summaryrefslogtreecommitdiff
path: root/indra/llcommon/lluuid.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-06-12 17:04:34 -0700
committerGitHub <noreply@github.com>2024-06-12 17:04:34 -0700
commit100ebbab2437de7f5d124a0d7b8279a7a7b57656 (patch)
treee8b4200dae16e89698c2f3eadae05634041681a1 /indra/llcommon/lluuid.cpp
parentf5e2708a0fc4e08d3d0a5dc393bbd4bac09e1c55 (diff)
parentae74ca80692c8bcf157e903033fcfa1778706d64 (diff)
Merge pull request #1745 from secondlife/project/gltf_development
move project/gltf development to develop
Diffstat (limited to 'indra/llcommon/lluuid.cpp')
-rw-r--r--indra/llcommon/lluuid.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp
index ab66fa6ddc..3b37365ec7 100644
--- a/indra/llcommon/lluuid.cpp
+++ b/indra/llcommon/lluuid.cpp
@@ -211,20 +211,20 @@ std::string LLUUID::asString() const
return str;
}
-BOOL LLUUID::set(const char* in_string, BOOL emit)
+bool LLUUID::set(const char* in_string, bool emit)
{
return set(ll_safe_string(in_string), emit);
}
-BOOL LLUUID::set(const std::string& in_string, BOOL emit)
+bool LLUUID::set(const std::string& in_string, bool emit)
{
- BOOL broken_format = FALSE;
+ bool broken_format = false;
// empty strings should make NULL uuid
if (in_string.empty())
{
setNull();
- return TRUE;
+ return true;
}
if (in_string.length() != (UUID_STR_LENGTH - 1)) /* Flawfinder: ignore */
@@ -237,7 +237,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit)
{
LL_WARNS() << "Warning! Using broken UUID string format" << LL_ENDL;
}
- broken_format = TRUE;
+ broken_format = true;
}
else
{
@@ -248,7 +248,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit)
LL_WARNS() << "Bad UUID string: " << in_string << LL_ENDL;
}
setNull();
- return FALSE;
+ return false;
}
}
@@ -287,7 +287,7 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit)
LL_WARNS() << "Invalid UUID string character" << LL_ENDL;
}
setNull();
- return FALSE;
+ return false;
}
mData[i] = mData[i] << 4;
@@ -312,27 +312,27 @@ BOOL LLUUID::set(const std::string& in_string, BOOL emit)
LL_WARNS() << "Invalid UUID string character" << LL_ENDL;
}
setNull();
- return FALSE;
+ return false;
}
cur_pos++;
}
- return TRUE;
+ return true;
}
-BOOL LLUUID::validate(const std::string& in_string)
+bool LLUUID::validate(const std::string& in_string)
{
- BOOL broken_format = FALSE;
+ bool broken_format = false;
if (in_string.length() != (UUID_STR_LENGTH - 1)) /* Flawfinder: ignore */
{
// I'm a moron. First implementation didn't have the right UUID format.
if (in_string.length() == (UUID_STR_LENGTH - 2)) /* Flawfinder: ignore */
{
- broken_format = TRUE;
+ broken_format = true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -360,7 +360,7 @@ BOOL LLUUID::validate(const std::string& in_string)
}
else
{
- return FALSE;
+ return false;
}
cur_pos++;
@@ -376,11 +376,11 @@ BOOL LLUUID::validate(const std::string& in_string)
}
else
{
- return FALSE;
+ return false;
}
cur_pos++;
}
- return TRUE;
+ return true;
}
const LLUUID& LLUUID::operator^=(const LLUUID& rhs)
@@ -510,7 +510,7 @@ S32 LLUUID::getNodeID(unsigned char* node_id)
}
#elif LL_DARWIN
-// Mac OS X version of the UUID generation code...
+// macOS version of the UUID generation code...
/*
* Get an ethernet hardware address, if we can find it...
*/
@@ -736,12 +736,12 @@ void LLUUID::getCurrentTime(uuid_time_t* timestamp)
static uuid_time_t time_last;
static U32 uuids_this_tick;
- static BOOL init = FALSE;
+ static bool init = false;
if (!init) {
getSystemTime(&time_last);
uuids_this_tick = uuids_per_tick;
- init = TRUE;
+ init = true;
mMutex = new LLMutex();
}
@@ -889,11 +889,11 @@ U32 LLUUID::getRandomSeed()
return U32(seed64) ^ U32(seed64 >> 32);
}
-BOOL LLUUID::parseUUID(const std::string& buf, LLUUID* value)
+bool LLUUID::parseUUID(const std::string& buf, LLUUID* value)
{
if (buf.empty() || value == NULL)
{
- return FALSE;
+ return false;
}
std::string temp(buf);
@@ -901,9 +901,9 @@ BOOL LLUUID::parseUUID(const std::string& buf, LLUUID* value)
if (LLUUID::validate(temp))
{
value->set(temp);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//static
@@ -989,7 +989,7 @@ bool LLUUID::operator!=(const LLUUID& rhs) const
}
*/
-BOOL LLUUID::notNull() const
+bool LLUUID::notNull() const
{
U32* word = (U32*)mData;
return (word[0] | word[1] | word[2] | word[3]) > 0;
@@ -997,10 +997,10 @@ BOOL LLUUID::notNull() const
// Faster than == LLUUID::null because doesn't require
// as much memory access.
-BOOL LLUUID::isNull() const
+bool LLUUID::isNull() const
{
U32* word = (U32*)mData;
- // If all bits are zero, return !0 == TRUE
+ // If all bits are zero, return !0 == true
return !(word[0] | word[1] | word[2] | word[3]);
}