summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsdutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llsdutil.cpp')
-rw-r--r--indra/llcommon/llsdutil.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index e98fc0285a..4d5fb0d818 100644
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
@@ -1,4 +1,4 @@
-/**
+/**
* @file llsdutil.cpp
* @author Phoenix
* @date 2006-05-24
@@ -7,21 +7,21 @@
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -161,7 +161,7 @@ LLSD ll_binary_from_string(const LLSD& sd)
char* ll_print_sd(const LLSD& sd)
{
const U32 bufferSize = 10 * 1024;
- static char buffer[bufferSize];
+ static char buffer[bufferSize + 1];
std::ostringstream stream;
//stream.rdbuf()->pubsetbuf(buffer, bufferSize);
stream << LLSDOStreamer<LLSDXMLFormatter>(sd);
@@ -183,7 +183,7 @@ char* ll_pretty_print_sd_ptr(const LLSD* sd)
char* ll_pretty_print_sd(const LLSD& sd)
{
const U32 bufferSize = 100 * 1024;
- static char buffer[bufferSize];
+ static char buffer[bufferSize + 1];
std::ostringstream stream;
//stream.rdbuf()->pubsetbuf(buffer, bufferSize);
stream << LLSDOStreamer<LLSDXMLFormatter>(sd, LLSDFormatter::OPTIONS_PRETTY);
@@ -324,7 +324,7 @@ BOOL compare_llsd_with_template(
return TRUE;
}
-// filter_llsd_with_template() is a direct clone (copy-n-paste) of
+// filter_llsd_with_template() is a direct clone (copy-n-paste) of
// compare_llsd_with_template with the following differences:
// (1) bool vs BOOL return types
// (2) A map with the key value "*" is a special value and maps any key in the
@@ -386,7 +386,7 @@ bool filter_llsd_with_template(
else
{
// Traditional compare_llsd_with_template matching
-
+
for (template_iter = template_llsd.beginArray();
template_iter != template_llsd.endArray() &&
test_iter != llsd_to_test.endArray();
@@ -417,7 +417,7 @@ bool filter_llsd_with_template(
else if (llsd_to_test.isMap())
{
resultant_llsd = LLSD::emptyMap();
-
+
//now we loop over the keys of the two maps
//any excess is taken from the template
//excess is ignored in the test
@@ -464,7 +464,7 @@ bool filter_llsd_with_template(
{
LLSD sub_value;
LLSD::map_const_iterator test_iter;
-
+
for (test_iter = llsd_to_test.beginMap();
test_iter != llsd_to_test.endMap();
++test_iter)
@@ -944,9 +944,9 @@ LLSD drill(const LLSD& blob, const LLSD& path)
} // namespace llsd
-// Construct a deep partial clone of of an LLSD object. primitive types share
+// Construct a deep partial clone of of an LLSD object. primitive types share
// references, however maps, arrays and binary objects are duplicated. An optional
-// filter may be include to exclude/include keys in a map.
+// filter may be include to exclude/include keys in a map.
LLSD llsd_clone(LLSD value, LLSD filter)
{
LL_PROFILE_ZONE_SCOPED