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] == '('))

View File

@@ -957,13 +957,18 @@ LLStringUtil::size_type LLStringUtil::getSubstitution(const std::string& instr,
{
const std::string delims (",");
// Find the first ]
size_type pos2 = instr.find(']', start);
// Find the first [
size_type pos1 = instr.find('[', start);
if (pos1 == std::string::npos)
return std::string::npos;
//Find the first ] after the initial [
size_type pos2 = instr.find(']', pos1);
if (pos2 == std::string::npos)
return std::string::npos;
// Find the last [ before ]
size_type pos1 = instr.find_last_of('[', pos2-1);
// Find the last [ before ] in case of nested [[]]
pos1 = instr.find_last_of('[', pos2-1);
if (pos1 == std::string::npos || pos1 < start)
return std::string::npos;

View File

@@ -202,9 +202,9 @@ void LLWorkerThread::WorkRequest::finishRequest(bool completed)
LLWorkerClass::LLWorkerClass(LLWorkerThread* workerthread, const std::string& name)
: mWorkerThread(workerthread),
mRequestPriority(LLWorkerThread::PRIORITY_NORMAL),
mWorkerClassName(name),
mRequestHandle(LLWorkerThread::nullHandle()),
mRequestPriority(LLWorkerThread::PRIORITY_NORMAL),
mWorkFlags(0)
{
if (!mWorkerThread)

View File

@@ -109,6 +109,7 @@ const U64 GP_LAND_ALLOW_FLY = 0x1 << 24; // Bypass Fly Restriction
const U64 GP_LAND_ALLOW_CREATE = 0x1 << 25; // Bypass Create/Edit Objects Restriction
const U64 GP_LAND_ALLOW_LANDMARK = 0x1 << 26; // Bypass Landmark Restriction
const U64 GP_LAND_ALLOW_SET_HOME = 0x1 << 28; // Bypass Set Home Point Restriction
const U64 GP_LAND_ALLOW_HOLD_EVENT = 0x1LL << 41; // Allowed to hold events on group-owned land
// Parcel Access
const U64 GP_LAND_MANAGE_ALLOWED = 0x1 << 29; // Manage Allowed List