Buncha pointless sync and cleanup
This commit is contained in:
@@ -1033,6 +1033,7 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
|
||||
std::string chat_text = chat_step->mChatText;
|
||||
// Don't animate the nodding, as this might not blend with
|
||||
// other playing animations.
|
||||
|
||||
const BOOL animate = FALSE;
|
||||
|
||||
if ( cmd_line_chat(chat_text, CHAT_TYPE_NORMAL))
|
||||
@@ -1097,20 +1098,15 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
|
||||
LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
|
||||
S32 size = file.getSize();
|
||||
|
||||
char* buffer = new char[size+1];
|
||||
if (buffer == NULL)
|
||||
{
|
||||
LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
std::vector<char> buffer(size+1);
|
||||
|
||||
file.read((U8*)buffer, size); /* Flawfinder: ignore */
|
||||
file.read((U8*)&buffer[0], size);
|
||||
// ensure there's a trailing NULL so strlen will work.
|
||||
buffer[size] = '\0';
|
||||
|
||||
LLMultiGesture* gesture = new LLMultiGesture();
|
||||
|
||||
LLDataPackerAsciiBuffer dp(buffer, size+1);
|
||||
LLDataPackerAsciiBuffer dp(&buffer[0], size+1);
|
||||
BOOL ok = gesture->deserialize(dp);
|
||||
|
||||
if (ok)
|
||||
@@ -1182,9 +1178,6 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
|
||||
delete gesture;
|
||||
gesture = NULL;
|
||||
}
|
||||
|
||||
delete [] buffer;
|
||||
buffer = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1461,7 +1454,7 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str)
|
||||
#ifdef MATCH_COMMON_CHARS
|
||||
if (!rest_of_match.empty())
|
||||
{
|
||||
*out_str = in_str + rest_of_match;
|
||||
*out_str = in_str+rest_of_match;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user