Shuffled LL_COMMON_API around in spots to match v2

Added llformat_to_utf8
Added LLProcessLauncher::getExecutable()
LLStringTableEntry() ctor and dtor definitions moved from .h to .cpp
(should be safe)
This commit is contained in:
Shyotl
2011-05-15 22:47:23 -05:00
parent 51338470b5
commit fe372028dc
17 changed files with 107 additions and 49 deletions

View File

@@ -49,11 +49,11 @@
#endif
#if STRING_TABLE_HASH_MAP
#if LL_WINDOWS
#include <hash_map>
#else
#include <ext/hash_map>
#endif
# if LL_WINDOWS
# include <hash_map>
# else
# include <ext/hash_map>
# endif
#endif
const U32 MAX_STRINGS_LENGTH = 256;
@@ -61,21 +61,9 @@ const U32 MAX_STRINGS_LENGTH = 256;
class LL_COMMON_API LLStringTableEntry
{
public:
LLStringTableEntry(const char *str)
: mString(NULL), mCount(1)
{
// Copy string
U32 length = (U32)strlen(str) + 1; /*Flawfinder: ignore*/
length = llmin(length, MAX_STRINGS_LENGTH);
mString = new char[length];
strncpy(mString, str, length); /*Flawfinder: ignore*/
mString[length - 1] = 0;
}
~LLStringTableEntry()
{
delete [] mString;
mCount = 0;
}
LLStringTableEntry(const char *str);
~LLStringTableEntry();
void incCount() { mCount++; }
BOOL decCount() { return --mCount; }