summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorBrian McGroarty <soft@lindenlab.com>2008-05-07 17:17:42 +0000
committerBrian McGroarty <soft@lindenlab.com>2008-05-07 17:17:42 +0000
commite1e1212daae33723e7da325f295a5c3a6bb78979 (patch)
tree95139904e71995519db2fc6e056940b2f40e73a3 /indra/llcommon
parent41927004751731d2d0cb74989ded36878292ee4e (diff)
QAR-520 maintenance-7 merge -- svn merge -r 84923:86093 svn+ssh://svn.lindenlab.com/svn/linden/qa/maintenance-7-sandbox-84884 -- dataserver-is-deprecated
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llapp.cpp1
-rw-r--r--indra/llcommon/llerror.cpp15
-rw-r--r--indra/llcommon/lllslconstants.h3
-rw-r--r--indra/llcommon/llstring.h116
4 files changed, 14 insertions, 121 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp
index d034334aab..2c7c7e38a4 100644
--- a/indra/llcommon/llapp.cpp
+++ b/indra/llcommon/llapp.cpp
@@ -492,6 +492,7 @@ void LLApp::setDefaultChildCallback(LLAppChildCallback callback)
pid_t LLApp::fork()
{
+ fflush(NULL); // flush all buffers before the child inherits them
pid_t pid = ::fork();
if( pid < 0 )
{
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 13bf368334..057b1bb417 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1006,18 +1006,15 @@ namespace LLError
<< "(" << site.mLine << ") : ";
}
- if (message.find(functionName(site.mFunction)) == std::string::npos)
- {
#if LL_WINDOWS
- // DevStudio: __FUNCTION__ already includes the full class name
+ // DevStudio: __FUNCTION__ already includes the full class name
#else
- if (site.mClassInfo != typeid(NoClassInfo))
- {
- prefix << className(site.mClassInfo) << "::";
- }
- #endif
- prefix << site.mFunction << ": ";
+ if (site.mClassInfo != typeid(NoClassInfo))
+ {
+ prefix << className(site.mClassInfo) << "::";
}
+ #endif
+ prefix << site.mFunction << ": ";
prefix << message;
message = prefix.str();
diff --git a/indra/llcommon/lllslconstants.h b/indra/llcommon/lllslconstants.h
index e4c83582ce..12467e4e63 100644
--- a/indra/llcommon/lllslconstants.h
+++ b/indra/llcommon/lllslconstants.h
@@ -181,4 +181,7 @@ const S32 OBJECT_OWNER = 6;
const S32 OBJECT_GROUP = 7;
const S32 OBJECT_CREATOR = 8;
+// llTextBox() magic token string - yes this is a hack. sue me.
+const std::string TEXTBOX_MAGIC_TOKEN = "!!llTextBox!!";
+
#endif
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 88d7e88edc..8a1e1fe8cb 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -39,15 +39,8 @@
const char LL_UNKNOWN_CHAR = '?';
-class LLVector3;
-class LLVector3d;
-class LLQuaternion;
-class LLUUID;
-class LLColor4;
-class LLColor4U;
-
-#if (LL_DARWIN || LL_SOLARIS || (LL_LINUX && __GNUC__ > 2))
-// Template specialization of char_traits for U16s. Only necessary on Mac for now (exists on Windows, unused/broken on Linux/gcc2.95)
+#if LL_DARWIN || LL_LINUX || LL_SOLARIS
+// Template specialization of char_traits for U16s. Only necessary on Mac and Linux (exists on Windows already)
namespace std
{
template<>
@@ -166,13 +159,13 @@ public:
// but it might be worthwhile to just go with two implementations (LLString and LLWString) of
// an interface class, unless we can think of a good reason to have a std::basic_string polymorphic base
-//****************************************************************
+// ****************************************************************
// NOTA BENE: do *NOT* dynamically allocate memory inside of LLStringBase as the {*()^#%*)#%W^*)#%*)STL implentation
// of basic_string doesn't provide a virtual destructor. If we need to allocate resources specific to LLString
// then we should either customize std::basic_string to linden::basic_string or change LLString to be a wrapper
// that contains an instance of std::basic_string. Similarly, overriding methods defined in std::basic_string will *not*
// be called in a polymorphic manner (passing an instance of basic_string to a particular function)
-//****************************************************************
+// ****************************************************************
template <class T>
class LLStringBase : public std::basic_string<T>
@@ -196,35 +189,6 @@ public:
LLStringBase(const T* s);
LLStringBase(const T* s, size_type n);
LLStringBase(const T* s, size_type pos, size_type n );
-
-#if LL_LINUX || LL_SOLARIS
- void clear() { assign(null); }
-
- LLStringBase<T>& assign(const T* s);
- LLStringBase<T>& assign(const T* s, size_type n);
- LLStringBase<T>& assign(const LLStringBase& s);
- LLStringBase<T>& assign(size_type n, const T& c);
- LLStringBase<T>& assign(const T* a, const T* b);
- LLStringBase<T>& assign(typename LLStringBase<T>::iterator &it1, typename LLStringBase<T>::iterator &it2);
- LLStringBase<T>& assign(typename LLStringBase<T>::const_iterator &it1, typename LLStringBase<T>::const_iterator &it2);
-
- // workaround for bug in gcc2 STL headers.
- #if ((__GNUC__ <= 2) && (!defined _STLPORT_VERSION))
- const T* c_str () const
- {
- if (length () == 0)
- {
- static const T zero = 0;
- return &zero;
- }
-
- //terminate ();
- { string_char_traits<T>::assign(const_cast<T*>(data())[length()], string_char_traits<T>::eos()); }
-
- return data ();
- }
- #endif
-#endif
bool operator==(const T* _Right) const { return _Right ? (std::basic_string<T>::compare(_Right) == 0) : this->empty(); }
@@ -787,78 +751,6 @@ LLStringBase<T>::LLStringBase(const T* s, size_type pos, size_type n ) : std::ba
}
}
-#if LL_LINUX || LL_SOLARIS
-template<class T>
-LLStringBase<T>& LLStringBase<T>::assign(const T* s)
-{
- if (s)
- {
- std::basic_string<T>::assign(s);
- }
- else
- {
- assign(LLStringBase<T>::null);
- }
- return *this;
-}
-
-template<class T>
-LLStringBase<T>& LLStringBase<T>::assign(const T* s, size_type n)
-{
- if (s)
- {
- std::basic_string<T>::assign(s, n);
- }
- else
- {
- assign(LLStringBase<T>::null);
- }
- return *this;
-}
-
-template<class T>
-LLStringBase<T>& LLStringBase<T>::assign(const LLStringBase<T>& s)
-{
- std::basic_string<T>::assign(s);
- return *this;
-}
-
-template<class T>
-LLStringBase<T>& LLStringBase<T>::assign(size_type n, const T& c)
-{
- std::basic_string<T>::assign(n, c);
- return *this;
-}
-
-template<class T>
-LLStringBase<T>& LLStringBase<T>::assign(const T* a, const T* b)
-{
- if (a > b)
- assign(LLStringBase<T>::null);
- else
- assign(a, (size_type) (b-a));
- return *this;
-}
-
-template<class T>
-LLStringBase<T>& LLStringBase<T>::assign(typename LLStringBase<T>::iterator &it1, typename LLStringBase<T>::iterator &it2)
-{
- assign(LLStringBase<T>::null);
- while(it1 != it2)
- *this += *it1++;
- return *this;
-}
-
-template<class T>
-LLStringBase<T>& LLStringBase<T>::assign(typename LLStringBase<T>::const_iterator &it1, typename LLStringBase<T>::const_iterator &it2)
-{
- assign(LLStringBase<T>::null);
- while(it1 != it2)
- *this += *it1++;
- return *this;
-}
-#endif
-
//static
template<class T>
void LLStringBase<T>::toUpper(std::basic_string<T>& string)