Misc little tidbits from V3.

This commit is contained in:
Shyotl
2011-09-20 22:16:00 -05:00
parent 587a687ac6
commit 2b69eb9902
7 changed files with 39 additions and 22 deletions

View File

@@ -1454,12 +1454,9 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
}
case LLSD::TypeUUID:
{
ostr.put('u');
LLUUID d = data.asUUID();
ostr.write((const char*)(&(d.mData)), UUID_BYTES);
ostr.write((const char*)(&(data.asUUID().mData)), UUID_BYTES);
break;
}
case LLSD::TypeString:
ostr.put('s');
@@ -1512,7 +1509,7 @@ void LLSDBinaryFormatter::formatString(
*/
int deserialize_string(std::istream& istr, std::string& value, S32 max_bytes)
{
char c = istr.get();
int c = istr.get();
if(istr.fail())
{
// No data in stream, bail out but mention the character we
@@ -1554,7 +1551,7 @@ int deserialize_string_delim(
while (true)
{
char next_char = istr.get();
int next_byte = istr.get();
++count;
if(istr.fail())
@@ -1563,6 +1560,8 @@ int deserialize_string_delim(
value = write_buffer.str();
return LLSDParser::PARSE_FAILURE;
}
char next_char = (char)next_byte; // Now that we know it's not EOF
if(found_escape)
{
@@ -1651,7 +1650,7 @@ int deserialize_string_raw(
char buf[BUF_LEN]; /* Flawfinder: ignore */
istr.get(buf, BUF_LEN - 1, ')');
count += istr.gcount();
char c = istr.get();
int c = istr.get();
c = istr.get();
count += 2;
if(((c == '"') || (c == '\'')) && (buf[0] == '('))