summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/is_approx_equal_fraction.h4
-rw-r--r--indra/llcommon/llcallbacklist.cpp2
-rw-r--r--indra/llcommon/llmainthreadtask.h2
-rw-r--r--indra/llcommon/llstring.h118
4 files changed, 63 insertions, 63 deletions
diff --git a/indra/llcommon/is_approx_equal_fraction.h b/indra/llcommon/is_approx_equal_fraction.h
index 4a9b2e2725..e86d58b70f 100644
--- a/indra/llcommon/is_approx_equal_fraction.h
+++ b/indra/llcommon/is_approx_equal_fraction.h
@@ -45,7 +45,7 @@
template <typename FTYPE>
inline BOOL is_approx_equal_fraction_impl(FTYPE x, FTYPE y, U32 frac_bits)
{
- BOOL ret = TRUE;
+ BOOL ret = true;
FTYPE diff = (FTYPE) fabs(x - y);
S32 diffInt = (S32) diff;
@@ -58,7 +58,7 @@ inline BOOL is_approx_equal_fraction_impl(FTYPE x, FTYPE y, U32 frac_bits)
// based on the number of bits used for packing decimal portion.
if (diffInt != 0 || diffFracTolerance > 1)
{
- ret = FALSE;
+ ret = false;
}
return ret;
diff --git a/indra/llcommon/llcallbacklist.cpp b/indra/llcommon/llcallbacklist.cpp
index 4ccf08cbbb..3b63d8f95a 100644
--- a/indra/llcommon/llcallbacklist.cpp
+++ b/indra/llcommon/llcallbacklist.cpp
@@ -194,7 +194,7 @@ private:
BOOL tick()
{
mCallable();
- return TRUE;
+ return true;
}
nullary_func_t mCallable;
diff --git a/indra/llcommon/llmainthreadtask.h b/indra/llcommon/llmainthreadtask.h
index d509b687c0..878f57cab6 100644
--- a/indra/llcommon/llmainthreadtask.h
+++ b/indra/llcommon/llmainthreadtask.h
@@ -85,7 +85,7 @@ private:
// obtained by get_future()
mTask();
// tell LLEventTimer we're done (one shot)
- return TRUE;
+ return true;
}
// Given arbitrary CALLABLE, which might be a lambda, how are we
// supposed to obtain its signature for std::packaged_task? It seems
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 66ee42af2a..3620a5b211 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -314,7 +314,7 @@ public:
static void toLower(string_type& string);
// True if this is the head of s.
- static BOOL isHead( const string_type& string, const T* s );
+ static bool isHead( const string_type& string, const T* s );
/**
* @brief Returns true if string starts with substr
@@ -356,7 +356,7 @@ public:
static void replaceChar( string_type& string, T target, T replacement );
static void replaceString( string_type& string, string_type target, string_type replacement );
- static BOOL containsNonprintable(const string_type& string);
+ static bool containsNonprintable(const string_type& string);
static void stripNonprintable(string_type& string);
/**
@@ -382,15 +382,15 @@ public:
static void _makeASCII(string_type& string);
// Conversion to other data types
- static BOOL convertToBOOL(const string_type& string, BOOL& value);
- static BOOL convertToU8(const string_type& string, U8& value);
- static BOOL convertToS8(const string_type& string, S8& value);
- static BOOL convertToS16(const string_type& string, S16& value);
- static BOOL convertToU16(const string_type& string, U16& value);
- static BOOL convertToU32(const string_type& string, U32& value);
- static BOOL convertToS32(const string_type& string, S32& value);
- static BOOL convertToF32(const string_type& string, F32& value);
- static BOOL convertToF64(const string_type& string, F64& value);
+ static bool convertToBOOL(const string_type& string, BOOL& value);
+ static bool convertToU8(const string_type& string, U8& value);
+ static bool convertToS8(const string_type& string, S8& value);
+ static bool convertToS16(const string_type& string, S16& value);
+ static bool convertToU16(const string_type& string, U16& value);
+ static bool convertToU32(const string_type& string, U32& value);
+ static bool convertToS32(const string_type& string, S32& value);
+ static bool convertToF32(const string_type& string, F32& value);
+ static bool convertToF64(const string_type& string, F64& value);
/////////////////////////////////////////////////////////////////////////////////////////
// Utility functions for working with char*'s and strings
@@ -415,7 +415,7 @@ public:
static S32 compareDictInsensitive(const string_type& a, const string_type& b);
// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
- static BOOL precedesDict( const string_type& a, const string_type& b );
+ static bool precedesDict( const string_type& a, const string_type& b );
// A replacement for strncpy.
// If the dst buffer is dst_size bytes long or more, ensures that dst is null terminated and holds
@@ -1362,7 +1362,7 @@ S32 LLStringUtilBase<T>::compareDictInsensitive(const string_type& astr, const s
// Puts compareDict() in a form appropriate for LL container classes to use for sorting.
// static
template<class T>
-BOOL LLStringUtilBase<T>::precedesDict( const string_type& a, const string_type& b )
+bool LLStringUtilBase<T>::precedesDict( const string_type& a, const string_type& b )
{
if( a.size() && b.size() )
{
@@ -1595,10 +1595,10 @@ void LLStringUtilBase<T>::replaceTabsWithSpaces( string_type& str, size_type spa
//static
template<class T>
-BOOL LLStringUtilBase<T>::containsNonprintable(const string_type& string)
+bool LLStringUtilBase<T>::containsNonprintable(const string_type& string)
{
const char MIN = 32;
- BOOL rv = false;
+ bool rv = false;
for (size_type i = 0; i < string.size(); i++)
{
if(string[i] < MIN)
@@ -1732,12 +1732,12 @@ void LLStringUtilBase<T>::copyInto(string_type& dst, const string_type& src, siz
// True if this is the head of s.
//static
template<class T>
-BOOL LLStringUtilBase<T>::isHead( const string_type& string, const T* s )
-{
+bool LLStringUtilBase<T>::isHead( const string_type& string, const T* s )
+{
if( string.empty() )
{
// Early exit
- return FALSE;
+ return false;
}
else
{
@@ -1804,11 +1804,11 @@ auto LLStringUtilBase<T>::getenv(const std::string& key, const string_type& dflt
}
template<class T>
-BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
+bool LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
{
if( string.empty() )
{
- return FALSE;
+ return false;
}
string_type temp( string );
@@ -1821,8 +1821,8 @@ BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
(temp == "true") ||
(temp == "True") )
{
- value = TRUE;
- return TRUE;
+ value = true;
+ return true;
}
else
if(
@@ -1833,71 +1833,71 @@ BOOL LLStringUtilBase<T>::convertToBOOL(const string_type& string, BOOL& value)
(temp == "false") ||
(temp == "False") )
{
- value = FALSE;
- return TRUE;
+ value = false;
+ return true;
}
- return FALSE;
+ return false;
}
template<class T>
-BOOL LLStringUtilBase<T>::convertToU8(const string_type& string, U8& value)
+bool LLStringUtilBase<T>::convertToU8(const string_type& string, U8& value)
{
S32 value32 = 0;
- BOOL success = convertToS32(string, value32);
+ bool success = convertToS32(string, value32);
if( success && (U8_MIN <= value32) && (value32 <= U8_MAX) )
{
value = (U8) value32;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
template<class T>
-BOOL LLStringUtilBase<T>::convertToS8(const string_type& string, S8& value)
+bool LLStringUtilBase<T>::convertToS8(const string_type& string, S8& value)
{
S32 value32 = 0;
- BOOL success = convertToS32(string, value32);
+ bool success = convertToS32(string, value32);
if( success && (S8_MIN <= value32) && (value32 <= S8_MAX) )
{
value = (S8) value32;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
template<class T>
-BOOL LLStringUtilBase<T>::convertToS16(const string_type& string, S16& value)
+bool LLStringUtilBase<T>::convertToS16(const string_type& string, S16& value)
{
S32 value32 = 0;
- BOOL success = convertToS32(string, value32);
+ bool success = convertToS32(string, value32);
if( success && (S16_MIN <= value32) && (value32 <= S16_MAX) )
{
value = (S16) value32;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
template<class T>
-BOOL LLStringUtilBase<T>::convertToU16(const string_type& string, U16& value)
+bool LLStringUtilBase<T>::convertToU16(const string_type& string, U16& value)
{
S32 value32 = 0;
- BOOL success = convertToS32(string, value32);
+ bool success = convertToS32(string, value32);
if( success && (U16_MIN <= value32) && (value32 <= U16_MAX) )
{
value = (U16) value32;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
template<class T>
-BOOL LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value)
+bool LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value)
{
if( string.empty() )
{
- return FALSE;
+ return false;
}
string_type temp( string );
@@ -1907,17 +1907,17 @@ BOOL LLStringUtilBase<T>::convertToU32(const string_type& string, U32& value)
if(i_stream >> v)
{
value = v;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
template<class T>
-BOOL LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value)
+bool LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value)
{
if( string.empty() )
{
- return FALSE;
+ return false;
}
string_type temp( string );
@@ -1930,34 +1930,34 @@ BOOL LLStringUtilBase<T>::convertToS32(const string_type& string, S32& value)
//if((LONG_MAX == v) || (LONG_MIN == v))
//{
// // Underflow or overflow
- // return FALSE;
+ // return false;
//}
value = v;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
template<class T>
-BOOL LLStringUtilBase<T>::convertToF32(const string_type& string, F32& value)
+bool LLStringUtilBase<T>::convertToF32(const string_type& string, F32& value)
{
F64 value64 = 0.0;
- BOOL success = convertToF64(string, value64);
+ bool success = convertToF64(string, value64);
if( success && (-F32_MAX <= value64) && (value64 <= F32_MAX) )
{
value = (F32) value64;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
template<class T>
-BOOL LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value)
+bool LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value)
{
if( string.empty() )
{
- return FALSE;
+ return false;
}
string_type temp( string );
@@ -1970,13 +1970,13 @@ BOOL LLStringUtilBase<T>::convertToF64(const string_type& string, F64& value)
//if( ((-HUGE_VAL == v) || (HUGE_VAL == v))) )
//{
// // Underflow or overflow
- // return FALSE;
+ // return false;
//}
value = v;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
template<class T>