summaryrefslogtreecommitdiff
path: root/indra/lscript
diff options
context:
space:
mode:
Diffstat (limited to 'indra/lscript')
-rwxr-xr-xindra/lscript/lscript_compile/indra.l4
-rwxr-xr-xindra/lscript/lscript_compile/lscript_bytecode.cpp19
-rwxr-xr-xindra/lscript/lscript_compile/lscript_bytecode.h5
-rwxr-xr-xindra/lscript/lscript_compile/lscript_scope.h51
-rwxr-xr-xindra/lscript/lscript_compile/lscript_tree.h9
-rwxr-xr-xindra/lscript/lscript_execute.h65
-rwxr-xr-xindra/lscript/lscript_execute/llscriptresourceconsumer.cpp2
-rwxr-xr-xindra/lscript/lscript_execute/lscript_execute.cpp33
-rwxr-xr-xindra/lscript/lscript_execute/lscript_readlso.cpp4
-rwxr-xr-xindra/lscript/lscript_execute/lscript_readlso.h1
-rwxr-xr-xindra/lscript/lscript_library.h16
-rwxr-xr-xindra/lscript/lscript_library/lscript_alloc.cpp2
-rwxr-xr-xindra/lscript/lscript_library/lscript_library.cpp2
13 files changed, 103 insertions, 110 deletions
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 88dfc2e9f3..7772c95609 100755
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -25,7 +25,6 @@ FS (f|F)
#include "indra.y.hpp"
#include "lltimer.h"
#include "indra_constants.h"
-#include "llagentconstants.h"
#include "lllslconstants.h"
#include "lluuid.h"
#include "llassetstorage.h"
@@ -648,7 +647,8 @@ int yyerror(const char *fmt, ...);
"REGION_FLAG_SANDBOX" { count(); yylval.ival = REGION_FLAGS_SANDBOX; return(INTEGER_CONSTANT); }
"REGION_FLAG_DISABLE_COLLISIONS" { count(); yylval.ival = REGION_FLAGS_SKIP_COLLISIONS; return(INTEGER_CONSTANT); }
"REGION_FLAG_DISABLE_PHYSICS" { count(); yylval.ival = REGION_FLAGS_SKIP_PHYSICS; return(INTEGER_CONSTANT); }
-"REGION_FLAG_BLOCK_FLY" { count(); yylval.ival = REGION_FLAGS_BLOCK_FLY; return(INTEGER_CONSTANT); }
+"REGION_FLAG_BLOCK_FLY" { count(); yylval.ival = REGION_FLAGS_BLOCK_FLY; return(INTEGER_CONSTANT); }
+"REGION_FLAG_BLOCK_FLYOVER" { count(); yylval.ival = REGION_FLAGS_BLOCK_FLYOVER; return(INTEGER_CONSTANT); }
"REGION_FLAG_ALLOW_DIRECT_TELEPORT" { count(); yylval.ival = REGION_FLAGS_ALLOW_DIRECT_TELEPORT; return(INTEGER_CONSTANT); }
"REGION_FLAG_RESTRICT_PUSHOBJECT" { count(); yylval.ival = REGION_FLAGS_RESTRICT_PUSHOBJECT; return(INTEGER_CONSTANT); }
diff --git a/indra/lscript/lscript_compile/lscript_bytecode.cpp b/indra/lscript/lscript_compile/lscript_bytecode.cpp
index 95b2f35a94..667e5dafc1 100755
--- a/indra/lscript/lscript_compile/lscript_bytecode.cpp
+++ b/indra/lscript/lscript_compile/lscript_bytecode.cpp
@@ -40,8 +40,8 @@ LLScriptJumpTable::LLScriptJumpTable()
LLScriptJumpTable::~LLScriptJumpTable()
{
- mLabelMap.deleteAllData();
- mJumpMap.deleteAllData();
+ delete_and_clear(mLabelMap);
+ delete_and_clear(mJumpMap);
}
void LLScriptJumpTable::addLabel(char *name, S32 offset)
@@ -203,17 +203,14 @@ void LLScriptByteCodeChunk::addJump(char *name)
void LLScriptByteCodeChunk::connectJumps()
{
- char *jump;
- S32 offset, jumppos;
-
if (mJumpTable)
{
- for (jump = mJumpTable->mJumpMap.getFirstKey();
- jump;
- jump = mJumpTable->mJumpMap.getNextKey())
+ for(std::map<char *, S32 *>::iterator it = mJumpTable->mJumpMap.begin(), end_it = mJumpTable->mJumpMap.end();
+ it != end_it;
+ ++it)
{
- jumppos = *mJumpTable->mJumpMap[jump];
- offset = *mJumpTable->mLabelMap[jump] - jumppos;
+ S32 jumppos = *it->second;
+ S32 offset = *mJumpTable->mLabelMap[it->first] - jumppos;
jumppos = jumppos - 4;
integer2bytestream(mCodeChunk, jumppos, offset);
}
@@ -308,7 +305,7 @@ void LLScriptScriptCodeChunk::build(LLFILE *efp, LLFILE *bcfp)
if (fwrite(mCompleteCode, 1, mTotalSize, bcfp) != (size_t)mTotalSize)
{
- llwarns << "Short write" << llendl;
+ LL_WARNS() << "Short write" << LL_ENDL;
}
}
else
diff --git a/indra/lscript/lscript_compile/lscript_bytecode.h b/indra/lscript/lscript_compile/lscript_bytecode.h
index 0933c78b6f..1908bebcb9 100755
--- a/indra/lscript/lscript_compile/lscript_bytecode.h
+++ b/indra/lscript/lscript_compile/lscript_bytecode.h
@@ -29,6 +29,7 @@
#include "lscript_byteconvert.h"
#include "lscript_scope.h"
+#include <map>
class LLScriptJumpTable
{
@@ -39,8 +40,8 @@ public:
void addLabel(char *name, S32 offset);
void addJump(char *name, S32 offset);
- LLMap<char *, S32 *> mLabelMap;
- LLMap<char *, S32 *> mJumpMap;
+ std::map<char *, S32 *> mLabelMap;
+ std::map<char *, S32 *> mJumpMap;
};
class LLScriptByteCodeChunk
diff --git a/indra/lscript/lscript_compile/lscript_scope.h b/indra/lscript/lscript_compile/lscript_scope.h
index 5b2a73ad92..ffff91c81b 100755
--- a/indra/lscript/lscript_compile/lscript_scope.h
+++ b/indra/lscript/lscript_compile/lscript_scope.h
@@ -27,8 +27,8 @@
#ifndef LL_LSCRIPT_SCOPE_H
#define LL_LSCRIPT_SCOPE_H
-#include "string_table.h"
-#include "llmap.h"
+#include <map>
+#include "llstringtable.h"
#include "lscript_byteformat.h"
typedef enum e_lscript_identifier_type
@@ -301,13 +301,13 @@ public:
~LLScriptScope()
{
- mEntryMap.deleteAllData();
+ delete_and_clear(mEntryMap);
}
LLScriptScopeEntry *addEntry(const char *identifier, LSCRIPTIdentifierType idtype, LSCRIPTType type)
{
const char *name = mSTable->addString(identifier);
- if (!mEntryMap.checkData(name))
+ if (mEntryMap.find(name) == mEntryMap.end())
{
if (idtype == LIT_FUNCTION)
mEntryMap[name] = new LLScriptScopeEntry(name, idtype, type, mFunctionCount++);
@@ -324,18 +324,10 @@ public:
}
}
- BOOL checkEntry(const char *identifier)
+ bool checkEntry(const char *identifier)
{
const char *name = mSTable->addString(identifier);
- if (mEntryMap.checkData(name))
- {
- return TRUE;
- }
- else
- {
- // identifier already exists at this scope
- return FALSE;
- }
+ return mEntryMap.find(name) != mEntryMap.end();
}
LLScriptScopeEntry *findEntry(const char *identifier)
@@ -345,10 +337,11 @@ public:
while (scope)
{
- if (scope->mEntryMap.checkData(name))
+ entry_map_t::iterator found_it = mEntryMap.find(name);
+ if (found_it != mEntryMap.end())
{
// cool, we found it at this scope
- return scope->mEntryMap[name];
+ return found_it->second;
}
scope = scope->mParentScope;
}
@@ -362,24 +355,25 @@ public:
while (scope)
{
- if (scope->mEntryMap.checkData(name))
+ entry_map_t::iterator found_it = scope->mEntryMap.find(name);
+ if (found_it != scope->mEntryMap.end())
{
// need to check type, and if type is function we need to check both types
if (idtype == LIT_FUNCTION)
{
- if (scope->mEntryMap[name]->mIDType == LIT_FUNCTION)
+ if (found_it->second->mIDType == LIT_FUNCTION)
{
- return scope->mEntryMap[name];
+ return (found_it->second);
}
- else if (scope->mEntryMap[name]->mIDType == LIT_LIBRARY_FUNCTION)
+ else if (found_it->second->mIDType == LIT_LIBRARY_FUNCTION)
{
- return scope->mEntryMap[name];
+ return (found_it->second);
}
}
- else if (scope->mEntryMap[name]->mIDType == idtype)
+ else if (found_it->second->mIDType == idtype)
{
// cool, we found it at this scope
- return scope->mEntryMap[name];
+ return (found_it->second);
}
}
scope = scope->mParentScope;
@@ -392,11 +386,12 @@ public:
mParentScope = scope;
}
- LLMap<const char *, LLScriptScopeEntry *> mEntryMap;
- LLScriptScope *mParentScope;
- LLStringTable *mSTable;
- S32 mFunctionCount;
- S32 mStateCount;
+ typedef std::map<const char *, LLScriptScopeEntry *> entry_map_t;
+ entry_map_t mEntryMap;
+ LLScriptScope* mParentScope;
+ LLStringTable* mSTable;
+ S32 mFunctionCount;
+ S32 mStateCount;
};
extern LLStringTable *gScopeStringTable;
diff --git a/indra/lscript/lscript_compile/lscript_tree.h b/indra/lscript/lscript_compile/lscript_tree.h
index bf29f44518..047c220b17 100755
--- a/indra/lscript/lscript_compile/lscript_tree.h
+++ b/indra/lscript/lscript_compile/lscript_tree.h
@@ -29,7 +29,6 @@
#include "v3math.h"
#include "llquaternion.h"
-#include "linked_lists.h"
#include "lscript_error.h"
#include "lscript_typecheck.h"
#include "lscript_byteformat.h"
@@ -2304,20 +2303,20 @@ public:
LLScriptAllocationManager() {}
~LLScriptAllocationManager()
{
- mAllocationList.deleteAllData();
+ deleteAllocations();
}
void addAllocation(LLScriptFilePosition *ptr)
{
- mAllocationList.addData(ptr);
+ mAllocationList.push_front(ptr);
}
void deleteAllocations()
{
- mAllocationList.deleteAllData();
+ delete_and_clear(mAllocationList);
}
- LLLinkedList<LLScriptFilePosition> mAllocationList;
+ std::list<LLScriptFilePosition*> mAllocationList;
};
extern LLScriptAllocationManager *gAllocationManager;
diff --git a/indra/lscript/lscript_execute.h b/indra/lscript/lscript_execute.h
index fc491ead0f..576c2ca2b7 100755
--- a/indra/lscript/lscript_execute.h
+++ b/indra/lscript/lscript_execute.h
@@ -27,9 +27,10 @@
#ifndef LL_LSCRIPT_EXECUTE_H
#define LL_LSCRIPT_EXECUTE_H
+#include "stdtypes.h"
#include "lscript_byteconvert.h"
-#include "linked_lists.h"
#include "lscript_library.h"
+#include "llstl.h"
class LLTimer;
@@ -262,7 +263,7 @@ public:
S32 i, number = bytestream2integer(src, offset);
for (i = 0; i < number; i++)
{
- mEventDataList.addData(new LLScriptDataCollection(src, offset));
+ mEventDataList.push_front(new LLScriptDataCollection(src, offset));
}
}
@@ -271,32 +272,32 @@ public:
S32 i, number = bytestream2integer(src, offset);
for (i = 0; i < number; i++)
{
- mEventDataList.addData(new LLScriptDataCollection(src, offset));
+ mEventDataList.push_front(new LLScriptDataCollection(src, offset));
}
}
~LLScriptEventData()
{
- mEventDataList.deleteAllData();
+ delete_and_clear(mEventDataList);
}
void addEventData(LLScriptDataCollection *data)
{
- if (mEventDataList.getLength() < MAX_EVENTS_IN_QUEUE)
- mEventDataList.addDataAtEnd(data);
+ if (mEventDataList.size() < MAX_EVENTS_IN_QUEUE)
+ mEventDataList.push_back(data);
else
delete data;
}
LLScriptDataCollection *getNextEvent(LSCRIPTStateEventType type)
{
- LLScriptDataCollection *temp;
- for (temp = mEventDataList.getFirstData();
- temp;
- temp = mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventDataList.begin(), end_it = mEventDataList.end();
+ it != end_it;
+ ++it)
{
+ LLScriptDataCollection* temp = *it;
if (temp->mType == type)
{
- mEventDataList.removeCurrentData();
+ mEventDataList.erase(it);
return temp;
}
}
@@ -305,24 +306,24 @@ public:
LLScriptDataCollection *getNextEvent()
{
LLScriptDataCollection *temp;
- temp = mEventDataList.getFirstData();
+ temp = mEventDataList.front();
if (temp)
{
- mEventDataList.removeCurrentData();
+ mEventDataList.pop_front();
return temp;
}
return NULL;
}
void removeEventType(LSCRIPTStateEventType type)
{
- LLScriptDataCollection *temp;
- for (temp = mEventDataList.getFirstData();
- temp;
- temp = mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventDataList.begin(), end_it = mEventDataList.end();
+ it != end_it;
+ ++it)
{
- if (temp->mType == type)
+ if ((*it)->mType == type)
{
- mEventDataList.deleteCurrentData();
+ delete *it;
+ mEventDataList.erase(it);
}
}
}
@@ -332,12 +333,11 @@ public:
S32 size = 0;
// number in linked list
size += 4;
- LLScriptDataCollection *temp;
- for (temp = mEventDataList.getFirstData();
- temp;
- temp = mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventDataList.begin(), end_it = mEventDataList.end();
+ it != end_it;
+ ++it)
{
- size += temp->getSavedSize();
+ size += (*it)->getSavedSize();
}
return size;
}
@@ -346,19 +346,18 @@ public:
{
S32 offset = 0;
// number in linked list
- S32 number = mEventDataList.getLength();
+ S32 number = mEventDataList.size();
integer2bytestream(dest, offset, number);
- LLScriptDataCollection *temp;
- for (temp = mEventDataList.getFirstData();
- temp;
- temp = mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventDataList.begin(), end_it = mEventDataList.end();
+ it != end_it;
+ ++it)
{
- offset += temp->write2bytestream(dest + offset);
+ offset += (*it)->write2bytestream(dest + offset);
}
return offset;
}
- LLLinkedList<LLScriptDataCollection> mEventDataList;
+ std::list<LLScriptDataCollection*> mEventDataList;
};
class LLScriptExecute
@@ -474,9 +473,9 @@ public:
virtual ~LLScriptExecuteLSL2();
virtual S32 getVersion() const {return get_register(mBuffer, LREG_VN);}
- virtual void deleteAllEvents() {mEventData.mEventDataList.deleteAllData();}
+ virtual void deleteAllEvents() {delete_and_clear(mEventData.mEventDataList);}
virtual void addEvent(LLScriptDataCollection* event);
- virtual U32 getEventCount() {return mEventData.mEventDataList.getLength();}
+ virtual U32 getEventCount() {return mEventData.mEventDataList.size();}
virtual void removeEventType(LSCRIPTStateEventType event_type);
virtual S32 getFaults() {return get_register(mBuffer, LREG_FR);}
virtual void setFault(LSCRIPTRunTimeFaults fault) {set_fault(mBuffer, fault);}
diff --git a/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp b/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp
index 55d47b6de2..0ce5eb7dab 100755
--- a/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp
+++ b/indra/lscript/lscript_execute/llscriptresourceconsumer.cpp
@@ -56,7 +56,7 @@ bool LLScriptResourceConsumer::switchScriptResourcePools(LLScriptResourcePool& n
{
if (&new_pool == &LLScriptResourcePool::null)
{
- llwarns << "New pool is null" << llendl;
+ LL_WARNS() << "New pool is null" << LL_ENDL;
}
if (isInPool(new_pool))
diff --git a/indra/lscript/lscript_execute/lscript_execute.cpp b/indra/lscript/lscript_execute/lscript_execute.cpp
index b12d2e4a16..5eb7ffc5a9 100755
--- a/indra/lscript/lscript_execute/lscript_execute.cpp
+++ b/indra/lscript/lscript_execute/lscript_execute.cpp
@@ -35,7 +35,6 @@
#include "lscript_library.h"
#include "lscript_heapruntime.h"
#include "lscript_alloc.h"
-#include "llstat.h"
// Static
@@ -77,7 +76,7 @@ LLScriptExecuteLSL2::LLScriptExecuteLSL2(LLFILE *fp)
S32 pos = 0;
if (fread(&sizearray, 1, 4, fp) != 4)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS() << "Short read" << LL_ENDL;
filesize = 0;
} else {
filesize = bytestream2integer(sizearray, pos);
@@ -86,7 +85,7 @@ LLScriptExecuteLSL2::LLScriptExecuteLSL2(LLFILE *fp)
fseek(fp, 0, SEEK_SET);
if (fread(mBuffer, 1, filesize, fp) != filesize)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS() << "Short read" << LL_ENDL;
}
fclose(fp);
@@ -290,7 +289,7 @@ void LLScriptExecuteLSL2::init()
void LLScriptExecuteLSL2::recordBoundaryError( const LLUUID &id )
{
set_fault(mBuffer, LSRF_BOUND_CHECK_ERROR);
- llwarns << "Script boundary error for ID " << id << llendl;
+ LL_WARNS() << "Script boundary error for ID " << id << LL_ENDL;
}
@@ -418,10 +417,13 @@ void LLScriptExecuteLSL2::callEventHandler(LSCRIPTStateEventType event, const LL
void LLScriptExecuteLSL2::callQueuedEventHandler(LSCRIPTStateEventType event, const LLUUID &id, F32 time_slice)
{
S32 major_version = getMajorVersion();
- LLScriptDataCollection* eventdata;
- for (eventdata = mEventData.mEventDataList.getFirstData(); eventdata; eventdata = mEventData.mEventDataList.getNextData())
+ for (std::list<LLScriptDataCollection*>::iterator it = mEventData.mEventDataList.begin(), end_it = mEventData.mEventDataList.end();
+ it != end_it;
+ ++it)
{
+ LLScriptDataCollection* eventdata = *it;
+
if (eventdata->mType == event)
{
// push a zero to be popped
@@ -459,7 +461,8 @@ void LLScriptExecuteLSL2::callQueuedEventHandler(LSCRIPTStateEventType event, co
S32 opcode_start = get_state_event_opcoode_start(mBuffer, current_state, event);
set_ip(mBuffer, opcode_start);
- mEventData.mEventDataList.deleteCurrentData();
+ delete *it;
+ mEventData.mEventDataList.erase(it);
break;
}
}
@@ -514,7 +517,7 @@ void LLScriptExecuteLSL2::callNextQueuedEventHandler(U64 event_register, const L
}
else
{
- llwarns << "Somehow got an event that we're not registered for!" << llendl;
+ LL_WARNS() << "Somehow got an event that we're not registered for!" << LL_ENDL;
}
delete eventdata;
}
@@ -622,7 +625,7 @@ S32 LLScriptExecuteLSL2::writeState(U8 **dest, U32 header_size, U32 footer_size)
// registers
integer2bytestream(*dest, dest_offset, registers_size);
- // llinfos << "Writing CE: " << getCurrentEvents() << llendl;
+ // LL_INFOS() << "Writing CE: " << getCurrentEvents() << LL_ENDL;
bytestream2bytestream(*dest, dest_offset, mBuffer, src_offset, registers_size);
// heap
@@ -674,11 +677,11 @@ S32 LLScriptExecuteLSL2::readState(U8 *src)
// copy data into register area
bytestream2bytestream(mBuffer, dest_offset, src, src_offset, size);
-// llinfos << "Read CE: " << getCurrentEvents() << llendl;
+// LL_INFOS() << "Read CE: " << getCurrentEvents() << LL_ENDL;
if (get_register(mBuffer, LREG_TM) != TOP_OF_MEMORY)
{
- llwarns << "Invalid state. Top of memory register does not match"
- << " constant." << llendl;
+ LL_WARNS() << "Invalid state. Top of memory register does not match"
+ << " constant." << LL_ENDL;
reset_hp_to_safe_spot(mBuffer);
return -1;
}
@@ -4021,7 +4024,7 @@ void lscript_run(const std::string& filename, BOOL b_debug)
if (filename.empty())
{
- llerrs << "filename is NULL" << llendl;
+ LL_ERRS() << "filename is NULL" << LL_ENDL;
// Just reporting error is likely not enough. Need
// to check how to abort or error out gracefully
// from this function. XXXTBD
@@ -4046,8 +4049,8 @@ void lscript_run(const std::string& filename, BOOL b_debug)
F32 time = timer.getElapsedTimeF32();
F32 ips = execute->mInstructionCount / time;
- llinfos << execute->mInstructionCount << " instructions in " << time << " seconds" << llendl;
- llinfos << ips/1000 << "K instructions per second" << llendl;
+ LL_INFOS() << execute->mInstructionCount << " instructions in " << time << " seconds" << LL_ENDL;
+ LL_INFOS() << ips/1000 << "K instructions per second" << LL_ENDL;
printf("ip: 0x%X\n", get_register(execute->mBuffer, LREG_IP));
printf("sp: 0x%X\n", get_register(execute->mBuffer, LREG_SP));
printf("bp: 0x%X\n", get_register(execute->mBuffer, LREG_BP));
diff --git a/indra/lscript/lscript_execute/lscript_readlso.cpp b/indra/lscript/lscript_execute/lscript_readlso.cpp
index 6384a57100..7ec56c2409 100755
--- a/indra/lscript/lscript_execute/lscript_readlso.cpp
+++ b/indra/lscript/lscript_execute/lscript_readlso.cpp
@@ -37,7 +37,7 @@ LLScriptLSOParse::LLScriptLSOParse(LLFILE *fp)
S32 pos = 0;
if (fread(&sizearray, 1, 4, fp) != 4)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS() << "Short read" << LL_ENDL;
filesize = 0;
} else {
filesize = bytestream2integer(sizearray, pos);
@@ -46,7 +46,7 @@ LLScriptLSOParse::LLScriptLSOParse(LLFILE *fp)
fseek(fp, 0, SEEK_SET);
if (fread(mRawData, 1, filesize, fp) != filesize)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS() << "Short read" << LL_ENDL;
}
initOpCodePrinting();
diff --git a/indra/lscript/lscript_execute/lscript_readlso.h b/indra/lscript/lscript_execute/lscript_readlso.h
index a545a9daf8..f3b2b66746 100755
--- a/indra/lscript/lscript_execute/lscript_readlso.h
+++ b/indra/lscript/lscript_execute/lscript_readlso.h
@@ -28,7 +28,6 @@
#define LL_LSCRIPT_READLSO_H
#include "lscript_byteconvert.h"
-#include "linked_lists.h"
// list of op code print functions
void print_noop(LLFILE *fp, U8 *buffer, S32 &offset, S32 tabs);
diff --git a/indra/lscript/lscript_library.h b/indra/lscript/lscript_library.h
index 89a473a627..f3dbb09196 100755
--- a/indra/lscript/lscript_library.h
+++ b/indra/lscript/lscript_library.h
@@ -240,7 +240,7 @@ public:
mKey = new char[strlen(data.mKey) + 1]; /* Flawfinder: ignore */
if (mKey == NULL)
{
- llerrs << "Memory Allocation Failed" << llendl;
+ LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
strcpy(mKey, data.mKey); /* Flawfinder: ignore */
@@ -250,7 +250,7 @@ public:
mString = new char[strlen(data.mString) + 1]; /* Flawfinder: ignore */
if (mString == NULL)
{
- llerrs << "Memory Allocation Failed" << llendl;
+ LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
strcpy(mString, data.mString); /* Flawfinder: ignore */
@@ -275,7 +275,7 @@ public:
mKey = new char[strlen(temp) + 1]; /* Flawfinder: ignore */
if (mKey == NULL)
{
- llerrs << "Memory Allocation Failed" << llendl;
+ LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
strcpy(mKey, temp); /* Flawfinder: ignore */
@@ -287,7 +287,7 @@ public:
mString = new char[strlen(temp) + 1]; /* Flawfinder: ignore */
if (mString == NULL)
{
- llerrs << "Memory Allocation Failed" << llendl;
+ LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
strcpy(mString, temp); /* Flawfinder: ignore */
@@ -324,7 +324,7 @@ public:
mKey = new char[strlen(temp) + 1]; /* Flawfinder: ignore */
if (mKey == NULL)
{
- llerrs << "Memory Allocation Failed" << llendl;
+ LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
strcpy(mKey, temp); /* Flawfinder: ignore */
@@ -336,7 +336,7 @@ public:
mString = new char[strlen(temp) + 1]; /* Flawfinder: ignore */
if (mString == NULL)
{
- llerrs << "Memory Allocation Failed" << llendl;
+ LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
strcpy(mString, temp); /* Flawfinder: ignore */
@@ -364,7 +364,7 @@ public:
mString = new char[strlen(src) + 1]; /* Flawfinder: ignore */
if (mString == NULL)
{
- llerrs << "Memory Allocation Failed" << llendl;
+ LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
strcpy(mString, src); /* Flawfinder: ignore */
@@ -398,7 +398,7 @@ public:
mString = new char[strlen(string) + 1]; /* Flawfinder: ignore */
if (mString == NULL)
{
- llerrs << "Memory Allocation Failed" << llendl;
+ LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
strcpy(mString, string); /* Flawfinder: ignore */
diff --git a/indra/lscript/lscript_library/lscript_alloc.cpp b/indra/lscript/lscript_library/lscript_alloc.cpp
index 92b1ab70fb..62ba029e8a 100755
--- a/indra/lscript/lscript_library/lscript_alloc.cpp
+++ b/indra/lscript/lscript_library/lscript_alloc.cpp
@@ -435,7 +435,7 @@ S32 lsa_create_data_block(U8 **buffer, LLScriptLibData *data, S32 base_offset)
U8 *tbuff = new U8[size + listsize];
if (tbuff == NULL)
{
- llerrs << "Memory Allocation Failed" << llendl;
+ LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
}
memcpy(tbuff, *buffer, size); /*Flawfinder: ignore*/
memcpy(tbuff + size, listbuf, listsize); /*Flawfinder: ignore*/
diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp
index 7ffe53a307..84ce94eead 100755
--- a/indra/lscript/lscript_library/lscript_library.cpp
+++ b/indra/lscript/lscript_library/lscript_library.cpp
@@ -498,7 +498,7 @@ void LLScriptLibrary::assignExec(const char *name, void (*exec_func)(LLScriptLib
}
}
- llerrs << "Unknown LSL function in assignExec: " << name << llendl;
+ LL_ERRS() << "Unknown LSL function in assignExec: " << name << LL_ENDL;
}
void LLScriptLibData::print(std::ostream &s, BOOL b_prepend_comma)