From 3777dbb3d6ed9b3411eef71c10182afed19c974b Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 8 Dec 2023 23:57:40 +0000 Subject: More sl-20635 - moved new attachment data to AvatarAppearance message --- indra/llmessage/message.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/llmessage') diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 31acc65642..5de29ba66f 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -307,12 +307,15 @@ void LLMessageSystem::loadTemplateFile(const std::string& filename, bool failure LLTemplateTokenizer tokens(template_body); LLTemplateParser parsed(tokens); mMessageFileVersionNumber = parsed.getVersion(); + S32 count = 0; for(LLTemplateParser::message_iterator iter = parsed.getMessagesBegin(); iter != parsed.getMessagesEnd(); iter++) { addTemplate(*iter); + count++; } + LL_INFOS("Messaging") << "Read " << count << " messages from " << filename << LL_ENDL; } -- cgit v1.3 From da967da9c7aa0d88f478d476e8bb059ba79ca818 Mon Sep 17 00:00:00 2001 From: Lars Næsbye Christensen Date: Thu, 11 Jan 2024 11:32:15 +0100 Subject: Rename OS X to macOS, mostly in comments We only support 10.13+ now, and it's been called macOS since 10.12. References in code to older versions are unchanged. --- indra/cmake/Variables.cmake | 2 +- indra/lib/python/indra/util/llmanifest.py | 4 ++-- indra/llcommon/llerror.cpp | 2 +- indra/llcommon/llsys.cpp | 6 +++--- indra/llcommon/lluuid.cpp | 2 +- indra/llfilesystem/lldir_mac.cpp | 2 +- indra/llfilesystem/lldir_mac.h | 2 +- indra/llfilesystem/lldir_utils_objc.h | 2 +- indra/llfilesystem/lldir_utils_objc.mm | 2 +- indra/llmessage/net.cpp | 2 +- indra/llrender/llfontgl.cpp | 2 +- indra/llrender/llimagegl.cpp | 2 +- indra/llwindow/llkeyboard.h | 2 +- indra/llwindow/llwindowmacosx.cpp | 4 ++-- indra/media_plugins/cef/mac_volume_catcher.cpp | 2 +- indra/media_plugins/cef/media_plugin_cef.cpp | 2 +- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llappviewermacosx-objc.mm | 2 +- indra/newview/llappviewermacosx.cpp | 2 +- indra/newview/llviewerjoystick.cpp | 2 +- indra/newview/llvoicevivox.cpp | 2 +- 21 files changed, 25 insertions(+), 25 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index af1f16d04d..9bc17df32a 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -5,7 +5,7 @@ # # Platform variables: # -# DARWIN - Mac OS X +# DARWIN - macOS # LINUX - Linux # WINDOWS - Windows diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py index bcb9d884c3..20c0e01576 100755 --- a/indra/lib/python/indra/util/llmanifest.py +++ b/indra/lib/python/indra/util/llmanifest.py @@ -116,7 +116,7 @@ BASE_ARGUMENTS=[ dict(name='build', description='Build directory.', default=DEFAULT_SRCTREE), dict(name='buildtype', description='Build type (i.e. Debug, Release, RelWithDebInfo).', default=None), dict(name='bundleid', - description="""The Mac OS X Bundle identifier.""", + description="""The macOS Bundle identifier.""", default="com.secondlife.indra.viewer"), dict(name='channel', description="""The channel to use for updates, packaging, settings name, etc.""", @@ -146,7 +146,7 @@ BASE_ARGUMENTS=[ dict(name='signature', description="""This specifies an identity to sign the viewer with, if any. If no value is supplied, the default signature will be used, if any. Currently - only used on Mac OS X.""", + only used on macOS.""", default=None), dict(name='source', description='Source directory.', diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 414515854a..19c285ea5a 100644 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -700,7 +700,7 @@ namespace bool shouldLogToStderr() { #if LL_DARWIN - // On Mac OS X, stderr from apps launched from the Finder goes to the + // On macOS, stderr from apps launched from the Finder goes to the // console log. It's generally considered bad form to spam too much // there. That scenario can be detected by noticing that stderr is a // character device (S_IFCHR). diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 938685bae6..d3f99a413d 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -269,9 +269,9 @@ LLOSInfo::LLOSInfo() : #elif LL_DARWIN // Initialize mOSStringSimple to something like: - // "Mac OS X 10.6.7" + // "macOS 10.13.1" { - const char * DARWIN_PRODUCT_NAME = "Mac OS X"; + const char * DARWIN_PRODUCT_NAME = "macOS"; int64_t major_version, minor_version, bugfix_version = 0; @@ -294,7 +294,7 @@ LLOSInfo::LLOSInfo() : } // Initialize mOSString to something like: - // "Mac OS X 10.6.7 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386" + // "macOS 10.13.1 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386" struct utsname un; if(uname(&un) != -1) { diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp index 200add404f..285469f0d4 100644 --- a/indra/llcommon/lluuid.cpp +++ b/indra/llcommon/lluuid.cpp @@ -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... */ diff --git a/indra/llfilesystem/lldir_mac.cpp b/indra/llfilesystem/lldir_mac.cpp index 9ad8e274b6..0d9695e161 100644 --- a/indra/llfilesystem/lldir_mac.cpp +++ b/indra/llfilesystem/lldir_mac.cpp @@ -1,6 +1,6 @@ /** * @file lldir_mac.cpp - * @brief Implementation of directory utilities for Mac OS X + * @brief Implementation of directory utilities for macOS * * $LicenseInfo:firstyear=2002&license=viewerlgpl$ * Second Life Viewer Source Code diff --git a/indra/llfilesystem/lldir_mac.h b/indra/llfilesystem/lldir_mac.h index 558727ebbc..0290fb773b 100644 --- a/indra/llfilesystem/lldir_mac.h +++ b/indra/llfilesystem/lldir_mac.h @@ -1,6 +1,6 @@ /** * @file lldir_mac.h - * @brief Definition of directory utilities class for Mac OS X + * @brief Definition of directory utilities class for macOS * * $LicenseInfo:firstyear=2000&license=viewerlgpl$ * Second Life Viewer Source Code diff --git a/indra/llfilesystem/lldir_utils_objc.h b/indra/llfilesystem/lldir_utils_objc.h index 59dbeb4aec..48148aad95 100644 --- a/indra/llfilesystem/lldir_utils_objc.h +++ b/indra/llfilesystem/lldir_utils_objc.h @@ -1,6 +1,6 @@ /** * @file lldir_utils_objc.h - * @brief Definition of directory utilities class for Mac OS X + * @brief Definition of directory utilities class for macOS * * $LicenseInfo:firstyear=2020&license=viewerlgpl$ * Second Life Viewer Source Code diff --git a/indra/llfilesystem/lldir_utils_objc.mm b/indra/llfilesystem/lldir_utils_objc.mm index 20540fb93c..01fe9e1f2c 100644 --- a/indra/llfilesystem/lldir_utils_objc.mm +++ b/indra/llfilesystem/lldir_utils_objc.mm @@ -1,6 +1,6 @@ /** * @file lldir_utils_objc.mm - * @brief Cocoa implementation of directory utilities for Mac OS X + * @brief Cocoa implementation of directory utilities for macOS * * $LicenseInfo:firstyear=2020&license=viewerlgpl$ * Second Life Viewer Source Code diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp index 523bcbb60d..60030bb920 100644 --- a/indra/llmessage/net.cpp +++ b/indra/llmessage/net.cpp @@ -77,7 +77,7 @@ const char* LOOPBACK_ADDRESS_STRING = "127.0.0.1"; const char* BROADCAST_ADDRESS_STRING = "255.255.255.255"; #if LL_DARWIN - // Mac OS X returns an error when trying to set these to 400000. Smaller values succeed. + // macOS returns an error when trying to set these to 400000. Smaller values succeed. const int SEND_BUFFER_SIZE = 200000; const int RECEIVE_BUFFER_SIZE = 200000; #else // LL_DARWIN diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 15fddbc99f..484fa9d82c 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -1110,7 +1110,7 @@ LLFontGL* LLFontGL::getFontDefault() std::string LLFontGL::getFontPathSystem() { #if LL_DARWIN - // HACK for Mac OS X + // HACK for macOS return "/System/Library/Fonts/"; #elif LL_WINDOWS diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index bbedcf360c..6315b2cd7c 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -56,7 +56,7 @@ const F32 MIN_TEXTURE_LIFETIME = 10.f; U32 wpo2(U32 i); -// texture memory accounting (for OS X) +// texture memory accounting (for macOS) static LLMutex sTexMemMutex; static std::unordered_map sTextureAllocs; static U64 sTextureBytes = 0; diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index dad150e3c1..2f80a9e89a 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -77,7 +77,7 @@ public: virtual BOOL handleKeyDown(const U16 key, MASK mask) = 0; #ifdef LL_DARWIN - // We only actually use this for OS X. + // We only actually use this for macOS. virtual void handleModifier(MASK mask) = 0; #endif // LL_DARWIN diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 778e5d3898..b317f00ae7 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1249,7 +1249,7 @@ F32 LLWindowMacOSX::getNativeAspectRatio() F32 LLWindowMacOSX::getPixelAspectRatio() { - //OS X always enforces a 1:1 pixel aspect ratio, regardless of video mode + //macOS always enforces a 1:1 pixel aspect ratio, regardless of video mode return 1.f; } @@ -1281,7 +1281,7 @@ void LLWindowMacOSX::afterDialog() void LLWindowMacOSX::flashIcon(F32 seconds) { - // For consistency with OS X conventions, the number of seconds given is ignored and + // For consistency with macOS conventions, the number of seconds given is ignored and // left up to the OS (which will actually bounce it for one second). requestUserAttention(); } diff --git a/indra/media_plugins/cef/mac_volume_catcher.cpp b/indra/media_plugins/cef/mac_volume_catcher.cpp index dddb9c2077..dafe545d09 100644 --- a/indra/media_plugins/cef/mac_volume_catcher.cpp +++ b/indra/media_plugins/cef/mac_volume_catcher.cpp @@ -1,6 +1,6 @@ /** * @file mac_volume_catcher.cpp - * @brief A Mac OS X specific hack to control the volume level of all audio channels opened by a process. + * @brief A macOS specific hack to control the volume level of all audio channels opened by a process. * * @cond * $LicenseInfo:firstyear=2010&license=viewerlgpl$ diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp index 43d3a32e64..d5e17ba536 100644 --- a/indra/media_plugins/cef/media_plugin_cef.cpp +++ b/indra/media_plugins/cef/media_plugin_cef.cpp @@ -816,7 +816,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) S32 y = message_in.getValueS32("y"); // only even send left mouse button events to the CEF library - // (partially prompted by crash in OS X CEF when sending right button events) + // (partially prompted by crash in macOS CEF when sending right button events) // we catch the right click in viewer and display our own context menu anyway S32 button = message_in.getValueS32("button"); dullahan::EMouseButton btn = dullahan::MB_MOUSE_BUTTON_LEFT; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 00b59f9a4d..8f651a0294 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9022,7 +9022,7 @@ RenderHiDPI Comment - Enable support for HiDPI displays, like Retina (MacOS X ONLY, requires restart) + Enable support for HiDPI displays, like Retina (macOS ONLY, requires restart) Persist 1 Type diff --git a/indra/newview/llappviewermacosx-objc.mm b/indra/newview/llappviewermacosx-objc.mm index 17301847e8..81ab4e0feb 100644 --- a/indra/newview/llappviewermacosx-objc.mm +++ b/indra/newview/llappviewermacosx-objc.mm @@ -25,7 +25,7 @@ */ #if !defined LL_DARWIN - #error "Use only with Mac OS X" + #error "Use only with macOS" #endif #import diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 8b313a321b..72e38cc1ea 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -27,7 +27,7 @@ #include "llviewerprecompiledheaders.h" #if !defined LL_DARWIN - #error "Use only with Mac OS X" + #error "Use only with macOS" #endif #define LL_CARBON_CRASH_HANDLER 1 diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index e35cb26ce1..dfa47e82b3 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -1414,7 +1414,7 @@ void LLViewerJoystick::setSNDefaults() #if LL_DARWIN || LL_LINUX const float platformScale = 20.f; const float platformScaleAvXZ = 1.f; - // The SpaceNavigator doesn't act as a 3D cursor on OS X / Linux. + // The SpaceNavigator doesn't act as a 3D cursor on macOS / Linux. const bool is_3d_cursor = false; #else const float platformScale = 1.f; diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 3725510b6a..c4cd1779b7 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5314,7 +5314,7 @@ std::string LLVivoxVoiceClient::nameFromID(const LLUUID &uuid) LLStringUtil::replaceChar(result, '+', '-'); LLStringUtil::replaceChar(result, '/', '_'); - // If you need to transform a GUID to this form on the Mac OS X command line, this will do so: + // If you need to transform a GUID to this form on the macOS command line, this will do so: // echo -n x && (echo e669132a-6c43-4ee1-a78d-6c82fff59f32 |xxd -r -p |openssl base64|tr '/+' '_-') // The reverse transform can be done with: -- cgit v1.3 From 9e854b697a06abed2a0917fb6120445f176764f0 Mon Sep 17 00:00:00 2001 From: Lars Næsbye Christensen Date: Fri, 16 Feb 2024 19:29:51 +0100 Subject: misc: BOOL to bool --- indra/llappearance/llavatarappearance.cpp | 44 +++--- indra/llappearance/llavatarappearance.h | 16 +-- indra/llappearance/llavatarappearancedefines.cpp | 100 +++++++------- indra/llappearance/llavatarappearancedefines.h | 6 +- indra/llappearance/llavatarjoint.cpp | 30 ++--- indra/llappearance/llavatarjoint.h | 24 ++-- indra/llappearance/llavatarjointmesh.cpp | 2 +- indra/llappearance/llavatarjointmesh.h | 4 +- indra/llappearance/lldriverparam.cpp | 4 +- indra/llappearance/lllocaltextureobject.cpp | 6 +- indra/llappearance/lllocaltextureobject.h | 4 +- indra/llappearance/llpolymesh.cpp | 10 +- indra/llappearance/llpolymesh.h | 12 +- indra/llappearance/llpolymorph.cpp | 12 +- indra/llappearance/llpolymorph.h | 12 +- indra/llappearance/llpolyskeletaldistortion.cpp | 2 +- indra/llappearance/llpolyskeletaldistortion.h | 6 +- indra/llappearance/lltexglobalcolor.cpp | 2 +- indra/llappearance/lltexlayer.cpp | 162 +++++++++++------------ indra/llappearance/lltexlayer.h | 70 +++++----- indra/llappearance/lltexlayerparams.cpp | 42 +++--- indra/llappearance/lltexlayerparams.h | 20 +-- indra/llappearance/llviewervisualparam.cpp | 8 +- indra/llappearance/llviewervisualparam.h | 12 +- indra/llappearance/llwearable.cpp | 8 +- indra/llappearance/llwearable.h | 6 +- indra/llappearance/llwearabledata.cpp | 14 +- indra/llappearance/llwearabledata.h | 8 +- indra/llappearance/llwearabletype.cpp | 46 +++---- indra/llappearance/llwearabletype.h | 12 +- indra/llcharacter/llanimationstates.cpp | 4 +- indra/llcharacter/llanimationstates.h | 2 +- indra/llcharacter/llbvhloader.cpp | 62 ++++----- indra/llcharacter/llbvhloader.h | 46 +++---- indra/llcharacter/llcharacter.cpp | 16 +-- indra/llcharacter/llcharacter.h | 18 +-- indra/llcharacter/lleditingmotion.cpp | 6 +- indra/llcharacter/lleditingmotion.h | 10 +- indra/llcharacter/llgesture.cpp | 16 +-- indra/llcharacter/llgesture.h | 8 +- indra/llcharacter/llhandmotion.cpp | 4 +- indra/llcharacter/llhandmotion.h | 12 +- indra/llcharacter/llheadrotmotion.cpp | 18 +-- indra/llcharacter/llheadrotmotion.h | 22 +-- indra/llcharacter/lljoint.cpp | 8 +- indra/llcharacter/lljoint.h | 4 +- indra/llcharacter/lljointsolverrp3.cpp | 6 +- indra/llcharacter/lljointsolverrp3.h | 4 +- indra/llcharacter/lljointstate.h | 2 +- indra/llcharacter/llkeyframefallmotion.cpp | 6 +- indra/llcharacter/llkeyframefallmotion.h | 4 +- indra/llcharacter/llkeyframemotion.cpp | 46 +++---- indra/llcharacter/llkeyframemotion.h | 26 ++-- indra/llcharacter/llkeyframemotionparam.cpp | 12 +- indra/llcharacter/llkeyframemotionparam.h | 14 +- indra/llcharacter/llkeyframestandmotion.cpp | 18 +-- indra/llcharacter/llkeyframestandmotion.h | 8 +- indra/llcharacter/llkeyframewalkmotion.cpp | 12 +- indra/llcharacter/llkeyframewalkmotion.h | 12 +- indra/llcharacter/llmotion.cpp | 14 +- indra/llcharacter/llmotion.h | 42 +++--- indra/llcharacter/llmotioncontroller.cpp | 60 ++++----- indra/llcharacter/llmotioncontroller.h | 22 +-- indra/llcharacter/llmultigesture.cpp | 40 +++--- indra/llcharacter/llmultigesture.h | 32 ++--- indra/llcharacter/llpose.cpp | 18 +-- indra/llcharacter/llpose.h | 16 +-- indra/llcharacter/llstatemachine.cpp | 20 +-- indra/llcharacter/llstatemachine.h | 16 +-- indra/llcharacter/lltargetingmotion.cpp | 6 +- indra/llcharacter/lltargetingmotion.h | 10 +- indra/llcharacter/llvisualparam.cpp | 14 +- indra/llcharacter/llvisualparam.h | 18 +-- indra/llcommon/llstring.cpp | 2 +- indra/llcommon/llstring.h | 4 +- indra/llinventory/llparcel.cpp | 58 ++++---- indra/llinventory/llparcel.h | 64 ++++----- indra/llinventory/llpermissions.cpp | 87 ++++++------ indra/llinventory/llpermissions.h | 26 ++-- indra/llmath/llvolume.cpp | 58 ++++---- indra/llmath/llvolume.h | 14 +- indra/llmessage/llassetstorage.cpp | 2 +- indra/llmessage/llmessagereader.h | 2 +- indra/llmessage/llsdmessagereader.cpp | 2 +- indra/llmessage/llsdmessagereader.h | 2 +- indra/llmessage/lltemplatemessagereader.cpp | 2 +- indra/llmessage/lltemplatemessagereader.h | 2 +- indra/llmessage/llxfermanager.cpp | 4 +- indra/llmessage/message.cpp | 4 +- indra/llmessage/message.h | 4 +- indra/llxml/llcontrol.cpp | 6 +- indra/llxml/llxmltree.cpp | 4 +- indra/llxml/llxmltree.h | 4 +- indra/newview/llagent.cpp | 6 +- indra/newview/llagent.h | 2 +- indra/newview/llagentwearables.cpp | 2 +- indra/newview/llagentwearables.h | 2 +- indra/newview/llavatarpropertiesprocessor.h | 4 +- indra/newview/llbreastmotion.h | 4 +- indra/newview/llcommandlineparser.cpp | 2 +- indra/newview/llemote.cpp | 8 +- indra/newview/llemote.h | 4 +- indra/newview/llfloaterbuycontents.cpp | 2 +- indra/newview/llfloaterland.cpp | 6 +- indra/newview/llfloaterpay.cpp | 4 +- indra/newview/llfloaterregioninfo.cpp | 2 +- indra/newview/llgroupmgr.cpp | 18 +-- indra/newview/llgroupmgr.h | 2 +- indra/newview/llpanelgroupnotices.cpp | 2 +- indra/newview/llphysicsmotion.cpp | 30 ++--- indra/newview/llphysicsmotion.h | 4 +- indra/newview/llpreviewscript.cpp | 4 +- indra/newview/llregioninfomodel.h | 2 +- indra/newview/llselectmgr.cpp | 12 +- indra/newview/llsettingsvo.cpp | 4 +- indra/newview/llsidepaneliteminfo.cpp | 2 +- indra/newview/llviewergesture.cpp | 28 ++-- indra/newview/llviewergesture.h | 12 +- indra/newview/llviewerjoint.cpp | 12 +- indra/newview/llviewerjoint.h | 4 +- indra/newview/llviewerjointattachment.cpp | 28 ++-- indra/newview/llviewerjointattachment.h | 22 +-- indra/newview/llviewerjointmesh.cpp | 4 +- indra/newview/llviewerjointmesh.h | 8 +- indra/newview/llviewermessage.cpp | 18 +-- indra/newview/llviewerparcelmgr.cpp | 20 +-- indra/newview/llviewerregion.cpp | 2 +- indra/newview/llviewertexlayer.cpp | 6 +- indra/newview/llviewertexlayer.h | 4 +- indra/newview/llvoavatar.cpp | 22 +-- indra/newview/llvoavatar.h | 4 +- indra/newview/llvoavatarself.cpp | 10 +- indra/newview/llvoavatarself.h | 6 +- 133 files changed, 1072 insertions(+), 1075 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp index 7d9d2ba24c..43ee78519d 100644 --- a/indra/llappearance/llavatarappearance.cpp +++ b/indra/llappearance/llavatarappearance.cpp @@ -78,7 +78,7 @@ class LLAvatarBoneInfo friend class LLAvatarAppearance; friend class LLAvatarSkeletonInfo; public: - LLAvatarBoneInfo() : mIsJoint(FALSE) {} + LLAvatarBoneInfo() : mIsJoint(false) {} ~LLAvatarBoneInfo() { std::for_each(mChildren.begin(), mChildren.end(), DeletePointer()); @@ -178,7 +178,7 @@ LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary* LLAvatarAppearance::sAv LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) : LLCharacter(), - mIsDummy(FALSE), + mIsDummy(false), mTexSkinColor( NULL ), mTexHairColor( NULL ), mTexEyeColor( NULL ), @@ -189,7 +189,7 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) : mNumBones(0), mNumCollisionVolumes(0), mCollisionVolumes(NULL), - mIsBuilt(FALSE), + mIsBuilt(false), mInitFlags(0) { llassert_always(mWearableData); @@ -236,14 +236,14 @@ void LLAvatarAppearance::initInstance() mesh->setName(mesh_name); mesh->setMeshID(mesh_index); mesh->setPickName(mesh_dict->mPickName); - mesh->setIsTransparent(FALSE); + mesh->setIsTransparent(false); switch((S32)mesh_index) { case MESH_ID_HAIR: - mesh->setIsTransparent(TRUE); + mesh->setIsTransparent(true); break; case MESH_ID_SKIRT: - mesh->setIsTransparent(TRUE); + mesh->setIsTransparent(true); break; case MESH_ID_EYEBALL_LEFT: case MESH_ID_EYEBALL_RIGHT: @@ -345,7 +345,7 @@ void LLAvatarAppearance::initClass(const std::string& avatar_file_name_arg, cons avatar_file_name = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,AVATAR_DEFAULT_CHAR + "_lad.xml"); } LLXmlTree xml_tree; - bool success = xml_tree.parseFile( avatar_file_name, FALSE ); + bool success = xml_tree.parseFile( avatar_file_name, false ); if (!success) { LL_ERRS() << "Problem reading avatar configuration file:" << avatar_file_name << LL_ENDL; @@ -580,7 +580,7 @@ bool LLAvatarAppearance::parseSkeletonFile(const std::string& filename, LLXmlTre //------------------------------------------------------------------------- // parse the file //------------------------------------------------------------------------- - bool parsesuccess = skeleton_xml_tree.parseFile( filename, FALSE ); + bool parsesuccess = skeleton_xml_tree.parseFile( filename, false ); if (!parsesuccess) { @@ -804,7 +804,7 @@ void LLAvatarAppearance::buildCharacter() //------------------------------------------------------------------------- mRoot->removeAllChildren(); mJointMap.clear(); - mIsBuilt = FALSE; + mIsBuilt = false; //------------------------------------------------------------------------- // clear mesh data @@ -825,7 +825,7 @@ void LLAvatarAppearance::buildCharacter() bool status = loadAvatar(); stop_glerror(); -// gPrintMessagesThisFrame = TRUE; +// gPrintMessagesThisFrame = true; LL_DEBUGS() << "Avatar load took " << timer.getElapsedTimeF32() << " seconds." << LL_ENDL; if (!status) @@ -895,7 +895,7 @@ void LLAvatarAppearance::buildCharacter() // SL-315 mPelvisp->setPosition( LLVector3(0.0f, 0.0f, 0.0f) ); - mIsBuilt = TRUE; + mIsBuilt = true; stop_glerror(); } @@ -1041,7 +1041,7 @@ bool LLAvatarAppearance::loadSkeletonNode () // make meshes children before calling parent version of the function for (LLAvatarJoint* joint : mMeshLOD) { - joint->mUpdateXform = FALSE; + joint->mUpdateXform = false; joint->setMeshesToChildren(); } @@ -1104,7 +1104,7 @@ bool LLAvatarAppearance::loadMeshNodes() LLAvatarJointMesh* mesh = NULL; U8 mesh_id = 0; - bool found_mesh_id = FALSE; + bool found_mesh_id = false; /* if (type == "hairMesh") switch(lod) @@ -1117,7 +1117,7 @@ bool LLAvatarAppearance::loadMeshNodes() if (type.compare(mesh_dict->mName) == 0) { mesh_id = mesh_index; - found_mesh_id = TRUE; + found_mesh_id = true; break; } } @@ -1257,12 +1257,12 @@ bool LLAvatarAppearance::loadLayersets() LLTexLayerInterface* layer = layer_set->findLayerByName(morph->mLayer); if (layer) { - layer->setHasMorph(TRUE); + layer->setHasMorph(true); } else { LL_WARNS() << "Could not find layer named " << morph->mLayer << " to set morph flag" << LL_ENDL; - success = FALSE; + success = false; } } } @@ -1564,7 +1564,7 @@ bool LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) { if (node->hasName("bone")) { - mIsJoint = TRUE; + mIsJoint = true; static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!node->getFastAttributeString(name_string, mName)) { @@ -1577,7 +1577,7 @@ bool LLAvatarBoneInfo::parseXml(LLXmlTreeNode* node) } else if (node->hasName("collision_volume")) { - mIsJoint = FALSE; + mIsJoint = false; static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!node->getFastAttributeString(name_string, mName)) { @@ -1810,13 +1810,13 @@ bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlSkeletonNode(LLXmlTreeNode* ro static LLStdStringHandle position_string = LLXmlTree::addAttributeString("position"); if (child->getFastAttributeVector3(position_string, info->mPosition)) { - info->mHasPosition = TRUE; + info->mHasPosition = true; } static LLStdStringHandle rotation_string = LLXmlTree::addAttributeString("rotation"); if (child->getFastAttributeVector3(rotation_string, info->mRotationEuler)) { - info->mHasRotation = TRUE; + info->mHasRotation = true; } static LLStdStringHandle group_string = LLXmlTree::addAttributeString("group"); if (child->getFastAttributeS32(group_string, info->mGroup)) @@ -1926,7 +1926,7 @@ bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMeshNodes(LLXmlTreeNode* root) delete info; return false; } - BOOL shared = false; + bool shared = false; static LLStdStringHandle shared_string = LLXmlTree::addAttributeString("shared"); child->getFastAttributeBOOL(shared_string, shared); @@ -2107,7 +2107,7 @@ bool LLAvatarAppearance::LLAvatarXmlInfo::parseXmlMorphNodes(LLXmlTreeNode* root } //virtual -LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer) : +LLAvatarAppearance::LLMaskedMorph::LLMaskedMorph(LLVisualParam *morph_target, bool invert, std::string layer) : mMorphTarget(morph_target), mInvert(invert), mLayer(layer) diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h index f3c74c052f..dd16a27a3c 100644 --- a/indra/llappearance/llavatarappearance.h +++ b/indra/llappearance/llavatarappearance.h @@ -381,7 +381,7 @@ protected: struct LLAvatarMeshInfo { - typedef std::pair morph_info_pair_t; // LLPolyMorphTargetInfo stored here + typedef std::pair morph_info_pair_t; // LLPolyMorphTargetInfo stored here typedef std::vector morph_info_list_t; LLAvatarMeshInfo() : mLOD(0), mMinPixelArea(.1f) {} @@ -410,8 +410,8 @@ protected: struct LLAvatarAttachmentInfo { LLAvatarAttachmentInfo() - : mGroup(-1), mAttachmentID(-1), mPieMenuSlice(-1), mVisibleFirstPerson(FALSE), - mIsHUDAttachment(FALSE), mHasPosition(FALSE), mHasRotation(FALSE) {} + : mGroup(-1), mAttachmentID(-1), mPieMenuSlice(-1), mVisibleFirstPerson(false), + mIsHUDAttachment(false), mHasPosition(false), mHasRotation(false) {} std::string mName; std::string mJointName; LLVector3 mPosition; @@ -419,8 +419,8 @@ protected: S32 mGroup; S32 mAttachmentID; S32 mPieMenuSlice; - BOOL mVisibleFirstPerson; - BOOL mIsHUDAttachment; + bool mVisibleFirstPerson; + bool mIsHUDAttachment; bool mHasPosition; bool mHasRotation; }; @@ -440,11 +440,11 @@ protected: struct LLAvatarMorphInfo { LLAvatarMorphInfo() - : mInvert(FALSE) {} + : mInvert(false) {} std::string mName; std::string mRegion; std::string mLayer; - BOOL mInvert; + bool mInvert; }; typedef std::vector morph_info_list_t; @@ -455,7 +455,7 @@ protected: class LLMaskedMorph { public: - LLMaskedMorph(LLVisualParam *morph_target, BOOL invert, std::string layer); + LLMaskedMorph(LLVisualParam *morph_target, bool invert, std::string layer); LLVisualParam *mMorphTarget; bool mInvert; diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp index f3f26be4b9..7af1c37824 100644 --- a/indra/llappearance/llavatarappearancedefines.cpp +++ b/indra/llappearance/llavatarappearancedefines.cpp @@ -39,56 +39,56 @@ using namespace LLAvatarAppearanceDefines; LLAvatarAppearanceDictionary::Textures::Textures() { - addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); - addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT)); - addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS)); - addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", TRUE, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES)); - addEntry(TEX_HAIR, new TextureEntry("hair_grain", TRUE, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR)); - addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); - addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); - addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES)); - addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS)); - addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET)); - addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET)); - addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", TRUE, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES)); - addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT)); - addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS)); - addEntry(TEX_SKIRT, new TextureEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT)); - - addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); - addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); - addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); - addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); - addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", TRUE, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); - - addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); - addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); - addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); - - addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", TRUE, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); - - - addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", FALSE, BAKED_HEAD, "head")); - addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", FALSE, BAKED_UPPER, "upper")); - addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", FALSE, BAKED_LOWER, "lower")); - addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", FALSE, BAKED_EYES, "eyes")); - addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", FALSE, BAKED_HAIR, "hair")); - addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", FALSE, BAKED_SKIRT, "skirt")); - addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", FALSE, BAKED_LEFT_ARM, "leftarm")); - addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", FALSE, BAKED_LEFT_LEG, "leftleg")); - addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", FALSE, BAKED_AUX1, "aux1")); - addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", FALSE, BAKED_AUX2, "aux2")); - addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", FALSE, BAKED_AUX3, "aux3")); + addEntry(TEX_HEAD_BODYPAINT, new TextureEntry("head_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); + addEntry(TEX_UPPER_SHIRT, new TextureEntry("upper_shirt", true, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", LLWearableType::WT_SHIRT)); + addEntry(TEX_LOWER_PANTS, new TextureEntry("lower_pants", true, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", LLWearableType::WT_PANTS)); + addEntry(TEX_EYES_IRIS, new TextureEntry("eyes_iris", true, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", LLWearableType::WT_EYES)); + addEntry(TEX_HAIR, new TextureEntry("hair_grain", true, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", LLWearableType::WT_HAIR)); + addEntry(TEX_UPPER_BODYPAINT, new TextureEntry("upper_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); + addEntry(TEX_LOWER_BODYPAINT, new TextureEntry("lower_bodypaint", true, BAKED_NUM_INDICES, "", LLWearableType::WT_SKIN)); + addEntry(TEX_LOWER_SHOES, new TextureEntry("lower_shoes", true, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", LLWearableType::WT_SHOES)); + addEntry(TEX_LOWER_SOCKS, new TextureEntry("lower_socks", true, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", LLWearableType::WT_SOCKS)); + addEntry(TEX_UPPER_JACKET, new TextureEntry("upper_jacket", true, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET)); + addEntry(TEX_LOWER_JACKET, new TextureEntry("lower_jacket", true, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", LLWearableType::WT_JACKET)); + addEntry(TEX_UPPER_GLOVES, new TextureEntry("upper_gloves", true, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", LLWearableType::WT_GLOVES)); + addEntry(TEX_UPPER_UNDERSHIRT, new TextureEntry("upper_undershirt", true, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERSHIRT)); + addEntry(TEX_LOWER_UNDERPANTS, new TextureEntry("lower_underpants", true, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", LLWearableType::WT_UNDERPANTS)); + addEntry(TEX_SKIRT, new TextureEntry("skirt", true, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", LLWearableType::WT_SKIRT)); + + addEntry(TEX_LOWER_ALPHA, new TextureEntry("lower_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_UPPER_ALPHA, new TextureEntry("upper_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_HEAD_ALPHA, new TextureEntry("head_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_EYES_ALPHA, new TextureEntry("eyes_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + addEntry(TEX_HAIR_ALPHA, new TextureEntry("hair_alpha", true, BAKED_NUM_INDICES, "UIImgDefaultAlphaUUID", LLWearableType::WT_ALPHA)); + + addEntry(TEX_HEAD_TATTOO, new TextureEntry("head_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); + addEntry(TEX_UPPER_TATTOO, new TextureEntry("upper_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); + addEntry(TEX_LOWER_TATTOO, new TextureEntry("lower_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_TATTOO)); + + addEntry(TEX_HEAD_UNIVERSAL_TATTOO, new TextureEntry("head_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_UPPER_UNIVERSAL_TATTOO, new TextureEntry("upper_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_LOWER_UNIVERSAL_TATTOO, new TextureEntry("lower_universal_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_SKIRT_TATTOO, new TextureEntry("skirt_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_HAIR_TATTOO, new TextureEntry("hair_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_EYES_TATTOO, new TextureEntry("eyes_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_LEFT_ARM_TATTOO, new TextureEntry("leftarm_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_LEFT_LEG_TATTOO, new TextureEntry("leftleg_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_AUX1_TATTOO, new TextureEntry("aux1_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_AUX2_TATTOO, new TextureEntry("aux2_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + addEntry(TEX_AUX3_TATTOO, new TextureEntry("aux3_tattoo", true, BAKED_NUM_INDICES, "", LLWearableType::WT_UNIVERSAL)); + + + addEntry(TEX_HEAD_BAKED, new TextureEntry("head-baked", false, BAKED_HEAD, "head")); + addEntry(TEX_UPPER_BAKED, new TextureEntry("upper-baked", false, BAKED_UPPER, "upper")); + addEntry(TEX_LOWER_BAKED, new TextureEntry("lower-baked", false, BAKED_LOWER, "lower")); + addEntry(TEX_EYES_BAKED, new TextureEntry("eyes-baked", false, BAKED_EYES, "eyes")); + addEntry(TEX_HAIR_BAKED, new TextureEntry("hair-baked", false, BAKED_HAIR, "hair")); + addEntry(TEX_SKIRT_BAKED, new TextureEntry("skirt-baked", false, BAKED_SKIRT, "skirt")); + addEntry(TEX_LEFT_ARM_BAKED, new TextureEntry("leftarm-baked", false, BAKED_LEFT_ARM, "leftarm")); + addEntry(TEX_LEFT_LEG_BAKED, new TextureEntry("leftleg-baked", false, BAKED_LEFT_LEG, "leftleg")); + addEntry(TEX_AUX1_BAKED, new TextureEntry("aux1-baked", false, BAKED_AUX1, "aux1")); + addEntry(TEX_AUX2_BAKED, new TextureEntry("aux2-baked", false, BAKED_AUX2, "aux2")); + addEntry(TEX_AUX3_BAKED, new TextureEntry("aux3-baked", false, BAKED_AUX3, "aux3")); } LLAvatarAppearanceDictionary::BakedTextures::BakedTextures() diff --git a/indra/llappearance/llavatarappearancedefines.h b/indra/llappearance/llavatarappearancedefines.h index b90c6664cc..21c0dedeba 100644 --- a/indra/llappearance/llavatarappearancedefines.h +++ b/indra/llappearance/llavatarappearancedefines.h @@ -167,10 +167,10 @@ public: const std::string mDefaultImageName; const LLWearableType::EType mWearableType; // It's either a local texture xor baked - BOOL mIsLocalTexture; - BOOL mIsBakedTexture; + bool mIsLocalTexture; + bool mIsBakedTexture; // If it's a local texture, it may be used by a baked texture - BOOL mIsUsedByBakedTexture; + bool mIsUsedByBakedTexture; EBakedTextureIndex mBakedTextureIndex; }; diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp index e7bd831b49..579381958c 100644 --- a/indra/llappearance/llavatarjoint.cpp +++ b/indra/llappearance/llavatarjoint.cpp @@ -40,7 +40,7 @@ const F32 DEFAULT_AVATAR_JOINT_LOD = 0.0f; //----------------------------------------------------------------------------- // Static Data //----------------------------------------------------------------------------- -BOOL LLAvatarJoint::sDisableLOD = FALSE; +bool LLAvatarJoint::sDisableLOD = false; //----------------------------------------------------------------------------- // LLAvatarJoint() @@ -66,13 +66,13 @@ LLAvatarJoint::LLAvatarJoint(const std::string &name, LLJoint *parent) : void LLAvatarJoint::init() { - mValid = FALSE; + mValid = false; mComponents = SC_JOINT | SC_BONE | SC_AXES; mMinPixelArea = DEFAULT_AVATAR_JOINT_LOD; mPickName = PN_DEFAULT; - mVisible = TRUE; + mVisible = true; mMeshID = 0; - mIsTransparent = FALSE; + mIsTransparent = false; } @@ -88,7 +88,7 @@ LLAvatarJoint::~LLAvatarJoint() //-------------------------------------------------------------------- // setValid() //-------------------------------------------------------------------- -void LLAvatarJoint::setValid( BOOL valid, BOOL recursive ) +void LLAvatarJoint::setValid( bool valid, bool recursive ) { //---------------------------------------------------------------- // set visibility for this joint @@ -103,7 +103,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive ) for (LLJoint* child : mChildren) { LLAvatarJoint* joint = static_cast(child); - joint->setValid(valid, TRUE); + joint->setValid(valid, true); } } @@ -112,7 +112,7 @@ void LLAvatarJoint::setValid( BOOL valid, BOOL recursive ) //-------------------------------------------------------------------- // setSkeletonComponents() //-------------------------------------------------------------------- -void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive ) +void LLAvatarJoint::setSkeletonComponents( U32 comp, bool recursive ) { mComponents = comp; if (recursive) @@ -125,7 +125,7 @@ void LLAvatarJoint::setSkeletonComponents( U32 comp, BOOL recursive ) } } -void LLAvatarJoint::setVisible(BOOL visible, BOOL recursive) +void LLAvatarJoint::setVisible(bool visible, bool recursive) { mVisible = visible; @@ -148,7 +148,7 @@ void LLAvatarJoint::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pix } } -void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update) +void LLAvatarJoint::updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind, bool terse_update) { for (LLJoint* child : mChildren) { @@ -180,18 +180,18 @@ bool LLAvatarJoint::updateLOD(F32 pixel_area, bool activate) if (found_lod || jointLOD == DEFAULT_AVATAR_JOINT_LOD) { // we've already found a joint to enable, so enable the rest as alternatives - lod_changed |= joint->updateLOD(pixel_area, TRUE); + lod_changed |= joint->updateLOD(pixel_area, true); } else { if (pixel_area >= jointLOD || sDisableLOD) { - lod_changed |= joint->updateLOD(pixel_area, TRUE); + lod_changed |= joint->updateLOD(pixel_area, true); found_lod = true; } else { - lod_changed |= joint->updateLOD(pixel_area, FALSE); + lod_changed |= joint->updateLOD(pixel_area, false); } } } @@ -222,11 +222,11 @@ void LLAvatarJoint::setMeshesToChildren() LLAvatarJointCollisionVolume::LLAvatarJointCollisionVolume() { - mUpdateXform = FALSE; + mUpdateXform = false; } /*virtual*/ -U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) +U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, bool first_pass, bool is_dummy ) { LL_ERRS() << "Cannot call render() on LLAvatarJointCollisionVolume" << LL_ENDL; return 0; @@ -234,7 +234,7 @@ U32 LLAvatarJointCollisionVolume::render( F32 pixelArea, BOOL first_pass, BOOL i LLVector3 LLAvatarJointCollisionVolume::getVolumePos(LLVector3 &offset) { - mUpdateXform = TRUE; + mUpdateXform = true; LLVector3 result = offset; result.scaleVec(getScale()); diff --git a/indra/llappearance/llavatarjoint.h b/indra/llappearance/llavatarjoint.h index 052852fa3d..09269bbc3f 100644 --- a/indra/llappearance/llavatarjoint.h +++ b/indra/llappearance/llavatarjoint.h @@ -52,14 +52,14 @@ public: virtual ~LLAvatarJoint(); // Gets the validity of this joint - BOOL getValid() { return mValid; } + bool getValid() { return mValid; } // Sets the validity of this joint - virtual void setValid( BOOL valid, BOOL recursive=FALSE ); + virtual void setValid( bool valid, bool recursive=false ); // Returns true if this object is transparent. // This is used to determine in which order to draw objects. - virtual BOOL isTransparent() { return mIsTransparent; } + virtual bool isTransparent() { return mIsTransparent; } // Returns true if this object should inherit scale modifiers from its immediate parent virtual bool inheritScale() { return false; } @@ -72,7 +72,7 @@ public: }; // Selects which skeleton components to draw - void setSkeletonComponents( U32 comp, BOOL recursive = TRUE ); + void setSkeletonComponents( U32 comp, bool recursive = true ); // Returns which skeleton components are enables for drawing U32 getSkeletonComponents() { return mComponents; } @@ -90,34 +90,34 @@ public: void setPickName(LLJointPickName name) { mPickName = name; } LLJointPickName getPickName() { return mPickName; } - void setVisible( BOOL visible, BOOL recursive ); + void setVisible( bool visible, bool recursive ); // Takes meshes in mMeshParts and sets each one as a child joint void setMeshesToChildren(); // LLViewerJoint interface - virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ) = 0; + virtual U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false ) = 0; virtual void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area); - virtual void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false); + virtual void updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind = false, bool terse_update = false); virtual bool updateLOD(F32 pixel_area, bool activate); virtual void updateJointGeometry(); virtual void dump(); public: - static BOOL sDisableLOD; + static bool sDisableLOD; avatar_joint_mesh_list_t mMeshParts; //LLViewerJointMesh* void setMeshID( S32 id ) {mMeshID = id;} protected: void init(); - BOOL mValid; - BOOL mIsTransparent; + bool mValid; + bool mIsTransparent; U32 mComponents; F32 mMinPixelArea; LLJointPickName mPickName; - BOOL mVisible; + bool mVisible; S32 mMeshID; }; @@ -128,7 +128,7 @@ public: virtual ~LLAvatarJointCollisionVolume() {}; /*virtual*/ bool inheritScale() { return true; } - /*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ); + /*virtual*/ U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false ); void renderCollision(); diff --git a/indra/llappearance/llavatarjointmesh.cpp b/indra/llappearance/llavatarjointmesh.cpp index f34e23a966..9b2a1d9b4c 100644 --- a/indra/llappearance/llavatarjointmesh.cpp +++ b/indra/llappearance/llavatarjointmesh.cpp @@ -247,7 +247,7 @@ void LLAvatarJointMesh::setTexture( LLGLTexture *texture ) { mLayerSet = NULL; //texture->bindTexture(0); - //texture->setClamp(TRUE, TRUE); + //texture->setClamp(true, true); } } diff --git a/indra/llappearance/llavatarjointmesh.h b/indra/llappearance/llavatarjointmesh.h index a3f6a61218..57cf5a26f8 100644 --- a/indra/llappearance/llavatarjointmesh.h +++ b/indra/llappearance/llavatarjointmesh.h @@ -69,7 +69,7 @@ protected: LLTexLayerSet* mLayerSet; // ptr to a layer set owned by the avatar U32 mTestImageName; // handle to a temporary texture for previewing uploads LLPolyMesh* mMesh; // ptr to a global polymesh - BOOL mCullBackFaces; // true by default + bool mCullBackFaces; // true by default LLFace* mFace; // ptr to a face w/ AGP copy of mesh U32 mFaceIndexCount; @@ -131,7 +131,7 @@ public: // Gets ID for picking S32 getMeshID() { return mMeshID; } - void setIsTransparent(BOOL is_transparent) { mIsTransparent = is_transparent; } + void setIsTransparent(bool is_transparent) { mIsTransparent = is_transparent; } private: // Allocate skin data diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp index 83f2ab1266..e832176ae8 100644 --- a/indra/llappearance/lldriverparam.cpp +++ b/indra/llappearance/lldriverparam.cpp @@ -461,14 +461,14 @@ void LLDriverParam::stopAnimating() for(LLDrivenEntry& driven : mDriven) { - driven.mParam->setAnimating(FALSE); + driven.mParam->setAnimating(false); } } /*virtual*/ bool LLDriverParam::linkDrivenParams(visual_param_mapper mapper, bool only_cross_params) { - BOOL success = true; + bool success = true; for (LLDrivenEntryInfo& driven_info : getInfo()->mDrivenInfoList) { S32 driven_id = driven_info.mDrivenID; diff --git a/indra/llappearance/lllocaltextureobject.cpp b/indra/llappearance/lllocaltextureobject.cpp index ff82e4e8e3..84c0fd8380 100644 --- a/indra/llappearance/lllocaltextureobject.cpp +++ b/indra/llappearance/lllocaltextureobject.cpp @@ -36,14 +36,14 @@ LLLocalTextureObject::LLLocalTextureObject() : - mIsBakedReady(FALSE), + mIsBakedReady(false), mDiscard(MAX_DISCARD_LEVEL+1) { mImage = NULL; } LLLocalTextureObject::LLLocalTextureObject(LLGLTexture* image, const LLUUID& id) : - mIsBakedReady(FALSE), + mIsBakedReady(false), mDiscard(MAX_DISCARD_LEVEL+1) { mImage = image; @@ -206,7 +206,7 @@ void LLLocalTextureObject::setDiscard(S32 new_discard) mDiscard = new_discard; } -void LLLocalTextureObject::setBakedReady(BOOL ready) +void LLLocalTextureObject::setBakedReady(bool ready) { mIsBakedReady = ready; } diff --git a/indra/llappearance/lllocaltextureobject.h b/indra/llappearance/lllocaltextureobject.h index 5ca503baf4..a5118ffde3 100644 --- a/indra/llappearance/lllocaltextureobject.h +++ b/indra/llappearance/lllocaltextureobject.h @@ -63,7 +63,7 @@ public: void setID(LLUUID new_id); void setDiscard(S32 new_discard); - void setBakedReady(BOOL ready); + void setBakedReady(bool ready); protected: @@ -78,7 +78,7 @@ private: LLUUID mID; - BOOL mIsBakedReady; + bool mIsBakedReady; S32 mDiscard; }; diff --git a/indra/llappearance/llpolymesh.cpp b/indra/llappearance/llpolymesh.cpp index a51d4dec7e..42a37c4e16 100644 --- a/indra/llappearance/llpolymesh.cpp +++ b/indra/llappearance/llpolymesh.cpp @@ -72,8 +72,8 @@ LLPolyMeshSharedData::LLPolyMeshSharedData() mTexCoords = NULL; mDetailTexCoords = NULL; mWeights = NULL; - mHasWeights = FALSE; - mHasDetailTexCoords = FALSE; + mHasWeights = false; + mHasDetailTexCoords = false; mNumFaces = 0; mFaces = NULL; @@ -615,7 +615,7 @@ bool LLPolyMeshSharedData::loadMesh( const std::string& fileName ) std::string morph_name(morphName); LLPolyMorphData* morph_data = new LLPolyMorphData(morph_name); - BOOL result = morph_data->loadBinary(fp, this); + bool result = morph_data->loadBinary(fp, this); if (!result) { @@ -705,12 +705,12 @@ bool LLPolyMeshSharedData::loadMesh( const std::string& fileName ) } } - status = TRUE; + status = true; } else { LL_ERRS() << "invalid mesh file header: " << fileName << LL_ENDL; - status = FALSE; + status = false; } if (0 == mNumJointNames) diff --git a/indra/llappearance/llpolymesh.h b/indra/llappearance/llpolymesh.h index 040868ea2a..e0822bf0e7 100644 --- a/indra/llappearance/llpolymesh.h +++ b/indra/llappearance/llpolymesh.h @@ -79,8 +79,8 @@ private: LLVector2 *mDetailTexCoords; F32 *mWeights; - BOOL mHasWeights; - BOOL mHasDetailTexCoords; + bool mHasWeights; + bool mHasDetailTexCoords; // face data S32 mNumFaces; @@ -138,7 +138,7 @@ public: const S32 *getSharedVert(S32 vert); - BOOL isLOD() { return (mReferenceData != NULL); } + bool isLOD() { return (mReferenceData != NULL); } }; @@ -204,13 +204,13 @@ public: } // Returns whether or not the mesh has detail texture coords - BOOL hasDetailTexCoords() { + bool hasDetailTexCoords() { llassert (mSharedData); return mSharedData->mHasDetailTexCoords; } // Returns whether or not the mesh has vertex weights - BOOL hasWeights() const{ + bool hasWeights() const{ llassert (mSharedData); return mSharedData->mHasWeights; } @@ -316,7 +316,7 @@ public: // Get indices U32* getIndices() { return mSharedData ? mSharedData->mTriangleIndices : NULL; } - BOOL isLOD() { return mSharedData && mSharedData->isLOD(); } + bool isLOD() { return mSharedData && mSharedData->isLOD(); } void setAvatar(LLAvatarAppearance* avatarp) { mAvatarp = avatarp; } LLAvatarAppearance* getAvatar() { return mAvatarp; } diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 73811a550c..4b94ed48b1 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -256,7 +256,7 @@ void LLPolyMorphData::freeData() // LLPolyMorphTargetInfo() //----------------------------------------------------------------------------- LLPolyMorphTargetInfo::LLPolyMorphTargetInfo() - : mIsClothingMorph(FALSE) + : mIsClothingMorph(false) { } @@ -659,7 +659,7 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) //----------------------------------------------------------------------------- // applyMask() //----------------------------------------------------------------------------- -void LLPolyMorphTarget::applyMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert) +void LLPolyMorphTarget::applyMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, bool invert) { LLVector4a *clothing_weights = getInfo()->mIsClothingMorph ? mMesh->getWritableClothingWeights() : NULL; @@ -749,7 +749,7 @@ void LLPolyMorphTarget::applyVolumeChanges(F32 delta_weight) LLPolyVertexMask::LLPolyVertexMask(LLPolyMorphData* morph_data) : mWeights(new F32[morph_data->mNumIndices]), mMorphData(morph_data), - mWeightsGenerated(FALSE) + mWeightsGenerated(false) { llassert(mMorphData != NULL); llassert(mMorphData->mNumIndices > 0); @@ -780,10 +780,10 @@ LLPolyVertexMask::~LLPolyVertexMask() //----------------------------------------------------------------------------- // generateMask() //----------------------------------------------------------------------------- -void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights) +void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 height, S32 num_components, bool invert, LLVector4a *clothing_weights) { // RN debug output that uses Image Debugger (http://www.cs.unc.edu/~baxter/projects/imdebug/) -// BOOL debugImg = FALSE; +// bool debugImg = false; // if (debugImg) // { // if (invert) @@ -827,7 +827,7 @@ void LLPolyVertexMask::generateMask(const U8 *maskTextureData, S32 width, S32 he clothing_weights[vertIndex].getF32ptr()[VW] = mWeights[index]; } } - mWeightsGenerated = TRUE; + mWeightsGenerated = true; } //----------------------------------------------------------------------------- diff --git a/indra/llappearance/llpolymorph.h b/indra/llappearance/llpolymorph.h index f52e9dce8d..5544344036 100644 --- a/indra/llappearance/llpolymorph.h +++ b/indra/llappearance/llpolymorph.h @@ -84,14 +84,14 @@ public: LLPolyVertexMask(const LLPolyVertexMask& pOther); ~LLPolyVertexMask(); - void generateMask(const U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert, LLVector4a *clothing_weights); + void generateMask(const U8 *maskData, S32 width, S32 height, S32 num_components, bool invert, LLVector4a *clothing_weights); F32* getMorphMaskWeights(); protected: F32* mWeights; LLPolyMorphData *mMorphData; - BOOL mWeightsGenerated; + bool mWeightsGenerated; }; @@ -133,7 +133,7 @@ public: protected: std::string mMorphName; - BOOL mIsClothingMorph; + bool mIsClothingMorph; typedef std::vector volume_info_list_t; volume_info_list_t mVolumeInfoList; }; @@ -159,7 +159,7 @@ public: /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; // LLVisualParam Virtual functions - ///*virtual*/ BOOL parseData(LLXmlTreeNode* node); + ///*virtual*/ bool parseData(LLXmlTreeNode* node); /*virtual*/ void apply( ESex sex ); // LLViewerVisualParam Virtual functions @@ -170,7 +170,7 @@ public: /*virtual*/ const LLVector4a* getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh); /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh); - void applyMask(const U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert); + void applyMask(const U8 *maskData, S32 width, S32 height, S32 num_components, bool invert); void addPendingMorphMask() { mNumMorphMasksPending++; } void applyVolumeChanges(F32 delta_weight); // SL-315 - for resetSkeleton() @@ -183,7 +183,7 @@ protected: LLPolyVertexMask * mVertMask; ESex mLastSex; // number of morph masks that haven't been generated, must be 0 before this morph is applied - BOOL mNumMorphMasksPending; + BOOL mNumMorphMasksPending; typedef std::vector volume_list_t; volume_list_t mVolumeMorphs; diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index e8405ddb1f..3dd21ff62b 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -68,7 +68,7 @@ bool LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) std::string name; LLVector3 scale; LLVector3 pos; - BOOL haspos = false; + bool haspos = false; static LLStdStringHandle name_string = LLXmlTree::addAttributeString("name"); if (!bone->getFastAttributeString(name_string, name)) diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h index 83d9b90d69..4c69f7e70a 100644 --- a/indra/llappearance/llpolyskeletaldistortion.h +++ b/indra/llappearance/llpolyskeletaldistortion.h @@ -51,7 +51,7 @@ class LLAvatarAppearance; //----------------------------------------------------------------------------- struct LLPolySkeletalBoneInfo { - LLPolySkeletalBoneInfo(std::string &name, LLVector3 &scale, LLVector3 &pos, BOOL haspos) + LLPolySkeletalBoneInfo(std::string &name, LLVector3 &scale, LLVector3 &pos, bool haspos) : mBoneName(name), mScaleDeformation(scale), mPositionDeformation(pos), @@ -59,7 +59,7 @@ struct LLPolySkeletalBoneInfo std::string mBoneName; LLVector3 mScaleDeformation; LLVector3 mPositionDeformation; - BOOL mHasPositionDeformation; + bool mHasPositionDeformation; }; class alignas(16) LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo @@ -97,7 +97,7 @@ public: /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; // LLVisualParam Virtual functions - ///*virtual*/ BOOL parseData(LLXmlTreeNode* node); + ///*virtual*/ bool parseData(LLXmlTreeNode* node); /*virtual*/ void apply( ESex sex ); // LLViewerVisualParam Virtual functions diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp index b450b1284e..cd416d6791 100644 --- a/indra/llappearance/lltexglobalcolor.cpp +++ b/indra/llappearance/lltexglobalcolor.cpp @@ -58,7 +58,7 @@ bool LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info) for (LLTexLayerParamColorInfo* color_info : mInfo->mParamColorInfoList) { LLTexParamGlobalColor* param_color = new LLTexParamGlobalColor(this); - if (!param_color->setInfo(color_info, TRUE)) + if (!param_color->setInfo(color_info, true)) { mInfo = NULL; return false; diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 73ce5257e5..15a031f90c 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -60,16 +60,16 @@ public: ~LLTexLayerInfo(); bool parseXml(LLXmlTreeNode* node); - BOOL createVisualParams(LLAvatarAppearance *appearance); - BOOL isUserSettable() { return mLocalTexture != -1; } + bool createVisualParams(LLAvatarAppearance *appearance); + bool isUserSettable() { return mLocalTexture != -1; } S32 getLocalTexture() const { return mLocalTexture; } - BOOL getOnlyAlpha() const { return mUseLocalTextureAlphaOnly; } + bool getOnlyAlpha() const { return mUseLocalTextureAlphaOnly; } std::string getName() const { return mName; } private: std::string mName; - BOOL mWriteAllChannels; // Don't use masking. Just write RGBA into buffer, + bool mWriteAllChannels; // Don't use masking. Just write RGBA into buffer, LLTexLayerInterface::ERenderPass mRenderPass; std::string mGlobalColor; @@ -77,11 +77,11 @@ private: S32 mLocalTexture; std::string mStaticImageFileName; - BOOL mStaticImageIsMask; - BOOL mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask - BOOL mIsVisibilityMask; + bool mStaticImageIsMask; + bool mUseLocalTextureAlphaOnly; // Ignore RGB channels from the input texture. Use alpha as a mask + bool mIsVisibilityMask; - typedef std::vector< std::pair< std::string,BOOL > > morph_name_list_t; + typedef std::vector< std::pair< std::string,bool > > morph_name_list_t; morph_name_list_t mMorphNameList; param_color_info_list_t mParamColorInfoList; param_alpha_info_list_t mParamAlphaInfoList; @@ -130,17 +130,17 @@ void LLTexLayerSetBuffer::preRenderTexLayerSet() } // virtual -void LLTexLayerSetBuffer::postRenderTexLayerSet(BOOL success) +void LLTexLayerSetBuffer::postRenderTexLayerSet(bool success) { popProjection(); } -BOOL LLTexLayerSetBuffer::renderTexLayerSet(LLRenderTarget* bound_target) +bool LLTexLayerSetBuffer::renderTexLayerSet(LLRenderTarget* bound_target) { // Default color mask for tex layer render gGL.setColorMask(true, true); - BOOL success = TRUE; + bool success = true; gAlphaMaskProgram.bind(); gAlphaMaskProgram.setMinimumAlpha(0.004f); @@ -175,7 +175,7 @@ LLTexLayerSetInfo::LLTexLayerSetInfo() : mBodyRegion( "" ), mWidth( 512 ), mHeight( 512 ), - mClearAlpha( TRUE ) + mClearAlpha( true ) { } @@ -252,11 +252,11 @@ void LLTexLayerSetInfo::createVisualParams(LLAvatarAppearance *appearance) // An ordered set of texture layers that get composited into a single texture. //----------------------------------------------------------------------------- -BOOL LLTexLayerSet::sHasCaches = FALSE; +bool LLTexLayerSet::sHasCaches = false; LLTexLayerSet::LLTexLayerSet(LLAvatarAppearance* const appearance) : mAvatarAppearance( appearance ), - mIsVisible( TRUE ), + mIsVisible( true ), mBakedTexIndex(LLAvatarAppearanceDefines::BAKED_HEAD), mInfo( NULL ) { @@ -277,7 +277,7 @@ LLTexLayerSet::~LLTexLayerSet() // setInfo //----------------------------------------------------------------------------- -BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info) +bool LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info) { llassert(mInfo == NULL); mInfo = info; @@ -323,7 +323,7 @@ BOOL LLTexLayerSet::setInfo(const LLTexLayerSetInfo *info) // parseData //----------------------------------------------------------------------------- -BOOL LLTexLayerSet::parseData(LLXmlTreeNode* node) +bool LLTexLayerSet::parseData(LLXmlTreeNode* node) { LLTexLayerSetInfo *info = new LLTexLayerSetInfo; @@ -354,10 +354,10 @@ void LLTexLayerSet::deleteCaches() } -BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target ) +bool LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target ) { - BOOL success = TRUE; - mIsVisible = TRUE; + bool success = true; + mIsVisible = true; if (mMaskLayerList.size() > 0) { @@ -365,7 +365,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* { if (layer->isInvisibleAlphaMask()) { - mIsVisible = FALSE; + mIsVisible = false; } } } @@ -425,8 +425,8 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height, LLRenderTarget* } -BOOL LLTexLayerSet::isBodyRegion(const std::string& region) const -{ +bool LLTexLayerSet::isBodyRegion(const std::string& region) const +{ return mInfo->mBodyRegion == region; } @@ -484,7 +484,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, { gGL.flush(); { - LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, TRUE); + LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(info->mStaticAlphaFileName, true); if( tex ) { LLGLSUIDefault gls_ui; @@ -533,7 +533,7 @@ void LLTexLayerSet::applyMorphMask(const U8* tex_data, S32 width, S32 height, S3 mAvatarAppearance->applyMorphMask(tex_data, width, height, num_components, mBakedTexIndex); } -BOOL LLTexLayerSet::isMorphValid() const +bool LLTexLayerSet::isMorphValid() const { for(const LLTexLayerInterface* layer : mLayerList) { @@ -561,13 +561,13 @@ void LLTexLayerSet::invalidateMorphMasks() // LLTexLayerInfo //----------------------------------------------------------------------------- LLTexLayerInfo::LLTexLayerInfo() : - mWriteAllChannels( FALSE ), + mWriteAllChannels( false ), mRenderPass(LLTexLayer::RP_COLOR), mFixedColor( 0.f, 0.f, 0.f, 0.f ), mLocalTexture( -1 ), - mStaticImageIsMask( FALSE ), - mUseLocalTextureAlphaOnly(FALSE), - mIsVisibilityMask(FALSE) + mStaticImageIsMask( false ), + mUseLocalTextureAlphaOnly(false), + mIsVisibilityMask(false) { } @@ -609,7 +609,7 @@ bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node) node->getFastAttributeString( global_color_string, mGlobalColor ); // Visibility mask (optional) - BOOL is_visibility; + bool is_visibility; static LLStdStringHandle visibility_mask_string = LLXmlTree::addAttributeString("visibility_mask"); if (node->getFastAttributeBOOL(visibility_mask_string, is_visibility)) { @@ -675,10 +675,10 @@ bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node) static LLStdStringHandle morph_name_string = LLXmlTree::addAttributeString("morph_name"); if (maskNode->getFastAttributeString(morph_name_string, morph_name)) { - BOOL invert = FALSE; + bool invert = false; static LLStdStringHandle invert_string = LLXmlTree::addAttributeString("invert"); maskNode->getFastAttributeBOOL(invert_string, invert); - mMorphNameList.push_back(std::pair(morph_name,invert)); + mMorphNameList.push_back(std::pair(morph_name,invert)); } } @@ -714,28 +714,28 @@ bool LLTexLayerInfo::parseXml(LLXmlTreeNode* node) return true; } -BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance) +bool LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance) { - BOOL success = true; + bool success = true; for (LLTexLayerParamColorInfo* color_info : mParamColorInfoList) { LLTexLayerParamColor* param_color = new LLTexLayerParamColor(appearance); - if (!param_color->setInfo(color_info, TRUE)) + if (!param_color->setInfo(color_info, true)) { LL_WARNS() << "NULL TexLayer Color Param could not be added to visual param list. Deleting." << LL_ENDL; delete param_color; - success = FALSE; + success = false; } } for (LLTexLayerParamAlphaInfo* alpha_info : mParamAlphaInfoList) { LLTexLayerParamAlpha* param_alpha = new LLTexLayerParamAlpha(appearance); - if (!param_alpha->setInfo(alpha_info, TRUE)) + if (!param_alpha->setInfo(alpha_info, true)) { LL_WARNS() << "NULL TexLayer Alpha Param could not be added to visual param list. Deleting." << LL_ENDL; delete param_alpha; - success = FALSE; + success = false; } } @@ -744,9 +744,9 @@ BOOL LLTexLayerInfo::createVisualParams(LLAvatarAppearance *appearance) LLTexLayerInterface::LLTexLayerInterface(LLTexLayerSet* const layer_set): mTexLayerSet( layer_set ), - mMorphMasksValid( FALSE ), + mMorphMasksValid( false ), mInfo(NULL), - mHasMorph(FALSE) + mHasMorph(false) { } @@ -760,7 +760,7 @@ LLTexLayerInterface::LLTexLayerInterface(const LLTexLayerInterface &layer, LLWea mHasMorph = layer.mHasMorph; } -BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions +bool LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearable ) // This sets mInfo and calls initialization functions { // setInfo should only be called once. Code is not robust enough to handle redefinition of a texlayer. // Not a critical warning, but could be useful for debugging later issues. -Nyx @@ -778,7 +778,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab if (!wearable) { param_color = new LLTexLayerParamColor(this); - if (!param_color->setInfo(color_info, TRUE)) + if (!param_color->setInfo(color_info, true)) { mInfo = NULL; return false; @@ -803,7 +803,7 @@ BOOL LLTexLayerInterface::setInfo(const LLTexLayerInfo *info, LLWearable* wearab if (!wearable) { param_alpha = new LLTexLayerParamAlpha( this ); - if (!param_alpha->setInfo(alpha_info, TRUE)) + if (!param_alpha->setInfo(alpha_info, true)) { mInfo = NULL; return false; @@ -893,14 +893,14 @@ const std::string& LLTexLayerInterface::getGlobalColor() const return mInfo->mGlobalColor; } -BOOL LLTexLayerInterface::isVisibilityMask() const +bool LLTexLayerInterface::isVisibilityMask() const { return mInfo->mIsVisibilityMask; } void LLTexLayerInterface::invalidateMorphMasks() { - mMorphMasksValid = FALSE; + mMorphMasksValid = false; } LLViewerVisualParam* LLTexLayerInterface::getVisualParamPtr(S32 index) const @@ -980,7 +980,7 @@ void LLTexLayer::asLLSD(LLSD& sd) const // setInfo //----------------------------------------------------------------------------- -BOOL LLTexLayer::setInfo(const LLTexLayerInfo* info, LLWearable* wearable ) +bool LLTexLayer::setInfo(const LLTexLayerInfo* info, LLWearable* wearable ) { return LLTexLayerInterface::setInfo(info, wearable); } @@ -1020,14 +1020,14 @@ void LLTexLayer::calculateTexLayerColor(const param_color_list_t ¶m_list, LL } } -BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) +bool LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) { // *TODO: Is this correct? //gPipeline.disableLights(); stop_glerror(); LLColor4 net_color; - BOOL color_specified = findNetColor(&net_color); + bool color_specified = findNetColor(&net_color); if (mTexLayerSet->getAvatarAppearance()->mIsDummy) { @@ -1035,7 +1035,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou net_color = LLAvatarAppearance::getDummyColor(); } - BOOL success = TRUE; + bool success = true; // If you can't see the layer, don't render it. if( is_approx_zero( net_color.mV[VW] ) ) @@ -1043,7 +1043,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou return success; } - BOOL alpha_mask_specified = FALSE; + bool alpha_mask_specified = false; param_alpha_list_t::const_iterator iter = mParamAlphaList.begin(); if( iter != mParamAlphaList.end() ) { @@ -1051,7 +1051,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou // However, we can't do this optimization if we have morph masks that need updating. /* if (!mHasMorph) { - BOOL skip_layer = TRUE; + bool skip_layer = true; while( iter != mParamAlphaList.end() ) { @@ -1059,7 +1059,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou if( !param->getSkip() ) { - skip_layer = FALSE; + skip_layer = false; break; } @@ -1074,7 +1074,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou const bool force_render = true; renderMorphMasks(x, y, width, height, net_color, bound_target, force_render); - alpha_mask_specified = TRUE; + alpha_mask_specified = true; gGL.flush(); gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ONE_MINUS_DEST_ALPHA); } @@ -1115,7 +1115,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode(); - gGL.getTexUnit(0)->bind(tex, TRUE); + gGL.getTexUnit(0)->bind(tex, true); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); gl_rect_2d_simple_tex( width, height ); @@ -1130,7 +1130,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou } // else // { -// success = FALSE; +// success = false; // } } } @@ -1141,13 +1141,13 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bou LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask); if( tex ) { - gGL.getTexUnit(0)->bind(tex, TRUE); + gGL.getTexUnit(0)->bind(tex, true); gl_rect_2d_simple_tex( width, height ); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } else { - success = FALSE; + success = false; } } } @@ -1199,7 +1199,7 @@ const U8* LLTexLayer::getAlphaData() const return (iter2 == mAlphaCache.end()) ? 0 : iter2->second; } -BOOL LLTexLayer::findNetColor(LLColor4* net_color) const +bool LLTexLayer::findNetColor(LLColor4* net_color) const { // Color is either: // * one or more color parameters (weighted colors) (which may make use of a global color or fixed color) @@ -1243,9 +1243,9 @@ BOOL LLTexLayer::findNetColor(LLColor4* net_color) const return false; // No need to draw a separate colored polygon } -BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) +bool LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) { - BOOL success = true; + bool success = true; gGL.flush(); @@ -1255,14 +1255,14 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) if( tex ) { gAlphaMaskProgram.setMinimumAlpha(0.f); - gGL.getTexUnit(0)->bind(tex, TRUE); + gGL.getTexUnit(0)->bind(tex, true); gl_rect_2d_simple_tex( width, height ); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gAlphaMaskProgram.setMinimumAlpha(0.004f); } else { - success = FALSE; + success = false; } } else @@ -1297,7 +1297,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC return; } LL_PROFILE_ZONE_SCOPED; - BOOL success = TRUE; + bool success = true; llassert( !mParamAlphaList.empty() ); @@ -1342,7 +1342,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC { LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode(); - gGL.getTexUnit(0)->bind(tex, TRUE); + gGL.getTexUnit(0)->bind(tex, true); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); gl_rect_2d_simple_tex( width, height ); @@ -1359,7 +1359,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC { if( (tex->getComponents() == 4) || (tex->getComponents() == 1) ) { - gGL.getTexUnit(0)->bind(tex, TRUE); + gGL.getTexUnit(0)->bind(tex, true); gl_rect_2d_simple_tex( width, height ); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } @@ -1480,7 +1480,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC getTexLayerSet()->getAvatarAppearance()->dirtyMesh(); - mMorphMasksValid = TRUE; + mMorphMasksValid = true; getTexLayerSet()->applyMorphMask(alpha_data, width, height, 1); } } @@ -1513,7 +1513,7 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 } } -/*virtual*/ BOOL LLTexLayer::isInvisibleAlphaMask() const +/*virtual*/ bool LLTexLayer::isInvisibleAlphaMask() const { if (mLocalTextureObject) { @@ -1582,7 +1582,7 @@ LLTexLayerTemplate::~LLTexLayerTemplate() // setInfo //----------------------------------------------------------------------------- -/*virtual*/ BOOL LLTexLayerTemplate::setInfo(const LLTexLayerInfo* info, LLWearable* wearable ) +/*virtual*/ bool LLTexLayerTemplate::setInfo(const LLTexLayerInfo* info, LLWearable* wearable ) { return LLTexLayerInterface::setInfo(info, wearable); } @@ -1631,14 +1631,14 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const return layer; } -/*virtual*/ BOOL LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) +/*virtual*/ bool LLTexLayerTemplate::render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) { if(!mInfo) { - return FALSE ; + return false ; } - BOOL success = TRUE; + bool success = true; updateWearableCache(); for (LLWearable* wearable : mWearableCache) { @@ -1663,9 +1663,9 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const return success; } -/*virtual*/ BOOL LLTexLayerTemplate::blendAlphaTexture( S32 x, S32 y, S32 width, S32 height) // Multiplies a single alpha texture against the frame buffer +/*virtual*/ bool LLTexLayerTemplate::blendAlphaTexture( S32 x, S32 y, S32 width, S32 height) // Multiplies a single alpha texture against the frame buffer { - BOOL success = TRUE; + bool success = true; U32 num_wearables = updateWearableCache(); for (U32 i = 0; i < num_wearables; i++) { @@ -1689,8 +1689,8 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const } } -/*virtual*/ void LLTexLayerTemplate::setHasMorph(BOOL newval) -{ +/*virtual*/ void LLTexLayerTemplate::setHasMorph(bool newval) +{ mHasMorph = newval; U32 num_wearables = updateWearableCache(); for (U32 i = 0; i < num_wearables; i++) @@ -1716,7 +1716,7 @@ LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) const } } -/*virtual*/ BOOL LLTexLayerTemplate::isInvisibleAlphaMask() const +/*virtual*/ bool LLTexLayerTemplate::isInvisibleAlphaMask() const { U32 num_wearables = updateWearableCache(); for (U32 i = 0; i < num_wearables; i++) @@ -1853,7 +1853,7 @@ LLImageTGA* LLTexLayerStaticImageList::getImageTGA(const std::string& file_name) // Returns a GL Image (without a backing ImageRaw) that contains the decoded data from a tga file named file_name. // Caches the result to speed identical subsequent requests. -LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, BOOL is_mask) +LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, bool is_mask) { LL_PROFILE_ZONE_SCOPED; LLPointer tex; @@ -1867,7 +1867,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, else { llassert(gTextureManagerBridgep); - tex = gTextureManagerBridgep->getLocalTexture( FALSE ); + tex = gTextureManagerBridgep->getLocalTexture( false ); LLPointer image_raw = new LLImageRaw; if( loadImageRaw( file_name, image_raw ) ) { @@ -1883,7 +1883,7 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, image_raw->copyUnscaledAlphaMask(alpha_image_raw, LLColor4U::black); } - tex->createGLTexture(0, image_raw, 0, TRUE, LLGLTexture::LOCAL); + tex->createGLTexture(0, image_raw, 0, true, LLGLTexture::LOCAL); gGL.getTexUnit(0)->bind(tex); tex->setAddressMode(LLTexUnit::TAM_CLAMP); @@ -1901,11 +1901,11 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name, } // Reads a .tga file, decodes it, and puts the decoded data in image_raw. -// Returns TRUE if successful. -BOOL LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw) +// Returns true if successful. +bool LLTexLayerStaticImageList::loadImageRaw(const std::string& file_name, LLImageRaw* image_raw) { LL_PROFILE_ZONE_SCOPED; - BOOL success = FALSE; + bool success = false; std::string path; path = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,file_name); LLPointer image_tga = new LLImageTGA( path ); diff --git a/indra/llappearance/lltexlayer.h b/indra/llappearance/lltexlayer.h index 2cca2b6b12..bc55db01fc 100644 --- a/indra/llappearance/lltexlayer.h +++ b/indra/llappearance/lltexlayer.h @@ -65,13 +65,13 @@ public: LLTexLayerInterface(const LLTexLayerInterface &layer, LLWearable *wearable); virtual ~LLTexLayerInterface() {} - virtual BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) = 0; + virtual bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) = 0; virtual void deleteCaches() = 0; - virtual BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) = 0; - virtual BOOL isInvisibleAlphaMask() const = 0; + virtual bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) = 0; + virtual bool isInvisibleAlphaMask() const = 0; const LLTexLayerInfo* getInfo() const { return mInfo; } - virtual BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // sets mInfo, calls initialization functions + virtual bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // sets mInfo, calls initialization functions LLWearableType::EType getWearableType() const; LLAvatarAppearanceDefines::ETextureIndex getLocalTextureIndex() const; @@ -80,16 +80,16 @@ public: LLTexLayerSet* const getTexLayerSet() { return mTexLayerSet; } void invalidateMorphMasks(); - virtual void setHasMorph(BOOL newval) { mHasMorph = newval; } - BOOL hasMorph() const { return mHasMorph; } - BOOL isMorphValid() const { return mMorphMasksValid; } + virtual void setHasMorph(bool newval) { mHasMorph = newval; } + bool hasMorph() const { return mHasMorph; } + bool isMorphValid() const { return mMorphMasksValid; } void requestUpdate(); virtual void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target) = 0; - BOOL hasAlphaParams() const { return !mParamAlphaList.empty(); } + bool hasAlphaParams() const { return !mParamAlphaList.empty(); } ERenderPass getRenderPass() const; - BOOL isVisibilityMask() const; + bool isVisibilityMask() const; virtual void asLLSD(LLSD& sd) const {} @@ -100,8 +100,8 @@ protected: protected: LLTexLayerSet* const mTexLayerSet; const LLTexLayerInfo* mInfo; - BOOL mMorphMasksValid; - BOOL mHasMorph; + bool mMorphMasksValid; + bool mHasMorph; // Layers can have either mParamColorList, mGlobalColor, or mFixedColor. They are looked for in that order. param_color_list_t mParamColorList; @@ -121,13 +121,13 @@ public: LLTexLayerTemplate(LLTexLayerSet* const layer_set, LLAvatarAppearance* const appearance); LLTexLayerTemplate(const LLTexLayerTemplate &layer); /*virtual*/ ~LLTexLayerTemplate(); - /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target); - /*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions - /*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer + /*virtual*/ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target); + /*virtual*/ bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions + /*virtual*/ bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer /*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target); - /*virtual*/ void setHasMorph(BOOL newval); + /*virtual*/ void setHasMorph(bool newval); /*virtual*/ void deleteCaches(); - /*virtual*/ BOOL isInvisibleAlphaMask() const; + /*virtual*/ bool isInvisibleAlphaMask() const; protected: U32 updateWearableCache() const; LLTexLayer* getLayer(U32 i) const; @@ -151,18 +151,18 @@ public: LLTexLayer(const LLTexLayerTemplate &layer_template, LLLocalTextureObject *lto, LLWearable *wearable); /*virtual*/ ~LLTexLayer(); - /*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions - /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target); + /*virtual*/ bool setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions + /*virtual*/ bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target); /*virtual*/ void deleteCaches(); const U8* getAlphaData() const; - BOOL findNetColor(LLColor4* color) const; - /*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer + bool findNetColor(LLColor4* color) const; + /*virtual*/ bool blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer /*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target); void renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, LLRenderTarget* bound_target, bool force_render); void addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height, LLRenderTarget* bound_target); - /*virtual*/ BOOL isInvisibleAlphaMask() const; + /*virtual*/ bool isInvisibleAlphaMask() const; void setLTO(LLLocalTextureObject *lto) { mLocalTextureObject = lto; } LLLocalTextureObject* getLTO() { return mLocalTextureObject; } @@ -197,14 +197,14 @@ public: void gatherMorphMaskAlpha(U8 *data, S32 origin_x, S32 origin_y, S32 width, S32 height, LLRenderTarget* bound_target); const LLTexLayerSetInfo* getInfo() const { return mInfo; } - BOOL setInfo(const LLTexLayerSetInfo *info); // This sets mInfo and calls initialization functions + bool setInfo(const LLTexLayerSetInfo *info); // This sets mInfo and calls initialization functions - BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr); + bool render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr); void renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target = nullptr, bool forceClear = false); - BOOL isBodyRegion(const std::string& region) const; + bool isBodyRegion(const std::string& region) const; void applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components); - BOOL isMorphValid() const; + bool isMorphValid() const; virtual void requestUpdate() = 0; void invalidateMorphMasks(); void deleteCaches(); @@ -213,12 +213,12 @@ public: LLAvatarAppearance* getAvatarAppearance() const { return mAvatarAppearance; } const std::string getBodyRegionName() const; - BOOL hasComposite() const { return (mComposite.notNull()); } + bool hasComposite() const { return (mComposite.notNull()); } LLAvatarAppearanceDefines::EBakedTextureIndex getBakedTexIndex() const { return mBakedTexIndex; } void setBakedTexIndex(LLAvatarAppearanceDefines::EBakedTextureIndex index) { mBakedTexIndex = index; } - BOOL isVisible() const { return mIsVisible; } + bool isVisible() const { return mIsVisible; } - static BOOL sHasCaches; + static bool sHasCaches; protected: typedef std::vector layer_list_t; @@ -226,7 +226,7 @@ protected: layer_list_t mMaskLayerList; LLPointer mComposite; LLAvatarAppearance* const mAvatarAppearance; // note: backlink only; don't make this an LLPointer. - BOOL mIsVisible; + bool mIsVisible; LLAvatarAppearanceDefines::EBakedTextureIndex mBakedTexIndex; const LLTexLayerSetInfo* mInfo; @@ -252,7 +252,7 @@ protected: S32 mWidth; S32 mHeight; std::string mStaticAlphaFileName; - BOOL mClearAlpha; // Set alpha to 1 for this layerset (if there is no mStaticAlphaFileName) + bool mClearAlpha; // Set alpha to 1 for this layerset (if there is no mStaticAlphaFileName) typedef std::vector layer_info_list_t; layer_info_list_t mLayerInfoList; }; @@ -274,13 +274,13 @@ protected: void pushProjection() const; void popProjection() const; virtual void preRenderTexLayerSet(); - virtual void midRenderTexLayerSet(BOOL success) {} - virtual void postRenderTexLayerSet(BOOL success); + virtual void midRenderTexLayerSet(bool success) {} + virtual void postRenderTexLayerSet(bool success); virtual S32 getCompositeOriginX() const = 0; virtual S32 getCompositeOriginY() const = 0; virtual S32 getCompositeWidth() const = 0; virtual S32 getCompositeHeight() const = 0; - BOOL renderTexLayerSet(LLRenderTarget* bound_target); + bool renderTexLayerSet(LLRenderTarget* bound_target); LLTexLayerSet* const mTexLayerSet; }; @@ -294,12 +294,12 @@ class LLTexLayerStaticImageList : public LLSingleton LLSINGLETON(LLTexLayerStaticImageList); ~LLTexLayerStaticImageList(); public: - LLGLTexture* getTexture(const std::string& file_name, BOOL is_mask); + LLGLTexture* getTexture(const std::string& file_name, bool is_mask); LLImageTGA* getImageTGA(const std::string& file_name); void deleteCachedImages(); void dumpByteCount() const; protected: - BOOL loadImageRaw(const std::string& file_name, LLImageRaw* image_raw); + bool loadImageRaw(const std::string& file_name, LLImageRaw* image_raw); private: LLStringTable mImageNames; typedef std::map > texture_map_t; diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index 4cfbdc01c1..8ad718a506 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -69,7 +69,7 @@ LLTexLayerParam::LLTexLayerParam(const LLTexLayerParam& pOther) { } -BOOL LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance) +bool LLTexLayerParam::setInfo(LLViewerVisualParamInfo *info, bool add_to_appearance) { LLViewerVisualParam::setInfo(info); @@ -123,8 +123,8 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLTexLayerInterface* layer) mCachedProcessedTexture(NULL), mStaticImageTGA(), mStaticImageRaw(), - mNeedsCreateTexture(FALSE), - mStaticImageInvalid(FALSE), + mNeedsCreateTexture(false), + mStaticImageInvalid(false), mAvgDistortionVec(1.f, 1.f, 1.f), mCachedEffectiveWeight(0.f) { @@ -136,8 +136,8 @@ LLTexLayerParamAlpha::LLTexLayerParamAlpha(LLAvatarAppearance* appearance) mCachedProcessedTexture(NULL), mStaticImageTGA(), mStaticImageRaw(), - mNeedsCreateTexture(FALSE), - mStaticImageInvalid(FALSE), + mNeedsCreateTexture(false), + mStaticImageInvalid(false), mAvgDistortionVec(1.f, 1.f, 1.f), mCachedEffectiveWeight(0.f) { @@ -173,10 +173,10 @@ void LLTexLayerParamAlpha::deleteCaches() mStaticImageTGA = NULL; // deletes image mCachedProcessedTexture = NULL; mStaticImageRaw = NULL; - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; } -BOOL LLTexLayerParamAlpha::getMultiplyBlend() const +bool LLTexLayerParamAlpha::getMultiplyBlend() const { return ((LLTexLayerParamAlphaInfo *)getInfo())->mMultiplyBlend; } @@ -216,7 +216,7 @@ void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value) mTargetWeight = target_value; setWeight(target_value); - mIsAnimating = TRUE; + mIsAnimating = true; if (mNext) { mNext->setAnimationTarget(target_value); @@ -231,7 +231,7 @@ void LLTexLayerParamAlpha::animate(F32 delta) } } -BOOL LLTexLayerParamAlpha::getSkip() const +bool LLTexLayerParamAlpha::getSkip() const { if (!mTexLayer) { @@ -259,10 +259,10 @@ BOOL LLTexLayerParamAlpha::getSkip() const } -BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) +bool LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) { LL_PROFILE_ZONE_SCOPED; - BOOL success = true; + bool success = true; if (!mTexLayer) { @@ -270,7 +270,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) } F32 effective_weight = (mTexLayer->getTexLayerSet()->getAvatarAppearance()->getSex() & getSex()) ? mCurWeight : getDefaultWeight(); - BOOL weight_changed = effective_weight != mCachedEffectiveWeight; + bool weight_changed = effective_weight != mCachedEffectiveWeight; if (getSkip()) { return success; @@ -294,12 +294,12 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) // Don't load the image file until we actually need it the first time. Like now. mStaticImageTGA = LLTexLayerStaticImageList::getInstance()->getImageTGA(info->mStaticImageFileName); // We now have something in one of our caches - LLTexLayerSet::sHasCaches |= mStaticImageTGA.notNull() ? TRUE : FALSE; + LLTexLayerSet::sHasCaches |= mStaticImageTGA.notNull() ? true : false; if (mStaticImageTGA.isNull()) { LL_WARNS() << "Unable to load static file: " << info->mStaticImageFileName << LL_ENDL; - mStaticImageInvalid = TRUE; // don't try again. + mStaticImageInvalid = true; // don't try again. return false; } } @@ -316,10 +316,10 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) if (!mCachedProcessedTexture) { llassert(gTextureManagerBridgep); - mCachedProcessedTexture = gTextureManagerBridgep->getLocalTexture(image_tga_width, image_tga_height, 1, FALSE); + mCachedProcessedTexture = gTextureManagerBridgep->getLocalTexture(image_tga_width, image_tga_height, 1, false); // We now have something in one of our caches - LLTexLayerSet::sHasCaches |= mCachedProcessedTexture ? TRUE : FALSE; + LLTexLayerSet::sHasCaches |= mCachedProcessedTexture ? true : false; mCachedProcessedTexture->setExplicitFormat(GL_ALPHA8, GL_ALPHA); } @@ -328,7 +328,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) mStaticImageRaw = NULL; mStaticImageRaw = new LLImageRaw; mStaticImageTGA->decodeAndProcess(mStaticImageRaw, info->mDomain, effective_weight); - mNeedsCreateTexture = TRUE; + mNeedsCreateTexture = true; LL_DEBUGS() << "Built Cached Alpha: " << info->mStaticImageFileName << ": (" << mStaticImageRaw->getWidth() << ", " << mStaticImageRaw->getHeight() << ") " << "Domain: " << info->mDomain << " Weight: " << effective_weight << LL_ENDL; } @@ -339,7 +339,7 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) if (mNeedsCreateTexture) { mCachedProcessedTexture->createGLTexture(0, mStaticImageRaw); - mNeedsCreateTexture = FALSE; + mNeedsCreateTexture = false; gGL.getTexUnit(0)->bind(mCachedProcessedTexture); mCachedProcessedTexture->setAddressMode(LLTexUnit::TAM_CLAMP); } @@ -372,8 +372,8 @@ BOOL LLTexLayerParamAlpha::render(S32 x, S32 y, S32 width, S32 height) // LLTexLayerParamAlphaInfo //----------------------------------------------------------------------------- LLTexLayerParamAlphaInfo::LLTexLayerParamAlphaInfo() : - mMultiplyBlend(FALSE), - mSkipIfZeroWeight(FALSE), + mMultiplyBlend(false), + mSkipIfZeroWeight(false), mDomain(0.f) { } @@ -514,7 +514,7 @@ void LLTexLayerParamColor::setAnimationTarget(F32 target_value) // set value first then set interpolating flag to ignore further updates mTargetWeight = target_value; setWeight(target_value); - mIsAnimating = TRUE; + mIsAnimating = true; if (mNext) { mNext->setAnimationTarget(target_value); diff --git a/indra/llappearance/lltexlayerparams.h b/indra/llappearance/lltexlayerparams.h index 1dbfd0b3d6..3767a9627f 100644 --- a/indra/llappearance/lltexlayerparams.h +++ b/indra/llappearance/lltexlayerparams.h @@ -48,7 +48,7 @@ class LLTexLayerParam : public LLViewerVisualParam public: LLTexLayerParam(LLTexLayerInterface *layer); LLTexLayerParam(LLAvatarAppearance *appearance); - /*virtual*/ BOOL setInfo(LLViewerVisualParamInfo *info, BOOL add_to_appearance); + /*virtual*/ bool setInfo(LLViewerVisualParamInfo *info, bool add_to_appearance); /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0; protected: @@ -74,7 +74,7 @@ public: /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const; // LLVisualParam Virtual functions - ///*virtual*/ BOOL parseData(LLXmlTreeNode* node); + ///*virtual*/ bool parseData(LLXmlTreeNode* node); /*virtual*/ void apply( ESex avatar_sex ) {} /*virtual*/ void setWeight(F32 weight); /*virtual*/ void setAnimationTarget(F32 target_value); @@ -89,10 +89,10 @@ public: /*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) { index = 0; poly_mesh = NULL; return NULL;}; // New functions - BOOL render( S32 x, S32 y, S32 width, S32 height ); - BOOL getSkip() const; + bool render( S32 x, S32 y, S32 width, S32 height ); + bool getSkip() const; void deleteCaches(); - BOOL getMultiplyBlend() const; + bool getMultiplyBlend() const; private: LLTexLayerParamAlpha(const LLTexLayerParamAlpha& pOther); @@ -100,8 +100,8 @@ private: LLPointer mCachedProcessedTexture; LLPointer mStaticImageTGA; LLPointer mStaticImageRaw; - std::atomic mNeedsCreateTexture; - BOOL mStaticImageInvalid; + std::atomic mNeedsCreateTexture; + bool mStaticImageInvalid; LL_ALIGN_16(LLVector4a mAvgDistortionVec); F32 mCachedEffectiveWeight; @@ -124,8 +124,8 @@ public: private: std::string mStaticImageFileName; - BOOL mMultiplyBlend; - BOOL mSkipIfZeroWeight; + bool mMultiplyBlend; + bool mSkipIfZeroWeight; F32 mDomain; }; // @@ -157,7 +157,7 @@ public: /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const; // LLVisualParam Virtual functions - ///*virtual*/ BOOL parseData(LLXmlTreeNode* node); + ///*virtual*/ bool parseData(LLXmlTreeNode* node); /*virtual*/ void apply( ESex avatar_sex ) {} /*virtual*/ void setWeight(F32 weight); /*virtual*/ void setAnimationTarget(F32 target_value); diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp index 43fb8fab5e..30a244be93 100644 --- a/indra/llappearance/llviewervisualparam.cpp +++ b/indra/llappearance/llviewervisualparam.cpp @@ -39,12 +39,12 @@ LLViewerVisualParamInfo::LLViewerVisualParamInfo() : mWearableType( LLWearableType::WT_INVALID ), - mCrossWearable(FALSE), + mCrossWearable(false), mCamDist( 0.5f ), mCamAngle( 0.f ), mCamElevation( 0.f ), mEditGroupDisplayOrder( 0 ), - mShowSimple(FALSE), + mShowSimple(false), mSimpleMin(0.f), mSimpleMax(100.f) { @@ -82,7 +82,7 @@ bool LLViewerVisualParamInfo::parseXml(LLXmlTreeNode *node) static LLStdStringHandle cross_wearable_string = LLXmlTree::addAttributeString("cross_wearable"); if (!node->getFastAttributeBOOL(cross_wearable_string, mCrossWearable)) { - mCrossWearable = FALSE; + mCrossWearable = false; } // Optional camera offsets from the current joint center. Used for generating "hints" (thumbnails). @@ -146,7 +146,7 @@ LLViewerVisualParam::~LLViewerVisualParam() // setInfo() //----------------------------------------------------------------------------- -BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) +bool LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info) { llassert(mInfo == NULL); if (info->mID < 0) diff --git a/indra/llappearance/llviewervisualparam.h b/indra/llappearance/llviewervisualparam.h index 9ad3e6eae8..42c32aa319 100644 --- a/indra/llappearance/llviewervisualparam.h +++ b/indra/llappearance/llviewervisualparam.h @@ -49,13 +49,13 @@ public: protected: S32 mWearableType; - BOOL mCrossWearable; + bool mCrossWearable; std::string mEditGroup; F32 mCamDist; F32 mCamAngle; // degrees F32 mCamElevation; F32 mEditGroupDisplayOrder; - BOOL mShowSimple; // show edit controls when in "simple ui" mode? + bool mShowSimple; // show edit controls when in "simple ui" mode? F32 mSimpleMin; // when in simple UI, apply this minimum, range 0.f to 100.f F32 mSimpleMax; // when in simple UI, apply this maximum, range 0.f to 100.f }; @@ -75,12 +75,12 @@ public: // Special: These functions are overridden by child classes LLViewerVisualParamInfo *getInfo() const { return (LLViewerVisualParamInfo*)mInfo; }; // This sets mInfo and calls initialization functions - BOOL setInfo(LLViewerVisualParamInfo *info); + bool setInfo(LLViewerVisualParamInfo *info); virtual LLViewerVisualParam* cloneParam(LLWearable* wearable) const = 0; // LLVisualParam Virtual functions - ///*virtual*/ BOOL parseData(LLXmlTreeNode* node); + ///*virtual*/ bool parseData(LLXmlTreeNode* node); // New Virtual functions virtual F32 getTotalDistortion() = 0; @@ -99,11 +99,11 @@ public: F32 getCameraAngle() const { return getInfo()->mCamAngle; } // degrees F32 getCameraElevation() const { return getInfo()->mCamElevation; } - BOOL getShowSimple() const { return getInfo()->mShowSimple; } + bool getShowSimple() const { return getInfo()->mShowSimple; } F32 getSimpleMin() const { return getInfo()->mSimpleMin; } F32 getSimpleMax() const { return getInfo()->mSimpleMax; } - BOOL getCrossWearable() const { return getInfo()->mCrossWearable; } + bool getCrossWearable() const { return getInfo()->mCrossWearable; } protected: LLViewerVisualParam(const LLViewerVisualParam& pOther); diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp index db7db32b3e..853b850fed 100644 --- a/indra/llappearance/llwearable.cpp +++ b/indra/llappearance/llwearable.cpp @@ -86,14 +86,14 @@ LLAssetType::EType LLWearable::getAssetType() const return LLWearableType::getInstance()->getAssetType(mType); } -BOOL LLWearable::exportFile(const std::string& filename) const +bool LLWearable::exportFile(const std::string& filename) const { llofstream ofs(filename.c_str(), std::ios_base::out | std::ios_base::trunc | std::ios_base::binary); return ofs.is_open() && exportStream(ofs); } // virtual -BOOL LLWearable::exportStream( std::ostream& output_stream ) const +bool LLWearable::exportStream( std::ostream& output_stream ) const { if (!output_stream.good()) return false; @@ -469,7 +469,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream, return LLWearable::SUCCESS; } -BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size) +bool LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size) { if (!input_stream.good()) { @@ -636,7 +636,7 @@ void LLWearable::addVisualParam(LLVisualParam *param) { delete mVisualParamIndexMap[param->getID()]; } - param->setIsDummy(FALSE); + param->setIsDummy(false); param->setParamLocation(LOC_WEARABLE); mVisualParamIndexMap[param->getID()] = param; mSavedVisualParamMap[param->getID()] = param->getDefaultWeight(); diff --git a/indra/llappearance/llwearable.h b/indra/llappearance/llwearable.h index d86db236a3..ccdb3273f2 100644 --- a/indra/llappearance/llwearable.h +++ b/indra/llappearance/llwearable.h @@ -80,9 +80,9 @@ public: SUCCESS, BAD_HEADER }; - BOOL exportFile(const std::string& filename) const; + bool exportFile(const std::string& filename) const; EImportResult importFile(const std::string& filename, LLAvatarAppearance* avatarp ); - virtual BOOL exportStream( std::ostream& output_stream ) const; + virtual bool exportStream( std::ostream& output_stream ) const; virtual EImportResult importStream( std::istream& input_stream, LLAvatarAppearance* avatarp ); static void setCurrentDefinitionVersion( S32 version ) { LLWearable::sCurrentDefinitionVersion = version; } @@ -118,7 +118,7 @@ protected: void destroyTextures(); void createVisualParams(LLAvatarAppearance *avatarp); void createLayers(S32 te, LLAvatarAppearance *avatarp); - BOOL getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size); + bool getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size); static S32 sCurrentDefinitionVersion; // Depends on the current state of the avatar_lad.xml. S32 mDefinitionVersion; // Depends on the state of the avatar_lad.xml when this asset was created. diff --git a/indra/llappearance/llwearabledata.cpp b/indra/llappearance/llwearabledata.cpp index 2a0b77ee39..db5c93352a 100644 --- a/indra/llappearance/llwearabledata.cpp +++ b/indra/llappearance/llwearabledata.cpp @@ -86,7 +86,7 @@ void LLWearableData::setWearable(const LLWearableType::EType type, U32 index, LL { wearable_vec[index] = wearable; old_wearable->setUpdated(); - const BOOL removed = FALSE; + const bool removed = false; wearableUpdated(wearable, removed); } } @@ -105,14 +105,14 @@ void LLWearableData::pushWearable(const LLWearableType::EType type, mWearableDatas[type].push_back(wearable); if (trigger_updated) { - const BOOL removed = FALSE; + const bool removed = false; wearableUpdated(wearable, removed); } } } // virtual -void LLWearableData::wearableUpdated(LLWearable *wearable, BOOL removed) +void LLWearableData::wearableUpdated(LLWearable *wearable, bool removed) { wearable->setUpdated(); if (!removed) @@ -144,7 +144,7 @@ void LLWearableData::eraseWearable(const LLWearableType::EType type, U32 index) if (wearable) { mWearableDatas[type].erase(mWearableDatas[type].begin() + index); - const BOOL removed = TRUE; + const bool removed = true; wearableUpdated(wearable, removed); } } @@ -200,7 +200,7 @@ void LLWearableData::pullCrossWearableValues(const LLWearableType::EType type) } -BOOL LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_found) const +bool LLWearableData::getWearableIndex(const LLWearable *wearable, U32& index_found) const { if (wearable == NULL) { @@ -242,7 +242,7 @@ U32 LLWearableData::getClothingLayerCount() const return count; } -BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const +bool LLWearableData::canAddWearable(const LLWearableType::EType type) const { LLAssetType::EType a_type = LLWearableType::getInstance()->getAssetType(type); if (a_type==LLAssetType::AT_CLOTHING) @@ -259,7 +259,7 @@ BOOL LLWearableData::canAddWearable(const LLWearableType::EType type) const } } -BOOL LLWearableData::isOnTop(LLWearable* wearable) const +bool LLWearableData::isOnTop(LLWearable* wearable) const { if (!wearable) return false; const LLWearableType::EType type = wearable->getType(); diff --git a/indra/llappearance/llwearabledata.h b/indra/llappearance/llwearabledata.h index b8e0bf8bd1..2fe9ae2302 100644 --- a/indra/llappearance/llwearabledata.h +++ b/indra/llappearance/llwearabledata.h @@ -60,11 +60,11 @@ public: const LLWearable* getBottomWearable(const LLWearableType::EType type) const; U32 getWearableCount(const LLWearableType::EType type) const; U32 getWearableCount(const U32 tex_index) const; - BOOL getWearableIndex(const LLWearable *wearable, U32& index) const; + bool getWearableIndex(const LLWearable *wearable, U32& index) const; U32 getClothingLayerCount() const; - BOOL canAddWearable(const LLWearableType::EType type) const; + bool canAddWearable(const LLWearableType::EType type) const; - BOOL isOnTop(LLWearable* wearable) const; + bool isOnTop(LLWearable* wearable) const; static const U32 MAX_CLOTHING_LAYERS = 60; @@ -76,7 +76,7 @@ protected: void setWearable(const LLWearableType::EType type, U32 index, LLWearable *wearable); void pushWearable(const LLWearableType::EType type, LLWearable *wearable, bool trigger_updated = true); - virtual void wearableUpdated(LLWearable *wearable, BOOL removed); + virtual void wearableUpdated(LLWearable *wearable, bool removed); void eraseWearable(LLWearable *wearable); void eraseWearable(const LLWearableType::EType type, U32 index); void clearWearableType(const LLWearableType::EType type); diff --git a/indra/llappearance/llwearabletype.cpp b/indra/llappearance/llwearabletype.cpp index 056f7cf888..c561502a3d 100644 --- a/indra/llappearance/llwearabletype.cpp +++ b/indra/llappearance/llwearabletype.cpp @@ -32,27 +32,27 @@ LLWearableType::LLWearableDictionary::LLWearableDictionary(LLTranslationBridge::ptr_t& trans) { - addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE)); - addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE)); - addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE)); - addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, FALSE, FALSE)); - addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE)); - addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, FALSE, TRUE)); - addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, FALSE, TRUE)); - addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE)); - addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, FALSE, TRUE)); - addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE)); - addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE)); - addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE)); - addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE)); - addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE)); - addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE)); - addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, FALSE, TRUE)); - - addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE)); - - addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, FALSE, FALSE)); - addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE)); + addEntry(LLWearableType::WT_SHAPE, new WearableEntry(trans, "shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, false, false)); + addEntry(LLWearableType::WT_SKIN, new WearableEntry(trans, "skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, false, false)); + addEntry(LLWearableType::WT_HAIR, new WearableEntry(trans, "hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, false, false)); + addEntry(LLWearableType::WT_EYES, new WearableEntry(trans, "eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, false, false)); + addEntry(LLWearableType::WT_SHIRT, new WearableEntry(trans, "shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, false, true)); + addEntry(LLWearableType::WT_PANTS, new WearableEntry(trans, "pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, false, true)); + addEntry(LLWearableType::WT_SHOES, new WearableEntry(trans, "shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, false, true)); + addEntry(LLWearableType::WT_SOCKS, new WearableEntry(trans, "socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, false, true)); + addEntry(LLWearableType::WT_JACKET, new WearableEntry(trans, "jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, false, true)); + addEntry(LLWearableType::WT_GLOVES, new WearableEntry(trans, "gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, false, true)); + addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry(trans, "undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, false, true)); + addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry(trans, "underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, false, true)); + addEntry(LLWearableType::WT_SKIRT, new WearableEntry(trans, "skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, false, true)); + addEntry(LLWearableType::WT_ALPHA, new WearableEntry(trans, "alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, false, true)); + addEntry(LLWearableType::WT_TATTOO, new WearableEntry(trans, "tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, false, true)); + addEntry(LLWearableType::WT_UNIVERSAL, new WearableEntry(trans, "universal", "New Universal", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNIVERSAL, false, true)); + + addEntry(LLWearableType::WT_PHYSICS, new WearableEntry(trans, "physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, true, true)); + + addEntry(LLWearableType::WT_INVALID, new WearableEntry(trans, "invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_UNKNOWN, false, false)); + addEntry(LLWearableType::WT_NONE, new WearableEntry(trans, "none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, false, false)); } @@ -112,14 +112,14 @@ LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType typ return entry->mIconName; } -BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type) +bool LLWearableType::getDisableCameraSwitch(LLWearableType::EType type) { const WearableEntry *entry = mDictionary.lookup(type); if (!entry) return false; return entry->mDisableCameraSwitch; } -BOOL LLWearableType::getAllowMultiwear(LLWearableType::EType type) +bool LLWearableType::getAllowMultiwear(LLWearableType::EType type) { const WearableEntry *entry = mDictionary.lookup(type); if (!entry) return false; diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h index 793a33cc87..d2a85581bc 100644 --- a/indra/llappearance/llwearabletype.h +++ b/indra/llappearance/llwearabletype.h @@ -72,8 +72,8 @@ public: LLAssetType::EType getAssetType(EType type); EType typeNameToType(const std::string& type_name); LLInventoryType::EIconName getIconName(EType type); - BOOL getDisableCameraSwitch(EType type); - BOOL getAllowMultiwear(EType type); + bool getDisableCameraSwitch(EType type); + bool getAllowMultiwear(EType type); static EType inventoryFlagsToWearableType(U32 flags); @@ -85,8 +85,8 @@ private: const std::string& default_new_name, LLAssetType::EType assetType, LLInventoryType::EIconName iconName, - BOOL disable_camera_switch = FALSE, - BOOL allow_multiwear = TRUE) : + bool disable_camera_switch = false, + bool allow_multiwear = true) : LLDictionaryEntry(name), mAssetType(assetType), mDefaultNewName(default_new_name), @@ -101,8 +101,8 @@ private: const std::string mLabel; const std::string mDefaultNewName; LLInventoryType::EIconName mIconName; - BOOL mDisableCameraSwitch; - BOOL mAllowMultiwear; + bool mDisableCameraSwitch; + bool mAllowMultiwear; }; class LLWearableDictionary : public LLDictionary diff --git a/indra/llcharacter/llanimationstates.cpp b/indra/llcharacter/llanimationstates.cpp index 2e78e30405..604c68a225 100644 --- a/indra/llcharacter/llanimationstates.cpp +++ b/indra/llcharacter/llanimationstates.cpp @@ -367,7 +367,7 @@ const char *LLAnimationLibrary::animStateToString( const LLUUID& state ) //----------------------------------------------------------------------------- // Return the animation state for a given name //----------------------------------------------------------------------------- -LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allow_ids ) +LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, bool allow_ids ) { std::string lower_case_name(name); LLStringUtil::toLower(lower_case_name); @@ -391,7 +391,7 @@ LLUUID LLAnimationLibrary::stringToAnimState( const std::string& name, BOOL allo else if (allow_ids) { // try to convert string to LLUUID - id.set(name, FALSE); + id.set(name, false); } return id; diff --git a/indra/llcharacter/llanimationstates.h b/indra/llcharacter/llanimationstates.h index 79cbcabdc1..1757ce07a1 100644 --- a/indra/llcharacter/llanimationstates.h +++ b/indra/llcharacter/llanimationstates.h @@ -220,7 +220,7 @@ public: // Return the animation state for the given name. // Retun NULL if the name is invalid. //----------------------------------------------------------------------------- - LLUUID stringToAnimState( const std::string& name, BOOL allow_ids = TRUE ); + LLUUID stringToAnimState( const std::string& name, bool allow_ids = true ); //----------------------------------------------------------------------------- // Associate an anim state with a name diff --git a/indra/llcharacter/llbvhloader.cpp b/indra/llcharacter/llbvhloader.cpp index 567bdb8c95..44e95c4e7f 100644 --- a/indra/llcharacter/llbvhloader.cpp +++ b/indra/llcharacter/llbvhloader.cpp @@ -184,7 +184,7 @@ LLBVHLoader::LLBVHLoader(const char* buffer, ELoadStatus &loadStatus, S32 &error LL_DEBUGS("BVH") << "After translations and optimize" << LL_ENDL; dumpBVHInfo(); - mInitialized = TRUE; + mInitialized = true; } @@ -227,7 +227,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) //-------------------------------------------------------------------- // load data one line at a time //-------------------------------------------------------------------- - BOOL loadingGlobals = FALSE; + bool loadingGlobals = false; while ( getLine(fp) ) { //---------------------------------------------------------------- @@ -251,7 +251,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) if (strcmp(name, "GLOBALS")==0) { - loadingGlobals = TRUE; + loadingGlobals = true; continue; } } @@ -298,7 +298,7 @@ ELoadStatus LLBVHLoader::loadTranslationTable(const char *fileName) if ( sscanf(mLine, " %*s = %f %f", &loop_in, &loop_out) == 2 ) { - mLoop = TRUE; + mLoop = true; } else if ( sscanf(mLine, " %*s = %127s", trueFalse) == 1 ) /* Flawfinder: ignore */ { @@ -496,8 +496,8 @@ void LLBVHLoader::makeTranslation(std::string alias_name, std::string joint_name if (joint_name == "mPelvis") { - newTrans.mRelativePositionKey = TRUE; - newTrans.mRelativeRotationKey = TRUE; + newTrans.mRelativePositionKey = true; + newTrans.mRelativeRotationKey = true; } } @@ -609,7 +609,7 @@ ELoadStatus LLBVHLoader::loadBVHFile(const char *buffer, char* error_text, S32 & //-------------------------------------------------------------------- // consume joints //-------------------------------------------------------------------- - while (TRUE) + while (true) { //---------------------------------------------------------------- // get next line @@ -969,7 +969,7 @@ void LLBVHLoader::applyTranslations() if ( trans.mIgnore ) { //LL_INFOS() << "NOTE: Ignoring " << joint->mName.c_str() << LL_ENDL; - joint->mIgnore = TRUE; + joint->mIgnore = true; continue; } @@ -983,10 +983,10 @@ void LLBVHLoader::applyTranslations() } //Allow joint position changes as of SL-318 - joint->mIgnorePositions = FALSE; + joint->mIgnorePositions = false; if (joint->mNumChannels == 3) { - joint->mIgnorePositions = TRUE; + joint->mIgnorePositions = true; } //---------------------------------------------------------------- @@ -995,13 +995,13 @@ void LLBVHLoader::applyTranslations() if ( trans.mRelativePositionKey ) { // LL_INFOS() << "NOTE: Removing 1st position offset from all keys for " << joint->mOutName.c_str() << LL_ENDL; - joint->mRelativePositionKey = TRUE; + joint->mRelativePositionKey = true; } if ( trans.mRelativeRotationKey ) { // LL_INFOS() << "NOTE: Removing 1st rotation from all keys for " << joint->mOutName.c_str() << LL_ENDL; - joint->mRelativeRotationKey = TRUE; + joint->mRelativeRotationKey = true; } if ( trans.mRelativePosition.magVec() > 0.0f ) @@ -1065,8 +1065,8 @@ void LLBVHLoader::optimize() for (Joint* joint : mJoints) { - BOOL pos_changed = FALSE; - BOOL rot_changed = FALSE; + bool pos_changed = false; + bool rot_changed = false; if ( ! joint->mIgnore ) { @@ -1079,7 +1079,7 @@ void LLBVHLoader::optimize() // no keys? if (first_key == joint->mKeys.end()) { - joint->mIgnore = TRUE; + joint->mIgnore = true; continue; } @@ -1092,13 +1092,13 @@ void LLBVHLoader::optimize() { // *FIX: use single frame to move pelvis // if only one keyframe force output for this joint - rot_changed = TRUE; + rot_changed = true; } else { // if more than one keyframe, use first frame as reference and skip to second - first_key->mIgnorePos = TRUE; - first_key->mIgnoreRot = TRUE; + first_key->mIgnorePos = true; + first_key->mIgnoreRot = true; ++ki; } @@ -1119,7 +1119,7 @@ void LLBVHLoader::optimize() joint->mNumPosKeys++; if (dist_vec_squared(LLVector3(ki_prev->mPos), first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED) { - pos_changed = TRUE; + pos_changed = true; } } else @@ -1132,12 +1132,12 @@ void LLBVHLoader::optimize() if (dist_vec_squared(current_pos, first_frame_pos) > POSITION_MOTION_THRESHOLD_SQUARED) { - pos_changed = TRUE; + pos_changed = true; } if (dist_vec_squared(interp_pos, test_pos) < POSITION_KEYFRAME_THRESHOLD_SQUARED) { - ki_prev->mIgnorePos = TRUE; + ki_prev->mIgnorePos = true; numPosFramesConsidered++; } else @@ -1158,7 +1158,7 @@ void LLBVHLoader::optimize() if (rot_test > ROTATION_MOTION_THRESHOLD) { - rot_changed = TRUE; + rot_changed = true; } } else @@ -1180,7 +1180,7 @@ void LLBVHLoader::optimize() rot_test = x_delta + y_delta; if (rot_test > ROTATION_MOTION_THRESHOLD) { - rot_changed = TRUE; + rot_changed = true; } x_delta = dist_vec(LLVector3::x_axis * interp_rot, LLVector3::x_axis * test_rot); y_delta = dist_vec(LLVector3::y_axis * interp_rot, LLVector3::y_axis * test_rot); @@ -1202,9 +1202,9 @@ void LLBVHLoader::optimize() // because it's significantly faster. if (diff_max > 0) { - if (ki_max->mIgnoreRot == TRUE) + if (ki_max->mIgnoreRot == true) { - ki_max->mIgnoreRot = FALSE; + ki_max->mIgnoreRot = false; joint->mNumRotKeys++; } diff_max = 0; @@ -1213,7 +1213,7 @@ void LLBVHLoader::optimize() else { // This keyframe isn't significant enough, throw it away. - ki_prev->mIgnoreRot = TRUE; + ki_prev->mIgnoreRot = true; numRotFramesConsidered++; // Store away the keyframe that has the largest deviation from the interpolated line, for insertion later. if (rot_test > diff_max) @@ -1232,7 +1232,7 @@ void LLBVHLoader::optimize() if (!(pos_changed || rot_changed)) { //LL_INFOS() << "Ignoring joint " << joint->mName << LL_ENDL; - joint->mIgnore = TRUE; + joint->mIgnore = true; } } } @@ -1245,13 +1245,13 @@ void LLBVHLoader::reset() mDuration = 0.0f; mPriority = 2; - mLoop = FALSE; + mLoop = false; mLoopInPoint = 0.f; mLoopOutPoint = 0.f; mEaseIn = 0.3f; mEaseOut = 0.3f; mHand = 1; - mInitialized = FALSE; + mInitialized = false; mEmoteName = ""; mLineNumber = 0; @@ -1262,7 +1262,7 @@ void LLBVHLoader::reset() //------------------------------------------------------------------------ // LLBVHLoader::getLine() //------------------------------------------------------------------------ -BOOL LLBVHLoader::getLine(apr_file_t* fp) +bool LLBVHLoader::getLine(apr_file_t* fp) { if (apr_file_eof(fp) == APR_EOF) { @@ -1287,7 +1287,7 @@ U32 LLBVHLoader::getOutputSize() } // writes contents to datapacker -BOOL LLBVHLoader::serialize(LLDataPacker& dp) +bool LLBVHLoader::serialize(LLDataPacker& dp) { F32 time; diff --git a/indra/llcharacter/llbvhloader.h b/indra/llcharacter/llbvhloader.h index 47fe409047..1cad8561c3 100644 --- a/indra/llcharacter/llbvhloader.h +++ b/indra/llcharacter/llbvhloader.h @@ -71,8 +71,8 @@ struct Key F32 mPos[3]; F32 mRot[3]; - BOOL mIgnorePos; - BOOL mIgnoreRot; + bool mIgnorePos; + bool mIgnoreRot; }; @@ -89,10 +89,10 @@ struct Joint Joint(const char *name) { mName = name; - mIgnore = FALSE; - mIgnorePositions = FALSE; - mRelativePositionKey = FALSE; - mRelativeRotationKey = FALSE; + mIgnore = false; + mIgnorePositions = false; + mRelativePositionKey = false; + mRelativeRotationKey = false; mOutName = name; mOrder[0] = 'X'; mOrder[1] = 'Y'; @@ -111,10 +111,10 @@ struct Joint LLVector3 mRelativePosition; // std::string mName; - BOOL mIgnore; - BOOL mIgnorePositions; - BOOL mRelativePositionKey; - BOOL mRelativeRotationKey; + bool mIgnore; + bool mIgnorePositions; + bool mRelativePositionKey; + bool mRelativeRotationKey; std::string mOutName; std::string mMergeParentName; std::string mMergeChildName; @@ -161,18 +161,18 @@ class Translation public: Translation() { - mIgnore = FALSE; - mIgnorePositions = FALSE; - mRelativePositionKey = FALSE; - mRelativeRotationKey = FALSE; + mIgnore = false; + mIgnorePositions = false; + mRelativePositionKey = false; + mRelativeRotationKey = false; mPriorityModifier = 0; } std::string mOutName; - BOOL mIgnore; - BOOL mIgnorePositions; - BOOL mRelativePositionKey; - BOOL mRelativeRotationKey; + bool mIgnore; + bool mIgnorePositions; + bool mRelativePositionKey; + bool mRelativeRotationKey; LLMatrix3 mFrameMatrix; LLMatrix3 mOffsetMatrix; LLVector3 mRelativePosition; @@ -293,7 +293,7 @@ public: U32 getOutputSize(); // writes contents to datapacker - BOOL serialize(LLDataPacker& dp); + bool serialize(LLDataPacker& dp); // flags redundant keyframe data void optimize(); @@ -302,13 +302,13 @@ public: F32 getDuration() { return mDuration; } - BOOL isInitialized() { return mInitialized; } + bool isInitialized() { return mInitialized; } ELoadStatus getStatus() { return mStatus; } protected: // Consumes one line of input from file. - BOOL getLine(apr_file_t *fp); + bool getLine(apr_file_t *fp); // parser state char mLine[BVH_PARSER_LINE_SIZE]; /* Flawfinder: ignore */ @@ -322,7 +322,7 @@ protected: TranslationMap mTranslations; S32 mPriority; - BOOL mLoop; + bool mLoop; F32 mLoopInPoint; F32 mLoopOutPoint; F32 mEaseIn; @@ -330,7 +330,7 @@ protected: S32 mHand; std::string mEmoteName; - BOOL mInitialized; + bool mInitialized; ELoadStatus mStatus; // computed values diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index b373bd75a3..abb0495b31 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -39,7 +39,7 @@ LLStringTable LLCharacter::sVisualParamNames(1024); std::vector< LLCharacter* > LLCharacter::sInstances; -BOOL LLCharacter::sAllowInstancesChange = TRUE ; +bool LLCharacter::sAllowInstancesChange = true ; //----------------------------------------------------------------------------- // LLCharacter() @@ -114,7 +114,7 @@ LLJoint *LLCharacter::getJoint( const std::string &name ) //----------------------------------------------------------------------------- // registerMotion() //----------------------------------------------------------------------------- -BOOL LLCharacter::registerMotion( const LLUUID& id, LLMotionConstructor create ) +bool LLCharacter::registerMotion( const LLUUID& id, LLMotionConstructor create ) { return mMotionController.registerMotion(id, create); } @@ -147,7 +147,7 @@ LLMotion* LLCharacter::createMotion( const LLUUID &id ) //----------------------------------------------------------------------------- // startMotion() //----------------------------------------------------------------------------- -BOOL LLCharacter::startMotion(const LLUUID &id, F32 start_offset) +bool LLCharacter::startMotion(const LLUUID &id, F32 start_offset) { return mMotionController.startMotion(id, start_offset); } @@ -156,7 +156,7 @@ BOOL LLCharacter::startMotion(const LLUUID &id, F32 start_offset) //----------------------------------------------------------------------------- // stopMotion() //----------------------------------------------------------------------------- -BOOL LLCharacter::stopMotion(const LLUUID& id, BOOL stop_immediate) +bool LLCharacter::stopMotion(const LLUUID& id, bool stop_immediate) { return mMotionController.stopMotionLocally(id, stop_immediate); } @@ -164,7 +164,7 @@ BOOL LLCharacter::stopMotion(const LLUUID& id, BOOL stop_immediate) //----------------------------------------------------------------------------- // isMotionActive() //----------------------------------------------------------------------------- -BOOL LLCharacter::isMotionActive(const LLUUID& id) +bool LLCharacter::isMotionActive(const LLUUID& id) { LLMotion *motionp = mMotionController.findMotion(id); if (motionp) @@ -279,7 +279,7 @@ void LLCharacter::removeAnimationData(std::string name) //----------------------------------------------------------------------------- // setVisualParamWeight() //----------------------------------------------------------------------------- -BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight) +bool LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 weight) { S32 index = which_param->getID(); visual_param_index_map_t::iterator index_iter = mVisualParamIndexMap.find(index); @@ -294,7 +294,7 @@ BOOL LLCharacter::setVisualParamWeight(const LLVisualParam* which_param, F32 wei //----------------------------------------------------------------------------- // setVisualParamWeight() //----------------------------------------------------------------------------- -BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight) +bool LLCharacter::setVisualParamWeight(const char* param_name, F32 weight) { std::string tname(param_name); LLStringUtil::toLower(tname); @@ -312,7 +312,7 @@ BOOL LLCharacter::setVisualParamWeight(const char* param_name, F32 weight) //----------------------------------------------------------------------------- // setVisualParamWeight() //----------------------------------------------------------------------------- -BOOL LLCharacter::setVisualParamWeight(S32 index, F32 weight) +bool LLCharacter::setVisualParamWeight(S32 index, F32 weight) { visual_param_index_map_t::iterator index_iter = mVisualParamIndexMap.find(index); if (index_iter != mVisualParamIndexMap.end()) diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index 6d56d59e8c..d134c1cb5b 100644 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -125,7 +125,7 @@ public: //------------------------------------------------------------------------- // registers a motion with the character // returns true if successfull - BOOL registerMotion( const LLUUID& id, LLMotionConstructor create ); + bool registerMotion( const LLUUID& id, LLMotionConstructor create ); void removeMotion( const LLUUID& id ); @@ -137,13 +137,13 @@ public: // start a motion // returns true if successful, false if an error occurred - virtual BOOL startMotion( const LLUUID& id, F32 start_offset = 0.f); + virtual bool startMotion( const LLUUID& id, F32 start_offset = 0.f); // stop a motion - virtual BOOL stopMotion( const LLUUID& id, BOOL stop_immediate = FALSE ); + virtual bool stopMotion( const LLUUID& id, bool stop_immediate = false ); // is this motion active? - BOOL isMotionActive( const LLUUID& id ); + bool isMotionActive( const LLUUID& id ); // Event handler for motion deactivation. // Called when a motion has completely stopped and has been deactivated. @@ -156,7 +156,7 @@ public: void updateMotions(e_update_t update_type); LLAnimPauseRequest requestPause(); - BOOL areAnimationsPaused() const { return mMotionController.isPaused(); } + bool areAnimationsPaused() const { return mMotionController.isPaused(); } void setAnimTimeFactor(F32 factor) { mMotionController.setTimeFactor(factor); } void setTimeStep(F32 time_step) { mMotionController.setTimeStep(time_step); } @@ -190,9 +190,9 @@ public: void addVisualParam(LLVisualParam *param); void addSharedVisualParam(LLVisualParam *param); - virtual BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight); - virtual BOOL setVisualParamWeight(const char* param_name, F32 weight); - virtual BOOL setVisualParamWeight(S32 index, F32 weight); + virtual bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight); + virtual bool setVisualParamWeight(const char* param_name, F32 weight); + virtual bool setVisualParamWeight(S32 index, F32 weight); // get visual param weight by param or name F32 getVisualParamWeight(LLVisualParam *distortion); @@ -256,7 +256,7 @@ public: void setSkeletonSerialNum( U32 num ) { mSkeletonSerialNum = num; } static std::vector< LLCharacter* > sInstances; - static BOOL sAllowInstancesChange ; //debug use + static bool sAllowInstancesChange ; //debug use virtual void setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; } const LLVector3& getHoverOffset() const { return mHoverOffset; } diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index cf6438aad9..0eed1ab39e 100644 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -141,7 +141,7 @@ LLMotion::LLMotionInitStatus LLEditingMotion::onInitialize(LLCharacter *characte //----------------------------------------------------------------------------- // LLEditingMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLEditingMotion::onActivate() +bool LLEditingMotion::onActivate() { // propagate joint positions to kinematic chain // SL-315 @@ -161,14 +161,14 @@ BOOL LLEditingMotion::onActivate() //----------------------------------------------------------------------------- // LLEditingMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) +bool LLEditingMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; LLVector3 focus_pt; LLVector3* pointAtPt = (LLVector3*)mCharacter->getAnimationData("PointAtPoint"); - BOOL result = true; + bool result = true; if (!pointAtPt) { diff --git a/indra/llcharacter/lleditingmotion.h b/indra/llcharacter/lleditingmotion.h index 63295983e0..de78c47da6 100644 --- a/indra/llcharacter/lleditingmotion.h +++ b/indra/llcharacter/lleditingmotion.h @@ -94,14 +94,14 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character); // called when a motion is activated - // must return TRUE to indicate success, or else + // must return true to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + // must return true while it is active, and + // must return false when the motion is completed. + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp index d0c4139da7..b36b83e75e 100644 --- a/indra/llcharacter/llgesture.cpp +++ b/indra/llcharacter/llgesture.cpp @@ -91,14 +91,14 @@ const LLGesture &LLGesture::operator =(const LLGesture &rhs) } -BOOL LLGesture::trigger(KEY key, MASK mask) +bool LLGesture::trigger(KEY key, MASK mask) { LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL; return false; } -BOOL LLGesture::trigger(const std::string& trigger_string) +bool LLGesture::trigger(const std::string& trigger_string) { LL_WARNS() << "Parent class trigger called: you probably didn't mean this." << LL_ENDL; return false; @@ -189,12 +189,12 @@ void LLGestureList::deleteAll() // Iterates through space delimited tokens in string, triggering any gestures found. // Generates a revised string that has the found tokens replaced by their replacement strings // and (as a minor side effect) has multiple spaces in a row replaced by single spaces. -BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::string* revised_string) +bool LLGestureList::triggerAndReviseString(const std::string &string, std::string* revised_string) { std::string tokenized = string; - BOOL found_gestures = FALSE; - BOOL first_token = TRUE; + bool found_gestures = false; + bool first_token = true; typedef boost::tokenizer > tokenizer; boost::char_separator sep(" "); @@ -235,7 +235,7 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin } } - found_gestures = TRUE; + found_gestures = true; break; } gesture = NULL; @@ -251,14 +251,14 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin revised_string->append( cur_token ); } - first_token = FALSE; + first_token = false; } return found_gestures; } -BOOL LLGestureList::trigger(KEY key, MASK mask) +bool LLGestureList::trigger(KEY key, MASK mask) { for (U32 i = 0; i < mList.size(); i++) { diff --git a/indra/llcharacter/llgesture.h b/indra/llcharacter/llgesture.h index cfb489f727..22db9bc565 100644 --- a/indra/llcharacter/llgesture.h +++ b/indra/llcharacter/llgesture.h @@ -55,10 +55,10 @@ public: const std::string& getOutputString() const { return mOutputString; } // Triggers if a key/mask matches it - virtual BOOL trigger(KEY key, MASK mask); + virtual bool trigger(KEY key, MASK mask); // Triggers if case-insensitive substring matches (assumes string is lowercase) - virtual BOOL trigger(const std::string &string); + virtual bool trigger(const std::string &string); // non-endian-neutral serialization U8 *serialize(U8 *buffer) const; @@ -84,10 +84,10 @@ public: virtual ~LLGestureList(); // Triggers if a key/mask matches one in the list - BOOL trigger(KEY key, MASK mask); + bool trigger(KEY key, MASK mask); // Triggers if substring matches and generates revised string. - BOOL triggerAndReviseString(const std::string &string, std::string* revised_string); + bool triggerAndReviseString(const std::string &string, std::string* revised_string); // Used for construction from UI S32 count() const { return mList.size(); } diff --git a/indra/llcharacter/llhandmotion.cpp b/indra/llcharacter/llhandmotion.cpp index 1aad9565fc..f74c8aa70c 100644 --- a/indra/llcharacter/llhandmotion.cpp +++ b/indra/llcharacter/llhandmotion.cpp @@ -98,7 +98,7 @@ LLMotion::LLMotionInitStatus LLHandMotion::onInitialize(LLCharacter *character) //----------------------------------------------------------------------------- // LLHandMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLHandMotion::onActivate() +bool LLHandMotion::onActivate() { LLPolyMesh *upperBodyMesh = mCharacter->getUpperBodyMesh(); @@ -119,7 +119,7 @@ BOOL LLHandMotion::onActivate() //----------------------------------------------------------------------------- // LLHandMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask) +bool LLHandMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; eHandPose *requestedHandPose; diff --git a/indra/llcharacter/llhandmotion.h b/indra/llcharacter/llhandmotion.h index a37e50f595..828b4851be 100644 --- a/indra/llcharacter/llhandmotion.h +++ b/indra/llcharacter/llhandmotion.h @@ -107,14 +107,14 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character); // called when a motion is activated - // must return TRUE to indicate success, or else - // it will be deactivated - virtual BOOL onActivate(); + // must return true to indicate success, or else + // it will be deactivated + virtual bool onActivate(); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + // must return true while it is active, and + // must return false when the motion is completed. + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); diff --git a/indra/llcharacter/llheadrotmotion.cpp b/indra/llcharacter/llheadrotmotion.cpp index 85d7611b2c..b327deca64 100644 --- a/indra/llcharacter/llheadrotmotion.cpp +++ b/indra/llcharacter/llheadrotmotion.cpp @@ -164,7 +164,7 @@ LLMotion::LLMotionInitStatus LLHeadRotMotion::onInitialize(LLCharacter *characte //----------------------------------------------------------------------------- // LLHeadRotMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLHeadRotMotion::onActivate() +bool LLHeadRotMotion::onActivate() { return true; } @@ -173,7 +173,7 @@ BOOL LLHeadRotMotion::onActivate() //----------------------------------------------------------------------------- // LLHeadRotMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask) +bool LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; LLQuaternion targetHeadRotWorld; @@ -279,7 +279,7 @@ LLEyeMotion::LLEyeMotion(const LLUUID &id) : LLMotion(id) mEyeLookAwayPitch = 0.f; mEyeBlinkTime = 0.f; - mEyesClosed = FALSE; + mEyesClosed = false; mHeadJoint = NULL; @@ -362,7 +362,7 @@ LLMotion::LLMotionInitStatus LLEyeMotion::onInitialize(LLCharacter *character) //----------------------------------------------------------------------------- // LLEyeMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLEyeMotion::onActivate() +bool LLEyeMotion::onActivate() { return true; } @@ -373,7 +373,7 @@ BOOL LLEyeMotion::onActivate() void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_state, LLJointState& right_eye_state) { // Compute eye rotation. - BOOL has_eye_target = FALSE; + bool has_eye_target = false; LLQuaternion target_eye_rot; LLVector3 eye_look_at; F32 vergence; @@ -385,7 +385,7 @@ void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_s LLVector3 up; eye_look_at = *targetPos; - has_eye_target = TRUE; + has_eye_target = true; F32 lookAtDistance = eye_look_at.normVec(); left.setVec(skyward % eye_look_at); @@ -457,7 +457,7 @@ void LLEyeMotion::adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_s //----------------------------------------------------------------------------- // LLEyeMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask) +bool LLEyeMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; //calculate jitter @@ -505,7 +505,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask) if (rightEyeBlinkMorph == 1.f) { - mEyesClosed = TRUE; + mEyesClosed = true; mEyeBlinkTime = EYE_BLINK_CLOSE_TIME; mEyeBlinkTimer.reset(); } @@ -525,7 +525,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask) if (rightEyeBlinkMorph == 0.f) { - mEyesClosed = FALSE; + mEyesClosed = false; mEyeBlinkTime = EYE_BLINK_MIN_TIME + ll_frand(EYE_BLINK_MAX_TIME - EYE_BLINK_MIN_TIME); mEyeBlinkTimer.reset(); } diff --git a/indra/llcharacter/llheadrotmotion.h b/indra/llcharacter/llheadrotmotion.h index fbc0885039..6bab1e8795 100644 --- a/indra/llcharacter/llheadrotmotion.h +++ b/indra/llcharacter/llheadrotmotion.h @@ -89,14 +89,14 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character); // called when a motion is activated - // must return TRUE to indicate success, or else + // must return true to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + // must return true while it is active, and + // must return false when the motion is completed. + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); @@ -172,16 +172,16 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character); // called when a motion is activated - // must return TRUE to indicate success, or else + // must return true to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); void adjustEyeTarget(LLVector3* targetPos, LLJointState& left_eye_state, LLJointState& right_eye_state); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + // must return true while it is active, and + // must return false when the motion is completed. + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); @@ -209,7 +209,7 @@ public: // eye blinking LLFrameTimer mEyeBlinkTimer; F32 mEyeBlinkTime; - BOOL mEyesClosed; + bool mEyesClosed; }; #endif // LL_LLHEADROTMOTION_H diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp index 06f3bedf85..3597f3b63f 100644 --- a/indra/llcharacter/lljoint.cpp +++ b/indra/llcharacter/lljoint.cpp @@ -105,10 +105,10 @@ void LLJoint::init() { mName = "unnamed"; mParent = NULL; - mXform.setScaleChildOffset(TRUE); + mXform.setScaleChildOffset(true); mXform.setScale(LLVector3(1.0f, 1.0f, 1.0f)); mDirtyFlags = MATRIX_DIRTY | ROTATION_DIRTY | POSITION_DIRTY; - mUpdateXform = TRUE; + mUpdateXform = true; mSupport = SUPPORT_BASE; mEnd = LLVector3(0.0f, 0.0f, 0.0f); } @@ -135,7 +135,7 @@ LLJoint::LLJoint(const std::string &name, LLJoint *parent) : mJointNum(-2) { init(); - mUpdateXform = FALSE; + mUpdateXform = false; setName(name); if (parent) @@ -996,7 +996,7 @@ void LLJoint::updateWorldMatrix() if (mDirtyFlags & MATRIX_DIRTY) { sNumUpdates++; - mXform.updateMatrix(FALSE); + mXform.updateMatrix(false); mWorldMatrix.loadu(mXform.getWorldMatrix()); mDirtyFlags = 0x0; } diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index 61ac6b4432..f0bfb3ba89 100644 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -133,7 +133,7 @@ protected: public: U32 mDirtyFlags; - BOOL mUpdateXform; + bool mUpdateXform; // describes the skin binding pose LLVector3 mSkinOffset; @@ -280,7 +280,7 @@ public: void clampRotation(LLQuaternion old_rot, LLQuaternion new_rot); - virtual BOOL isAnimatable() const { return true; } + virtual bool isAnimatable() const { return true; } void addAttachmentPosOverride( const LLVector3& pos, const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed ); void removeAttachmentPosOverride( const LLUUID& mesh_id, const std::string& av_info, bool& active_override_changed ); diff --git a/indra/llcharacter/lljointsolverrp3.cpp b/indra/llcharacter/lljointsolverrp3.cpp index f3d5e2e324..4b5d1c8894 100644 --- a/indra/llcharacter/lljointsolverrp3.cpp +++ b/indra/llcharacter/lljointsolverrp3.cpp @@ -53,9 +53,9 @@ LLJointSolverRP3::LLJointSolverRP3() mLengthAB = 1.0f; mLengthBC = 1.0f; mPoleVector.setVec( 1.0f, 0.0f, 0.0f ); - mbUseBAxis = FALSE; + mbUseBAxis = false; mTwist = 0.0f; - mFirstTime = TRUE; + mFirstTime = true; } @@ -114,7 +114,7 @@ void LLJointSolverRP3::setBAxis( const LLVector3& bAxis ) { mBAxis = bAxis; mBAxis.normVec(); - mbUseBAxis = TRUE; + mbUseBAxis = true; } //----------------------------------------------------------------------------- diff --git a/indra/llcharacter/lljointsolverrp3.h b/indra/llcharacter/lljointsolverrp3.h index 88b5d08710..4eb814ee2b 100644 --- a/indra/llcharacter/lljointsolverrp3.h +++ b/indra/llcharacter/lljointsolverrp3.h @@ -97,11 +97,11 @@ protected: LLVector3 mPoleVector; LLVector3 mBAxis; - BOOL mbUseBAxis; + bool mbUseBAxis; F32 mTwist; - BOOL mFirstTime; + bool mFirstTime; LLMatrix4 mSavedJointAMat; LLMatrix4 mSavedInvPlaneMat; diff --git a/indra/llcharacter/lljointstate.h b/indra/llcharacter/lljointstate.h index 1ccc6b5093..c01ec96450 100644 --- a/indra/llcharacter/lljointstate.h +++ b/indra/llcharacter/lljointstate.h @@ -80,7 +80,7 @@ public: // joint that this state is applied to LLJoint* getJoint() { return mJoint; } const LLJoint* getJoint() const { return mJoint; } - BOOL setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; } + bool setJoint( LLJoint *joint ) { mJoint = joint; return mJoint != NULL; } // transform type (bitwise flags can be combined) // Note that these are set automatically when various diff --git a/indra/llcharacter/llkeyframefallmotion.cpp b/indra/llcharacter/llkeyframefallmotion.cpp index e8bb2bf95d..ed6dd69362 100644 --- a/indra/llcharacter/llkeyframefallmotion.cpp +++ b/indra/llcharacter/llkeyframefallmotion.cpp @@ -91,7 +91,7 @@ LLMotion::LLMotionInitStatus LLKeyframeFallMotion::onInitialize(LLCharacter *cha //----------------------------------------------------------------------------- // LLKeyframeFallMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLKeyframeFallMotion::onActivate() +bool LLKeyframeFallMotion::onActivate() { LLVector3 ground_pos; LLVector3 ground_normal; @@ -119,10 +119,10 @@ BOOL LLKeyframeFallMotion::onActivate() //----------------------------------------------------------------------------- // LLKeyframeFallMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask) +bool LLKeyframeFallMotion::onUpdate(F32 activeTime, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - BOOL result = LLKeyframeMotion::onUpdate(activeTime, joint_mask); + bool result = LLKeyframeMotion::onUpdate(activeTime, joint_mask); F32 slerp_amt = clamp_rescale(activeTime / getDuration(), 0.5f, 0.75f, 0.f, 1.f); if (mPelvisState.notNull()) diff --git a/indra/llcharacter/llkeyframefallmotion.h b/indra/llcharacter/llkeyframefallmotion.h index 7f0a2fdda2..1ca1ed4dec 100644 --- a/indra/llcharacter/llkeyframefallmotion.h +++ b/indra/llcharacter/llkeyframefallmotion.h @@ -60,9 +60,9 @@ public: // animation callbacks to be implemented by subclasses //------------------------------------------------------------------------- virtual LLMotionInitStatus onInitialize(LLCharacter *character); - virtual BOOL onActivate(); + virtual bool onActivate(); virtual F32 getEaseInDuration(); - virtual BOOL onUpdate(F32 activeTime, U8* joint_mask); + virtual bool onUpdate(F32 activeTime, U8* joint_mask); protected: //------------------------------------------------------------------------- diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 0c2893cf4d..ba6cc025be 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -66,7 +66,7 @@ static F32 MAX_CONSTRAINTS = 10; //----------------------------------------------------------------------------- LLKeyframeMotion::JointMotionList::JointMotionList() : mDuration(0.f), - mLoop(FALSE), + mLoop(false), mLoopInPoint(0.f), mLoopOutPoint(0.f), mEaseInDuration(0.f), @@ -505,7 +505,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact LLAssetType::AT_ANIMATION, onLoadComplete, (void*)character_id, - FALSE); + false); } else { @@ -565,7 +565,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact U8 *anim_data; S32 anim_file_size; - BOOL success = FALSE; + bool success = false; LLFileSystem* anim_file = new LLFileSystem(mID, LLAssetType::AT_ANIMATION); if (!anim_file || !anim_file->getSize()) { @@ -620,7 +620,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact //----------------------------------------------------------------------------- // setupPose() //----------------------------------------------------------------------------- -BOOL LLKeyframeMotion::setupPose() +bool LLKeyframeMotion::setupPose() { // add all valid joint states to the pose for (U32 jm=0; jmgetNumJointMotions(); jm++) @@ -659,7 +659,7 @@ BOOL LLKeyframeMotion::setupPose() //----------------------------------------------------------------------------- // LLKeyframeMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLKeyframeMotion::onActivate() +bool LLKeyframeMotion::onActivate() { // If the keyframe anim has an associated emote, trigger it. if( mJointMotionList->mEmoteName.length() > 0 ) @@ -680,7 +680,7 @@ BOOL LLKeyframeMotion::onActivate() //----------------------------------------------------------------------------- // LLKeyframeMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask) +bool LLKeyframeMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // llassert(time >= 0.f); // This will fire @@ -869,7 +869,7 @@ void LLKeyframeMotion::initializeConstraint(JointConstraint* constraint) void LLKeyframeMotion::activateConstraint(JointConstraint* constraint) { JointConstraintSharedData *shared_data = constraint->mSharedData; - constraint->mActive = TRUE; + constraint->mActive = true; S32 joint_num; // grab ground position if we need to @@ -901,17 +901,17 @@ void LLKeyframeMotion::deactivateConstraint(JointConstraint *constraintp) { if (constraintp->mSourceVolume) { - constraintp->mSourceVolume->mUpdateXform = FALSE; + constraintp->mSourceVolume->mUpdateXform = false; } if (constraintp->mSharedData->mConstraintTargetType != CONSTRAINT_TARGET_TYPE_GROUND) { if (constraintp->mTargetVolume) { - constraintp->mTargetVolume->mUpdateXform = FALSE; + constraintp->mTargetVolume->mUpdateXform = false; } } - constraintp->mActive = FALSE; + constraintp->mActive = false; } //----------------------------------------------------------------------------- @@ -1088,9 +1088,9 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 // convert intermediate joint positions to world coordinates positions[joint_num] = ( constraint->mPositions[joint_num] * mPelvisp->getWorldRotation()) + mPelvisp->getWorldPosition(); F32 time_constant = 1.f / clamp_rescale(constraint->mFixupDistanceRMS, 0.f, 0.5f, 0.2f, 8.f); -// LL_INFOS() << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, FALSE) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; - positions[joint_num] = lerp(positions[joint_num], kinematic_position, - LLSmoothInterpolation::getInterpolant(time_constant, FALSE)); +// LL_INFOS() << "Interpolant " << LLSmoothInterpolation::getInterpolant(time_constant, false) << " and fixup distance " << constraint->mFixupDistanceRMS << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; + positions[joint_num] = lerp(positions[joint_num], kinematic_position, + LLSmoothInterpolation::getInterpolant(time_constant, false)); } S32 iteration_count; @@ -1225,9 +1225,9 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 // allow_invalid_joints should be true when handling existing content, to avoid breakage. // During upload, we should be more restrictive and reject such animations. //----------------------------------------------------------------------------- -BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints) +bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints) { - BOOL old_version = FALSE; + bool old_version = false; std::unique_ptr joint_motion_list(new LLKeyframeMotion::JointMotionList); //------------------------------------------------------------------------- @@ -1251,7 +1251,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo if (version == 0 && sub_version == 1) { - old_version = TRUE; + old_version = true; } else if (version != KEYFRAME_MOTION_VERSION || sub_version != KEYFRAME_MOTION_SUBVERSION) { @@ -1352,7 +1352,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo if (female_land_anim == asset_id || formal_female_land_anim == asset_id) { LL_WARNS() << "Animation(" << asset_id << ") won't be looped." << LL_ENDL; - joint_motion_list->mLoop = FALSE; + joint_motion_list->mLoop = false; } //------------------------------------------------------------------------- @@ -1656,7 +1656,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo // scan position curve keys //--------------------------------------------------------------------- PositionCurve *pCurve = &joint_motion->mPositionCurve; - BOOL is_pelvis = joint_motion->mJointName == "mPelvis"; + bool is_pelvis = joint_motion->mJointName == "mPelvis"; for (S32 k = 0; k < joint_motion->mPositionCurve.mNumKeys; k++) { U16 time_short; @@ -1903,7 +1903,7 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo if (!constraintp->mTargetConstraintDir.isExactlyZero()) { - constraintp->mUseTargetOffset = TRUE; + constraintp->mUseTargetOffset = true; // constraintp->mTargetConstraintDir *= constraintp->mSourceConstraintOffset.magVec(); } @@ -1998,9 +1998,9 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo //----------------------------------------------------------------------------- // serialize() //----------------------------------------------------------------------------- -BOOL LLKeyframeMotion::serialize(LLDataPacker& dp) const +bool LLKeyframeMotion::serialize(LLDataPacker& dp) const { - BOOL success = true; + bool success = true; LL_DEBUGS("BVH") << "serializing" << LL_ENDL; @@ -2283,7 +2283,7 @@ void LLKeyframeMotion::flushKeyframeCache() //----------------------------------------------------------------------------- // setLoop() //----------------------------------------------------------------------------- -void LLKeyframeMotion::setLoop(BOOL loop) +void LLKeyframeMotion::setLoop(bool loop) { if (mJointMotionList) { @@ -2515,7 +2515,7 @@ LLKeyframeMotion::JointConstraint::JointConstraint(JointConstraintSharedData* sh { mWeight = 0.f; mTotalLength = 0.f; - mActive = FALSE; + mActive = false; mSourceVolume = NULL; mTargetVolume = NULL; mFixupDistanceRMS = 0.f; diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h index 59a1d39a62..56c4364fd8 100644 --- a/indra/llcharacter/llkeyframemotion.h +++ b/indra/llcharacter/llkeyframemotion.h @@ -135,14 +135,14 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character); // called when a motion is activated - // must return TRUE to indicate success, or else + // must return true to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + // must return true while it is active, and + // must return false when the motion is completed. + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); @@ -155,14 +155,14 @@ public: public: U32 getFileSize(); - BOOL serialize(LLDataPacker& dp) const; - BOOL deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints = true); - BOOL isLoaded() { return mJointMotionList != NULL; } + bool serialize(LLDataPacker& dp) const; + bool deserialize(LLDataPacker& dp, const LLUUID& asset_id, bool allow_invalid_joints = true); + bool isLoaded() { return mJointMotionList != NULL; } bool dumpToFile(const std::string& name); // setters for modifying a keyframe animation - void setLoop(BOOL loop); + void setLoop(bool loop); F32 getLoopIn() { return (mJointMotionList) ? mJointMotionList->mLoopInPoint : 0.f; @@ -211,7 +211,7 @@ protected: mEaseInStopTime(0.f), mEaseOutStartTime(0.f), mEaseOutStopTime(0.f), - mUseTargetOffset(FALSE), + mUseTargetOffset(false), mConstraintType(CONSTRAINT_TYPE_POINT), mConstraintTargetType(CONSTRAINT_TARGET_TYPE_BODY), mSourceConstraintVolume(0), @@ -231,7 +231,7 @@ protected: F32 mEaseInStopTime; F32 mEaseOutStartTime; F32 mEaseOutStopTime; - BOOL mUseTargetOffset; + bool mUseTargetOffset; EConstraintType mConstraintType; EConstraintTargetType mConstraintTargetType; }; @@ -251,7 +251,7 @@ protected: LLVector3 mPositions[MAX_CHAIN_LENGTH]; F32 mJointLengths[MAX_CHAIN_LENGTH]; F32 mJointLengthFractions[MAX_CHAIN_LENGTH]; - BOOL mActive; + bool mActive; LLVector3d mGroundPos; LLVector3 mGroundNorm; LLJoint* mSourceVolume; @@ -271,7 +271,7 @@ protected: void applyConstraint(JointConstraint* constraintp, F32 time, U8* joint_mask); - BOOL setupPose(); + bool setupPose(); public: enum AssetStatus { ASSET_LOADED, ASSET_FETCHED, ASSET_NEEDS_FETCH, ASSET_FETCH_FAILED, ASSET_UNDEFINED }; diff --git a/indra/llcharacter/llkeyframemotionparam.cpp b/indra/llcharacter/llkeyframemotionparam.cpp index 88c1a7ebe4..dfb6c1ec9f 100644 --- a/indra/llcharacter/llkeyframemotionparam.cpp +++ b/indra/llcharacter/llkeyframemotionparam.cpp @@ -133,7 +133,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotionParam::onInitialize(LLCharacter *ch //----------------------------------------------------------------------------- // LLKeyframeMotionParam::onActivate() //----------------------------------------------------------------------------- -BOOL LLKeyframeMotionParam::onActivate() +bool LLKeyframeMotionParam::onActivate() { for (motion_map_t::value_type& motion_pair : mParameterizedMotions) { @@ -150,7 +150,7 @@ BOOL LLKeyframeMotionParam::onActivate() //----------------------------------------------------------------------------- // LLKeyframeMotionParam::onUpdate() //----------------------------------------------------------------------------- -BOOL LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) +bool LLKeyframeMotionParam::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; F32 weightFactor = 1.f / (F32)mParameterizedMotions.size(); @@ -283,7 +283,7 @@ void LLKeyframeMotionParam::onDeactivate() //----------------------------------------------------------------------------- // LLKeyframeMotionParam::addKeyframeMotion() //----------------------------------------------------------------------------- -BOOL LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value) +bool LLKeyframeMotionParam::addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value) { LLMotion *newMotion = mCharacter->createMotion( id ); @@ -322,7 +322,7 @@ void LLKeyframeMotionParam::setDefaultKeyframeMotion(char *name) //----------------------------------------------------------------------------- // loadMotions() //----------------------------------------------------------------------------- -BOOL LLKeyframeMotionParam::loadMotions() +bool LLKeyframeMotionParam::loadMotions() { //------------------------------------------------------------------------- // Load named file by concatenating the character prefix with the motion name. @@ -401,7 +401,7 @@ BOOL LLKeyframeMotionParam::loadMotions() //------------------------------------------------------------------------- // get priority //------------------------------------------------------------------------- - BOOL isFirstMotion = TRUE; + bool isFirstMotion = true; num = sscanf(p, "%79s %79s %f", strA, strB, &floatA); /* Flawfinder: ignore */ while(1) @@ -416,7 +416,7 @@ BOOL LLKeyframeMotionParam::loadMotions() addKeyframeMotion(strA, gAnimLibrary.stringToAnimState(std::string(strA)), strB, floatA); if (isFirstMotion) { - isFirstMotion = FALSE; + isFirstMotion = false; setDefaultKeyframeMotion(strA); } diff --git a/indra/llcharacter/llkeyframemotionparam.h b/indra/llcharacter/llkeyframemotionparam.h index 3b0bc36012..553d95dbbe 100644 --- a/indra/llcharacter/llkeyframemotionparam.h +++ b/indra/llcharacter/llkeyframemotionparam.h @@ -102,14 +102,14 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character); // called when a motion is activated - // must return TRUE to indicate success, or else + // must return true to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + // must return true while it is active, and + // must return false when the motion is completed. + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); @@ -128,12 +128,12 @@ protected: }; // add a motion and associated parameter triplet - BOOL addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value); + bool addKeyframeMotion(char *name, const LLUUID &id, char *param, F32 value); // set default motion for LOD and retrieving blend constants void setDefaultKeyframeMotion(char *); - BOOL loadMotions(); + bool loadMotions(); protected: //------------------------------------------------------------------------- diff --git a/indra/llcharacter/llkeyframestandmotion.cpp b/indra/llcharacter/llkeyframestandmotion.cpp index f99492fd47..5e31d70216 100644 --- a/indra/llcharacter/llkeyframestandmotion.cpp +++ b/indra/llcharacter/llkeyframestandmotion.cpp @@ -46,7 +46,7 @@ const F32 POSITION_THRESHOLD = 0.1f; //----------------------------------------------------------------------------- LLKeyframeStandMotion::LLKeyframeStandMotion(const LLUUID &id) : LLKeyframeMotion(id) { - mFlipFeet = FALSE; + mFlipFeet = false; mCharacter = NULL; // create kinematic hierarchy @@ -67,7 +67,7 @@ LLKeyframeStandMotion::LLKeyframeStandMotion(const LLUUID &id) : LLKeyframeMotio mKneeRightState = NULL; mAnkleRightState = NULL; - mTrackAnkles = TRUE; + mTrackAnkles = true; mFrameNum = 0; } @@ -90,7 +90,7 @@ LLMotion::LLMotionInitStatus LLKeyframeStandMotion::onInitialize(LLCharacter *ch // save character pointer for later use mCharacter = character; - mFlipFeet = FALSE; + mFlipFeet = false; // load keyframe data, setup pose and joint states LLMotion::LLMotionInitStatus status = LLKeyframeMotion::onInitialize(character); @@ -129,7 +129,7 @@ LLMotion::LLMotionInitStatus LLKeyframeStandMotion::onInitialize(LLCharacter *ch //----------------------------------------------------------------------------- // LLKeyframeStandMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLKeyframeStandMotion::onActivate() +bool LLKeyframeStandMotion::onActivate() { //------------------------------------------------------------------------- // setup the IK solvers @@ -158,12 +158,12 @@ void LLKeyframeStandMotion::onDeactivate() //----------------------------------------------------------------------------- // LLKeyframeStandMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask) +bool LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask) { //------------------------------------------------------------------------- // let the base class update the cycle //------------------------------------------------------------------------- - BOOL status = LLKeyframeMotion::onUpdate(time, joint_mask); + bool status = LLKeyframeMotion::onUpdate(time, joint_mask); if (!status) { return false; @@ -185,16 +185,16 @@ BOOL LLKeyframeStandMotion::onUpdate(F32 time, U8* joint_mask) { mLastGoodPelvisRotation = mPelvisState->getJoint()->getWorldRotation(); mLastGoodPelvisRotation.normalize(); - mTrackAnkles = TRUE; + mTrackAnkles = true; } else if ((mCharacter->getCharacterPosition() - mLastGoodPosition).magVecSquared() > POSITION_THRESHOLD) { mLastGoodPosition = mCharacter->getCharacterPosition(); - mTrackAnkles = TRUE; + mTrackAnkles = true; } else if (mPose.getWeight() < 1.f) { - mTrackAnkles = TRUE; + mTrackAnkles = true; } diff --git a/indra/llcharacter/llkeyframestandmotion.h b/indra/llcharacter/llkeyframestandmotion.h index 1aa5b187ba..0932a837bd 100644 --- a/indra/llcharacter/llkeyframestandmotion.h +++ b/indra/llcharacter/llkeyframestandmotion.h @@ -63,9 +63,9 @@ public: // animation callbacks to be implemented by subclasses //------------------------------------------------------------------------- virtual LLMotionInitStatus onInitialize(LLCharacter *character); - virtual BOOL onActivate(); + virtual bool onActivate(); void onDeactivate(); - virtual BOOL onUpdate(F32 time, U8* joint_mask); + virtual bool onUpdate(F32 time, U8* joint_mask); public: //------------------------------------------------------------------------- @@ -85,7 +85,7 @@ public: LLCharacter *mCharacter; - BOOL mFlipFeet; + bool mFlipFeet; LLPointer mPelvisState; @@ -109,7 +109,7 @@ public: LLQuaternion mLastGoodPelvisRotation; LLVector3 mLastGoodPosition; - BOOL mTrackAnkles; + bool mTrackAnkles; S32 mFrameNum; } LL_ALIGN_POSTFIX(16); diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index ae0a03925d..1dd743e096 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -83,7 +83,7 @@ LLMotion::LLMotionInitStatus LLKeyframeWalkMotion::onInitialize(LLCharacter *cha //----------------------------------------------------------------------------- // LLKeyframeWalkMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLKeyframeWalkMotion::onActivate() +bool LLKeyframeWalkMotion::onActivate() { mRealTimeLast = 0.0f; mAdjTimeLast = 0.0f; @@ -103,7 +103,7 @@ void LLKeyframeWalkMotion::onDeactivate() //----------------------------------------------------------------------------- // LLKeyframeWalkMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask) +bool LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; // compute time since last update @@ -174,7 +174,7 @@ LLMotion::LLMotionInitStatus LLWalkAdjustMotion::onInitialize(LLCharacter *chara //----------------------------------------------------------------------------- // LLWalkAdjustMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLWalkAdjustMotion::onActivate() +bool LLWalkAdjustMotion::onActivate() { mAnimSpeed = 0.f; mAdjustedSpeed = 0.f; @@ -197,7 +197,7 @@ BOOL LLWalkAdjustMotion::onActivate() //----------------------------------------------------------------------------- // LLWalkAdjustMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) +bool LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; // delta_time is guaranteed to be non zero @@ -362,7 +362,7 @@ LLMotion::LLMotionInitStatus LLFlyAdjustMotion::onInitialize(LLCharacter *charac //----------------------------------------------------------------------------- // LLFlyAdjustMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLFlyAdjustMotion::onActivate() +bool LLFlyAdjustMotion::onActivate() { mPelvisState->setPosition(LLVector3::zero); mPelvisState->setRotation(LLQuaternion::DEFAULT); @@ -373,7 +373,7 @@ BOOL LLFlyAdjustMotion::onActivate() //----------------------------------------------------------------------------- // LLFlyAdjustMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) +bool LLFlyAdjustMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; LLVector3 ang_vel = mCharacter->getCharacterAngularVelocity() * mCharacter->getTimeDilation(); diff --git a/indra/llcharacter/llkeyframewalkmotion.h b/indra/llcharacter/llkeyframewalkmotion.h index d9e9322c82..7539d84db1 100644 --- a/indra/llcharacter/llkeyframewalkmotion.h +++ b/indra/llcharacter/llkeyframewalkmotion.h @@ -65,9 +65,9 @@ public: // animation callbacks to be implemented by subclasses //------------------------------------------------------------------------- virtual LLMotionInitStatus onInitialize(LLCharacter *character); - virtual BOOL onActivate(); + virtual bool onActivate(); virtual void onDeactivate(); - virtual BOOL onUpdate(F32 time, U8* joint_mask); + virtual bool onUpdate(F32 time, U8* joint_mask); public: //------------------------------------------------------------------------- @@ -100,9 +100,9 @@ public: // animation callbacks to be implemented by subclasses //------------------------------------------------------------------------- virtual LLMotionInitStatus onInitialize(LLCharacter *character); - virtual BOOL onActivate(); + virtual bool onActivate(); virtual void onDeactivate(); - virtual BOOL onUpdate(F32 time, U8* joint_mask); + virtual bool onUpdate(F32 time, U8* joint_mask); virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGH_PRIORITY;} virtual bool getLoop() { return true; } virtual F32 getDuration() { return 0.f; } @@ -150,9 +150,9 @@ public: // animation callbacks to be implemented by subclasses //------------------------------------------------------------------------- virtual LLMotionInitStatus onInitialize(LLCharacter *character); - virtual BOOL onActivate(); + virtual bool onActivate(); virtual void onDeactivate() {}; - virtual BOOL onUpdate(F32 time, U8* joint_mask); + virtual bool onUpdate(F32 time, U8* joint_mask); virtual LLJoint::JointPriority getPriority(){return LLJoint::HIGHER_PRIORITY;} virtual bool getLoop() { return true; } virtual F32 getDuration() { return 0.f; } diff --git a/indra/llcharacter/llmotion.cpp b/indra/llcharacter/llmotion.cpp index a3c23a9c94..a0b599663e 100644 --- a/indra/llcharacter/llmotion.cpp +++ b/indra/llcharacter/llmotion.cpp @@ -43,8 +43,8 @@ // Class Constructor //----------------------------------------------------------------------------- LLMotion::LLMotion( const LLUUID &id ) : - mStopped(TRUE), - mActive(FALSE), + mStopped(true), + mActive(false), mID(id), mActivationTimestamp(0.f), mStopTimestamp(0.f), @@ -132,10 +132,10 @@ void LLMotion::setDeactivateCallback( void (*cb)(void *), void* userdata ) void LLMotion::setStopTime(F32 time) { mStopTimestamp = time; - mStopped = TRUE; + mStopped = true; } -BOOL LLMotion::isBlending() +bool LLMotion::isBlending() { return mPose.getWeight() < 1.f; } @@ -146,8 +146,8 @@ BOOL LLMotion::isBlending() void LLMotion::activate(F32 time) { mActivationTimestamp = time; - mStopped = FALSE; - mActive = TRUE; + mStopped = false; + mActive = true; onActivate(); } @@ -156,7 +156,7 @@ void LLMotion::activate(F32 time) //----------------------------------------------------------------------------- void LLMotion::deactivate() { - mActive = FALSE; + mActive = false; mPose.setWeight(0.f); if (mDeactivateCallback) diff --git a/indra/llcharacter/llmotion.h b/indra/llcharacter/llmotion.h index 1453979764..d6d7267115 100644 --- a/indra/llcharacter/llmotion.h +++ b/indra/llcharacter/llmotion.h @@ -91,21 +91,21 @@ public: virtual void setStopTime(F32 time); - BOOL isStopped() const { return mStopped; } + bool isStopped() const { return mStopped; } - void setStopped(BOOL stopped) { mStopped = stopped; } + void setStopped(bool stopped) { mStopped = stopped; } - BOOL isBlending(); + bool isBlending(); // Activation functions. // It is OK for other classes to activate a motion, // but only the controller can deactivate it. - // Thus, if mActive == TRUE, the motion *may* be on the controllers active list, - // but if mActive == FALSE, the motion is gauranteed not to be on the active list. + // Thus, if mActive == true, the motion *may* be on the controllers active list, + // but if mActive == false, the motion is gauranteed not to be on the active list. protected: // Used by LLMotionController only void deactivate(); - BOOL isActive() { return mActive; } + bool isActive() { return mActive; } public: void activate(F32 time); @@ -144,15 +144,15 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character) = 0; // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 activeTime, U8* joint_mask) = 0; + // must return true while it is active, and + // must return false when the motion is completed. + virtual bool onUpdate(F32 activeTime, U8* joint_mask) = 0; // called when a motion is deactivated virtual void onDeactivate() = 0; // can we crossfade this motion with a new instance when restarted? - // should ultimately always be TRUE, but lack of emote blending, etc + // should ultimately always be true, but lack of emote blending, etc // requires this virtual bool canDeprecate(); @@ -161,16 +161,16 @@ public: protected: // called when a motion is activated - // must return TRUE to indicate success, or else + // must return true to indicate success, or else // it will be deactivated - virtual BOOL onActivate() = 0; + virtual bool onActivate() = 0; void addJointState(const LLPointer& jointState); protected: LLPose mPose; - BOOL mStopped; // motion has been stopped; - BOOL mActive; // motion is on active list (can be stopped or not stopped) + bool mStopped; // motion has been stopped; + bool mActive; // motion is on active list (can be stopped or not stopped) //------------------------------------------------------------------------- // these are set implicitly by the motion controller and @@ -208,8 +208,8 @@ public: F32 getMinPixelArea() { return 0.f; } LLMotionInitStatus onInitialize(LLCharacter*) { LL_INFOS() << "LLTestMotion::onInitialize()" << LL_ENDL; return STATUS_SUCCESS; } - BOOL onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return true; } - BOOL onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return true; } + bool onActivate() { LL_INFOS() << "LLTestMotion::onActivate()" << LL_ENDL; return true; } + bool onUpdate(F32 time, U8* joint_mask) { LL_INFOS() << "LLTestMotion::onUpdate(" << time << ")" << LL_ENDL; return true; } void onDeactivate() { LL_INFOS() << "LLTestMotion::onDeactivate()" << LL_ENDL; } }; @@ -251,14 +251,14 @@ public: /*virtual*/ LLMotionInitStatus onInitialize(LLCharacter *character) { return STATUS_SUCCESS; } // called when a motion is activated - // must return TRUE to indicate success, or else + // must return true to indicate success, or else // it will be deactivated - /*virtual*/ BOOL onActivate() { return true; } + /*virtual*/ bool onActivate() { return true; } // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - /*virtual*/ BOOL onUpdate(F32 activeTime, U8* joint_mask) { return true; } + // must return true while it is active, and + // must return false when the motion is completed. + /*virtual*/ bool onUpdate(F32 activeTime, U8* joint_mask) { return true; } // called when a motion is deactivated /*virtual*/ void onDeactivate() {} diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 750547da93..115606d863 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -76,7 +76,7 @@ LLMotionRegistry::~LLMotionRegistry() //----------------------------------------------------------------------------- // addMotion() //----------------------------------------------------------------------------- -BOOL LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) +bool LLMotionRegistry::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) { // LL_INFOS() << "Registering motion: " << name << LL_ENDL; if (!is_in_map(mMotionTable, id)) @@ -133,13 +133,13 @@ LLMotionController::LLMotionController() mAnimTime(0.f), mPrevTimerElapsed(0.f), mLastTime(0.0f), - mHasRunOnce(FALSE), - mPaused(FALSE), + mHasRunOnce(false), + mPaused(false), mPausedFrame(0), mTimeStep(0.f), mTimeStepCount(0), mLastInterp(0.f), - mIsSelf(FALSE), + mIsSelf(false), mLastCountAfterPurge(0) { } @@ -275,7 +275,7 @@ void LLMotionController::setTimeStep(F32 step) LLMotion* motionp = *iter; F32 activation_time = motionp->mActivationTimestamp; motionp->mActivationTimestamp = (F32)(llfloor(activation_time / step)) * step; - BOOL stopped = motionp->isStopped(); + bool stopped = motionp->isStopped(); motionp->setStopTime((F32)(llfloor(motionp->getStopTime() / step)) * step); motionp->setStopped(stopped); motionp->mSendStopTimestamp = (F32)llfloor(motionp->mSendStopTimestamp / step) * step; @@ -303,7 +303,7 @@ void LLMotionController::setCharacter(LLCharacter *character) //----------------------------------------------------------------------------- // registerMotion() //----------------------------------------------------------------------------- -BOOL LLMotionController::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) +bool LLMotionController::registerMotion( const LLUUID& id, LLMotionConstructor constructor ) { return sRegistry.registerMotion(id, constructor); } @@ -389,7 +389,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id ) //----------------------------------------------------------------------------- // startMotion() //----------------------------------------------------------------------------- -BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) +bool LLMotionController::startMotion(const LLUUID &id, F32 start_offset) { // do we have an instance of this motion for this character? LLMotion *motion = findMotion(id); @@ -431,7 +431,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset) //----------------------------------------------------------------------------- // stopMotionLocally() //----------------------------------------------------------------------------- -BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate) +bool LLMotionController::stopMotionLocally(const LLUUID &id, bool stop_immediate) { // if already inactive, return false LLMotion *motion = findMotion(id); @@ -439,7 +439,7 @@ BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate return stopMotionInstance(motion, stop_immediate||mPaused); } -BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediate) +bool LLMotionController::stopMotionInstance(LLMotion* motion, bool stop_immediate) { if (!motion) { @@ -459,7 +459,7 @@ BOOL LLMotionController::stopMotionInstance(LLMotion* motion, BOOL stop_immediat } else if (isMotionLoading(motion)) { - motion->setStopped(TRUE); + motion->setStopped(true); return true; } @@ -518,7 +518,7 @@ void LLMotionController::updateIdleMotion(LLMotion* motionp) if (mLastTime <= motionp->mSendStopTimestamp) { mCharacter->requestStopMotion( motionp ); - stopMotionInstance(motionp, FALSE); + stopMotionInstance(motionp, false); } } else if (mAnimTime >= motionp->mActivationTimestamp) @@ -552,7 +552,7 @@ void LLMotionController::updateIdleActiveMotions() void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - BOOL update_result = TRUE; + bool update_result = true; U8 last_joint_signature[LL_CHARACTER_MAX_ANIMATED_JOINTS]; memset(&last_joint_signature, 0, sizeof(U8) * LL_CHARACTER_MAX_ANIMATED_JOINTS); @@ -568,11 +568,11 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty continue; } - BOOL update_motion = FALSE; + bool update_motion = false; if (motionp->getPose()->getWeight() < 1.f) { - update_motion = TRUE; + update_motion = true; } else { @@ -584,7 +584,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty if ((*current_signature | test_signature) > (*current_signature)) { *current_signature |= test_signature; - update_motion = TRUE; + update_motion = true; } *((U32*)&last_joint_signature[i * 4]) = *(U32*)&(mJointSignature[1][i * 4]); @@ -594,7 +594,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty if ((*current_signature | test_signature) > (*current_signature)) { *current_signature |= test_signature; - update_motion = TRUE; + update_motion = true; } } } @@ -620,7 +620,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty if (mLastTime <= motionp->mSendStopTimestamp) { mCharacter->requestStopMotion( motionp ); - stopMotionInstance(motionp, FALSE); + stopMotionInstance(motionp, false); } } @@ -701,7 +701,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty if (mLastTime <= motionp->mSendStopTimestamp) { mCharacter->requestStopMotion( motionp ); - stopMotionInstance(motionp, FALSE); + stopMotionInstance(motionp, false); } } @@ -747,12 +747,12 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty // propagate this to the network // as not all viewers are guaranteed to have access to the same logic mCharacter->requestStopMotion( motionp ); - stopMotionInstance(motionp, FALSE); + stopMotionInstance(motionp, false); } } - // even if onupdate returns FALSE, add this motion in to the blend one last time + // even if onupdate returns false, add this motion in to the blend one last time mPoseBlender.addMotion(motionp); } } @@ -815,7 +815,7 @@ void LLMotionController::updateMotions(bool force_update) // The use_quantum optimization or possibly the associated code in setTimeStamp() // does not work as implemented. // Currently setting mTimeStep to nonzero is disabled elsewhere. - BOOL use_quantum = (mTimeStep != 0.f); + bool use_quantum = (mTimeStep != 0.f); // Always update mPrevTimerElapsed F32 cur_time = mTimer.getElapsedTimeF32(); @@ -885,7 +885,7 @@ void LLMotionController::updateMotions(bool force_update) if (use_quantum) { - mPoseBlender.blendAndCache(TRUE); + mPoseBlender.blendAndCache(true); } else { @@ -893,7 +893,7 @@ void LLMotionController::updateMotions(bool force_update) } } - mHasRunOnce = TRUE; + mHasRunOnce = true; // LL_INFOS() << "Motion controller time " << motionTimer.getElapsedTimeF32() << LL_ENDL; } @@ -913,13 +913,13 @@ void LLMotionController::updateMotionsMinimal() deactivateStoppedMotions(); - mHasRunOnce = TRUE; + mHasRunOnce = true; } //----------------------------------------------------------------------------- // activateMotionInstance() //----------------------------------------------------------------------------- -BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) +bool LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // It's not clear why the getWeight() line seems to be crashing this, but @@ -932,7 +932,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) if (mLoadingMotions.find(motion) != mLoadingMotions.end()) { // we want to start this motion, but we can't yet, so flag it as started - motion->setStopped(FALSE); + motion->setStopped(false); // report pending animations as activated return true; } @@ -984,7 +984,7 @@ BOOL LLMotionController::activateMotionInstance(LLMotion *motion, F32 time) //----------------------------------------------------------------------------- // deactivateMotionInstance() //----------------------------------------------------------------------------- -BOOL LLMotionController::deactivateMotionInstance(LLMotion *motion) +bool LLMotionController::deactivateMotionInstance(LLMotion *motion) { motion->deactivate(); @@ -1009,7 +1009,7 @@ void LLMotionController::deprecateMotionInstance(LLMotion* motion) mDeprecatedMotions.insert(motion); //fade out deprecated motion - stopMotionInstance(motion, FALSE); + stopMotionInstance(motion, false); //no longer canonical mAllMotions.erase(motion->getID()); } @@ -1124,7 +1124,7 @@ void LLMotionController::pauseAllMotions() if (!mPaused) { //LL_INFOS() << "Pausing animations..." << LL_ENDL; - mPaused = TRUE; + mPaused = true; mPausedFrame = LLFrameTimer::getFrameCount(); } @@ -1138,7 +1138,7 @@ void LLMotionController::unpauseAllMotions() if (mPaused) { //LL_INFOS() << "Unpausing animations..." << LL_ENDL; - mPaused = FALSE; + mPaused = false; } } // End diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h index 637ee4d2bb..dea470cbd3 100644 --- a/indra/llcharacter/llmotioncontroller.h +++ b/indra/llcharacter/llmotioncontroller.h @@ -62,7 +62,7 @@ public: // adds motion classes to the registry // returns true if successfull - BOOL registerMotion( const LLUUID& id, LLMotionConstructor create); + bool registerMotion( const LLUUID& id, LLMotionConstructor create); // creates a new instance of a named motion // returns NULL motion is not registered @@ -85,7 +85,7 @@ class LLMotionController public: typedef std::list motion_list_t; typedef std::set motion_set_t; - BOOL mIsSelf; + bool mIsSelf; public: // Constructor @@ -102,7 +102,7 @@ public: // registers a motion with the controller // (actually just forwards call to motion registry) // returns true if successfull - BOOL registerMotion( const LLUUID& id, LLMotionConstructor create ); + bool registerMotion( const LLUUID& id, LLMotionConstructor create ); // creates a motion from the registry LLMotion *createMotion( const LLUUID &id ); @@ -115,13 +115,13 @@ public: // start motion // begins playing the specified motion // returns true if successful - BOOL startMotion( const LLUUID &id, F32 start_offset ); + bool startMotion( const LLUUID &id, F32 start_offset ); // stop motion // stops a playing motion // in reality, it begins the ease out transition phase // returns true if successful - BOOL stopMotionLocally( const LLUUID &id, BOOL stop_immediate ); + bool stopMotionLocally( const LLUUID &id, bool stop_immediate ); // Move motions from loading to loaded void updateLoadingMotions(); @@ -147,7 +147,7 @@ public: // pause and continue all motions void pauseAllMotions(); void unpauseAllMotions(); - BOOL isPaused() const { return mPaused; } + bool isPaused() const { return mPaused; } S32 getPausedFrame() const { return mPausedFrame; } void setTimeStep(F32 step); @@ -178,10 +178,10 @@ protected: // internal operations act on motion instances directly // as there can be duplicate motions per id during blending overlap void deleteAllMotions(); - BOOL activateMotionInstance(LLMotion *motion, F32 time); - BOOL deactivateMotionInstance(LLMotion *motion); + bool activateMotionInstance(LLMotion *motion, F32 time); + bool deactivateMotionInstance(LLMotion *motion); void deprecateMotionInstance(LLMotion* motion); - BOOL stopMotionInstance(LLMotion *motion, BOOL stop_imemdiate); + bool stopMotionInstance(LLMotion *motion, bool stop_imemdiate); void removeMotionInstance(LLMotion* motion); void updateRegularMotions(); void updateAdditiveMotions(); @@ -220,8 +220,8 @@ protected: F32 mPrevTimerElapsed; F32 mAnimTime; F32 mLastTime; - BOOL mHasRunOnce; - BOOL mPaused; + bool mHasRunOnce; + bool mPaused; S32 mPausedFrame; F32 mTimeStep; S32 mTimeStepCount; diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp index 2938bf9473..73652a15b4 100644 --- a/indra/llcharacter/llmultigesture.cpp +++ b/indra/llcharacter/llmultigesture.cpp @@ -48,7 +48,7 @@ LLMultiGesture::LLMultiGesture() mTrigger(), mReplaceText(), mSteps(), - mPlaying(FALSE), + mPlaying(false), mCurrentStep(0), mDoneCallback(NULL), mCallbackData(NULL) @@ -64,12 +64,12 @@ LLMultiGesture::~LLMultiGesture() void LLMultiGesture::reset() { - mPlaying = FALSE; + mPlaying = false; mCurrentStep = 0; mWaitTimer.reset(); - mWaitingTimer = FALSE; - mWaitingAnimations = FALSE; - mWaitingAtEnd = FALSE; + mWaitingTimer = false; + mWaitingAnimations = false; + mWaitingAtEnd = false; mRequestedAnimIDs.clear(); mPlayingAnimIDs.clear(); } @@ -114,7 +114,7 @@ S32 LLMultiGesture::getMaxSerialSize() const return max_size; } -BOOL LLMultiGesture::serialize(LLDataPacker& dp) const +bool LLMultiGesture::serialize(LLDataPacker& dp) const { dp.packS32(GESTURE_VERSION, "version"); dp.packU8(mKey, "key"); @@ -130,7 +130,7 @@ BOOL LLMultiGesture::serialize(LLDataPacker& dp) const LLGestureStep* step = mSteps[i]; dp.packS32(step->getType(), "step_type"); - BOOL ok = step->serialize(dp); + bool ok = step->serialize(dp); if (!ok) { return false; @@ -139,7 +139,7 @@ BOOL LLMultiGesture::serialize(LLDataPacker& dp) const return true; } -BOOL LLMultiGesture::deserialize(LLDataPacker& dp) +bool LLMultiGesture::deserialize(LLDataPacker& dp) { S32 version; dp.unpackS32(version, "version"); @@ -179,7 +179,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) case STEP_ANIMATION: { LLGestureStepAnimation* step = new LLGestureStepAnimation(); - BOOL ok = step->deserialize(dp); + bool ok = step->deserialize(dp); if (!ok) return false; mSteps.push_back(step); break; @@ -187,7 +187,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) case STEP_SOUND: { LLGestureStepSound* step = new LLGestureStepSound(); - BOOL ok = step->deserialize(dp); + bool ok = step->deserialize(dp); if (!ok) return false; mSteps.push_back(step); break; @@ -195,7 +195,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) case STEP_CHAT: { LLGestureStepChat* step = new LLGestureStepChat(); - BOOL ok = step->deserialize(dp); + bool ok = step->deserialize(dp); if (!ok) return false; mSteps.push_back(step); break; @@ -203,7 +203,7 @@ BOOL LLMultiGesture::deserialize(LLDataPacker& dp) case STEP_WAIT: { LLGestureStepWait* step = new LLGestureStepWait(); - BOOL ok = step->deserialize(dp); + bool ok = step->deserialize(dp); if (!ok) return false; mSteps.push_back(step); break; @@ -262,7 +262,7 @@ S32 LLGestureStepAnimation::getMaxSerialSize() const return max_size; } -BOOL LLGestureStepAnimation::serialize(LLDataPacker& dp) const +bool LLGestureStepAnimation::serialize(LLDataPacker& dp) const { dp.packString(mAnimName, "anim_name"); dp.packUUID(mAnimAssetID, "asset_id"); @@ -270,7 +270,7 @@ BOOL LLGestureStepAnimation::serialize(LLDataPacker& dp) const return true; } -BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp) +bool LLGestureStepAnimation::deserialize(LLDataPacker& dp) { dp.unpackString(mAnimName, "anim_name"); @@ -344,7 +344,7 @@ S32 LLGestureStepSound::getMaxSerialSize() const return max_size; } -BOOL LLGestureStepSound::serialize(LLDataPacker& dp) const +bool LLGestureStepSound::serialize(LLDataPacker& dp) const { dp.packString(mSoundName, "sound_name"); dp.packUUID(mSoundAssetID, "asset_id"); @@ -352,7 +352,7 @@ BOOL LLGestureStepSound::serialize(LLDataPacker& dp) const return true; } -BOOL LLGestureStepSound::deserialize(LLDataPacker& dp) +bool LLGestureStepSound::deserialize(LLDataPacker& dp) { dp.unpackString(mSoundName, "sound_name"); @@ -404,14 +404,14 @@ S32 LLGestureStepChat::getMaxSerialSize() const return max_size; } -BOOL LLGestureStepChat::serialize(LLDataPacker& dp) const +bool LLGestureStepChat::serialize(LLDataPacker& dp) const { dp.packString(mChatText, "chat_text"); dp.packU32(mFlags, "flags"); return true; } -BOOL LLGestureStepChat::deserialize(LLDataPacker& dp) +bool LLGestureStepChat::deserialize(LLDataPacker& dp) { dp.unpackString(mChatText, "chat_text"); @@ -459,14 +459,14 @@ S32 LLGestureStepWait::getMaxSerialSize() const return max_size; } -BOOL LLGestureStepWait::serialize(LLDataPacker& dp) const +bool LLGestureStepWait::serialize(LLDataPacker& dp) const { dp.packF32(mWaitSeconds, "wait_seconds"); dp.packU32(mFlags, "flags"); return true; } -BOOL LLGestureStepWait::deserialize(LLDataPacker& dp) +bool LLGestureStepWait::deserialize(LLDataPacker& dp) { dp.unpackF32(mWaitSeconds, "wait_seconds"); dp.unpackU32(mFlags, "flags"); diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h index 92820159d4..13acbc3f52 100644 --- a/indra/llcharacter/llmultigesture.h +++ b/indra/llcharacter/llmultigesture.h @@ -46,8 +46,8 @@ public: // Maximum number of bytes this could hold once serialized. S32 getMaxSerialSize() const; - BOOL serialize(LLDataPacker& dp) const; - BOOL deserialize(LLDataPacker& dp); + bool serialize(LLDataPacker& dp) const; + bool deserialize(LLDataPacker& dp); void dump(); @@ -75,19 +75,19 @@ public: std::vector mSteps; // Is the gesture currently playing? - BOOL mPlaying; + bool mPlaying; // "instruction pointer" for steps S32 mCurrentStep; // We're waiting for triggered animations to stop playing - BOOL mWaitingAnimations; + bool mWaitingAnimations; // We're waiting a fixed amount of time - BOOL mWaitingTimer; + bool mWaitingTimer; // Waiting after the last step played for all animations to complete - BOOL mWaitingAtEnd; + bool mWaitingAtEnd; // Timer for waiting LLFrameTimer mWaitTimer; @@ -129,8 +129,8 @@ public: virtual std::vector getLabel() const = 0; virtual S32 getMaxSerialSize() const = 0; - virtual BOOL serialize(LLDataPacker& dp) const = 0; - virtual BOOL deserialize(LLDataPacker& dp) = 0; + virtual bool serialize(LLDataPacker& dp) const = 0; + virtual bool deserialize(LLDataPacker& dp) = 0; virtual void dump() = 0; }; @@ -151,8 +151,8 @@ public: virtual std::vector getLabel() const; virtual S32 getMaxSerialSize() const; - virtual BOOL serialize(LLDataPacker& dp) const; - virtual BOOL deserialize(LLDataPacker& dp); + virtual bool serialize(LLDataPacker& dp) const; + virtual bool deserialize(LLDataPacker& dp); virtual void dump(); @@ -174,8 +174,8 @@ public: virtual std::vector getLabel() const; virtual S32 getMaxSerialSize() const; - virtual BOOL serialize(LLDataPacker& dp) const; - virtual BOOL deserialize(LLDataPacker& dp); + virtual bool serialize(LLDataPacker& dp) const; + virtual bool deserialize(LLDataPacker& dp); virtual void dump(); @@ -197,8 +197,8 @@ public: virtual std::vector getLabel() const; virtual S32 getMaxSerialSize() const; - virtual BOOL serialize(LLDataPacker& dp) const; - virtual BOOL deserialize(LLDataPacker& dp); + virtual bool serialize(LLDataPacker& dp) const; + virtual bool deserialize(LLDataPacker& dp); virtual void dump(); @@ -222,8 +222,8 @@ public: virtual std::vector getLabel() const; virtual S32 getMaxSerialSize() const; - virtual BOOL serialize(LLDataPacker& dp) const; - virtual BOOL deserialize(LLDataPacker& dp); + virtual bool serialize(LLDataPacker& dp) const; + virtual bool deserialize(LLDataPacker& dp); virtual void dump(); diff --git a/indra/llcharacter/llpose.cpp b/indra/llcharacter/llpose.cpp index 5acdfbf532..1983607d47 100644 --- a/indra/llcharacter/llpose.cpp +++ b/indra/llcharacter/llpose.cpp @@ -81,7 +81,7 @@ LLJointState *LLPose::getNextJointState() //----------------------------------------------------------------------------- // addJointState() //----------------------------------------------------------------------------- -BOOL LLPose::addJointState(const LLPointer& jointState) +bool LLPose::addJointState(const LLPointer& jointState) { if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end()) { @@ -93,7 +93,7 @@ BOOL LLPose::addJointState(const LLPointer& jointState) //----------------------------------------------------------------------------- // removeJointState() //----------------------------------------------------------------------------- -BOOL LLPose::removeJointState(const LLPointer& jointState) +bool LLPose::removeJointState(const LLPointer& jointState) { mJointMap.erase(jointState->getJoint()->getName()); return true; @@ -102,7 +102,7 @@ BOOL LLPose::removeJointState(const LLPointer& jointState) //----------------------------------------------------------------------------- // removeAllJointStates() //----------------------------------------------------------------------------- -BOOL LLPose::removeAllJointStates() +bool LLPose::removeAllJointStates() { mJointMap.clear(); return true; @@ -181,7 +181,7 @@ LLJointStateBlender::LLJointStateBlender() { mJointStates[i] = NULL; mPriorities[i] = S32_MIN; - mAdditiveBlends[i] = FALSE; + mAdditiveBlends[i] = false; } } @@ -193,7 +193,7 @@ LLJointStateBlender::~LLJointStateBlender() //----------------------------------------------------------------------------- // addJointState() //----------------------------------------------------------------------------- -BOOL LLJointStateBlender::addJointState(const LLPointer& joint_state, S32 priority, BOOL additive_blend) +bool LLJointStateBlender::addJointState(const LLPointer& joint_state, S32 priority, bool additive_blend) { llassert(joint_state); @@ -235,7 +235,7 @@ BOOL LLJointStateBlender::addJointState(const LLPointer& joint_sta //----------------------------------------------------------------------------- // blendJointStates() //----------------------------------------------------------------------------- -void LLJointStateBlender::blendJointStates(BOOL apply_now) +void LLJointStateBlender::blendJointStates(bool apply_now) { // we need at least one joint to blend // if there is one, it will be in slot zero according to insertion logic @@ -468,7 +468,7 @@ LLPoseBlender::~LLPoseBlender() //----------------------------------------------------------------------------- // addMotion() //----------------------------------------------------------------------------- -BOOL LLPoseBlender::addMotion(LLMotion* motion) +bool LLPoseBlender::addMotion(LLMotion* motion) { LLPose* pose = motion->getPose(); @@ -525,7 +525,7 @@ void LLPoseBlender::blendAndApply() //----------------------------------------------------------------------------- // blendAndCache() //----------------------------------------------------------------------------- -void LLPoseBlender::blendAndCache(BOOL reset_cached_joints) +void LLPoseBlender::blendAndCache(bool reset_cached_joints) { for (blender_list_t::iterator iter = mActiveBlenders.begin(); iter != mActiveBlenders.end(); ++iter) @@ -535,7 +535,7 @@ void LLPoseBlender::blendAndCache(BOOL reset_cached_joints) { jsbp->resetCachedJoint(); } - jsbp->blendJointStates(FALSE); + jsbp->blendJointStates(false); } } diff --git a/indra/llcharacter/llpose.h b/indra/llcharacter/llpose.h index 1405f1e053..d43956e120 100644 --- a/indra/llcharacter/llpose.h +++ b/indra/llcharacter/llpose.h @@ -65,11 +65,11 @@ public: // Destructor ~LLPose(); // add a joint state in this pose - BOOL addJointState(const LLPointer& jointState); + bool addJointState(const LLPointer& jointState); // remove a joint state from this pose - BOOL removeJointState(const LLPointer& jointState); + bool removeJointState(const LLPointer& jointState); // removes all joint states from this pose - BOOL removeAllJointStates(); + bool removeAllJointStates(); // set weight for all joint states in this pose void setWeight(F32 weight); // get weight for this pose @@ -87,12 +87,12 @@ class LLJointStateBlender protected: LLPointer mJointStates[JSB_NUM_JOINT_STATES]; S32 mPriorities[JSB_NUM_JOINT_STATES]; - BOOL mAdditiveBlends[JSB_NUM_JOINT_STATES]; + bool mAdditiveBlends[JSB_NUM_JOINT_STATES]; public: LLJointStateBlender(); ~LLJointStateBlender(); - void blendJointStates(BOOL apply_now = TRUE); - BOOL addJointState(const LLPointer& joint_state, S32 priority, BOOL additive_blend); + void blendJointStates(bool apply_now = true); + bool addJointState(const LLPointer& joint_state, S32 priority, bool additive_blend); void interpolate(F32 u); void clear(); void resetCachedJoint(); @@ -120,7 +120,7 @@ public: ~LLPoseBlender(); // request motion joint states to be added to pose blender joint state records - BOOL addMotion(LLMotion* motion); + bool addMotion(LLMotion* motion); // blend all joint states and apply to skeleton void blendAndApply(); @@ -129,7 +129,7 @@ public: void clearBlenders(); // blend all joint states and cache results - void blendAndCache(BOOL reset_cached_joints); + void blendAndCache(bool reset_cached_joints); // interpolate all joints towards cached values void interpolate(F32 u); diff --git a/indra/llcharacter/llstatemachine.cpp b/indra/llcharacter/llstatemachine.cpp index 8261670728..261eaf0350 100644 --- a/indra/llcharacter/llstatemachine.cpp +++ b/indra/llcharacter/llstatemachine.cpp @@ -49,7 +49,7 @@ bool operator!=(const LLUniqueID &a, const LLUniqueID &b) LLStateDiagram::LLStateDiagram() { mDefaultState = NULL; - mUseDefaultState = FALSE; + mUseDefaultState = false; } LLStateDiagram::~LLStateDiagram() @@ -58,14 +58,14 @@ LLStateDiagram::~LLStateDiagram() } // add a state to the state graph -BOOL LLStateDiagram::addState(LLFSMState *state) +bool LLStateDiagram::addState(LLFSMState *state) { mStates[state] = Transitions(); return true; } // add a directed transition between 2 states -BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) +bool LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) { StateMap::iterator state_it; state_it = mStates.find(&start_state); @@ -97,9 +97,9 @@ BOOL LLStateDiagram::addTransition(LLFSMState& start_state, LLFSMState& end_stat } // add an undirected transition between 2 states -BOOL LLStateDiagram::addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) +bool LLStateDiagram::addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition) { - BOOL result; + bool result; result = addTransition(start_state, end_state, transition); if (result) { @@ -162,7 +162,7 @@ LLFSMState* LLStateDiagram::processTransition(LLFSMState& start_state, LLFSMTran void LLStateDiagram::setDefaultState(LLFSMState& default_state) { - mUseDefaultState = TRUE; + mUseDefaultState = true; mDefaultState = &default_state; } @@ -179,7 +179,7 @@ S32 LLStateDiagram::numDeadendStates() return numDeadends; } -BOOL LLStateDiagram::stateIsValid(LLFSMState& state) +bool LLStateDiagram::stateIsValid(LLFSMState& state) { if (mStates.find(&state) != mStates.end()) { @@ -200,7 +200,7 @@ LLFSMState* LLStateDiagram::getState(U32 state_id) return NULL; } -BOOL LLStateDiagram::saveDotFile(const std::string& filename) +bool LLStateDiagram::saveDotFile(const std::string& filename) { LLAPRFile outfile ; outfile.open(filename, LL_APR_W); @@ -308,7 +308,7 @@ void LLStateMachine::runCurrentState(void *data) } // set current state -BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, BOOL skip_entry) +bool LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, bool skip_entry) { llassert(mStateDiagram); @@ -325,7 +325,7 @@ BOOL LLStateMachine::setCurrentState(LLFSMState *initial_state, void* user_data, return false; } -BOOL LLStateMachine::setCurrentState(U32 state_id, void* user_data, BOOL skip_entry) +bool LLStateMachine::setCurrentState(U32 state_id, void* user_data, bool skip_entry) { llassert(mStateDiagram); diff --git a/indra/llcharacter/llstatemachine.h b/indra/llcharacter/llstatemachine.h index a2f7e59bd2..521da113e9 100644 --- a/indra/llcharacter/llstatemachine.h +++ b/indra/llcharacter/llstatemachine.h @@ -74,7 +74,7 @@ protected: StateMap mStates; Transitions mDefaultTransitions; LLFSMState* mDefaultState; - BOOL mUseDefaultState; + bool mUseDefaultState; public: LLStateDiagram(); @@ -82,13 +82,13 @@ public: protected: // add a state to the state graph, executed implicitly when adding transitions - BOOL addState(LLFSMState *state); + bool addState(LLFSMState *state); // add a directed transition between 2 states - BOOL addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition); + bool addTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition); // add an undirected transition between 2 states - BOOL addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition); + bool addUndirectedTransition(LLFSMState& start_state, LLFSMState& end_state, LLFSMTransition& transition); // add a transition that is taken if none other exist void addDefaultTransition(LLFSMState& end_state, LLFSMTransition& transition); @@ -103,14 +103,14 @@ protected: S32 numDeadendStates(); // does this state exist in the state diagram? - BOOL stateIsValid(LLFSMState& state); + bool stateIsValid(LLFSMState& state); // get a state pointer by ID LLFSMState* getState(U32 state_id); public: // save the graph in a DOT file for rendering and visualization - BOOL saveDotFile(const std::string& filename); + bool saveDotFile(const std::string& filename); }; class LLStateMachine @@ -138,10 +138,10 @@ public: void runCurrentState(void *data); // set state by state pointer - BOOL setCurrentState(LLFSMState *initial_state, void* user_data, BOOL skip_entry = TRUE); + bool setCurrentState(LLFSMState *initial_state, void* user_data, bool skip_entry = true); // set state by unique ID - BOOL setCurrentState(U32 state_id, void* user_data, BOOL skip_entry = TRUE); + bool setCurrentState(U32 state_id, void* user_data, bool skip_entry = true); }; #endif //_LL_LLSTATEMACHINE_H diff --git a/indra/llcharacter/lltargetingmotion.cpp b/indra/llcharacter/lltargetingmotion.cpp index 0697d04fd3..87d61a2d36 100644 --- a/indra/llcharacter/lltargetingmotion.cpp +++ b/indra/llcharacter/lltargetingmotion.cpp @@ -93,7 +93,7 @@ LLMotion::LLMotionInitStatus LLTargetingMotion::onInitialize(LLCharacter *charac //----------------------------------------------------------------------------- // LLTargetingMotion::onActivate() //----------------------------------------------------------------------------- -BOOL LLTargetingMotion::onActivate() +bool LLTargetingMotion::onActivate() { return true; } @@ -101,7 +101,7 @@ BOOL LLTargetingMotion::onActivate() //----------------------------------------------------------------------------- // LLTargetingMotion::onUpdate() //----------------------------------------------------------------------------- -BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask) +bool LLTargetingMotion::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED; F32 slerp_amt = LLSmoothInterpolation::getInterpolant(TORSO_TARGET_HALF_LIFE); @@ -109,7 +109,7 @@ BOOL LLTargetingMotion::onUpdate(F32 time, U8* joint_mask) LLVector3 target; LLVector3* lookAtPoint = (LLVector3*)mCharacter->getAnimationData("LookAtPoint"); - BOOL result = TRUE; + bool result = true; if (!lookAtPoint) { diff --git a/indra/llcharacter/lltargetingmotion.h b/indra/llcharacter/lltargetingmotion.h index 85749a0882..b284dd2941 100644 --- a/indra/llcharacter/lltargetingmotion.h +++ b/indra/llcharacter/lltargetingmotion.h @@ -91,14 +91,14 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character); // called when a motion is activated - // must return TRUE to indicate success, or else + // must return true to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + // must return true while it is active, and + // must return true when the motion is completed. + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp index 2255191e59..5930a28ee8 100644 --- a/indra/llcharacter/llvisualparam.cpp +++ b/indra/llcharacter/llvisualparam.cpp @@ -164,8 +164,8 @@ LLVisualParam::LLVisualParam() mLastWeight( 0.f ), mNext( NULL ), mTargetWeight( 0.f ), - mIsAnimating( FALSE ), - mIsDummy(FALSE), + mIsAnimating( false ), + mIsDummy(false), mID( -1 ), mInfo( 0 ), mParamLocation(LOC_UNKNOWN) @@ -207,21 +207,21 @@ LLVisualParam::~LLVisualParam() // setInfo() //----------------------------------------------------------------------------- -BOOL LLVisualParam::setInfo(LLVisualParamInfo *info) +bool LLVisualParam::setInfo(LLVisualParamInfo *info) { llassert(mInfo == NULL); if (info->mID < 0) return false; mInfo = info; mID = info->mID; - setWeight(getDefaultWeight(), FALSE ); + setWeight(getDefaultWeight(), false ); return true; } //----------------------------------------------------------------------------- // parseData() //----------------------------------------------------------------------------- -BOOL LLVisualParam::parseData(LLXmlTreeNode *node) +bool LLVisualParam::parseData(LLXmlTreeNode *node) { LLVisualParamInfo *info = new LLVisualParamInfo; @@ -282,7 +282,7 @@ void LLVisualParam::setAnimationTarget(F32 target_value) { mTargetWeight = target_value; } - mIsAnimating = TRUE; + mIsAnimating = true; if (mNext) { @@ -327,7 +327,7 @@ void LLVisualParam::stopAnimating() { if (mIsAnimating && isTweakable()) { - mIsAnimating = FALSE; + mIsAnimating = false; setWeight(mTargetWeight); } } diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h index 2a632689f0..9cbb3962f4 100644 --- a/indra/llcharacter/llvisualparam.h +++ b/indra/llcharacter/llvisualparam.h @@ -113,11 +113,11 @@ public: // (They can not be virtual because they use specific derived Info classes) LLVisualParamInfo* getInfo() const { return mInfo; } // This sets mInfo and calls initialization functions - BOOL setInfo(LLVisualParamInfo *info); + bool setInfo(LLVisualParamInfo *info); // Virtual functions // Pure virtuals - //virtual BOOL parseData( LLXmlTreeNode *node ) = 0; + //virtual bool parseData( LLXmlTreeNode *node ) = 0; virtual void apply( ESex avatar_sex ) = 0; // Default functions virtual void setWeight(F32 weight); @@ -151,17 +151,17 @@ public: F32 getCurrentWeight() const { return mCurWeight; } F32 getLastWeight() const { return mLastWeight; } void setLastWeight(F32 val) { mLastWeight = val; } - BOOL isAnimating() const { return mIsAnimating; } - BOOL isTweakable() const { return (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) || (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT); } + bool isAnimating() const { return mIsAnimating; } + bool isTweakable() const { return (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) || (getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE_NO_TRANSMIT); } LLVisualParam* getNextParam() { return mNext; } void setNextParam( LLVisualParam *next ); void clearNextParam(); - virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating && !mIsDummy; } - BOOL getAnimating() const { return mIsAnimating; } + virtual void setAnimating(bool is_animating) { mIsAnimating = is_animating && !mIsDummy; } + bool getAnimating() const { return mIsAnimating; } - void setIsDummy(BOOL is_dummy) { mIsDummy = is_dummy; } + void setIsDummy(bool is_dummy) { mIsDummy = is_dummy; } void setParamLocation(EParamLocation loc); EParamLocation getParamLocation() const { return mParamLocation; } @@ -173,8 +173,8 @@ protected: F32 mLastWeight; // last weight LLVisualParam* mNext; // next param in a shared chain F32 mTargetWeight; // interpolation target - BOOL mIsAnimating; // this value has been given an interpolation target - BOOL mIsDummy; // this is used to prevent dummy visual params from animating + bool mIsAnimating; // this value has been given an interpolation target + bool mIsDummy; // this is used to prevent dummy visual params from animating S32 mID; // id for storing weight/morphtarget compares compactly diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index ef77b0b1c8..6e6797312b 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -1359,7 +1359,7 @@ S32 LLStringUtil::format(std::string& s, const format_map_t& substitutions) if (iter != substitutions.end()) { S32 secFromEpoch = 0; - BOOL r = LLStringUtil::convertToS32(iter->second, secFromEpoch); + bool r = LLStringUtil::convertToS32(iter->second, secFromEpoch); if (r) { found_replacement = formatDatetime(replacement, tokens[0], param, secFromEpoch); diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 47dbf967cf..f2741a0e1f 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -382,7 +382,7 @@ public: static void _makeASCII(string_type& string); // Conversion to other data types - static bool convertToBOOL(const string_type& string, BOOL& 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); @@ -1804,7 +1804,7 @@ auto LLStringUtilBase::getenv(const std::string& key, const string_type& dflt } template -bool LLStringUtilBase::convertToBOOL(const string_type& string, BOOL& value) +bool LLStringUtilBase::convertToBOOL(const string_type& string, bool& value) { if( string.empty() ) { diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index aa9d9572be..78dcf40ac6 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -124,10 +124,10 @@ LLParcel::LLParcel() LLParcel::LLParcel(const LLUUID &owner_id, - BOOL modify, BOOL terraform, BOOL damage, + bool modify, bool terraform, bool damage, time_t claim_date, S32 claim_price_per_meter, S32 rent_price_per_meter, S32 area, S32 sim_object_limit, F32 parcel_object_bonus, - BOOL is_group_owned) + bool is_group_owned) { init( owner_id, modify, terraform, damage, claim_date, claim_price_per_meter, rent_price_per_meter, area, sim_object_limit, parcel_object_bonus, @@ -142,10 +142,10 @@ LLParcel::~LLParcel() } void LLParcel::init(const LLUUID &owner_id, - BOOL modify, BOOL terraform, BOOL damage, + bool modify, bool terraform, bool damage, time_t claim_date, S32 claim_price_per_meter, S32 rent_price_per_meter, S32 area, S32 sim_object_limit, F32 parcel_object_bonus, - BOOL is_group_owned) + bool is_group_owned) { mID.setNull(); mOwnerID = owner_id; @@ -172,7 +172,7 @@ void LLParcel::init(const LLUUID &owner_id, mSaleTimerExpires.stop(); mGraceExtension = 0; //mExpireAction = STEA_REVERT; - //mRecordTransaction = FALSE; + //mRecordTransaction = false; mAuctionID = 0; mInEscrow = false; @@ -238,7 +238,7 @@ void LLParcel::init(const LLUUID &owner_id, setObscureMOAP(false); } -void LLParcel::overrideOwner(const LLUUID& owner_id, BOOL is_group_owned) +void LLParcel::overrideOwner(const LLUUID& owner_id, bool is_group_owned) { // Override with system permission (LLUUID::null) // Overridden parcels have no group @@ -352,7 +352,7 @@ void LLParcel::setAllParcelFlags(U32 flags) mParcelFlags = flags; } -void LLParcel::setParcelFlag(U32 flag, BOOL b) +void LLParcel::setParcelFlag(U32 flag, bool b) { if (b) { @@ -365,7 +365,7 @@ void LLParcel::setParcelFlag(U32 flag, BOOL b) } -BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const +bool LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const { if (agent_id == LLUUID::null) { @@ -394,7 +394,7 @@ BOOL LLParcel::allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) con return false; } -BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const +bool LLParcel::allowTerraformBy(const LLUUID &agent_id) const { if (agent_id == LLUUID::null) { @@ -441,7 +441,7 @@ void LLParcel::setDiscountRate(F32 rate) // File input and output //----------------------------------------------------------- -BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entry) +bool LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entry) { skip_to_end_of_next_keyword("{", input_stream); while (input_stream.good()) @@ -561,9 +561,9 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer ); setMediaURL(buffer); - BOOL see_avs = TRUE; // All default to true for legacy server behavior - BOOL any_av_sounds = TRUE; - BOOL group_av_sounds = TRUE; + bool see_avs = true; // All default to true for legacy server behavior + bool any_av_sounds = true; + bool group_av_sounds = true; bool have_new_parcel_limit_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_SeeAVs) > 0); // New version of server should send all 3 of these values have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds) > 0); have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds) > 0); @@ -787,7 +787,7 @@ void LLParcel::extendAABB(const LLVector3& box_min, const LLVector3& box_max) } } -BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time) +bool LLParcel::addToAccessList(const LLUUID& agent_id, S32 time) { if (mAccessList.size() >= (U32) PARCEL_MAX_ACCESS_LIST) { @@ -828,7 +828,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time) return true; } -BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time) +bool LLParcel::addToBanList(const LLUUID& agent_id, S32 time) { if (mBanList.size() >= (U32) PARCEL_MAX_ACCESS_LIST) { @@ -871,10 +871,10 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time) return true; } -BOOL remove_from_access_array(std::map* list, +bool remove_from_access_array(std::map* list, const LLUUID& agent_id) { - BOOL removed = FALSE; + bool removed = false; LLAccessEntry::map::iterator itor = list->begin(); while (itor != list->end()) { @@ -882,7 +882,7 @@ BOOL remove_from_access_array(std::map* list, if (entry.mID == agent_id) { list->erase(itor++); - removed = TRUE; + removed = true; } else { @@ -892,12 +892,12 @@ BOOL remove_from_access_array(std::map* list, return removed; } -BOOL LLParcel::removeFromAccessList(const LLUUID& agent_id) +bool LLParcel::removeFromAccessList(const LLUUID& agent_id) { return remove_from_access_array(&mAccessList, agent_id); } -BOOL LLParcel::removeFromBanList(const LLUUID& agent_id) +bool LLParcel::removeFromBanList(const LLUUID& agent_id) { return remove_from_access_array(&mBanList, agent_id); } @@ -947,13 +947,13 @@ const std::string& LLParcel::getActionString(LLParcel::EAction action) return PARCEL_ACTION_STRING[index]; } -BOOL LLParcel::isSaleTimerExpired(const U64& time) +bool LLParcel::isSaleTimerExpired(const U64& time) { if (mSaleTimerExpires.getStarted() == FALSE) { return false; } - BOOL expired = mSaleTimerExpires.checkExpirationAndReset(0.0); + bool expired = mSaleTimerExpires.checkExpirationAndReset(0.0); if (expired) { mSaleTimerExpires.stop(); @@ -961,13 +961,13 @@ BOOL LLParcel::isSaleTimerExpired(const U64& time) return expired; } -BOOL LLParcel::isMediaResetTimerExpired(const U64& time) +bool LLParcel::isMediaResetTimerExpired(const U64& time) { - if (mMediaResetTimer.getStarted() == FALSE) + if (mMediaResetTimer.getStarted() == false) { return false; } - BOOL expired = mMediaResetTimer.checkExpirationAndReset(0.0); + bool expired = mMediaResetTimer.checkExpirationAndReset(0.0); if (expired) { mMediaResetTimer.stop(); @@ -976,7 +976,7 @@ BOOL LLParcel::isMediaResetTimerExpired(const U64& time) } -void LLParcel::startSale(const LLUUID& buyer_id, BOOL is_buyer_group) +void LLParcel::startSale(const LLUUID& buyer_id, bool is_buyer_group) { // TODO -- this and all Sale related methods need to move out of the LLParcel // base class and into server-side-only LLSimParcel class @@ -1042,7 +1042,7 @@ void LLParcel::completeSale( // Turn off show directory, since it's a recurring fee that // the buyer may not want. - setParcelFlag(PF_SHOW_DIRECTORY, FALSE); + setParcelFlag(PF_SHOW_DIRECTORY, false); //should be cleared on sale. mAccessList.clear(); @@ -1069,12 +1069,12 @@ void LLParcel::clearSale() setSellWithObjects(FALSE); } -BOOL LLParcel::isPublic() const +bool LLParcel::isPublic() const { return (mOwnerID.isNull()); } -BOOL LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const +bool LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const { if(mAuthBuyerID.isNull()) { diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index f5ee1241ab..e3c27e7d73 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -209,37 +209,37 @@ public: LLParcel(); LLParcel( const LLUUID &owner_id, - BOOL modify, - BOOL terraform, - BOOL damage, + bool modify, + bool terraform, + bool damage, time_t claim_date, S32 claim_price, S32 rent_price, S32 area, S32 sim_object_limit, F32 parcel_object_bonus, - BOOL is_group_owned = FALSE); + bool is_group_owned = false); virtual ~LLParcel(); void init( const LLUUID &owner_id, - BOOL modify, - BOOL terraform, - BOOL damage, + bool modify, + bool terraform, + bool damage, time_t claim_date, S32 claim_price, S32 rent_price, S32 area, S32 sim_object_limit, F32 parcel_object_bonus, - BOOL is_group_owned = FALSE); + bool is_group_owned = false); // TODO: make an actual copy constructor for this void overrideParcelFlags(U32 flags); // if you specify an agent id here, the group id will be zeroed void overrideOwner( const LLUUID& owner_id, - BOOL is_group_owned = FALSE); + bool is_group_owned = false); void overrideSaleTimerExpires(F32 secs_left) { mSaleTimerExpires.setTimerExpirySec(secs_left); } // MANIPULATORS @@ -283,7 +283,7 @@ public: void setAuctionID(U32 auction_id) { mAuctionID = auction_id;} void setAllParcelFlags(U32 flags); - void setParcelFlag(U32 flag, BOOL b); + void setParcelFlag(U32 flag, bool b); virtual void setArea(S32 area, S32 sim_object_limit); void setDiscountRate(F32 rate); @@ -316,7 +316,7 @@ public: void setPassHours(F32 hours) { mPassHours = hours; } // BOOL importStream(std::istream& input_stream); - BOOL importAccessEntry(std::istream& input_stream, LLAccessEntry* entry); + bool importAccessEntry(std::istream& input_stream, LLAccessEntry* entry); // BOOL exportStream(std::ostream& output_stream); void packMessage(LLMessageSystem* msg); @@ -344,10 +344,10 @@ public: void expirePasses(S32 now); // Add to list, suppressing duplicates. Returns TRUE if added. - BOOL addToAccessList(const LLUUID& agent_id, S32 time); - BOOL addToBanList(const LLUUID& agent_id, S32 time); - BOOL removeFromAccessList(const LLUUID& agent_id); - BOOL removeFromBanList(const LLUUID& agent_id); + bool addToAccessList(const LLUUID& agent_id, S32 time); + bool addToBanList(const LLUUID& agent_id, S32 time); + bool removeFromAccessList(const LLUUID& agent_id); + bool removeFromBanList(const LLUUID& agent_id); // ACCESSORS const LLUUID& getID() const { return mID; } @@ -377,14 +377,14 @@ public: U32 getAuctionID() const { return mAuctionID; } bool isInEscrow() const { return mInEscrow; } - BOOL isPublic() const; + bool isPublic() const; // Region-local user-specified position const LLVector3& getUserLocation() const { return mUserLocation; } const LLVector3& getUserLookAt() const { return mUserLookAt; } ELandingType getLandingType() const { return mLandingType; } - BOOL getSeeAVs() const { return mSeeAVs; } - BOOL getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; } + bool getSeeAVs() const { return mSeeAVs; } + bool getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; } // User-specified snapshot const LLUUID& getSnapshotID() const { return mSnapshotID; } @@ -395,7 +395,7 @@ public: const LLUUID& getAuthorizedBuyerID() const { return mAuthBuyerID; } // helper function - BOOL isBuyerAuthorized(const LLUUID& buyer_id) const; + bool isBuyerAuthorized(const LLUUID& buyer_id) const; // The buyer of a plot is set when someone indicates they want to // buy the plot, and the system is simply waiting for tier-up @@ -422,7 +422,7 @@ public: // the isSaleTimerExpired will trivially return FALSE if there is // no sale going on. Pass in the current time in usec which will // be used for comparison. - BOOL isSaleTimerExpired(const U64& time); + bool isSaleTimerExpired(const U64& time); F32 getSaleTimerExpires() { return mSaleTimerExpires.getRemainingTimeF32(); } @@ -431,7 +431,7 @@ public: // need to record a few things with the parcel when a sale // starts. - void startSale(const LLUUID& buyer_id, BOOL is_buyer_group); + void startSale(const LLUUID& buyer_id, bool is_buyer_group); // do the expiration logic, which needs to return values usable in // a L$ transaction. @@ -440,26 +440,26 @@ public: void clearSale(); - BOOL isMediaResetTimerExpired(const U64& time); + bool isMediaResetTimerExpired(const U64& time); // more accessors U32 getParcelFlags() const { return mParcelFlags; } - BOOL getParcelFlag(U32 flag) const - { return (mParcelFlags & flag) ? TRUE : FALSE; } + bool getParcelFlag(U32 flag) const + { return (mParcelFlags & flag) ? true : false; } // objects can be added or modified by anyone (only parcel owner if disabled) - BOOL getAllowModify() const - { return (mParcelFlags & PF_CREATE_OBJECTS) ? TRUE : FALSE; } + bool getAllowModify() const + { return (mParcelFlags & PF_CREATE_OBJECTS) ? true : false; } // objects can be added or modified by group members - BOOL getAllowGroupModify() const - { return (mParcelFlags & PF_CREATE_GROUP_OBJECTS) ? TRUE : FALSE; } + bool getAllowGroupModify() const + { return (mParcelFlags & PF_CREATE_GROUP_OBJECTS) ? true : false; } // the parcel can be deeded to the group - BOOL getAllowDeedToGroup() const - { return (mParcelFlags & PF_ALLOW_DEED_TO_GROUP) ? TRUE : FALSE; } + bool getAllowDeedToGroup() const + { return (mParcelFlags & PF_ALLOW_DEED_TO_GROUP) ? true : false; } // Does the owner want to make a contribution along with the deed. BOOL getContributeWithDeed() const @@ -537,10 +537,10 @@ public: S32 getClaimPrice() const { return mClaimPricePerMeter * mArea; } // Can this agent create objects here? - BOOL allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const; + bool allowModifyBy(const LLUUID &agent_id, const LLUUID &group_id) const; // Can this agent change the shape of the land? - BOOL allowTerraformBy(const LLUUID &agent_id) const; + bool allowTerraformBy(const LLUUID &agent_id) const; bool operator==(const LLParcel &rhs) const; diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp index 0359d2f554..693a0da123 100644 --- a/indra/llinventory/llpermissions.cpp +++ b/indra/llinventory/llpermissions.cpp @@ -87,21 +87,21 @@ void LLPermissions::initMasks(LLInventoryType::EType type) } } -BOOL LLPermissions::getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const +bool LLPermissions::getOwnership(LLUUID& owner_id, bool& is_group_owned) const { if(mOwner.notNull()) { owner_id = mOwner; - is_group_owned = FALSE; - return TRUE; + is_group_owned = false; + return true; } else if(mIsGroupOwned) { owner_id = mGroup; - is_group_owned = TRUE; - return TRUE; + is_group_owned = true; + return true; } - return FALSE; + return false; } LLUUID LLPermissions::getSafeOwner() const @@ -232,13 +232,13 @@ void LLPermissions::accumulate(const LLPermissions& perm) // saves last owner, sets current owner, and sets the group. note // that this function has to more cleverly apply the fair use // permissions. -BOOL LLPermissions::setOwnerAndGroup( +bool LLPermissions::setOwnerAndGroup( const LLUUID& agent, const LLUUID& owner, const LLUUID& group, bool is_atomic) { - BOOL allowed = FALSE; + bool allowed = false; if( agent.isNull() || mOwner.isNull() || ((agent == mOwner) && ((owner == mOwner) || (mMaskOwner & PERM_TRANSFER)) ) ) @@ -246,7 +246,7 @@ BOOL LLPermissions::setOwnerAndGroup( // ...system can alway set owner // ...public objects can be claimed by anyone // ...otherwise, agent must own it and have transfer ability - allowed = TRUE; + allowed = true; } if (allowed) @@ -301,7 +301,7 @@ void LLPermissions::yesReallySetOwner(const LLUUID& owner, bool group_owned) mIsGroupOwned = group_owned; } -BOOL LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group) +bool LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group) { if(group.notNull() && (agent.isNull() || ((group == mGroup) && (mMaskOwner & PERM_TRANSFER) @@ -318,18 +318,18 @@ BOOL LLPermissions::deedToGroup(const LLUUID& agent, const LLUUID& group) mIsGroupOwned = true; fixFairUse(); fix(); - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLPermissions::setBaseBits(const LLUUID& agent, BOOL set, PermissionMask bits) +bool LLPermissions::setBaseBits(const LLUUID& agent, bool set, PermissionMask bits) { - BOOL ownership = FALSE; + bool ownership = true; if(agent.isNull()) { // only the system is always allowed to change base bits - ownership = TRUE; + ownership = true; } if (ownership) @@ -351,19 +351,19 @@ BOOL LLPermissions::setBaseBits(const LLUUID& agent, BOOL set, PermissionMask bi // Note: If you attempt to set bits that the base bits doesn't allow, // the function will succeed, but those bits will not be set. -BOOL LLPermissions::setOwnerBits(const LLUUID& agent, BOOL set, PermissionMask bits) +bool LLPermissions::setOwnerBits(const LLUUID& agent, bool set, PermissionMask bits) { - BOOL ownership = FALSE; + bool ownership = false; if(agent.isNull()) { // ...system always allowed to change things - ownership = TRUE; + ownership = true; } else if (agent == mOwner) { // ...owner bits can only be set by owner - ownership = TRUE; + ownership = true; } // If we have correct ownership and @@ -383,15 +383,15 @@ BOOL LLPermissions::setOwnerBits(const LLUUID& agent, BOOL set, PermissionMask b return (ownership); } -BOOL LLPermissions::setGroupBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits) +bool LLPermissions::setGroupBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits) { - BOOL ownership = FALSE; + bool ownership = false; if((agent.isNull()) || (agent == mOwner) || ((group == mGroup) && (!mGroup.isNull()))) { // The group bits can be set by the system, the owner, or a // group member. - ownership = TRUE; + ownership = true; } if (ownership) @@ -412,15 +412,15 @@ BOOL LLPermissions::setGroupBits(const LLUUID& agent, const LLUUID& group, BOOL // Note: If you attempt to set bits that the creator or owner doesn't allow, // the function will succeed, but those bits will not be set. -BOOL LLPermissions::setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits) +bool LLPermissions::setEveryoneBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits) { - BOOL ownership = FALSE; + bool ownership = false; if((agent.isNull()) || (agent == mOwner) || ((group == mGroup) && (!mGroup.isNull()))) { // The everyone bits can be set by the system, the owner, or a // group member. - ownership = TRUE; + ownership = true; } if (ownership) { @@ -441,15 +441,15 @@ BOOL LLPermissions::setEveryoneBits(const LLUUID& agent, const LLUUID& group, BO // Note: If you attempt to set bits that the creator or owner doesn't allow, // the function will succeed, but those bits will not be set. -BOOL LLPermissions::setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits) +bool LLPermissions::setNextOwnerBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits) { - BOOL ownership = FALSE; + bool ownership = false; if((agent.isNull()) || (agent == mOwner) || ((group == mGroup) && (!mGroup.isNull()))) { // The next owner bits can be set by the system, the owner, or // a group member. - ownership = TRUE; + ownership = true; } if (ownership) { @@ -478,7 +478,7 @@ bool LLPermissions::allowOperationBy(PermissionBit op, const LLUUID& requester, { // ...system making request // ...not owned - return TRUE; + return true; } else if (mIsGroupOwned && (mGroup == requester)) { @@ -513,7 +513,7 @@ LLSD LLPermissions::packMessage() const result["group-mask"] = (S32)mMaskGroup; result["everyone-mask"] = (S32)mMaskEveryone; result["next-owner-mask"]= (S32)mMaskNextOwner; - result["group-owned"] = (BOOL)mIsGroupOwned; + result["group-owned"] = (bool)mIsGroupOwned; return result; } @@ -531,7 +531,7 @@ void LLPermissions::packMessage(LLMessageSystem* msg) const msg->addU32Fast(_PREHASH_GroupMask, mMaskGroup ); msg->addU32Fast(_PREHASH_EveryoneMask, mMaskEveryone ); msg->addU32Fast(_PREHASH_NextOwnerMask, mMaskNextOwner ); - msg->addBOOLFast(_PREHASH_GroupOwned, (BOOL)mIsGroupOwned); + msg->addBOOLFast(_PREHASH_GroupOwned, mIsGroupOwned); } void LLPermissions::unpackMessage(LLSD perms) @@ -559,13 +559,13 @@ void LLPermissions::unpackMessage(LLMessageSystem* msg, const char* block, S32 b msg->getU32Fast(block, _PREHASH_GroupMask, mMaskGroup, block_num ); msg->getU32Fast(block, _PREHASH_EveryoneMask, mMaskEveryone, block_num ); msg->getU32Fast(block, _PREHASH_NextOwnerMask, mMaskNextOwner, block_num ); - BOOL tmp; + bool tmp; msg->getBOOLFast(block, _PREHASH_GroupOwned, tmp, block_num); - mIsGroupOwned = (bool)tmp; + mIsGroupOwned = tmp; } -BOOL LLPermissions::importLegacyStream(std::istream& input_stream) +bool LLPermissions::importLegacyStream(std::istream& input_stream) { init(LLUUID::null, LLUUID::null, LLUUID::null, LLUUID::null); const S32 BUFSIZE = 16384; @@ -661,11 +661,11 @@ BOOL LLPermissions::importLegacyStream(std::istream& input_stream) } } fix(); - return TRUE; + return true; } -BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const +bool LLPermissions::exportLegacyStream(std::ostream& output_stream) const { std::string uuid_str; @@ -701,12 +701,9 @@ BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const output_stream << "\t\tgroup_owned\t1\n"; } output_stream << "\t}\n"; - return TRUE; + return true; } -// Deleted LLPermissions::exportFileXML() and LLPermissions::importXML() -// because I can't find any non-test code references to it. 2009-05-04 JC - bool LLPermissions::operator==(const LLPermissions &rhs) const { return @@ -791,21 +788,21 @@ U8 LLAggregatePermissions::getU8() const return byte; } -BOOL LLAggregatePermissions::isEmpty() const +bool LLAggregatePermissions::isEmpty() const { for(S32 i = 0; i < PI_END; ++i) { if(mBits[i] != AP_EMPTY) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLAggregatePermissions::aggregate(PermissionMask mask) { - BOOL is_allowed = mask & PERM_COPY; + bool is_allowed = mask & PERM_COPY; aggregateBit(PI_COPY, is_allowed); is_allowed = mask & PERM_MODIFY; aggregateBit(PI_MODIFY, is_allowed); @@ -821,7 +818,7 @@ void LLAggregatePermissions::aggregate(const LLAggregatePermissions& ag) } } -void LLAggregatePermissions::aggregateBit(EPermIndex idx, BOOL allowed) +void LLAggregatePermissions::aggregateBit(EPermIndex idx, bool allowed) { //if(AP_SOME == mBits[idx]) return; // P4 branch prediction optimization switch(mBits[idx]) diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h index 27252f7b97..a8acef098a 100644 --- a/indra/llinventory/llpermissions.h +++ b/indra/llinventory/llpermissions.h @@ -162,7 +162,7 @@ public: // either the owner id or the group id, and the is_group_owned // parameter is appropriately filled. The values of owner_id and // is_group_owned are not changed if the object is not owned. - BOOL getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const; + bool getOwnership(LLUUID& owner_id, bool& is_group_owned) const; // Gets the 'safe' owner. This should never return LLUUID::null. // If no group owned, return the agent owner id normally. @@ -218,7 +218,7 @@ public: // Currently, the only way to have a collection is when an object // has inventory and is then itself rolled up into an inventory // item. - BOOL setOwnerAndGroup(const LLUUID& agent, const LLUUID& owner, const LLUUID& group, bool is_atomic); + bool setOwnerAndGroup(const LLUUID& agent, const LLUUID& owner, const LLUUID& group, bool is_atomic); // only call this if you know what you're doing // there are usually perm-bit consequences when the @@ -239,16 +239,16 @@ public: // owner transfer) then this function will deed the permissions, // set the next owner mask, and return TRUE. Otherwise, no change // is effected, and the function returns FALSE. - BOOL deedToGroup(const LLUUID& agent, const LLUUID& group); + bool deedToGroup(const LLUUID& agent, const LLUUID& group); // Attempt to set or clear the given bitmask. Returns TRUE if you // are allowed to modify the permissions. If you attempt to turn // on bits not allowed by the base bits, the function will return // TRUE, but those bits will not be set. - BOOL setBaseBits( const LLUUID& agent, BOOL set, PermissionMask bits); - BOOL setOwnerBits( const LLUUID& agent, BOOL set, PermissionMask bits); - BOOL setGroupBits( const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits); - BOOL setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits); - BOOL setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits); + bool setBaseBits( const LLUUID& agent, bool set, PermissionMask bits); + bool setOwnerBits( const LLUUID& agent, bool set, PermissionMask bits); + bool setGroupBits( const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits); + bool setEveryoneBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits); + bool setNextOwnerBits(const LLUUID& agent, const LLUUID& group, bool set, PermissionMask bits); // This is currently only used in the Viewer to handle calling cards // where the creator is actually used to store the target. Use with care. @@ -311,8 +311,8 @@ public: void packMessage(LLMessageSystem* msg) const; void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0); - BOOL importLegacyStream(std::istream& input_stream); - BOOL exportLegacyStream(std::ostream& output_stream) const; + bool importLegacyStream(std::istream& input_stream); + bool exportLegacyStream(std::ostream& output_stream) const; bool operator==(const LLPermissions &rhs) const; bool operator!=(const LLPermissions &rhs) const; @@ -401,8 +401,8 @@ public: // LSB is to the right U8 getU8() const; - // return TRUE is the aggregate permissions are empty, otherwise FALSE. - BOOL isEmpty() const ; + // return true is the aggregate permissions are empty, otherwise false. + bool isEmpty() const ; // pass in a PERM_COPY, PERM_TRANSFER, etc, and an EValue // enumeration to specifically set that value. Not implemented @@ -432,7 +432,7 @@ protected: PI_END = 3, PI_COUNT = 3 }; - void aggregateBit(EPermIndex idx, BOOL allowed); + void aggregateBit(EPermIndex idx, bool allowed); void aggregateIndex(EPermIndex idx, U8 bits); static EPermIndex perm2PermIndex(PermissionBit bit); diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index f9306d6bce..5f0c668b33 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -803,16 +803,16 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de } -BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split, - BOOL is_sculpted, S32 sculpt_size) +bool LLProfile::generate(const LLProfileParams& params, bool path_open,F32 detail, S32 split, + bool is_sculpted, S32 sculpt_size) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME if ((!mDirty) && (!is_sculpted)) { - return FALSE; + return false; } - mDirty = FALSE; + mDirty = false; if (detail < MIN_LOD) { @@ -833,7 +833,7 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai if (begin > end - 0.01f) { LL_WARNS() << "LLProfile::generate() assertion failed (begin >= end)" << LL_ENDL; - return FALSE; + return false; } S32 face_num = 0; @@ -1014,11 +1014,11 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai } if (mOpen && !params.getHollow()) { - addFace(0,mTotal-1,0,LL_FACE_OUTER_SIDE_0, FALSE); + addFace(0,mTotal-1,0,LL_FACE_OUTER_SIDE_0, false); } else { - addFace(0,mTotal,0,LL_FACE_OUTER_SIDE_0, FALSE); + addFace(0,mTotal,0,LL_FACE_OUTER_SIDE_0, false); } if (hollow) @@ -1026,15 +1026,15 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai switch (hole_type) { case LL_PCODE_HOLE_SQUARE: - addHole(params, TRUE, 2, 0.5f, hollow, 0.5f, split); + addHole(params, true, 2, 0.5f, hollow, 0.5f, split); break; case LL_PCODE_HOLE_TRIANGLE: - addHole(params, TRUE, 3, 0.5f, hollow, 0.5f, split); + addHole(params, true, 3, 0.5f, hollow, 0.5f, split); break; case LL_PCODE_HOLE_CIRCLE: case LL_PCODE_HOLE_SAME: default: - addHole(params, FALSE, circle_detail, 0.5f, hollow, 0.5f); + addHole(params, false, circle_detail, 0.5f, hollow, 0.5f); break; } } @@ -1042,11 +1042,11 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai // Special case for openness of sphere if ((params.getEnd() - params.getBegin()) < 1.f) { - mOpen = TRUE; + mOpen = true; } else if (!hollow) { - mOpen = FALSE; + mOpen = false; mProfile.push_back(mProfile[0]); mTotal++; } @@ -1064,19 +1064,19 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai if ( mOpen) // interior edge caps { - addFace(mTotal-1, 2,0.5,LL_FACE_PROFILE_BEGIN, TRUE); + addFace(mTotal-1, 2,0.5,LL_FACE_PROFILE_BEGIN, true); if (hollow) { - addFace(mTotalOut-1, 2,0.5,LL_FACE_PROFILE_END, TRUE); + addFace(mTotalOut-1, 2,0.5,LL_FACE_PROFILE_END, true); } else { - addFace(mTotal-2, 2,0.5,LL_FACE_PROFILE_END, TRUE); + addFace(mTotal-2, 2,0.5,LL_FACE_PROFILE_END, true); } } - return TRUE; + return true; } @@ -1521,14 +1521,14 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail) return np; } -BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, - BOOL is_sculpted, S32 sculpt_size) +bool LLPath::generate(const LLPathParams& params, F32 detail, S32 split, + bool is_sculpted, S32 sculpt_size) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME if ((!mDirty) && (!is_sculpted)) { - return FALSE; + return false; } if (detail < MIN_LOD) @@ -1537,11 +1537,11 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, detail = MIN_LOD; } - mDirty = FALSE; + mDirty = false; S32 np = 2; // hardcode for line mPath.resize(0); - mOpen = TRUE; + mOpen = true; // Is this 0xf0 mask really necessary? DK 03/02/05 switch (params.getCurveType() & 0xf0) @@ -1601,7 +1601,7 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, if (params.getEnd() - params.getBegin() >= 0.99f && params.getScaleX() >= .99f) { - mOpen = FALSE; + mOpen = false; } //genNGon(params, llfloor(MIN_DETAIL_FACES * detail), 4.f, 0.f); @@ -1645,19 +1645,19 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split, break; }; - if (params.getTwist() != params.getTwistBegin()) mOpen = TRUE; + if (params.getTwist() != params.getTwistBegin()) mOpen = true; //if ((int(fabsf(params.getTwist() - params.getTwistBegin())*100))%100 != 0) { - // mOpen = TRUE; + // mOpen = true; //} - return TRUE; + return true; } -BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, - BOOL is_sculpted, S32 sculpt_size) +bool LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, + bool is_sculpted, S32 sculpt_size) { - mOpen = TRUE; // Draw end caps + mOpen = true; // Draw end caps if (getPathLength() == 0) { // Path hasn't been generated yet. @@ -1676,7 +1676,7 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, } } - return TRUE; + return true; } diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index c27bc5e821..0158ca9bcd 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -703,9 +703,9 @@ public: static S32 getNumPoints(const LLProfileParams& params, BOOL path_open, F32 detail = 1.0f, S32 split = 0, BOOL is_sculpted = FALSE, S32 sculpt_size = 0); - BOOL generate(const LLProfileParams& params, BOOL path_open, F32 detail = 1.0f, S32 split = 0, - BOOL is_sculpted = FALSE, S32 sculpt_size = 0); - BOOL isConcave() const { return mConcave; } + bool generate(const LLProfileParams& params, bool path_open, F32 detail = 1.0f, S32 split = 0, + bool is_sculpted = false, S32 sculpt_size = 0); + bool isConcave() const { return mConcave; } public: struct Face { @@ -792,8 +792,8 @@ public: static S32 getNumNGonPoints(const LLPathParams& params, S32 sides, F32 offset=0.0f, F32 end_scale = 1.f, F32 twist_scale = 1.f); void genNGon(const LLPathParams& params, S32 sides, F32 offset=0.0f, F32 end_scale = 1.f, F32 twist_scale = 1.f); - virtual BOOL generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0, - BOOL is_sculpted = FALSE, S32 sculpt_size = 0); + virtual bool generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0, + bool is_sculpted = false, S32 sculpt_size = 0); BOOL isOpen() const { return mOpen; } F32 getStep() const { return mStep; } @@ -819,8 +819,8 @@ class LLDynamicPath : public LLPath { public: LLDynamicPath() : LLPath() { } - /*virtual*/ BOOL generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0, - BOOL is_sculpted = FALSE, S32 sculpt_size = 0); + /*virtual*/ bool generate(const LLPathParams& params, F32 detail=1.0f, S32 split = 0, + bool is_sculpted = false, S32 sculpt_size = 0); }; // Yet another "face" class - caches volume-specific, but not instance-specific data for faces) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index f38a5e663e..60d95c3367 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -1020,7 +1020,7 @@ void LLAssetStorage::processUploadComplete(LLMessageSystem *msg, void **user_dat LLUUID uuid; S8 asset_type_s8; LLAssetType::EType asset_type; - BOOL success = FALSE; + bool success = false; msg->getUUIDFast(_PREHASH_AssetBlock, _PREHASH_UUID, uuid); msg->getS8Fast(_PREHASH_AssetBlock, _PREHASH_Type, asset_type_s8); diff --git a/indra/llmessage/llmessagereader.h b/indra/llmessage/llmessagereader.h index 3b77a6bfe4..647f267785 100644 --- a/indra/llmessage/llmessagereader.h +++ b/indra/llmessage/llmessagereader.h @@ -52,7 +52,7 @@ class LLMessageReader /** All get* methods expect pointers to canonical strings. */ virtual void getBinaryData(const char *blockname, const char *varname, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX) = 0; - virtual void getBOOL(const char *block, const char *var, BOOL &data, S32 blocknum = 0) = 0; + virtual void getBOOL(const char *block, const char *var, bool &data, S32 blocknum = 0) = 0; virtual void getS8(const char *block, const char *var, S8 &data, S32 blocknum = 0) = 0; virtual void getU8(const char *block, const char *var, U8 &data, S32 blocknum = 0) = 0; virtual void getS16(const char *block, const char *var, S16 &data, S32 blocknum = 0) = 0; diff --git a/indra/llmessage/llsdmessagereader.cpp b/indra/llmessage/llsdmessagereader.cpp index b729ebafa9..d533d6535b 100644 --- a/indra/llmessage/llsdmessagereader.cpp +++ b/indra/llmessage/llsdmessagereader.cpp @@ -114,7 +114,7 @@ void LLSDMessageReader::getBinaryData(const char *block, const char *var, //virtual void LLSDMessageReader::getBOOL(const char *block, const char *var, - BOOL &data, + bool &data, S32 blocknum) { data = getLLSD(mMessage, block, var, blocknum); diff --git a/indra/llmessage/llsdmessagereader.h b/indra/llmessage/llsdmessagereader.h index 3b3d7fbfbe..4119de6009 100644 --- a/indra/llmessage/llsdmessagereader.h +++ b/indra/llmessage/llsdmessagereader.h @@ -46,7 +46,7 @@ public: virtual void getBinaryData(const char *block, const char *var, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX); - virtual void getBOOL(const char *block, const char *var, BOOL &data, + virtual void getBOOL(const char *block, const char *var, bool &data, S32 blocknum = 0); virtual void getS8(const char *block, const char *var, S8 &data, S32 blocknum = 0); diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 32f79f0546..8a41d5565d 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -284,7 +284,7 @@ void LLTemplateMessageReader::getU8(const char *block, const char *var, } void LLTemplateMessageReader::getBOOL(const char *block, const char *var, - BOOL &b, S32 blocknum ) + bool &b, S32 blocknum ) { U8 value; getData(block, var, &value, sizeof(U8), blocknum); diff --git a/indra/llmessage/lltemplatemessagereader.h b/indra/llmessage/lltemplatemessagereader.h index fcf8f92fa6..88889cd7d2 100644 --- a/indra/llmessage/lltemplatemessagereader.h +++ b/indra/llmessage/lltemplatemessagereader.h @@ -47,7 +47,7 @@ public: virtual void getBinaryData(const char *blockname, const char *varname, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX); - virtual void getBOOL(const char *block, const char *var, BOOL &data, + virtual void getBOOL(const char *block, const char *var, bool &data, S32 blocknum = 0); virtual void getS8(const char *block, const char *var, S8 &data, S32 blocknum = 0); diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index f9b59d7e42..956ecc11a3 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -757,7 +757,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user LLUUID uuid; LLAssetType::EType type; S16 type_s16; - BOOL b_use_big_packets; + bool b_use_big_packets; mesgsys->getBOOL("XferID", "UseBigPackets", b_use_big_packets); @@ -853,7 +853,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user } LL_INFOS("Xfer") << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << LL_ENDL; - BOOL delete_local_on_completion = FALSE; + bool delete_local_on_completion = false; mesgsys->getBOOL("XferID", "DeleteOnCompletion", delete_local_on_completion); // -1 chunk_size causes it to use the default diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 5de29ba66f..5e24061959 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -3673,13 +3673,13 @@ void LLMessageSystem::getU8(const char *block, const char *var, U8 &u, LLMessageStringTable::getInstance()->getString(var), u, blocknum); } -void LLMessageSystem::getBOOLFast(const char *block, const char *var, BOOL &b, +void LLMessageSystem::getBOOLFast(const char *block, const char *var, bool &b, S32 blocknum) { mMessageReader->getBOOL(block, var, b, blocknum); } -void LLMessageSystem::getBOOL(const char *block, const char *var, BOOL &b, +void LLMessageSystem::getBOOL(const char *block, const char *var, bool &b, S32 blocknum) { getBOOLFast(LLMessageStringTable::getInstance()->getString(block), diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index e25a9ea7ef..c041a69d79 100644 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -599,8 +599,8 @@ public: */ void getBinaryDataFast(const char *blockname, const char *varname, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX); void getBinaryData(const char *blockname, const char *varname, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX); - void getBOOLFast( const char *block, const char *var, BOOL &data, S32 blocknum = 0); - void getBOOL( const char *block, const char *var, BOOL &data, S32 blocknum = 0); + void getBOOLFast( const char *block, const char *var, bool &data, S32 blocknum = 0); + void getBOOL( const char *block, const char *var, bool &data, S32 blocknum = 0); void getS8Fast( const char *block, const char *var, S8 &data, S32 blocknum = 0); void getS8( const char *block, const char *var, S8 &data, S32 blocknum = 0); void getU8Fast( const char *block, const char *var, U8 &data, S32 blocknum = 0); diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 1abf6832fb..2c04147a5a 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -178,10 +178,10 @@ LLSD LLControlVariable::getComparableValue(const LLSD& value) LLSD storable_value; if(TYPE_BOOLEAN == type() && value.isString()) { - BOOL temp; + bool temp; if(LLStringUtil::convertToBOOL(value.asString(), temp)) { - storable_value = (bool)temp; + storable_value = temp; } else { @@ -859,7 +859,7 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require break; case TYPE_BOOLEAN: { - BOOL initial = FALSE; + bool initial = false; child_nodep->getAttributeBOOL("value", initial); control->set(initial); diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp index ed9c07e1db..4991e99a96 100644 --- a/indra/llxml/llxmltree.cpp +++ b/indra/llxml/llxmltree.cpp @@ -199,7 +199,7 @@ void LLXmlTreeNode::addChild(LLXmlTreeNode* child) // These functions assume that name is already in mAttritrubteKeys -BOOL LLXmlTreeNode::getFastAttributeBOOL(LLStdStringHandle canonical_name, BOOL& value) +bool LLXmlTreeNode::getFastAttributeBOOL(LLStdStringHandle canonical_name, bool& value) { const std::string *s = getAttribute( canonical_name ); return s && LLStringUtil::convertToBOOL( *s, value ); @@ -310,7 +310,7 @@ BOOL LLXmlTreeNode::getFastAttributeString(LLStdStringHandle canonical_name, std ////////////////////////////////////////////////////////////// -BOOL LLXmlTreeNode::getAttributeBOOL(const std::string& name, BOOL& value) +bool LLXmlTreeNode::getAttributeBOOL(const std::string& name, bool& value) { LLStdStringHandle canonical_name = LLXmlTree::sAttributeKeys.addString( name ); return getFastAttributeBOOL(canonical_name, value); diff --git a/indra/llxml/llxmltree.h b/indra/llxml/llxmltree.h index 3e425c3870..5d33e2c660 100644 --- a/indra/llxml/llxmltree.h +++ b/indra/llxml/llxmltree.h @@ -105,7 +105,7 @@ public: BOOL hasAttribute( const std::string& name ); // Fast versions use cannonical_name handlee to entru in LLXmlTree::sAttributeKeys string table - BOOL getFastAttributeBOOL( LLStdStringHandle cannonical_name, BOOL& value ); + bool getFastAttributeBOOL( LLStdStringHandle cannonical_name, bool& value ); BOOL getFastAttributeU8( LLStdStringHandle cannonical_name, U8& value ); BOOL getFastAttributeS8( LLStdStringHandle cannonical_name, S8& value ); BOOL getFastAttributeU16( LLStdStringHandle cannonical_name, U16& value ); @@ -124,7 +124,7 @@ public: BOOL getFastAttributeString( LLStdStringHandle cannonical_name, std::string& value ); // Normal versions find 'name' in LLXmlTree::sAttributeKeys then call fast versions - virtual BOOL getAttributeBOOL( const std::string& name, BOOL& value ); + virtual bool getAttributeBOOL( const std::string& name, bool& value ); virtual BOOL getAttributeU8( const std::string& name, U8& value ); virtual BOOL getAttributeS8( const std::string& name, S8& value ); virtual BOOL getAttributeU16( const std::string& name, U16& value ); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index cdb4130d42..565c00d2ea 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3430,7 +3430,7 @@ BOOL LLAgent::allowOperation(PermissionBit op, if (!perm.isOwned()) return FALSE; // A group member with group_proxy_power can act as owner. - BOOL is_group_owned; + bool is_group_owned; LLUUID owner_id; perm.getOwnership(owner_id, is_group_owned); LLUUID group_id(perm.getGroup()); @@ -3812,9 +3812,9 @@ void LLAgent::processScriptControlChange(LLMessageSystem *msg, void **) S32 block_count = msg->getNumberOfBlocks("Data"); for (S32 block_index = 0; block_index < block_count; block_index++) { - BOOL take_controls; + bool take_controls; U32 controls; - BOOL passon; + bool passon; U32 i; msg->getBOOL("Data", "TakeControls", take_controls, block_index); if (take_controls) diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index c1162c1609..2b33cb878b 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -78,7 +78,7 @@ struct LLGroupData LLUUID mID; LLUUID mInsigniaID; U64 mPowers; - BOOL mAcceptNotices; + bool mAcceptNotices; BOOL mListInProfile; S32 mContribution; std::string mName; diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 8bd9169c7d..405432fe90 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -623,7 +623,7 @@ BOOL LLAgentWearables::selfHasWearable(LLWearableType::EType type) } // virtual -void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed) +void LLAgentWearables::wearableUpdated(LLWearable *wearable, bool removed) { if (isAgentAvatarValid()) { diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index e20f5df7fa..2a888573d6 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -101,7 +101,7 @@ public: // Setters //-------------------------------------------------------------------- private: - /*virtual*/void wearableUpdated(LLWearable *wearable, BOOL removed); + /*virtual*/void wearableUpdated(LLWearable *wearable, bool removed); public: void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false); void setWearableOutfit(const LLInventoryItem::item_array_t& items, const std::vector< LLViewerWearable* >& wearables); diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 10cde35f9c..b4a4b60794 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -105,14 +105,14 @@ struct LLPickData LLUUID agent_id; LLUUID pick_id; LLUUID creator_id; - BOOL top_pick; + bool top_pick; LLUUID parcel_id; std::string name; std::string desc; LLUUID snapshot_id; LLVector3d pos_global; S32 sort_order; - BOOL enabled; + bool enabled; //used only in read requests std::string user_name; diff --git a/indra/newview/llbreastmotion.h b/indra/newview/llbreastmotion.h index 433fece29f..d099257a33 100644 --- a/indra/newview/llbreastmotion.h +++ b/indra/newview/llbreastmotion.h @@ -93,12 +93,12 @@ public: // called when a motion is activated // must return TRUE to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); // called per time step // must return TRUE while it is active, and // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index 794bb78b9c..bc61fac00b 100644 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -571,7 +571,7 @@ void setControlValueCB(const LLCommandLineParser::token_vector_t& value, std::string token(onevalue(option, value)); // There's a token. check the string for true/false/1/0 etc. - BOOL result = false; + bool result = false; bool gotSet = LLStringUtil::convertToBOOL(token, result); if (gotSet) { diff --git a/indra/newview/llemote.cpp b/indra/newview/llemote.cpp index b9ef297c00..a051825dae 100644 --- a/indra/newview/llemote.cpp +++ b/indra/newview/llemote.cpp @@ -74,7 +74,7 @@ LLMotion::LLMotionInitStatus LLEmote::onInitialize(LLCharacter *character) //----------------------------------------------------------------------------- // LLEmote::onActivate() //----------------------------------------------------------------------------- -BOOL LLEmote::onActivate() +bool LLEmote::onActivate() { LLVisualParam* default_param = mCharacter->getVisualParam( "Express_Closed_Mouth" ); if( default_param ) @@ -89,14 +89,14 @@ BOOL LLEmote::onActivate() mCharacter->updateVisualParams(); } - return TRUE; + return true; } //----------------------------------------------------------------------------- // LLEmote::onUpdate() //----------------------------------------------------------------------------- -BOOL LLEmote::onUpdate(F32 time, U8* joint_mask) +bool LLEmote::onUpdate(F32 time, U8* joint_mask) { if( mParam ) { @@ -116,7 +116,7 @@ BOOL LLEmote::onUpdate(F32 time, U8* joint_mask) mCharacter->updateVisualParams(); } - return TRUE; + return true; } diff --git a/indra/newview/llemote.h b/indra/newview/llemote.h index 9ea6be6b1e..1b15445e4b 100644 --- a/indra/newview/llemote.h +++ b/indra/newview/llemote.h @@ -96,12 +96,12 @@ public: // called when a motion is activated // must return TRUE to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); // called per time step // must return TRUE while it is active, and // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 440ec06c4e..f9dfa0334f 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -170,7 +170,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, buy_btn->setEnabled(FALSE); LLUUID owner_id; - BOOL is_group_owned; + bool is_group_owned; LLAssetType::EType asset_type; LLInventoryType::EType inv_type; S32 wearable_count = 0; diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 9c4c9b3e59..07bd77460f 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1649,12 +1649,12 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo S32 rows = msg->getNumberOfBlocksFast(_PREHASH_Data); //uuid_list_t return_ids; LLUUID owner_id; - BOOL is_group_owned; + bool is_group_owned; S32 object_count; U32 most_recent_time = 0; - BOOL is_online; + bool is_online; std::string object_count_str; - //BOOL b_need_refresh = FALSE; + //bool b_need_refresh = false; // If we were waiting for the first reply, clear the "Searching..." text. if (self->mFirstReply) diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index 94261b2e4e..bab6631d54 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -388,7 +388,7 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandlesetHandlerFuncFast(_PREHASH_PayPriceReply, processPayPriceReply,(void **)floater); LLUUID owner_id; - BOOL is_group = FALSE; + bool is_group = false; node->mPermissions->getOwnership(owner_id, is_group); floater->getChild("object_name_text")->setValue(node->mName); @@ -505,7 +505,7 @@ void LLFloaterPay::onGive(give_money_ptr info) if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount) { LLUUID payee_id = LLUUID::null; - BOOL is_group = false; + bool is_group = false; if (floater->mObjectSelection.notNull()) { LLSelectNode* node = floater->mObjectSelection->getFirstRootNode(); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index d4eb40ff92..1e106ed3b1 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -437,7 +437,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) F32 water_height; F32 terrain_raise_limit; F32 terrain_lower_limit; - BOOL use_estate_sun; + bool use_estate_sun; F32 sun_hour; msg->getString("RegionInfo", "SimName", sim_name); msg->getU8("RegionInfo", "MaxAgents", agent_limit); diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index a9e5e55451..5683a690f1 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -980,7 +980,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) std::string online_status; std::string title; U64 agent_powers = 0; - BOOL is_owner = FALSE; + bool is_owner = false; S32 num_members = msg->getNumberOfBlocksFast(_PREHASH_MemberData); for (S32 i = 0; i < num_members; i++) @@ -1075,7 +1075,7 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data) LLUUID group_id; std::string name; std::string charter; - BOOL show_in_list = FALSE; + bool show_in_list = false; LLUUID founder_id; U64 powers_mask = GP_NO_POWERS; S32 money = 0; @@ -1083,11 +1083,11 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data) LLUUID insignia_id; LLUUID owner_role; U32 membership_fee = 0; - BOOL open_enrollment = FALSE; + bool open_enrollment = false; S32 num_group_members = 0; S32 num_group_roles = 0; - BOOL allow_publish = FALSE; - BOOL mature = FALSE; + bool allow_publish = false; + bool mature = false; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id ); msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_FounderID, founder_id); @@ -1389,7 +1389,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data LL_DEBUGS("GrpMgr") << "processEjectGroupMemberReply" << LL_ENDL; LLUUID group_id; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); - BOOL success; + bool success; msg->getBOOLFast(_PREHASH_EjectData, _PREHASH_Success, success); // If we had a failure, the group panel needs to be updated. @@ -1404,7 +1404,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data) { LL_DEBUGS("GrpMgr") << "processJoinGroupReply" << LL_ENDL; LLUUID group_id; - BOOL success; + bool success; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_Success, success); @@ -1424,7 +1424,7 @@ void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data) { LL_DEBUGS("GrpMgr") << "processLeaveGroupReply" << LL_ENDL; LLUUID group_id; - BOOL success; + bool success; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_Success, success); @@ -1443,7 +1443,7 @@ void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data) void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data) { LLUUID group_id; - BOOL success; + bool success; std::string message; msg->getUUIDFast(_PREHASH_ReplyData, _PREHASH_GroupID, group_id ); diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 0d25e8fb22..bd61798543 100644 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -221,7 +221,7 @@ struct LLGroupTitle { std::string mTitle; LLUUID mRoleID; - BOOL mSelected; + bool mSelected; }; class LLGroupMgrGroupData diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 54121c2656..b007291179 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -501,7 +501,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) std::string subj; std::string name; U32 timestamp; - BOOL has_attachment; + bool has_attachment; U8 asset_type; S32 i=0; diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 03a02ba26f..98b8919660 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -124,7 +124,7 @@ public: ~LLPhysicsMotion() {} - BOOL onUpdate(F32 time); + bool onUpdate(F32 time); LLPointer getJointState() { @@ -250,9 +250,9 @@ LLPhysicsMotionController::~LLPhysicsMotionController() } } -BOOL LLPhysicsMotionController::onActivate() -{ - return TRUE; +bool LLPhysicsMotionController::onActivate() +{ + return true; } void LLPhysicsMotionController::onDeactivate() @@ -451,16 +451,16 @@ F32 LLPhysicsMotion::calculateAcceleration_local(const F32 velocity_local, const return smoothed_acceleration_local; } -BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) +bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // Skip if disabled globally. if (!gSavedSettings.getBOOL("AvatarPhysics")) { - return TRUE; + return true; } - BOOL update_visuals = FALSE; + BOOL update_visuals = false; for (motion_vec_t::iterator iter = mMotions.begin(); iter != mMotions.end(); ++iter) @@ -472,21 +472,21 @@ BOOL LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) if (update_visuals) mCharacter->updateVisualParams(); - return TRUE; + return true; } // Return TRUE if character has to update visual params. -BOOL LLPhysicsMotion::onUpdate(F32 time) +bool LLPhysicsMotion::onUpdate(F32 time) { // static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w"); if (!mParamDriver) - return FALSE; + return false; if (!mLastTime || mLastTime >= time) { mLastTime = time; - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -499,7 +499,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) if (time_delta > 1.0) { mLastTime = time; - return FALSE; + return false; } // Higher LOD is better. This controls the granularity @@ -507,7 +507,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) const F32 lod_factor = LLVOAvatar::sPhysicsLODFactor; if (lod_factor == 0) { - return TRUE; + return true; } LLJoint *joint = mJointState->getJoint(); @@ -520,7 +520,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) const F32 behavior_drag = getParamValue(DRAG); F32 behavior_maxeffect = getParamValue(MAX_EFFECT); - const BOOL physics_test = FALSE; // Enable this to simulate bouncing on all parts. + const BOOL physics_test = false; // Enable this to simulate bouncing on all parts. if (physics_test) behavior_maxeffect = 1.0f; @@ -548,7 +548,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time) // End velocity and acceleration //////////////////////////////////////////////////////////////////////////////// - BOOL update_visuals = FALSE; + bool update_visuals = false; // Break up the physics into a bunch of iterations so that differing framerates will show // roughly the same behavior. diff --git a/indra/newview/llphysicsmotion.h b/indra/newview/llphysicsmotion.h index a3b8e293f1..976f23cd44 100644 --- a/indra/newview/llphysicsmotion.h +++ b/indra/newview/llphysicsmotion.h @@ -93,12 +93,12 @@ public: // called when a motion is activated // must return TRUE to indicate success, or else // it will be deactivated - virtual BOOL onActivate(); + virtual bool onActivate(); // called per time step // must return TRUE while it is active, and // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask); + virtual bool onUpdate(F32 time, U8* joint_mask); // called when a motion is deactivated virtual void onDeactivate(); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index aceb8539d2..b0b9e00d1b 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2367,11 +2367,11 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**) if(instance) { instance->mHaveRunningInfo = TRUE; - BOOL running; + bool running; msg->getBOOLFast(_PREHASH_Script, _PREHASH_Running, running); LLCheckBoxCtrl* runningCheckbox = instance->getChild("running"); runningCheckbox->set(running); - BOOL mono; + bool mono; msg->getBOOLFast(_PREHASH_Script, "Mono", mono); LLCheckBoxCtrl* monoCheckbox = instance->getChild("mono"); monoCheckbox->setEnabled(instance->getIsModifiable() && have_script_upload_cap(object_id)); diff --git a/indra/newview/llregioninfomodel.h b/indra/newview/llregioninfomodel.h index baeff82fef..2aea654de7 100644 --- a/indra/newview/llregioninfomodel.h +++ b/indra/newview/llregioninfomodel.h @@ -70,7 +70,7 @@ public: F32 mTerrainLowerLimit; F32 mSunHour; // 6..30 - BOOL mUseEstateSun; + bool mUseEstateSun; std::string mSimName; std::string mSimType; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 61508f8648..4c7a440231 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -6022,7 +6022,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use // static void LLSelectMgr::processForceObjectSelect(LLMessageSystem* msg, void**) { - BOOL reset_list; + bool reset_list; msg->getBOOL("Header", "ResetList", reset_list); if (reset_list) @@ -6858,14 +6858,14 @@ void LLSelectNode::saveTextureScaleRatios(LLRender::eTexIndex index_to_query) BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const { // Extract ownership. - BOOL object_is_group_owned = FALSE; + bool object_is_group_owned = false; LLUUID object_owner_id; mPermissions->getOwnership(object_owner_id, object_is_group_owned); // Operations on invalid or public objects is not allowed. if (!mObject || (mObject->isDead()) || !mPermissions->isOwned()) { - return FALSE; + return false; } // The transfer permissions can never be given through proxy. @@ -6875,7 +6875,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) if ( !object_is_group_owned && (gAgent.getID() == object_owner_id) ) { - return TRUE; + return true; } else { @@ -6891,7 +6891,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) // no proxy allowed. if (mObject->isAttachment() && object_owner_id != gAgent.getID()) { - return FALSE; + return false; } } @@ -6904,7 +6904,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) // Gods can always operate. if (gAgent.isGodlike()) { - return TRUE; + return true; } // Check if the agent is in the same group as the object. diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 4df80cb2b9..fb5ca2c3f4 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -227,8 +227,8 @@ void LLSettingsVOBase::updateInventoryItem(const LLSettingsBase::ptr_t &settings if (settings->getFlag(LLSettingsBase::FLAG_NOTRANS) && new_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { LLPermissions perm(inv_item->getPermissions()); - perm.setBaseBits(LLUUID::null, FALSE, PERM_TRANSFER); - perm.setOwnerBits(LLUUID::null, FALSE, PERM_TRANSFER); + perm.setBaseBits(LLUUID::null, false, PERM_TRANSFER); + perm.setOwnerBits(LLUUID::null, false, PERM_TRANSFER); new_item->setPermissions(perm); need_update |= true; } diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 298fac1bfe..7feacd530d 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -957,7 +957,7 @@ void LLSidepanelItemInfo::updatePermissions() LLViewerInventoryItem* item = findItem(); if(!item) return; - BOOL is_group_owned; + bool is_group_owned; LLUUID owner_id; LLUUID group_id; LLPermissions perm(item->getPermissions()); diff --git a/indra/newview/llviewergesture.cpp b/indra/newview/llviewergesture.cpp index f30279d1e9..ef63ef41e5 100644 --- a/indra/newview/llviewergesture.cpp +++ b/indra/newview/llviewergesture.cpp @@ -70,37 +70,37 @@ LLViewerGesture::LLViewerGesture(const LLViewerGesture &rhs) { } -BOOL LLViewerGesture::trigger(KEY key, MASK mask) +bool LLViewerGesture::trigger(KEY key, MASK mask) { if (mKey == key && mMask == mask) { - doTrigger( TRUE ); - return TRUE; + doTrigger( true ); + return true; } else { - return FALSE; + return false; } } -BOOL LLViewerGesture::trigger(const std::string &trigger_string) +bool LLViewerGesture::trigger(const std::string &trigger_string) { // Assumes trigger_string is lowercase if (mTriggerLower == trigger_string) { - doTrigger( FALSE ); - return TRUE; + doTrigger( false ); + return true; } else { - return FALSE; + return false; } } // private -void LLViewerGesture::doTrigger( BOOL send_chat ) +void LLViewerGesture::doTrigger( bool send_chat ) { if (mSoundItemID != LLUUID::null) { @@ -132,7 +132,7 @@ void LLViewerGesture::doTrigger( BOOL send_chat ) // Don't play nodding animation, since that might not blend // with the gesture animation. (LLFloaterReg::getTypedInstance("nearby_chat"))-> - sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, FALSE); + sendChatFromViewer(mOutputString, CHAT_TYPE_NORMAL, false); } } @@ -140,7 +140,7 @@ void LLViewerGesture::doTrigger( BOOL send_chat ) LLViewerGestureList::LLViewerGestureList() : LLGestureList() { - mIsLoaded = FALSE; + mIsLoaded = false; } @@ -154,7 +154,7 @@ LLGesture *LLViewerGestureList::create_gesture(U8 **buffer, S32 max_size) // See if the prefix matches any gesture. If so, return TRUE // and place the full text of the gesture trigger into // output_str -BOOL LLViewerGestureList::matchPrefix(const std::string& in_str, std::string* out_str) +bool LLViewerGestureList::matchPrefix(const std::string& in_str, std::string* out_str) { S32 in_len = in_str.length(); @@ -177,10 +177,10 @@ BOOL LLViewerGestureList::matchPrefix(const std::string& in_str, std::string* ou if (in_str_lc == trigger_trunc) { *out_str = trigger; - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/indra/newview/llviewergesture.h b/indra/newview/llviewergesture.h index 8b621850ea..fea0778b1c 100644 --- a/indra/newview/llviewergesture.h +++ b/indra/newview/llviewergesture.h @@ -46,12 +46,12 @@ public: LLViewerGesture(const LLViewerGesture &gesture); // Triggers if a key/mask matches it - virtual BOOL trigger(KEY key, MASK mask); + virtual bool trigger(KEY key, MASK mask); // Triggers if case-insensitive substring matches (assumes string is lowercase) - virtual BOOL trigger(const std::string &string); + virtual bool trigger(const std::string &string); - void doTrigger( BOOL send_chat ); + void doTrigger( bool send_chat ); protected: static const F32 SOUND_VOLUME; @@ -63,14 +63,14 @@ public: LLViewerGestureList(); //void requestFromServer(); - BOOL getIsLoaded() { return mIsLoaded; } + bool getIsLoaded() { return mIsLoaded; } //void requestResetFromServer( BOOL is_male ); // See if the prefix matches any gesture. If so, return TRUE // and place the full text of the gesture trigger into // output_str - BOOL matchPrefix(const std::string& in_str, std::string* out_str); + bool matchPrefix(const std::string& in_str, std::string* out_str); static void xferCallback(void *data, S32 size, void** /*user_data*/, S32 status); @@ -78,7 +78,7 @@ protected: LLGesture *create_gesture(U8 **buffer, S32 max_size); protected: - BOOL mIsLoaded; + bool mIsLoaded; }; extern LLViewerGestureList gGestureList; diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index 9653e80b53..22d70d482b 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -67,7 +67,7 @@ LLViewerJoint::~LLViewerJoint() //-------------------------------------------------------------------- // render() //-------------------------------------------------------------------- -U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) +U32 LLViewerJoint::render( F32 pixelArea, bool first_pass, bool is_dummy ) { stop_glerror(); @@ -107,13 +107,13 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) // second pass writes to z buffer only gGL.setColorMask(false, false); { - triangle_count += drawShape( pixelArea, FALSE, is_dummy ); + triangle_count += drawShape( pixelArea, false, is_dummy ); } // third past respects z buffer and writes color gGL.setColorMask(true, false); { LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); - triangle_count += drawShape( pixelArea, FALSE, is_dummy ); + triangle_count += drawShape( pixelArea, false, is_dummy ); } } else @@ -127,7 +127,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) // Render Outside (write to the Z buffer) glCullFace(GL_BACK); { - triangle_count += drawShape( pixelArea, FALSE, is_dummy ); + triangle_count += drawShape( pixelArea, false, is_dummy ); } } } @@ -149,7 +149,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) F32 jointLOD = joint->getLOD(); if (pixelArea >= jointLOD || sDisableLOD) { - triangle_count += joint->render( pixelArea, TRUE, is_dummy ); + triangle_count += joint->render( pixelArea, true, is_dummy ); if (jointLOD != DEFAULT_AVATAR_JOINT_LOD) { @@ -164,7 +164,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) //-------------------------------------------------------------------- // drawShape() //-------------------------------------------------------------------- -U32 LLViewerJoint::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) +U32 LLViewerJoint::drawShape( F32 pixelArea, bool first_pass, bool is_dummy ) { return 0; } diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h index abe11bbf5c..dec6b3d2a7 100644 --- a/indra/newview/llviewerjoint.h +++ b/indra/newview/llviewerjoint.h @@ -54,11 +54,11 @@ public: // Traverses the entire joint hierarchy, setting up // transforms and calling the drawShape(). // Derived classes may add text/graphic output. - virtual U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ); // Returns triangle count + virtual U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false ); // Returns triangle count // Draws the shape attached to a joint. // Called by render(). - virtual U32 drawShape( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ); + virtual U32 drawShape( F32 pixelArea, bool first_pass = true, bool is_dummy = false ); virtual void drawNormals() {} }; diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 55fa2682e1..eed482b598 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -71,15 +71,15 @@ LLViewerJointAttachment::~LLViewerJointAttachment() //----------------------------------------------------------------------------- // isTransparent() //----------------------------------------------------------------------------- -BOOL LLViewerJointAttachment::isTransparent() +bool LLViewerJointAttachment::isTransparent() { - return FALSE; + return false; } //----------------------------------------------------------------------------- // drawShape() //----------------------------------------------------------------------------- -U32 LLViewerJointAttachment::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) +U32 LLViewerJointAttachment::drawShape( F32 pixelArea, bool first_pass, bool is_dummy ) { if (LLVOAvatar::sShowAttachmentPoints) { @@ -103,7 +103,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object) return; if (object->mDrawable->isActive()) { - object->mDrawable->makeStatic(FALSE); + object->mDrawable->makeStatic(false); } object->mDrawable->mXform.setParent(getXform()); // LLViewerJointAttachment::lazyAttach @@ -162,7 +162,7 @@ void LLViewerJointAttachment::setupDrawable(LLViewerObject *object) //----------------------------------------------------------------------------- // addObject() //----------------------------------------------------------------------------- -BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) +bool LLViewerJointAttachment::addObject(LLViewerObject* object) { object->extractAttachmentItemID(); @@ -184,7 +184,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) // If this happens to be attached to self, then detach. LLVOAvatarSelf::detachAttachmentIntoInventory(object->getAttachmentItemID()); - return FALSE; + return false; } mAttachedObjects.push_back(object); @@ -194,7 +194,7 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) { if (object->mText.notNull()) { - object->mText->setOnHUDAttachment(TRUE); + object->mText->setOnHUDAttachment(true); } LLViewerObject::const_child_list_t& child_list = object->getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); @@ -203,14 +203,14 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object) LLViewerObject* childp = *iter; if (childp && childp->mText.notNull()) { - childp->mText->setOnHUDAttachment(TRUE); + childp->mText->setOnHUDAttachment(true); } } } calcLOD(); - mUpdateXform = TRUE; + mUpdateXform = true; - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -317,7 +317,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) //----------------------------------------------------------------------------- // setAttachmentVisibility() //----------------------------------------------------------------------------- -void LLViewerJointAttachment::setAttachmentVisibility(BOOL visible) +void LLViewerJointAttachment::setAttachmentVisibility(bool visible) { for (attachedobjs_vec_t::const_iterator iter = mAttachedObjects.begin(); iter != mAttachedObjects.end(); @@ -435,7 +435,7 @@ bool LLViewerJointAttachment::updateLOD(F32 pixel_area, bool activate) return res; } -BOOL LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_object) const +bool LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_object) const { for (attachedobjs_vec_t::const_iterator iter = mAttachedObjects.begin(); iter != mAttachedObjects.end(); @@ -444,10 +444,10 @@ BOOL LLViewerJointAttachment::isObjectAttached(const LLViewerObject *viewer_obje const LLViewerObject* attached_object = iter->get(); if (attached_object == viewer_object) { - return TRUE; + return true; } } - return FALSE; + return false; } const LLViewerObject *LLViewerJointAttachment::getAttachedObject(const LLUUID &object_id) const diff --git a/indra/newview/llviewerjointattachment.h b/indra/newview/llviewerjointattachment.h index 4f72f3dfa9..883df5b2c4 100644 --- a/indra/newview/llviewerjointattachment.h +++ b/indra/newview/llviewerjointattachment.h @@ -51,11 +51,11 @@ public: // Returns true if this object is transparent. // This is used to determine in which order to draw objects. - /*virtual*/ BOOL isTransparent(); + /*virtual*/ bool isTransparent(); // Draws the shape attached to a joint. // Called by render(). - /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy ); + /*virtual*/ U32 drawShape( F32 pixelArea, bool first_pass, bool is_dummy ); /*virtual*/ bool updateLOD(F32 pixel_area, bool activate); @@ -64,15 +64,15 @@ public: // void setPieSlice(S32 pie_slice) { mPieSlice = pie_slice; } - void setVisibleInFirstPerson(BOOL visibility) { mVisibleInFirst = visibility; } + void setVisibleInFirstPerson(bool visibility) { mVisibleInFirst = visibility; } BOOL getVisibleInFirstPerson() const { return mVisibleInFirst; } void setGroup(S32 group) { mGroup = group; } void setOriginalPosition(LLVector3 &position); - void setAttachmentVisibility(BOOL visible); - void setIsHUDAttachment(BOOL is_hud) { mIsHUDAttachment = is_hud; } - BOOL getIsHUDAttachment() const { return mIsHUDAttachment; } + void setAttachmentVisibility(bool visible); + void setIsHUDAttachment(bool is_hud) { mIsHUDAttachment = is_hud; } + bool getIsHUDAttachment() const { return mIsHUDAttachment; } - BOOL isAnimatable() const { return FALSE; } + bool isAnimatable() const { return false; } S32 getGroup() const { return mGroup; } S32 getPieSlice() const { return mPieSlice; } @@ -84,13 +84,13 @@ public: // // unique methods // - BOOL addObject(LLViewerObject* object); + bool addObject(LLViewerObject* object); void removeObject(LLViewerObject *object); // // attachments operations // - BOOL isObjectAttached(const LLViewerObject *viewer_object) const; + bool isObjectAttached(const LLViewerObject *viewer_object) const; const LLViewerObject *getAttachedObject(const LLUUID &object_id) const; LLViewerObject *getAttachedObject(const LLUUID &object_id); @@ -103,10 +103,10 @@ protected: void setupDrawable(LLViewerObject *object); private: - BOOL mVisibleInFirst; + bool mVisibleInFirst; LLVector3 mOriginalPos; S32 mGroup; - BOOL mIsHUDAttachment; + bool mIsHUDAttachment; S32 mPieSlice; }; diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 7f774e9f63..fd45bc37b2 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -216,7 +216,7 @@ int compare_int(const void *a, const void *b) //-------------------------------------------------------------------- // LLViewerJointMesh::drawShape() //-------------------------------------------------------------------- -U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) +U32 LLViewerJointMesh::drawShape( F32 pixelArea, bool first_pass, bool is_dummy) { if (!mValid || !mMesh || !mFace || !mVisible || !mFace->getVertexBuffer() || @@ -346,7 +346,7 @@ void LLViewerJointMesh::updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 // updateFaceData() //----------------------------------------------------------------------------- -void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update) +void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind, bool terse_update) { //IF THIS FUNCTION BREAKS, SEE LLPOLYMESH CONSTRUCTOR AND CHECK ALIGNMENT OF INPUT ARRAYS diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h index 1fe58c60ad..c7f2b1bbac 100644 --- a/indra/newview/llviewerjointmesh.h +++ b/indra/newview/llviewerjointmesh.h @@ -54,19 +54,19 @@ public: void uploadJointMatrices(); // overloaded from base class - /*virtual*/ U32 drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy ); + /*virtual*/ U32 drawShape( F32 pixelArea, bool first_pass, bool is_dummy ); // necessary because MS's compiler warns on function inheritance via dominance in the diamond inheritance here. // warns even though LLViewerJoint holds the only non virtual implementation. - /*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ) { return LLViewerJoint::render(pixelArea,first_pass,is_dummy);} + /*virtual*/ U32 render( F32 pixelArea, bool first_pass = true, bool is_dummy = false ) { return LLViewerJoint::render(pixelArea,first_pass,is_dummy);} /*virtual*/ void updateFaceSizes(U32 &num_vertices, U32& num_indices, F32 pixel_area); - /*virtual*/ void updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind = FALSE, bool terse_update = false); + /*virtual*/ void updateFaceData(LLFace *face, F32 pixel_area, bool damp_wind = false, bool terse_update = false); /*virtual*/ bool updateLOD(F32 pixel_area, bool activate); /*virtual*/ void updateJointGeometry(); /*virtual*/ void dump(); - /*virtual*/ BOOL isAnimatable() const { return FALSE; } + /*virtual*/ bool isAnimatable() const { return false; } private: diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8c76f575a9..d0fc0eb16c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2276,7 +2276,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LL_PROFILE_ZONE_SCOPED; LLUUID from_id; - BOOL from_group; + bool from_group; LLUUID to_id; U8 offline; U8 d = 0; @@ -4305,7 +4305,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) LLVector3 sitPosition; LLQuaternion sitRotation; LLUUID sitObjectID; - BOOL use_autopilot; + bool use_autopilot; mesgsys->getUUIDFast(_PREHASH_SitObject, _PREHASH_ID, sitObjectID); mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_AutoPilot, use_autopilot); mesgsys->getVector3Fast(_PREHASH_SitTransform, _PREHASH_SitPosition, sitPosition); @@ -4314,7 +4314,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) mesgsys->getVector3Fast(_PREHASH_SitTransform, _PREHASH_CameraEyeOffset, camera_eye); LLVector3 camera_at; mesgsys->getVector3Fast(_PREHASH_SitTransform, _PREHASH_CameraAtOffset, camera_at); - BOOL force_mouselook; + bool force_mouselook; mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_ForceMouselook, force_mouselook); if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > CAMERA_POSITION_THRESHOLD_SQUARED) @@ -4739,12 +4739,12 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) // and agent ids for name lookup. S32 transaction_type = 0; LLUUID source_id; - BOOL is_source_group = FALSE; + bool is_source_group = false; LLUUID dest_id; - BOOL is_dest_group = FALSE; + bool is_dest_group = false; S32 amount = 0; std::string item_description; - BOOL success = FALSE; + bool success = false; msg->getS32("TransactionInfo", "TransactionType", transaction_type); msg->getUUID("TransactionInfo", "SourceID", source_id); @@ -5334,7 +5334,7 @@ void process_agent_alert_message(LLMessageSystem* msgsystem, void** user_data) if (!attempt_standard_notification(msgsystem)) { - BOOL modal = FALSE; + bool modal = false; msgsystem->getBOOL("AlertData", "Modal", modal); process_alert_core(message, modal); } @@ -5550,7 +5550,7 @@ void process_frozen_message(LLMessageSystem *msgsystem, void **user_data) // make sure the cursor is back to the usual default since the // alert is probably due to some kind of error. gViewerWindow->getWindow()->resetBusyCount(); - BOOL b_frozen; + bool b_frozen; msgsystem->getBOOL("FrozenData", "Data", b_frozen); @@ -6727,7 +6727,7 @@ void process_load_url(LLMessageSystem* msg, void**) { LLUUID object_id; LLUUID owner_id; - BOOL owner_is_group; + bool owner_is_group; char object_name[256]; /* Flawfinder: ignore */ char message[256]; /* Flawfinder: ignore */ char url[256]; /* Flawfinder: ignore */ diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 15accd0547..2e59145bbe 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1528,13 +1528,13 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use { S32 request_result; S32 sequence_id; - BOOL snap_selection = FALSE; + bool snap_selection = false; S32 self_count = 0; S32 other_count = 0; S32 public_count = 0; S32 local_id; LLUUID owner_id; - BOOL is_group_owned; + bool is_group_owned; U32 auction_id = 0; S32 claim_price_per_meter = 0; S32 rent_price_per_meter = 0; @@ -1553,15 +1553,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use S32 other_prims = 0; S32 selected_prims = 0; F32 parcel_prim_bonus = 1.f; - BOOL region_push_override = false; - BOOL region_deny_anonymous_override = false; - BOOL region_deny_identified_override = false; // Deprecated - BOOL region_deny_transacted_override = false; // Deprecated - BOOL region_deny_age_unverified_override = false; - BOOL region_allow_access_override = true; - BOOL region_allow_environment_override = true; + bool region_push_override = false; + bool region_deny_anonymous_override = false; + bool region_deny_identified_override = false; // Deprecated + bool region_deny_transacted_override = false; // Deprecated + bool region_deny_age_unverified_override = false; + bool region_allow_access_override = true; + bool region_allow_environment_override = true; S32 parcel_environment_version = 0; - BOOL agent_parcel_update = false; // updating previous(existing) agent parcel + bool agent_parcel_update = false; // updating previous(existing) agent parcel U32 extended_flags = 0; //obscure MOAP S32 other_clean_time = 0; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 452dcdd8fd..d341a966f1 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2890,7 +2890,7 @@ void LLViewerRegion::unpackRegionHandshake() U8 sim_access; std::string sim_name; LLUUID sim_owner; - BOOL is_estate_manager; + bool is_estate_manager; F32 water_height; F32 billable_factor; LLUUID cache_id; diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp index 4c2fbcf837..63c8e0d59c 100644 --- a/indra/newview/llviewertexlayer.cpp +++ b/indra/newview/llviewertexlayer.cpp @@ -150,7 +150,7 @@ void LLViewerTexLayerSetBuffer::preRenderTexLayerSet() } // virtual -void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(BOOL success) +void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(bool success) { LLTexLayerSetBuffer::postRenderTexLayerSet(success); @@ -158,9 +158,9 @@ void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(BOOL success) } // virtual -void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success) +void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(bool success) { - const BOOL update_now = mNeedsUpdate && isReadyToUpdate(); + const bool update_now = mNeedsUpdate && isReadyToUpdate(); if (update_now) { doUpdate(); diff --git a/indra/newview/llviewertexlayer.h b/indra/newview/llviewertexlayer.h index dec7f0ddfc..d1c01bf1ad 100644 --- a/indra/newview/llviewertexlayer.h +++ b/indra/newview/llviewertexlayer.h @@ -95,8 +95,8 @@ private: // Tex Layer Render //-------------------------------------------------------------------- virtual void preRenderTexLayerSet(); - virtual void midRenderTexLayerSet(BOOL success); - virtual void postRenderTexLayerSet(BOOL success); + virtual void midRenderTexLayerSet(bool success); + virtual void postRenderTexLayerSet(bool success); virtual S32 getCompositeOriginX() const { return getOriginX(); } virtual S32 getCompositeOriginY() const { return getOriginY(); } virtual S32 getCompositeWidth() const { return getFullWidth(); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index bb4ffac604..777fa70539 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -330,12 +330,12 @@ public: // called when a motion is activated // must return TRUE to indicate success, or else // it will be deactivated - virtual BOOL onActivate() { return TRUE; } + virtual bool onActivate() { return true; } // called per time step // must return TRUE while it is active, and // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask) + virtual bool onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; F32 nx[2]; @@ -353,7 +353,7 @@ public: tQn.setQuat( rx, ry, 0.0f ); mTorsoState->setRotation( tQn ); - return TRUE; + return true; } // called when a motion is deactivated @@ -451,12 +451,12 @@ public: // called when a motion is activated // must return TRUE to indicate success, or else // it will be deactivated - virtual BOOL onActivate() { return TRUE; } + virtual bool onActivate() { return true; } // called per time step // must return TRUE while it is active, and // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask) + virtual bool onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; mBreatheRate = 1.f; @@ -465,7 +465,7 @@ public: mChestState->setRotation(LLQuaternion(breathe_amt, LLVector3(0.f, 1.f, 0.f))); - return TRUE; + return true; } // called when a motion is deactivated @@ -553,17 +553,17 @@ public: // called when a motion is activated // must return TRUE to indicate success, or else // it will be deactivated - virtual BOOL onActivate() { return TRUE; } + virtual bool onActivate() { return true; } // called per time step // must return TRUE while it is active, and // must return FALSE when the motion is completed. - virtual BOOL onUpdate(F32 time, U8* joint_mask) + virtual bool onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; mPelvisState->setPosition(LLVector3::zero); - return TRUE; + return true; } // called when a motion is deactivated @@ -6075,7 +6075,7 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) // id is the asset if of the animation to start // time_offset is the offset into the animation at which to start playing //----------------------------------------------------------------------------- -BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) +bool LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) { LL_DEBUGS("Motion") << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; @@ -6097,7 +6097,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) //----------------------------------------------------------------------------- // stopMotion() //----------------------------------------------------------------------------- -BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) +bool LLVOAvatar::stopMotion(const LLUUID& id, bool stop_immediate) { LL_DEBUGS("Motion") << "Motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 72770e19a8..203e3e8c62 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -192,8 +192,8 @@ public: /*virtual*/ LLVector3 getCharacterAngularVelocity(); /*virtual*/ LLUUID remapMotionID(const LLUUID& id); - /*virtual*/ BOOL startMotion(const LLUUID& id, F32 time_offset = 0.f); - /*virtual*/ BOOL stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE); + /*virtual*/ bool startMotion(const LLUUID& id, F32 time_offset = 0.f); + /*virtual*/ bool stopMotion(const LLUUID& id, bool stop_immediate = FALSE); virtual bool hasMotionFromSource(const LLUUID& source_id); virtual void stopMotionFromSource(const LLUUID& source_id); virtual void requestStopMotion(LLMotion* motion); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 528407b82c..4f41a63e64 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -727,29 +727,29 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) } // virtual -BOOL LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight) +bool LLVOAvatarSelf::setVisualParamWeight(const LLVisualParam *which_param, F32 weight) { if (!which_param) { - return FALSE; + return false; } LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(which_param->getID()); return setParamWeight(param,weight); } // virtual -BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight) +bool LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight) { if (!param_name) { - return FALSE; + return false; } LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(param_name); return setParamWeight(param,weight); } // virtual -BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight) +bool LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight) { LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(index); return setParamWeight(param,weight); diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index a121ef356e..c4a81affe6 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -92,9 +92,9 @@ public: /*virtual*/ void requestStopMotion(LLMotion* motion); /*virtual*/ LLJoint* getJoint(const std::string &name); - /*virtual*/ BOOL setVisualParamWeight(const LLVisualParam *which_param, F32 weight); - /*virtual*/ BOOL setVisualParamWeight(const char* param_name, F32 weight); - /*virtual*/ BOOL setVisualParamWeight(S32 index, F32 weight); + /*virtual*/ bool setVisualParamWeight(const LLVisualParam *which_param, F32 weight); + /*virtual*/ bool setVisualParamWeight(const char* param_name, F32 weight); + /*virtual*/ bool setVisualParamWeight(S32 index, F32 weight); /*virtual*/ void updateVisualParams(); void writeWearablesToAvatar(); /*virtual*/ void idleUpdateAppearanceAnimation(); -- cgit v1.3 From 48b121ab03435507e2ed9a865de9f8aff992877a Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Sat, 17 Feb 2024 14:02:06 +0200 Subject: viewer#826 Follow-up buildfix: update lldatapacker --- indra/llmessage/lldatapacker.cpp | 556 +++++++++++++++++++------------------- indra/llmessage/lldatapacker.h | 312 ++++++++++----------- indra/newview/llphysicsmotion.cpp | 4 +- 3 files changed, 436 insertions(+), 436 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp index 9f7768f78e..b3113cd5d8 100644 --- a/indra/llmessage/lldatapacker.cpp +++ b/indra/llmessage/lldatapacker.cpp @@ -45,7 +45,7 @@ const S32 DP_BUFSIZE = 512; static char DUMMY_BUFFER[128]; /*Flawfinder: ignore*/ -LLDataPacker::LLDataPacker() : mPassFlags(0), mWriteEnabled(FALSE) +LLDataPacker::LLDataPacker() : mPassFlags(0), mWriteEnabled(false) { } @@ -61,10 +61,10 @@ void LLDataPacker::dumpBufferToLog() LL_ERRS() << "dumpBufferToLog not implemented for this type!" << LL_ENDL; } -BOOL LLDataPacker::packFixed(const F32 value, const char *name, - const BOOL is_signed, const U32 int_bits, const U32 frac_bits) +bool LLDataPacker::packFixed(const F32 value, const char *name, + const bool is_signed, const U32 int_bits, const U32 frac_bits) { - BOOL success = TRUE; + bool success = true; S32 unsigned_bits = int_bits + frac_bits; S32 total_bits = unsigned_bits; @@ -113,10 +113,10 @@ BOOL LLDataPacker::packFixed(const F32 value, const char *name, return success; } -BOOL LLDataPacker::unpackFixed(F32 &value, const char *name, - const BOOL is_signed, const U32 int_bits, const U32 frac_bits) +bool LLDataPacker::unpackFixed(F32 &value, const char *name, + const bool is_signed, const U32 int_bits, const U32 frac_bits) { - BOOL success = TRUE; + bool success = true; //LL_INFOS() << "unpackFixed:" << name << " int:" << int_bits << " frac:" << frac_bits << LL_ENDL; S32 unsigned_bits = int_bits + frac_bits; S32 total_bits = unsigned_bits; @@ -166,82 +166,82 @@ BOOL LLDataPacker::unpackFixed(F32 &value, const char *name, return success; } -BOOL LLDataPacker::unpackU16s(U16 *values, S32 count, const char *name) +bool LLDataPacker::unpackU16s(U16 *values, S32 count, const char *name) { for (S32 idx = 0; idx < count; ++idx) { if (!unpackU16(values[idx], name)) { LL_WARNS("DATAPACKER") << "Buffer overflow reading Unsigned 16s \"" << name << "\" at index " << idx << "!" << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLDataPacker::unpackS16s(S16 *values, S32 count, const char *name) +bool LLDataPacker::unpackS16s(S16 *values, S32 count, const char *name) { for (S32 idx = 0; idx < count; ++idx) { if (!unpackS16(values[idx], name)) { LL_WARNS("DATAPACKER") << "Buffer overflow reading Signed 16s \"" << name << "\" at index " << idx << "!" << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLDataPacker::unpackF32s(F32 *values, S32 count, const char *name) +bool LLDataPacker::unpackF32s(F32 *values, S32 count, const char *name) { for (S32 idx = 0; idx < count; ++idx) { if (!unpackF32(values[idx], name)) { LL_WARNS("DATAPACKER") << "Buffer overflow reading Float 32s \"" << name << "\" at index " << idx << "!" << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLDataPacker::unpackColor4Us(LLColor4U *values, S32 count, const char *name) +bool LLDataPacker::unpackColor4Us(LLColor4U *values, S32 count, const char *name) { for (S32 idx = 0; idx < count; ++idx) { if (!unpackColor4U(values[idx], name)) { LL_WARNS("DATAPACKER") << "Buffer overflow reading Float 32s \"" << name << "\" at index " << idx << "!" << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLDataPacker::unpackUUIDs(LLUUID *values, S32 count, const char *name) +bool LLDataPacker::unpackUUIDs(LLUUID *values, S32 count, const char *name) { for (S32 idx = 0; idx < count; ++idx) { if (!unpackUUID(values[idx], name)) { LL_WARNS("DATAPACKER") << "Buffer overflow reading UUIDs \"" << name << "\" at index " << idx << "!" << LL_ENDL; - return FALSE; + return false; } } - return TRUE; + return true; } //--------------------------------------------------------------------------- // LLDataPackerBinaryBuffer implementation //--------------------------------------------------------------------------- -BOOL LLDataPackerBinaryBuffer::packString(const std::string& value, const char *name) +bool LLDataPackerBinaryBuffer::packString(const std::string& value, const char *name) { S32 length = value.length()+1; if (!verifyLength(length, name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -249,30 +249,30 @@ BOOL LLDataPackerBinaryBuffer::packString(const std::string& value, const char * htolememcpy(mCurBufferp, value.c_str(), MVT_VARIABLE, length); } mCurBufferp += length; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackString(std::string& value, const char *name) +bool LLDataPackerBinaryBuffer::unpackString(std::string& value, const char *name) { S32 length = (S32)strlen((char *)mCurBufferp) + 1; /*Flawfinder: ignore*/ if (!verifyLength(length, name)) { - return FALSE; + return false; } value = std::string((char*)mCurBufferp); // We already assume NULL termination calling strlen() mCurBufferp += length; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packBinaryData(const U8 *value, S32 size, const char *name) +bool LLDataPackerBinaryBuffer::packBinaryData(const U8 *value, S32 size, const char *name) { if (!verifyLength(size + 4, name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -285,16 +285,16 @@ BOOL LLDataPackerBinaryBuffer::packBinaryData(const U8 *value, S32 size, const c htolememcpy(mCurBufferp, value, MVT_VARIABLE, size); } mCurBufferp += size; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char *name) +bool LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char *name) { if (!verifyLength(4, name)) { LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData would unpack invalid data, aborting!" << LL_ENDL; - return FALSE; + return false; } htolememcpy(&size, mCurBufferp, MVT_S32, 4); @@ -303,21 +303,21 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char if (!verifyLength(size, name)) { LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData would unpack invalid data, aborting!" << LL_ENDL; - return FALSE; + return false; } htolememcpy(value, mCurBufferp, MVT_VARIABLE, size); mCurBufferp += size; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packBinaryDataFixed(const U8 *value, S32 size, const char *name) +bool LLDataPackerBinaryBuffer::packBinaryDataFixed(const U8 *value, S32 size, const char *name) { if (!verifyLength(size, name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -325,27 +325,27 @@ BOOL LLDataPackerBinaryBuffer::packBinaryDataFixed(const U8 *value, S32 size, co htolememcpy(mCurBufferp, value, MVT_VARIABLE, size); } mCurBufferp += size; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const char *name) +bool LLDataPackerBinaryBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const char *name) { if (!verifyLength(size, name)) { - return FALSE; + return false; } htolememcpy(value, mCurBufferp, MVT_VARIABLE, size); mCurBufferp += size; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packU8(const U8 value, const char *name) +bool LLDataPackerBinaryBuffer::packU8(const U8 value, const char *name) { if (!verifyLength(sizeof(U8), name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -353,28 +353,28 @@ BOOL LLDataPackerBinaryBuffer::packU8(const U8 value, const char *name) *mCurBufferp = value; } mCurBufferp++; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackU8(U8 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackU8(U8 &value, const char *name) { if (!verifyLength(sizeof(U8), name)) { - return FALSE; + return false; } value = *mCurBufferp; mCurBufferp++; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packU16(const U16 value, const char *name) +bool LLDataPackerBinaryBuffer::packU16(const U16 value, const char *name) { if (!verifyLength(sizeof(U16), name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -382,25 +382,25 @@ BOOL LLDataPackerBinaryBuffer::packU16(const U16 value, const char *name) htolememcpy(mCurBufferp, &value, MVT_U16, 2); } mCurBufferp += 2; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackU16(U16 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackU16(U16 &value, const char *name) { if (!verifyLength(sizeof(U16), name)) { - return FALSE; + return false; } htolememcpy(&value, mCurBufferp, MVT_U16, 2); mCurBufferp += 2; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packS16(const S16 value, const char *name) +bool LLDataPackerBinaryBuffer::packS16(const S16 value, const char *name) { - BOOL success = verifyLength(sizeof(S16), name); + bool success = verifyLength(sizeof(S16), name); if (mWriteEnabled && success) { @@ -410,9 +410,9 @@ BOOL LLDataPackerBinaryBuffer::packS16(const S16 value, const char *name) return success; } -BOOL LLDataPackerBinaryBuffer::unpackS16(S16 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackS16(S16 &value, const char *name) { - BOOL success = verifyLength(sizeof(S16), name); + bool success = verifyLength(sizeof(S16), name); if (success) { @@ -422,11 +422,11 @@ BOOL LLDataPackerBinaryBuffer::unpackS16(S16 &value, const char *name) return success; } -BOOL LLDataPackerBinaryBuffer::packU32(const U32 value, const char *name) +bool LLDataPackerBinaryBuffer::packU32(const U32 value, const char *name) { if (!verifyLength(sizeof(U32), name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -434,28 +434,28 @@ BOOL LLDataPackerBinaryBuffer::packU32(const U32 value, const char *name) htolememcpy(mCurBufferp, &value, MVT_U32, 4); } mCurBufferp += 4; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackU32(U32 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackU32(U32 &value, const char *name) { if (!verifyLength(sizeof(U32), name)) { - return FALSE; + return false; } htolememcpy(&value, mCurBufferp, MVT_U32, 4); mCurBufferp += 4; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packS32(const S32 value, const char *name) +bool LLDataPackerBinaryBuffer::packS32(const S32 value, const char *name) { if (!verifyLength(sizeof(S32), name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -463,28 +463,28 @@ BOOL LLDataPackerBinaryBuffer::packS32(const S32 value, const char *name) htolememcpy(mCurBufferp, &value, MVT_S32, 4); } mCurBufferp += 4; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackS32(S32 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackS32(S32 &value, const char *name) { if(!verifyLength(sizeof(S32), name)) { - return FALSE; + return false; } htolememcpy(&value, mCurBufferp, MVT_S32, 4); mCurBufferp += 4; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packF32(const F32 value, const char *name) +bool LLDataPackerBinaryBuffer::packF32(const F32 value, const char *name) { if (!verifyLength(sizeof(F32), name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -492,28 +492,28 @@ BOOL LLDataPackerBinaryBuffer::packF32(const F32 value, const char *name) htolememcpy(mCurBufferp, &value, MVT_F32, 4); } mCurBufferp += 4; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackF32(F32 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackF32(F32 &value, const char *name) { if (!verifyLength(sizeof(F32), name)) { - return FALSE; + return false; } htolememcpy(&value, mCurBufferp, MVT_F32, 4); mCurBufferp += 4; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packColor4(const LLColor4 &value, const char *name) +bool LLDataPackerBinaryBuffer::packColor4(const LLColor4 &value, const char *name) { if (!verifyLength(16, name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -521,28 +521,28 @@ BOOL LLDataPackerBinaryBuffer::packColor4(const LLColor4 &value, const char *nam htolememcpy(mCurBufferp, value.mV, MVT_LLVector4, 16); } mCurBufferp += 16; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackColor4(LLColor4 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackColor4(LLColor4 &value, const char *name) { if (!verifyLength(16, name)) { - return FALSE; + return false; } htolememcpy(value.mV, mCurBufferp, MVT_LLVector4, 16); mCurBufferp += 16; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packColor4U(const LLColor4U &value, const char *name) +bool LLDataPackerBinaryBuffer::packColor4U(const LLColor4U &value, const char *name) { if (!verifyLength(4, name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -550,29 +550,29 @@ BOOL LLDataPackerBinaryBuffer::packColor4U(const LLColor4U &value, const char *n htolememcpy(mCurBufferp, value.mV, MVT_VARIABLE, 4); } mCurBufferp += 4; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackColor4U(LLColor4U &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackColor4U(LLColor4U &value, const char *name) { if (!verifyLength(4, name)) { - return FALSE; + return false; } htolememcpy(value.mV, mCurBufferp, MVT_VARIABLE, 4); mCurBufferp += 4; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packVector2(const LLVector2 &value, const char *name) +bool LLDataPackerBinaryBuffer::packVector2(const LLVector2 &value, const char *name) { if (!verifyLength(8, name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -581,29 +581,29 @@ BOOL LLDataPackerBinaryBuffer::packVector2(const LLVector2 &value, const char *n htolememcpy(mCurBufferp+4, &value.mV[1], MVT_F32, 4); } mCurBufferp += 8; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackVector2(LLVector2 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackVector2(LLVector2 &value, const char *name) { if (!verifyLength(8, name)) { - return FALSE; + return false; } htolememcpy(&value.mV[0], mCurBufferp, MVT_F32, 4); htolememcpy(&value.mV[1], mCurBufferp+4, MVT_F32, 4); mCurBufferp += 8; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packVector3(const LLVector3 &value, const char *name) +bool LLDataPackerBinaryBuffer::packVector3(const LLVector3 &value, const char *name) { if (!verifyLength(12, name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -611,27 +611,27 @@ BOOL LLDataPackerBinaryBuffer::packVector3(const LLVector3 &value, const char *n htolememcpy(mCurBufferp, value.mV, MVT_LLVector3, 12); } mCurBufferp += 12; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackVector3(LLVector3 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackVector3(LLVector3 &value, const char *name) { if (!verifyLength(12, name)) { - return FALSE; + return false; } htolememcpy(value.mV, mCurBufferp, MVT_LLVector3, 12); mCurBufferp += 12; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packVector4(const LLVector4 &value, const char *name) +bool LLDataPackerBinaryBuffer::packVector4(const LLVector4 &value, const char *name) { if (!verifyLength(16, name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -639,27 +639,27 @@ BOOL LLDataPackerBinaryBuffer::packVector4(const LLVector4 &value, const char *n htolememcpy(mCurBufferp, value.mV, MVT_LLVector4, 16); } mCurBufferp += 16; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackVector4(LLVector4 &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackVector4(LLVector4 &value, const char *name) { if (!verifyLength(16, name)) { - return FALSE; + return false; } htolememcpy(value.mV, mCurBufferp, MVT_LLVector4, 16); mCurBufferp += 16; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::packUUID(const LLUUID &value, const char *name) +bool LLDataPackerBinaryBuffer::packUUID(const LLUUID &value, const char *name) { if (!verifyLength(16, name)) { - return FALSE; + return false; } if (mWriteEnabled) @@ -667,20 +667,20 @@ BOOL LLDataPackerBinaryBuffer::packUUID(const LLUUID &value, const char *name) htolememcpy(mCurBufferp, value.mData, MVT_LLUUID, 16); } mCurBufferp += 16; - return TRUE; + return true; } -BOOL LLDataPackerBinaryBuffer::unpackUUID(LLUUID &value, const char *name) +bool LLDataPackerBinaryBuffer::unpackUUID(LLUUID &value, const char *name) { if (!verifyLength(16, name)) { - return FALSE; + return false; } htolememcpy(value.mData, mCurBufferp, MVT_LLUUID, 16); mCurBufferp += 16; - return TRUE; + return true; } const LLDataPackerBinaryBuffer& LLDataPackerBinaryBuffer::operator=(const LLDataPackerBinaryBuffer &a) @@ -722,9 +722,9 @@ void LLDataPackerBinaryBuffer::dumpBufferToLog() //--------------------------------------------------------------------------- // LLDataPackerAsciiBuffer implementation //--------------------------------------------------------------------------- -BOOL LLDataPackerAsciiBuffer::packString(const std::string& value, const char *name) +bool LLDataPackerAsciiBuffer::packString(const std::string& value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -752,21 +752,21 @@ BOOL LLDataPackerAsciiBuffer::packString(const std::string& value, const char *n return success; } -BOOL LLDataPackerAsciiBuffer::unpackString(std::string& value, const char *name) +bool LLDataPackerAsciiBuffer::unpackString(std::string& value, const char *name) { char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore*/ if (!getValueStr(name, valuestr, DP_BUFSIZE)) // NULL terminated { - return FALSE; + return false; } value = valuestr; - return TRUE; + return true; } -BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const char *name) +bool LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; @@ -789,7 +789,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch S32 i; - BOOL bBufferFull = FALSE; + bool bBufferFull = false; for (i = 0; i < size && !bBufferFull; i++) { numCopied = snprintf(mCurBufferp, getBufferSize()-getCurrentSize(), "%02x ", value[i]); /* Flawfinder: ignore */ @@ -797,7 +797,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch { numCopied = getBufferSize()-getCurrentSize(); LL_WARNS() << "LLDataPackerAsciiBuffer::packBinaryData: data truncated: " << LL_ENDL; - bBufferFull = TRUE; + bBufferFull = true; } mCurBufferp += numCopied; } @@ -829,13 +829,13 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch } -BOOL LLDataPackerAsciiBuffer::unpackBinaryData(U8 *value, S32 &size, const char *name) +bool LLDataPackerAsciiBuffer::unpackBinaryData(U8 *value, S32 &size, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } char *cur_pos = &valuestr[0]; @@ -854,16 +854,16 @@ BOOL LLDataPackerAsciiBuffer::unpackBinaryData(U8 *value, S32 &size, const char } -BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, const char *name) +bool LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mWriteEnabled) { S32 i; int numCopied = 0; - BOOL bBufferFull = FALSE; + bool bBufferFull = false; for (i = 0; i < size && !bBufferFull; i++) { numCopied = snprintf(mCurBufferp, getBufferSize()-getCurrentSize(), "%02x ", value[i]); /* Flawfinder: ignore */ @@ -871,7 +871,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, con { numCopied = getBufferSize()-getCurrentSize(); LL_WARNS() << "LLDataPackerAsciiBuffer::packBinaryDataFixed: data truncated: " << LL_ENDL; - bBufferFull = TRUE; + bBufferFull = true; } mCurBufferp += numCopied; @@ -901,13 +901,13 @@ BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, con } -BOOL LLDataPackerAsciiBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const char *name) +bool LLDataPackerAsciiBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } char *cur_pos = &valuestr[0]; @@ -925,9 +925,9 @@ BOOL LLDataPackerAsciiBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const c -BOOL LLDataPackerAsciiBuffer::packU8(const U8 value, const char *name) +bool LLDataPackerAsciiBuffer::packU8(const U8 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -958,13 +958,13 @@ BOOL LLDataPackerAsciiBuffer::packU8(const U8 value, const char *name) } -BOOL LLDataPackerAsciiBuffer::unpackU8(U8 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackU8(U8 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } S32 in_val; @@ -973,9 +973,9 @@ BOOL LLDataPackerAsciiBuffer::unpackU8(U8 &value, const char *name) return success; } -BOOL LLDataPackerAsciiBuffer::packU16(const U16 value, const char *name) +bool LLDataPackerAsciiBuffer::packU16(const U16 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1005,13 +1005,13 @@ BOOL LLDataPackerAsciiBuffer::packU16(const U16 value, const char *name) } -BOOL LLDataPackerAsciiBuffer::unpackU16(U16 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackU16(U16 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } S32 in_val; @@ -1020,9 +1020,9 @@ BOOL LLDataPackerAsciiBuffer::unpackU16(U16 &value, const char *name) return success; } -BOOL LLDataPackerAsciiBuffer::packS16(const S16 value, const char *name) +bool LLDataPackerAsciiBuffer::packS16(const S16 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1052,13 +1052,13 @@ BOOL LLDataPackerAsciiBuffer::packS16(const S16 value, const char *name) } -BOOL LLDataPackerAsciiBuffer::unpackS16(S16 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackS16(S16 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } S32 in_val; @@ -1067,9 +1067,9 @@ BOOL LLDataPackerAsciiBuffer::unpackS16(S16 &value, const char *name) return success; } -BOOL LLDataPackerAsciiBuffer::packU32(const U32 value, const char *name) +bool LLDataPackerAsciiBuffer::packU32(const U32 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1097,13 +1097,13 @@ BOOL LLDataPackerAsciiBuffer::packU32(const U32 value, const char *name) } -BOOL LLDataPackerAsciiBuffer::unpackU32(U32 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackU32(U32 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%u", &value); @@ -1111,9 +1111,9 @@ BOOL LLDataPackerAsciiBuffer::unpackU32(U32 &value, const char *name) } -BOOL LLDataPackerAsciiBuffer::packS32(const S32 value, const char *name) +bool LLDataPackerAsciiBuffer::packS32(const S32 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1141,13 +1141,13 @@ BOOL LLDataPackerAsciiBuffer::packS32(const S32 value, const char *name) } -BOOL LLDataPackerAsciiBuffer::unpackS32(S32 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackS32(S32 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%d", &value); @@ -1155,9 +1155,9 @@ BOOL LLDataPackerAsciiBuffer::unpackS32(S32 &value, const char *name) } -BOOL LLDataPackerAsciiBuffer::packF32(const F32 value, const char *name) +bool LLDataPackerAsciiBuffer::packF32(const F32 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1185,13 +1185,13 @@ BOOL LLDataPackerAsciiBuffer::packF32(const F32 value, const char *name) } -BOOL LLDataPackerAsciiBuffer::unpackF32(F32 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackF32(F32 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f", &value); @@ -1199,9 +1199,9 @@ BOOL LLDataPackerAsciiBuffer::unpackF32(F32 &value, const char *name) } -BOOL LLDataPackerAsciiBuffer::packColor4(const LLColor4 &value, const char *name) +bool LLDataPackerAsciiBuffer::packColor4(const LLColor4 &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1229,22 +1229,22 @@ BOOL LLDataPackerAsciiBuffer::packColor4(const LLColor4 &value, const char *name } -BOOL LLDataPackerAsciiBuffer::unpackColor4(LLColor4 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackColor4(LLColor4 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f %f %f %f", &value.mV[0], &value.mV[1], &value.mV[2], &value.mV[3]); return success; } -BOOL LLDataPackerAsciiBuffer::packColor4U(const LLColor4U &value, const char *name) +bool LLDataPackerAsciiBuffer::packColor4U(const LLColor4U &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1272,13 +1272,13 @@ BOOL LLDataPackerAsciiBuffer::packColor4U(const LLColor4U &value, const char *na } -BOOL LLDataPackerAsciiBuffer::unpackColor4U(LLColor4U &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackColor4U(LLColor4U &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } S32 r, g, b, a; @@ -1292,9 +1292,9 @@ BOOL LLDataPackerAsciiBuffer::unpackColor4U(LLColor4U &value, const char *name) } -BOOL LLDataPackerAsciiBuffer::packVector2(const LLVector2 &value, const char *name) +bool LLDataPackerAsciiBuffer::packVector2(const LLVector2 &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1322,13 +1322,13 @@ BOOL LLDataPackerAsciiBuffer::packVector2(const LLVector2 &value, const char *na } -BOOL LLDataPackerAsciiBuffer::unpackVector2(LLVector2 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackVector2(LLVector2 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f %f", &value.mV[0], &value.mV[1]); @@ -1336,9 +1336,9 @@ BOOL LLDataPackerAsciiBuffer::unpackVector2(LLVector2 &value, const char *name) } -BOOL LLDataPackerAsciiBuffer::packVector3(const LLVector3 &value, const char *name) +bool LLDataPackerAsciiBuffer::packVector3(const LLVector3 &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1366,22 +1366,22 @@ BOOL LLDataPackerAsciiBuffer::packVector3(const LLVector3 &value, const char *na } -BOOL LLDataPackerAsciiBuffer::unpackVector3(LLVector3 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackVector3(LLVector3 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f %f %f", &value.mV[0], &value.mV[1], &value.mV[2]); return success; } -BOOL LLDataPackerAsciiBuffer::packVector4(const LLVector4 &value, const char *name) +bool LLDataPackerAsciiBuffer::packVector4(const LLVector4 &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; if (mWriteEnabled) @@ -1409,13 +1409,13 @@ BOOL LLDataPackerAsciiBuffer::packVector4(const LLVector4 &value, const char *na } -BOOL LLDataPackerAsciiBuffer::unpackVector4(LLVector4 &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackVector4(LLVector4 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f %f %f %f", &value.mV[0], &value.mV[1], &value.mV[2], &value.mV[3]); @@ -1423,9 +1423,9 @@ BOOL LLDataPackerAsciiBuffer::unpackVector4(LLVector4 &value, const char *name) } -BOOL LLDataPackerAsciiBuffer::packUUID(const LLUUID &value, const char *name) +bool LLDataPackerAsciiBuffer::packUUID(const LLUUID &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); int numCopied = 0; @@ -1449,20 +1449,20 @@ BOOL LLDataPackerAsciiBuffer::packUUID(const LLUUID &value, const char *name) { numCopied = getBufferSize()-getCurrentSize(); LL_WARNS() << "LLDataPackerAsciiBuffer::packUUID: truncated: " << LL_ENDL; - success = FALSE; + success = false; } mCurBufferp += numCopied; return success; } -BOOL LLDataPackerAsciiBuffer::unpackUUID(LLUUID &value, const char *name) +bool LLDataPackerAsciiBuffer::unpackUUID(LLUUID &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } char tmp_str[64]; /* Flawfinder: ignore */ @@ -1507,9 +1507,9 @@ void LLDataPackerAsciiBuffer::writeIndentedName(const char *name) } } -BOOL LLDataPackerAsciiBuffer::getValueStr(const char *name, char *out_value, S32 value_len) +bool LLDataPackerAsciiBuffer::getValueStr(const char *name, char *out_value, S32 value_len) { - BOOL success = TRUE; + bool success = true; char buffer[DP_BUFSIZE]; /* Flawfinder: ignore */ char keyword[DP_BUFSIZE]; /* Flawfinder: ignore */ char value[DP_BUFSIZE]; /* Flawfinder: ignore */ @@ -1530,7 +1530,7 @@ BOOL LLDataPackerAsciiBuffer::getValueStr(const char *name, char *out_value, S32 if (strcmp(keyword, name)) { LL_WARNS() << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << LL_ENDL; - return FALSE; + return false; } } else @@ -1565,9 +1565,9 @@ std::string convertF32ToString(F32 val) //--------------------------------------------------------------------------- // LLDataPackerAsciiFile implementation //--------------------------------------------------------------------------- -BOOL LLDataPackerAsciiFile::packString(const std::string& value, const char *name) +bool LLDataPackerAsciiFile::packString(const std::string& value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1580,22 +1580,22 @@ BOOL LLDataPackerAsciiFile::packString(const std::string& value, const char *nam return success; } -BOOL LLDataPackerAsciiFile::unpackString(std::string& value, const char *name) +bool LLDataPackerAsciiFile::unpackString(std::string& value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /* Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } value = valuestr; return success; } -BOOL LLDataPackerAsciiFile::packBinaryData(const U8 *value, S32 size, const char *name) +bool LLDataPackerAsciiFile::packBinaryData(const U8 *value, S32 size, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) @@ -1627,13 +1627,13 @@ BOOL LLDataPackerAsciiFile::packBinaryData(const U8 *value, S32 size, const char } -BOOL LLDataPackerAsciiFile::unpackBinaryData(U8 *value, S32 &size, const char *name) +bool LLDataPackerAsciiFile::unpackBinaryData(U8 *value, S32 &size, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore*/ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } char *cur_pos = &valuestr[0]; @@ -1652,9 +1652,9 @@ BOOL LLDataPackerAsciiFile::unpackBinaryData(U8 *value, S32 &size, const char *n } -BOOL LLDataPackerAsciiFile::packBinaryDataFixed(const U8 *value, S32 size, const char *name) +bool LLDataPackerAsciiFile::packBinaryDataFixed(const U8 *value, S32 size, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) @@ -1681,13 +1681,13 @@ BOOL LLDataPackerAsciiFile::packBinaryDataFixed(const U8 *value, S32 size, const } -BOOL LLDataPackerAsciiFile::unpackBinaryDataFixed(U8 *value, S32 size, const char *name) +bool LLDataPackerAsciiFile::unpackBinaryDataFixed(U8 *value, S32 size, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore*/ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } char *cur_pos = &valuestr[0]; @@ -1705,9 +1705,9 @@ BOOL LLDataPackerAsciiFile::unpackBinaryDataFixed(U8 *value, S32 size, const cha -BOOL LLDataPackerAsciiFile::packU8(const U8 value, const char *name) +bool LLDataPackerAsciiFile::packU8(const U8 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1723,13 +1723,13 @@ BOOL LLDataPackerAsciiFile::packU8(const U8 value, const char *name) } -BOOL LLDataPackerAsciiFile::unpackU8(U8 &value, const char *name) +bool LLDataPackerAsciiFile::unpackU8(U8 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } S32 in_val; @@ -1738,9 +1738,9 @@ BOOL LLDataPackerAsciiFile::unpackU8(U8 &value, const char *name) return success; } -BOOL LLDataPackerAsciiFile::packU16(const U16 value, const char *name) +bool LLDataPackerAsciiFile::packU16(const U16 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1754,13 +1754,13 @@ BOOL LLDataPackerAsciiFile::packU16(const U16 value, const char *name) } -BOOL LLDataPackerAsciiFile::unpackU16(U16 &value, const char *name) +bool LLDataPackerAsciiFile::unpackU16(U16 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } S32 in_val; @@ -1769,9 +1769,9 @@ BOOL LLDataPackerAsciiFile::unpackU16(U16 &value, const char *name) return success; } -BOOL LLDataPackerAsciiFile::packS16(const S16 value, const char *name) +bool LLDataPackerAsciiFile::packS16(const S16 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1785,13 +1785,13 @@ BOOL LLDataPackerAsciiFile::packS16(const S16 value, const char *name) } -BOOL LLDataPackerAsciiFile::unpackS16(S16 &value, const char *name) +bool LLDataPackerAsciiFile::unpackS16(S16 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } S32 in_val; @@ -1800,9 +1800,9 @@ BOOL LLDataPackerAsciiFile::unpackS16(S16 &value, const char *name) return success; } -BOOL LLDataPackerAsciiFile::packU32(const U32 value, const char *name) +bool LLDataPackerAsciiFile::packU32(const U32 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1816,13 +1816,13 @@ BOOL LLDataPackerAsciiFile::packU32(const U32 value, const char *name) } -BOOL LLDataPackerAsciiFile::unpackU32(U32 &value, const char *name) +bool LLDataPackerAsciiFile::unpackU32(U32 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%u", &value); @@ -1830,9 +1830,9 @@ BOOL LLDataPackerAsciiFile::unpackU32(U32 &value, const char *name) } -BOOL LLDataPackerAsciiFile::packS32(const S32 value, const char *name) +bool LLDataPackerAsciiFile::packS32(const S32 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1846,13 +1846,13 @@ BOOL LLDataPackerAsciiFile::packS32(const S32 value, const char *name) } -BOOL LLDataPackerAsciiFile::unpackS32(S32 &value, const char *name) +bool LLDataPackerAsciiFile::unpackS32(S32 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%d", &value); @@ -1860,9 +1860,9 @@ BOOL LLDataPackerAsciiFile::unpackS32(S32 &value, const char *name) } -BOOL LLDataPackerAsciiFile::packF32(const F32 value, const char *name) +bool LLDataPackerAsciiFile::packF32(const F32 value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1876,13 +1876,13 @@ BOOL LLDataPackerAsciiFile::packF32(const F32 value, const char *name) } -BOOL LLDataPackerAsciiFile::unpackF32(F32 &value, const char *name) +bool LLDataPackerAsciiFile::unpackF32(F32 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f", &value); @@ -1890,9 +1890,9 @@ BOOL LLDataPackerAsciiFile::unpackF32(F32 &value, const char *name) } -BOOL LLDataPackerAsciiFile::packColor4(const LLColor4 &value, const char *name) +bool LLDataPackerAsciiFile::packColor4(const LLColor4 &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1906,22 +1906,22 @@ BOOL LLDataPackerAsciiFile::packColor4(const LLColor4 &value, const char *name) } -BOOL LLDataPackerAsciiFile::unpackColor4(LLColor4 &value, const char *name) +bool LLDataPackerAsciiFile::unpackColor4(LLColor4 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f %f %f %f", &value.mV[0], &value.mV[1], &value.mV[2], &value.mV[3]); return success; } -BOOL LLDataPackerAsciiFile::packColor4U(const LLColor4U &value, const char *name) +bool LLDataPackerAsciiFile::packColor4U(const LLColor4U &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1935,13 +1935,13 @@ BOOL LLDataPackerAsciiFile::packColor4U(const LLColor4U &value, const char *name } -BOOL LLDataPackerAsciiFile::unpackColor4U(LLColor4U &value, const char *name) +bool LLDataPackerAsciiFile::unpackColor4U(LLColor4U &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } S32 r, g, b, a; @@ -1955,9 +1955,9 @@ BOOL LLDataPackerAsciiFile::unpackColor4U(LLColor4U &value, const char *name) } -BOOL LLDataPackerAsciiFile::packVector2(const LLVector2 &value, const char *name) +bool LLDataPackerAsciiFile::packVector2(const LLVector2 &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -1971,13 +1971,13 @@ BOOL LLDataPackerAsciiFile::packVector2(const LLVector2 &value, const char *name } -BOOL LLDataPackerAsciiFile::unpackVector2(LLVector2 &value, const char *name) +bool LLDataPackerAsciiFile::unpackVector2(LLVector2 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f %f", &value.mV[0], &value.mV[1]); @@ -1985,9 +1985,9 @@ BOOL LLDataPackerAsciiFile::unpackVector2(LLVector2 &value, const char *name) } -BOOL LLDataPackerAsciiFile::packVector3(const LLVector3 &value, const char *name) +bool LLDataPackerAsciiFile::packVector3(const LLVector3 &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -2001,22 +2001,22 @@ BOOL LLDataPackerAsciiFile::packVector3(const LLVector3 &value, const char *name } -BOOL LLDataPackerAsciiFile::unpackVector3(LLVector3 &value, const char *name) +bool LLDataPackerAsciiFile::unpackVector3(LLVector3 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f %f %f", &value.mV[0], &value.mV[1], &value.mV[2]); return success; } -BOOL LLDataPackerAsciiFile::packVector4(const LLVector4 &value, const char *name) +bool LLDataPackerAsciiFile::packVector4(const LLVector4 &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); if (mFP) { @@ -2030,13 +2030,13 @@ BOOL LLDataPackerAsciiFile::packVector4(const LLVector4 &value, const char *name } -BOOL LLDataPackerAsciiFile::unpackVector4(LLVector4 &value, const char *name) +bool LLDataPackerAsciiFile::unpackVector4(LLVector4 &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } sscanf(valuestr,"%f %f %f %f", &value.mV[0], &value.mV[1], &value.mV[2], &value.mV[3]); @@ -2044,9 +2044,9 @@ BOOL LLDataPackerAsciiFile::unpackVector4(LLVector4 &value, const char *name) } -BOOL LLDataPackerAsciiFile::packUUID(const LLUUID &value, const char *name) +bool LLDataPackerAsciiFile::packUUID(const LLUUID &value, const char *name) { - BOOL success = TRUE; + bool success = true; writeIndentedName(name); std::string tmp_str; value.toString(tmp_str); @@ -2062,13 +2062,13 @@ BOOL LLDataPackerAsciiFile::packUUID(const LLUUID &value, const char *name) } -BOOL LLDataPackerAsciiFile::unpackUUID(LLUUID &value, const char *name) +bool LLDataPackerAsciiFile::unpackUUID(LLUUID &value, const char *name) { - BOOL success = TRUE; + bool success = true; char valuestr[DP_BUFSIZE]; /*Flawfinder: ignore */ if (!getValueStr(name, valuestr, DP_BUFSIZE)) { - return FALSE; + return false; } char tmp_str[64]; /*Flawfinder: ignore */ @@ -2100,9 +2100,9 @@ void LLDataPackerAsciiFile::writeIndentedName(const char *name) } } -BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 value_len) +bool LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 value_len) { - BOOL success = FALSE; + bool success = false; char buffer[DP_BUFSIZE]; /*Flawfinder: ignore*/ char keyword[DP_BUFSIZE]; /*Flawfinder: ignore*/ char value[DP_BUFSIZE]; /*Flawfinder: ignore*/ @@ -2117,7 +2117,7 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v if (0 != fgetpos(mFP, &last_pos)) // 0==success for fgetpos { LL_WARNS() << "Data packer failed to fgetpos" << LL_ENDL; - return FALSE; + return false; } if (fgets(buffer, DP_BUFSIZE, mFP) == NULL) @@ -2131,20 +2131,20 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v { LL_WARNS() << "Data packer could not get the keyword!" << LL_ENDL; fsetpos(mFP, &last_pos); - return FALSE; + return false; } if (strcmp(keyword, name)) { LL_WARNS() << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << LL_ENDL; fsetpos(mFP, &last_pos); - return FALSE; + return false; } S32 in_value_len = (S32)strlen(value)+1; /*Flawfinder: ignore*/ S32 min_len = llmin(in_value_len, value_len); memcpy(out_value, value, min_len); /*Flawfinder: ignore*/ out_value[min_len-1] = 0; - success = TRUE; + success = true; } else if (mInputStream) { @@ -2154,19 +2154,19 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v if (!keyword[0]) { LL_WARNS() << "Data packer could not get the keyword!" << LL_ENDL; - return FALSE; + return false; } if (strcmp(keyword, name)) { LL_WARNS() << "Data packer expecting keyword of type " << name << ", got " << keyword << " instead!" << LL_ENDL; - return FALSE; + return false; } S32 in_value_len = (S32)strlen(value)+1; /*Flawfinder: ignore*/ S32 min_len = llmin(in_value_len, value_len); memcpy(out_value, value, min_len); /*Flawfinder: ignore*/ out_value[min_len-1] = 0; - success = TRUE; + success = true; } return success; diff --git a/indra/llmessage/lldatapacker.h b/indra/llmessage/lldatapacker.h index ac28cadbce..8e980d8611 100644 --- a/indra/llmessage/lldatapacker.h +++ b/indra/llmessage/lldatapacker.h @@ -43,72 +43,72 @@ public: virtual void reset(); virtual void dumpBufferToLog(); - virtual BOOL hasNext() const = 0; + virtual bool hasNext() const = 0; - virtual BOOL packString(const std::string& value, const char *name) = 0; - virtual BOOL unpackString(std::string& value, const char *name) = 0; + virtual bool packString(const std::string& value, const char *name) = 0; + virtual bool unpackString(std::string& value, const char *name) = 0; - virtual BOOL packBinaryData(const U8 *value, S32 size, const char *name) = 0; - virtual BOOL unpackBinaryData(U8 *value, S32 &size, const char *name) = 0; + virtual bool packBinaryData(const U8 *value, S32 size, const char *name) = 0; + virtual bool unpackBinaryData(U8 *value, S32 &size, const char *name) = 0; // Constant size binary data packing - virtual BOOL packBinaryDataFixed(const U8 *value, S32 size, const char *name) = 0; - virtual BOOL unpackBinaryDataFixed(U8 *value, S32 size, const char *name) = 0; + virtual bool packBinaryDataFixed(const U8 *value, S32 size, const char *name) = 0; + virtual bool unpackBinaryDataFixed(U8 *value, S32 size, const char *name) = 0; - virtual BOOL packU8(const U8 value, const char *name) = 0; - virtual BOOL unpackU8(U8 &value, const char *name) = 0; + virtual bool packU8(const U8 value, const char *name) = 0; + virtual bool unpackU8(U8 &value, const char *name) = 0; - virtual BOOL packU16(const U16 value, const char *name) = 0; - virtual BOOL unpackU16(U16 &value, const char *name) = 0; - BOOL unpackU16s(U16 *value, S32 count, const char *name); + virtual bool packU16(const U16 value, const char *name) = 0; + virtual bool unpackU16(U16 &value, const char *name) = 0; + bool unpackU16s(U16 *value, S32 count, const char *name); - virtual BOOL packS16(const S16 value, const char *name) = 0; - virtual BOOL unpackS16(S16 &value, const char *name) = 0; - BOOL unpackS16s(S16 *value, S32 count, const char *name); + virtual bool packS16(const S16 value, const char *name) = 0; + virtual bool unpackS16(S16 &value, const char *name) = 0; + bool unpackS16s(S16 *value, S32 count, const char *name); - virtual BOOL packU32(const U32 value, const char *name) = 0; - virtual BOOL unpackU32(U32 &value, const char *name) = 0; + virtual bool packU32(const U32 value, const char *name) = 0; + virtual bool unpackU32(U32 &value, const char *name) = 0; - virtual BOOL packS32(const S32 value, const char *name) = 0; - virtual BOOL unpackS32(S32 &value, const char *name) = 0; + virtual bool packS32(const S32 value, const char *name) = 0; + virtual bool unpackS32(S32 &value, const char *name) = 0; - virtual BOOL packF32(const F32 value, const char *name) = 0; - virtual BOOL unpackF32(F32 &value, const char *name) = 0; - BOOL unpackF32s(F32 *values, S32 count, const char *name); + virtual bool packF32(const F32 value, const char *name) = 0; + virtual bool unpackF32(F32 &value, const char *name) = 0; + bool unpackF32s(F32 *values, S32 count, const char *name); // Packs a float into an integer, using the given size // and picks the right U* data type to pack into. - BOOL packFixed(const F32 value, const char *name, - const BOOL is_signed, const U32 int_bits, const U32 frac_bits); - BOOL unpackFixed(F32 &value, const char *name, - const BOOL is_signed, const U32 int_bits, const U32 frac_bits); + bool packFixed(const F32 value, const char *name, + const bool is_signed, const U32 int_bits, const U32 frac_bits); + bool unpackFixed(F32 &value, const char *name, + const bool is_signed, const U32 int_bits, const U32 frac_bits); - virtual BOOL packColor4(const LLColor4 &value, const char *name) = 0; - virtual BOOL unpackColor4(LLColor4 &value, const char *name) = 0; + virtual bool packColor4(const LLColor4 &value, const char *name) = 0; + virtual bool unpackColor4(LLColor4 &value, const char *name) = 0; - virtual BOOL packColor4U(const LLColor4U &value, const char *name) = 0; - virtual BOOL unpackColor4U(LLColor4U &value, const char *name) = 0; - BOOL unpackColor4Us(LLColor4U *values, S32 count, const char *name); + virtual bool packColor4U(const LLColor4U &value, const char *name) = 0; + virtual bool unpackColor4U(LLColor4U &value, const char *name) = 0; + bool unpackColor4Us(LLColor4U *values, S32 count, const char *name); - virtual BOOL packVector2(const LLVector2 &value, const char *name) = 0; - virtual BOOL unpackVector2(LLVector2 &value, const char *name) = 0; + virtual bool packVector2(const LLVector2 &value, const char *name) = 0; + virtual bool unpackVector2(LLVector2 &value, const char *name) = 0; - virtual BOOL packVector3(const LLVector3 &value, const char *name) = 0; - virtual BOOL unpackVector3(LLVector3 &value, const char *name) = 0; + virtual bool packVector3(const LLVector3 &value, const char *name) = 0; + virtual bool unpackVector3(LLVector3 &value, const char *name) = 0; - virtual BOOL packVector4(const LLVector4 &value, const char *name) = 0; - virtual BOOL unpackVector4(LLVector4 &value, const char *name) = 0; + virtual bool packVector4(const LLVector4 &value, const char *name) = 0; + virtual bool unpackVector4(LLVector4 &value, const char *name) = 0; - virtual BOOL packUUID(const LLUUID &value, const char *name) = 0; - virtual BOOL unpackUUID(LLUUID &value, const char *name) = 0; - BOOL unpackUUIDs(LLUUID *values, S32 count, const char *name); + virtual bool packUUID(const LLUUID &value, const char *name) = 0; + virtual bool unpackUUID(LLUUID &value, const char *name) = 0; + bool unpackUUIDs(LLUUID *values, S32 count, const char *name); U32 getPassFlags() const { return mPassFlags; } void setPassFlags(U32 flags) { mPassFlags = flags; } protected: LLDataPacker(); protected: U32 mPassFlags; - BOOL mWriteEnabled; // disable this to do things like determine filesize without actually copying data + bool mWriteEnabled; // disable this to do things like determine filesize without actually copying data }; class LLDataPackerBinaryBuffer : public LLDataPacker @@ -120,7 +120,7 @@ public: mCurBufferp(bufferp), mBufferSize(size) { - mWriteEnabled = TRUE; + mWriteEnabled = true; } LLDataPackerBinaryBuffer() @@ -131,58 +131,58 @@ public: { } - /*virtual*/ BOOL packString(const std::string& value, const char *name); - /*virtual*/ BOOL unpackString(std::string& value, const char *name); + /*virtual*/ bool packString(const std::string& value, const char *name); + /*virtual*/ bool unpackString(std::string& value, const char *name); - /*virtual*/ BOOL packBinaryData(const U8 *value, S32 size, const char *name); - /*virtual*/ BOOL unpackBinaryData(U8 *value, S32 &size, const char *name); + /*virtual*/ bool packBinaryData(const U8 *value, S32 size, const char *name); + /*virtual*/ bool unpackBinaryData(U8 *value, S32 &size, const char *name); // Constant size binary data packing - /*virtual*/ BOOL packBinaryDataFixed(const U8 *value, S32 size, const char *name); - /*virtual*/ BOOL unpackBinaryDataFixed(U8 *value, S32 size, const char *name); + /*virtual*/ bool packBinaryDataFixed(const U8 *value, S32 size, const char *name); + /*virtual*/ bool unpackBinaryDataFixed(U8 *value, S32 size, const char *name); - /*virtual*/ BOOL packU8(const U8 value, const char *name); - /*virtual*/ BOOL unpackU8(U8 &value, const char *name); + /*virtual*/ bool packU8(const U8 value, const char *name); + /*virtual*/ bool unpackU8(U8 &value, const char *name); - /*virtual*/ BOOL packU16(const U16 value, const char *name); - /*virtual*/ BOOL unpackU16(U16 &value, const char *name); + /*virtual*/ bool packU16(const U16 value, const char *name); + /*virtual*/ bool unpackU16(U16 &value, const char *name); - /*virtual*/ BOOL packS16(const S16 value, const char *name); - /*virtual*/ BOOL unpackS16(S16 &value, const char *name); + /*virtual*/ bool packS16(const S16 value, const char *name); + /*virtual*/ bool unpackS16(S16 &value, const char *name); - /*virtual*/ BOOL packU32(const U32 value, const char *name); - /*virtual*/ BOOL unpackU32(U32 &value, const char *name); + /*virtual*/ bool packU32(const U32 value, const char *name); + /*virtual*/ bool unpackU32(U32 &value, const char *name); - /*virtual*/ BOOL packS32(const S32 value, const char *name); - /*virtual*/ BOOL unpackS32(S32 &value, const char *name); + /*virtual*/ bool packS32(const S32 value, const char *name); + /*virtual*/ bool unpackS32(S32 &value, const char *name); - /*virtual*/ BOOL packF32(const F32 value, const char *name); - /*virtual*/ BOOL unpackF32(F32 &value, const char *name); + /*virtual*/ bool packF32(const F32 value, const char *name); + /*virtual*/ bool unpackF32(F32 &value, const char *name); - /*virtual*/ BOOL packColor4(const LLColor4 &value, const char *name); - /*virtual*/ BOOL unpackColor4(LLColor4 &value, const char *name); + /*virtual*/ bool packColor4(const LLColor4 &value, const char *name); + /*virtual*/ bool unpackColor4(LLColor4 &value, const char *name); - /*virtual*/ BOOL packColor4U(const LLColor4U &value, const char *name); - /*virtual*/ BOOL unpackColor4U(LLColor4U &value, const char *name); + /*virtual*/ bool packColor4U(const LLColor4U &value, const char *name); + /*virtual*/ bool unpackColor4U(LLColor4U &value, const char *name); - /*virtual*/ BOOL packVector2(const LLVector2 &value, const char *name); - /*virtual*/ BOOL unpackVector2(LLVector2 &value, const char *name); + /*virtual*/ bool packVector2(const LLVector2 &value, const char *name); + /*virtual*/ bool unpackVector2(LLVector2 &value, const char *name); - /*virtual*/ BOOL packVector3(const LLVector3 &value, const char *name); - /*virtual*/ BOOL unpackVector3(LLVector3 &value, const char *name); + /*virtual*/ bool packVector3(const LLVector3 &value, const char *name); + /*virtual*/ bool unpackVector3(LLVector3 &value, const char *name); - /*virtual*/ BOOL packVector4(const LLVector4 &value, const char *name); - /*virtual*/ BOOL unpackVector4(LLVector4 &value, const char *name); + /*virtual*/ bool packVector4(const LLVector4 &value, const char *name); + /*virtual*/ bool unpackVector4(LLVector4 &value, const char *name); - /*virtual*/ BOOL packUUID(const LLUUID &value, const char *name); - /*virtual*/ BOOL unpackUUID(LLUUID &value, const char *name); + /*virtual*/ bool packUUID(const LLUUID &value, const char *name); + /*virtual*/ bool unpackUUID(LLUUID &value, const char *name); S32 getCurrentSize() const { return (S32)(mCurBufferp - mBufferp); } S32 getBufferSize() const { return mBufferSize; } const U8* getBuffer() const { return mBufferp; } void reset() { mCurBufferp = mBufferp; mWriteEnabled = (mCurBufferp != NULL); } void shift(S32 offset) { reset(); mCurBufferp += offset;} - void freeBuffer() { delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; mWriteEnabled = FALSE; } + void freeBuffer() { delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; mWriteEnabled = false; } void assignBuffer(U8 *bufferp, S32 size) { if(mBufferp && mBufferp != bufferp) @@ -192,31 +192,31 @@ public: mBufferp = bufferp; mCurBufferp = bufferp; mBufferSize = size; - mWriteEnabled = TRUE; + mWriteEnabled = true; } const LLDataPackerBinaryBuffer& operator=(const LLDataPackerBinaryBuffer &a); - /*virtual*/ BOOL hasNext() const { return getCurrentSize() < getBufferSize(); } + /*virtual*/ bool hasNext() const { return getCurrentSize() < getBufferSize(); } /*virtual*/ void dumpBufferToLog(); protected: - inline BOOL verifyLength(const S32 data_size, const char *name); + inline bool verifyLength(const S32 data_size, const char *name); U8 *mBufferp; U8 *mCurBufferp; S32 mBufferSize; }; -inline BOOL LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const char *name) +inline bool LLDataPackerBinaryBuffer::verifyLength(const S32 data_size, const char *name) { if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size) { LL_WARNS() << "Buffer overflow in BinaryBuffer length verify, field name " << name << "!" << LL_ENDL; LL_WARNS() << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } class LLDataPackerAsciiBuffer : public LLDataPacker @@ -228,8 +228,8 @@ public: mCurBufferp = bufferp; mBufferSize = size; mPassFlags = 0; - mIncludeNames = FALSE; - mWriteEnabled = TRUE; + mIncludeNames = false; + mWriteEnabled = true; } LLDataPackerAsciiBuffer() @@ -238,57 +238,57 @@ public: mCurBufferp = NULL; mBufferSize = 0; mPassFlags = 0; - mIncludeNames = FALSE; - mWriteEnabled = FALSE; + mIncludeNames = false; + mWriteEnabled = false; } - /*virtual*/ BOOL packString(const std::string& value, const char *name); - /*virtual*/ BOOL unpackString(std::string& value, const char *name); + /*virtual*/ bool packString(const std::string& value, const char *name); + /*virtual*/ bool unpackString(std::string& value, const char *name); - /*virtual*/ BOOL packBinaryData(const U8 *value, S32 size, const char *name); - /*virtual*/ BOOL unpackBinaryData(U8 *value, S32 &size, const char *name); + /*virtual*/ bool packBinaryData(const U8 *value, S32 size, const char *name); + /*virtual*/ bool unpackBinaryData(U8 *value, S32 &size, const char *name); // Constant size binary data packing - /*virtual*/ BOOL packBinaryDataFixed(const U8 *value, S32 size, const char *name); - /*virtual*/ BOOL unpackBinaryDataFixed(U8 *value, S32 size, const char *name); + /*virtual*/ bool packBinaryDataFixed(const U8 *value, S32 size, const char *name); + /*virtual*/ bool unpackBinaryDataFixed(U8 *value, S32 size, const char *name); - /*virtual*/ BOOL packU8(const U8 value, const char *name); - /*virtual*/ BOOL unpackU8(U8 &value, const char *name); + /*virtual*/ bool packU8(const U8 value, const char *name); + /*virtual*/ bool unpackU8(U8 &value, const char *name); - /*virtual*/ BOOL packU16(const U16 value, const char *name); - /*virtual*/ BOOL unpackU16(U16 &value, const char *name); + /*virtual*/ bool packU16(const U16 value, const char *name); + /*virtual*/ bool unpackU16(U16 &value, const char *name); - /*virtual*/ BOOL packS16(const S16 value, const char *name); - /*virtual*/ BOOL unpackS16(S16 &value, const char *name); + /*virtual*/ bool packS16(const S16 value, const char *name); + /*virtual*/ bool unpackS16(S16 &value, const char *name); - /*virtual*/ BOOL packU32(const U32 value, const char *name); - /*virtual*/ BOOL unpackU32(U32 &value, const char *name); + /*virtual*/ bool packU32(const U32 value, const char *name); + /*virtual*/ bool unpackU32(U32 &value, const char *name); - /*virtual*/ BOOL packS32(const S32 value, const char *name); - /*virtual*/ BOOL unpackS32(S32 &value, const char *name); + /*virtual*/ bool packS32(const S32 value, const char *name); + /*virtual*/ bool unpackS32(S32 &value, const char *name); - /*virtual*/ BOOL packF32(const F32 value, const char *name); - /*virtual*/ BOOL unpackF32(F32 &value, const char *name); + /*virtual*/ bool packF32(const F32 value, const char *name); + /*virtual*/ bool unpackF32(F32 &value, const char *name); - /*virtual*/ BOOL packColor4(const LLColor4 &value, const char *name); - /*virtual*/ BOOL unpackColor4(LLColor4 &value, const char *name); + /*virtual*/ bool packColor4(const LLColor4 &value, const char *name); + /*virtual*/ bool unpackColor4(LLColor4 &value, const char *name); - /*virtual*/ BOOL packColor4U(const LLColor4U &value, const char *name); - /*virtual*/ BOOL unpackColor4U(LLColor4U &value, const char *name); + /*virtual*/ bool packColor4U(const LLColor4U &value, const char *name); + /*virtual*/ bool unpackColor4U(LLColor4U &value, const char *name); - /*virtual*/ BOOL packVector2(const LLVector2 &value, const char *name); - /*virtual*/ BOOL unpackVector2(LLVector2 &value, const char *name); + /*virtual*/ bool packVector2(const LLVector2 &value, const char *name); + /*virtual*/ bool unpackVector2(LLVector2 &value, const char *name); - /*virtual*/ BOOL packVector3(const LLVector3 &value, const char *name); - /*virtual*/ BOOL unpackVector3(LLVector3 &value, const char *name); + /*virtual*/ bool packVector3(const LLVector3 &value, const char *name); + /*virtual*/ bool unpackVector3(LLVector3 &value, const char *name); - /*virtual*/ BOOL packVector4(const LLVector4 &value, const char *name); - /*virtual*/ BOOL unpackVector4(LLVector4 &value, const char *name); + /*virtual*/ bool packVector4(const LLVector4 &value, const char *name); + /*virtual*/ bool unpackVector4(LLVector4 &value, const char *name); - /*virtual*/ BOOL packUUID(const LLUUID &value, const char *name); - /*virtual*/ BOOL unpackUUID(LLUUID &value, const char *name); + /*virtual*/ bool packUUID(const LLUUID &value, const char *name); + /*virtual*/ bool unpackUUID(LLUUID &value, const char *name); - void setIncludeNames(BOOL b) { mIncludeNames = b; } + void setIncludeNames(bool b) { mIncludeNames = b; } // Include the trailing NULL so it's always a valid string S32 getCurrentSize() const { return (S32)(mCurBufferp - mBufferp) + 1; } @@ -296,7 +296,7 @@ public: S32 getBufferSize() const { return mBufferSize; } /*virtual*/ void reset() { mCurBufferp = mBufferp; mWriteEnabled = (mCurBufferp != NULL); } - /*virtual*/ BOOL hasNext() const { return getCurrentSize() < getBufferSize(); } + /*virtual*/ bool hasNext() const { return getCurrentSize() < getBufferSize(); } inline void freeBuffer(); inline void assignBuffer(char* bufferp, S32 size); @@ -304,15 +304,15 @@ public: protected: void writeIndentedName(const char *name); - BOOL getValueStr(const char *name, char *out_value, const S32 value_len); + bool getValueStr(const char *name, char *out_value, const S32 value_len); protected: - inline BOOL verifyLength(const S32 data_size, const char *name); + inline bool verifyLength(const S32 data_size, const char *name); char *mBufferp; char *mCurBufferp; S32 mBufferSize; - BOOL mIncludeNames; // useful for debugging, print the name of each field + bool mIncludeNames; // useful for debugging, print the name of each field }; inline void LLDataPackerAsciiBuffer::freeBuffer() @@ -320,7 +320,7 @@ inline void LLDataPackerAsciiBuffer::freeBuffer() delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; - mWriteEnabled = FALSE; + mWriteEnabled = false; } inline void LLDataPackerAsciiBuffer::assignBuffer(char* bufferp, S32 size) @@ -328,19 +328,19 @@ inline void LLDataPackerAsciiBuffer::assignBuffer(char* bufferp, S32 size) mBufferp = bufferp; mCurBufferp = bufferp; mBufferSize = size; - mWriteEnabled = TRUE; + mWriteEnabled = true; } -inline BOOL LLDataPackerAsciiBuffer::verifyLength(const S32 data_size, const char *name) +inline bool LLDataPackerAsciiBuffer::verifyLength(const S32 data_size, const char *name) { if (mWriteEnabled && (mCurBufferp - mBufferp) > mBufferSize - data_size) { LL_WARNS() << "Buffer overflow in AsciiBuffer length verify, field name " << name << "!" << LL_ENDL; LL_WARNS() << "Current pos: " << (int)(mCurBufferp - mBufferp) << " Buffer size: " << mBufferSize << " Data size: " << data_size << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } class LLDataPackerAsciiFile : public LLDataPacker @@ -362,7 +362,7 @@ public: mOutputStream(&output_stream), mInputStream(NULL) { - mWriteEnabled = TRUE; + mWriteEnabled = true; } LLDataPackerAsciiFile(std::istream& input_stream, const S32 indent = 2) @@ -374,55 +374,55 @@ public: { } - /*virtual*/ BOOL packString(const std::string& value, const char *name); - /*virtual*/ BOOL unpackString(std::string& value, const char *name); + /*virtual*/ bool packString(const std::string& value, const char *name); + /*virtual*/ bool unpackString(std::string& value, const char *name); - /*virtual*/ BOOL packBinaryData(const U8 *value, S32 size, const char *name); - /*virtual*/ BOOL unpackBinaryData(U8 *value, S32 &size, const char *name); + /*virtual*/ bool packBinaryData(const U8 *value, S32 size, const char *name); + /*virtual*/ bool unpackBinaryData(U8 *value, S32 &size, const char *name); - /*virtual*/ BOOL packBinaryDataFixed(const U8 *value, S32 size, const char *name); - /*virtual*/ BOOL unpackBinaryDataFixed(U8 *value, S32 size, const char *name); + /*virtual*/ bool packBinaryDataFixed(const U8 *value, S32 size, const char *name); + /*virtual*/ bool unpackBinaryDataFixed(U8 *value, S32 size, const char *name); - /*virtual*/ BOOL packU8(const U8 value, const char *name); - /*virtual*/ BOOL unpackU8(U8 &value, const char *name); + /*virtual*/ bool packU8(const U8 value, const char *name); + /*virtual*/ bool unpackU8(U8 &value, const char *name); - /*virtual*/ BOOL packU16(const U16 value, const char *name); - /*virtual*/ BOOL unpackU16(U16 &value, const char *name); + /*virtual*/ bool packU16(const U16 value, const char *name); + /*virtual*/ bool unpackU16(U16 &value, const char *name); - /*virtual*/ BOOL packS16(const S16 value, const char *name); - /*virtual*/ BOOL unpackS16(S16 &value, const char *name); + /*virtual*/ bool packS16(const S16 value, const char *name); + /*virtual*/ bool unpackS16(S16 &value, const char *name); - /*virtual*/ BOOL packU32(const U32 value, const char *name); - /*virtual*/ BOOL unpackU32(U32 &value, const char *name); + /*virtual*/ bool packU32(const U32 value, const char *name); + /*virtual*/ bool unpackU32(U32 &value, const char *name); - /*virtual*/ BOOL packS32(const S32 value, const char *name); - /*virtual*/ BOOL unpackS32(S32 &value, const char *name); + /*virtual*/ bool packS32(const S32 value, const char *name); + /*virtual*/ bool unpackS32(S32 &value, const char *name); - /*virtual*/ BOOL packF32(const F32 value, const char *name); - /*virtual*/ BOOL unpackF32(F32 &value, const char *name); + /*virtual*/ bool packF32(const F32 value, const char *name); + /*virtual*/ bool unpackF32(F32 &value, const char *name); - /*virtual*/ BOOL packColor4(const LLColor4 &value, const char *name); - /*virtual*/ BOOL unpackColor4(LLColor4 &value, const char *name); + /*virtual*/ bool packColor4(const LLColor4 &value, const char *name); + /*virtual*/ bool unpackColor4(LLColor4 &value, const char *name); - /*virtual*/ BOOL packColor4U(const LLColor4U &value, const char *name); - /*virtual*/ BOOL unpackColor4U(LLColor4U &value, const char *name); + /*virtual*/ bool packColor4U(const LLColor4U &value, const char *name); + /*virtual*/ bool unpackColor4U(LLColor4U &value, const char *name); - /*virtual*/ BOOL packVector2(const LLVector2 &value, const char *name); - /*virtual*/ BOOL unpackVector2(LLVector2 &value, const char *name); + /*virtual*/ bool packVector2(const LLVector2 &value, const char *name); + /*virtual*/ bool unpackVector2(LLVector2 &value, const char *name); - /*virtual*/ BOOL packVector3(const LLVector3 &value, const char *name); - /*virtual*/ BOOL unpackVector3(LLVector3 &value, const char *name); + /*virtual*/ bool packVector3(const LLVector3 &value, const char *name); + /*virtual*/ bool unpackVector3(LLVector3 &value, const char *name); - /*virtual*/ BOOL packVector4(const LLVector4 &value, const char *name); - /*virtual*/ BOOL unpackVector4(LLVector4 &value, const char *name); + /*virtual*/ bool packVector4(const LLVector4 &value, const char *name); + /*virtual*/ bool unpackVector4(LLVector4 &value, const char *name); - /*virtual*/ BOOL packUUID(const LLUUID &value, const char *name); - /*virtual*/ BOOL unpackUUID(LLUUID &value, const char *name); + /*virtual*/ bool packUUID(const LLUUID &value, const char *name); + /*virtual*/ bool unpackUUID(LLUUID &value, const char *name); protected: void writeIndentedName(const char *name); - BOOL getValueStr(const char *name, char *out_value, const S32 value_len); + bool getValueStr(const char *name, char *out_value, const S32 value_len); - /*virtual*/ BOOL hasNext() const { return true; } + /*virtual*/ bool hasNext() const { return true; } protected: S32 mIndent; diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 98b8919660..3ac07626b0 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -460,7 +460,7 @@ bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) return true; } - BOOL update_visuals = false; + bool update_visuals = false; for (motion_vec_t::iterator iter = mMotions.begin(); iter != mMotions.end(); ++iter) @@ -707,7 +707,7 @@ bool LLPhysicsMotion::onUpdate(F32 time) const F32 min_delta = (1.0001f-lod_factor)*0.4f; if (llabs(position_diff_local) > min_delta) { - update_visuals = TRUE; + update_visuals = true; mPositionLastUpdate_local = position_new_local; } } -- cgit v1.3 From f1c97f4057833220a2e9ac045d701208e30457d1 Mon Sep 17 00:00:00 2001 From: Lars Næsbye Christensen Date: Sun, 18 Feb 2024 16:41:22 +0100 Subject: misc: BOOL to bool --- indra/llmath/llvolume.cpp | 172 +++++++++++++-------------- indra/llmath/llvolume.h | 50 ++++---- indra/llmath/xform.cpp | 4 +- indra/llmath/xform.h | 14 +-- indra/llmessage/llassetstorage.cpp | 46 +++---- indra/llmessage/llassetstorage.h | 22 ++-- indra/llmessage/llcachename.cpp | 30 ++--- indra/llmessage/llcachename.h | 8 +- indra/llmessage/llcircuit.cpp | 60 +++++----- indra/llmessage/llcircuit.h | 34 +++--- indra/llmessage/llclassifiedflags.cpp | 4 +- indra/llmessage/llclassifiedflags.h | 2 +- indra/llmessage/llhost.cpp | 6 +- indra/llmessage/llhost.h | 2 +- indra/llmessage/llinstantmessage.cpp | 4 +- indra/llmessage/llinstantmessage.h | 4 +- indra/llmessage/llmail.cpp | 8 +- indra/llmessage/llmail.h | 4 +- indra/llmessage/llmessagebuilder.h | 12 +- indra/llmessage/llmessagereader.cpp | 8 +- indra/llmessage/llmessagereader.h | 5 +- indra/llmessage/llmessagetemplateparser.cpp | 64 +++++----- indra/llmessage/llmessagethrottle.cpp | 16 +-- indra/llmessage/llmessagethrottle.h | 4 +- indra/llmessage/llnamevalue.cpp | 4 +- indra/llmessage/llnamevalue.h | 4 +- indra/llmessage/llpacketack.cpp | 2 +- indra/llmessage/llpacketring.cpp | 12 +- indra/llmessage/llpacketring.h | 12 +- indra/llmessage/llpartdata.cpp | 80 ++++++------- indra/llmessage/llpartdata.h | 16 +-- indra/llmessage/llsdmessagebuilder.cpp | 22 ++-- indra/llmessage/llsdmessagebuilder.h | 12 +- indra/llmessage/lltemplatemessagebuilder.cpp | 26 ++-- indra/llmessage/lltemplatemessagebuilder.h | 12 +- indra/llmessage/lltemplatemessagereader.cpp | 36 +++--- indra/llmessage/lltemplatemessagereader.h | 8 +- indra/llmessage/llthrottle.cpp | 64 +++++----- indra/llmessage/llthrottle.h | 12 +- indra/llmessage/lltransfermanager.cpp | 16 +-- indra/llmessage/lltransfermanager.h | 10 +- indra/llmessage/lltransfersourceasset.cpp | 10 +- indra/llmessage/lltransfersourceasset.h | 8 +- indra/llmessage/lltransfersourcefile.cpp | 10 +- indra/llmessage/lltransfersourcefile.h | 6 +- indra/llmessage/lluseroperation.cpp | 8 +- indra/llmessage/lluseroperation.h | 8 +- indra/llmessage/llxfer.cpp | 2 +- indra/llmessage/llxfer.h | 2 +- indra/llmessage/llxfer_file.cpp | 4 +- indra/llmessage/llxfer_file.h | 4 +- indra/llmessage/llxfer_vfile.cpp | 4 +- indra/llmessage/llxfer_vfile.h | 4 +- indra/llmessage/llxfermanager.cpp | 14 +-- indra/llmessage/llxfermanager.h | 20 ++-- indra/llmessage/llxorcipher.cpp | 6 +- indra/llmessage/message.cpp | 82 ++++++------- indra/llmessage/message.h | 34 +++--- indra/llmessage/partsyspacket.cpp | 16 +-- indra/llmessage/partsyspacket.h | 8 +- indra/llrender/llgl.h | 2 +- indra/llrender/llimagegl.cpp | 4 +- indra/llrender/llimagegl.h | 2 +- indra/newview/llappviewer.cpp | 2 +- indra/newview/llfloatergodtools.cpp | 2 +- indra/newview/llmutelist.cpp | 2 +- indra/newview/llviewerassetstorage.cpp | 8 +- indra/newview/llviewerassetstorage.h | 8 +- indra/newview/llviewercontrol.cpp | 2 +- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llviewerobject.cpp | 2 +- indra/newview/llvovolume.cpp | 6 +- indra/newview/llvovolume.h | 2 +- indra/newview/pipeline.cpp | 2 +- 74 files changed, 614 insertions(+), 613 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 5f0c668b33..73569cfa07 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -95,7 +95,7 @@ const F32 SKEW_MAX = 0.95f; const F32 SCULPT_MIN_AREA = 0.002f; const S32 SCULPT_MIN_AREA_DETAIL = 1; -BOOL gDebugGL = FALSE; // See settings.xml "RenderDebugGL" +bool gDebugGL = FALSE; // See settings.xml "RenderDebugGL" bool check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm) { @@ -1081,7 +1081,7 @@ bool LLProfile::generate(const LLProfileParams& params, bool path_open,F32 detai -BOOL LLProfileParams::importFile(LLFILE *fp) +bool LLProfileParams::importFile(LLFILE *fp) { const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -1139,11 +1139,11 @@ BOOL LLProfileParams::importFile(LLFILE *fp) } } - return TRUE; + return true; } -BOOL LLProfileParams::exportFile(LLFILE *fp) const +bool LLProfileParams::exportFile(LLFILE *fp) const { fprintf(fp,"\t\tprofile 0\n"); fprintf(fp,"\t\t{\n"); @@ -1152,11 +1152,11 @@ BOOL LLProfileParams::exportFile(LLFILE *fp) const fprintf(fp,"\t\t\tend\t%g\n", getEnd()); fprintf(fp,"\t\t\thollow\t%g\n", getHollow()); fprintf(fp, "\t\t}\n"); - return TRUE; + return true; } -BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) +bool LLProfileParams::importLegacyStream(std::istream& input_stream) { const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -1211,11 +1211,11 @@ BOOL LLProfileParams::importLegacyStream(std::istream& input_stream) } } - return TRUE; + return true; } -BOOL LLProfileParams::exportLegacyStream(std::ostream& output_stream) const +bool LLProfileParams::exportLegacyStream(std::ostream& output_stream) const { output_stream <<"\t\tprofile 0\n"; output_stream <<"\t\t{\n"; @@ -1224,7 +1224,7 @@ BOOL LLProfileParams::exportLegacyStream(std::ostream& output_stream) const output_stream <<"\t\t\tend\t" << getEnd() << "\n"; output_stream <<"\t\t\thollow\t" << getHollow() << "\n"; output_stream << "\t\t}\n"; - return TRUE; + return true; } LLSD LLProfileParams::asLLSD() const @@ -1680,7 +1680,7 @@ bool LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split, } -BOOL LLPathParams::importFile(LLFILE *fp) +bool LLPathParams::importFile(LLFILE *fp) { const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -1795,11 +1795,11 @@ BOOL LLPathParams::importFile(LLFILE *fp) LL_WARNS() << "unknown keyword " << " in path import" << LL_ENDL; } } - return TRUE; + return true; } -BOOL LLPathParams::exportFile(LLFILE *fp) const +bool LLPathParams::exportFile(LLFILE *fp) const { fprintf(fp, "\t\tpath 0\n"); fprintf(fp, "\t\t{\n"); @@ -1820,11 +1820,11 @@ BOOL LLPathParams::exportFile(LLFILE *fp) const fprintf(fp,"\t\t\tskew\t%g\n", getSkew()); fprintf(fp, "\t\t}\n"); - return TRUE; + return true; } -BOOL LLPathParams::importLegacyStream(std::istream& input_stream) +bool LLPathParams::importLegacyStream(std::istream& input_stream) { const S32 BUFSIZE = 16384; char buffer[BUFSIZE]; /* Flawfinder: ignore */ @@ -1935,11 +1935,11 @@ BOOL LLPathParams::importLegacyStream(std::istream& input_stream) LL_WARNS() << "unknown keyword " << " in path import" << LL_ENDL; } } - return TRUE; + return true; } -BOOL LLPathParams::exportLegacyStream(std::ostream& output_stream) const +bool LLPathParams::exportLegacyStream(std::ostream& output_stream) const { output_stream << "\t\tpath 0\n"; output_stream << "\t\t{\n"; @@ -1960,7 +1960,7 @@ BOOL LLPathParams::exportLegacyStream(std::ostream& output_stream) const output_stream <<"\t\t\tskew\t" << getSkew() << "\n"; output_stream << "\t\t}\n"; - return TRUE; + return true; } LLSD LLPathParams::asLLSD() const @@ -2099,7 +2099,7 @@ LLVolume::~LLVolume() mHullIndices = NULL; } -BOOL LLVolume::generate() +bool LLVolume::generate() { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME @@ -2143,8 +2143,8 @@ BOOL LLVolume::generate() } } - BOOL regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split); - BOOL regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split); + bool regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split); + bool regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split); if (regenPath || regenProf ) { @@ -2207,11 +2207,11 @@ BOOL LLVolume::generate() mFaceMask |= id; } LL_CHECK_MEMORY - return TRUE; + return true; } LL_CHECK_MEMORY - return FALSE; + return false; } void LLVolumeFace::VertexData::init() @@ -3334,12 +3334,12 @@ void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, -BOOL LLVolume::isCap(S32 face) +bool LLVolume::isCap(S32 face) { return mProfilep->mFaces[face].mCap; } -BOOL LLVolume::isFlat(S32 face) +bool LLVolume::isFlat(S32 face) { return mProfilep->mFaces[face].mFlat; } @@ -4324,7 +4324,7 @@ BOOL equalTriangle(const S32 *a, const S32 *b) return FALSE; } -BOOL LLVolumeParams::importFile(LLFILE *fp) +bool LLVolumeParams::importFile(LLFILE *fp) { //LL_INFOS() << "importing volume" << LL_ENDL; const S32 BUFSIZE = 16384; @@ -4364,21 +4364,21 @@ BOOL LLVolumeParams::importFile(LLFILE *fp) } } - return TRUE; + return true; } -BOOL LLVolumeParams::exportFile(LLFILE *fp) const +bool LLVolumeParams::exportFile(LLFILE *fp) const { fprintf(fp,"\tshape 0\n"); fprintf(fp,"\t{\n"); mPathParams.exportFile(fp); mProfileParams.exportFile(fp); fprintf(fp, "\t}\n"); - return TRUE; + return true; } -BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) +bool LLVolumeParams::importLegacyStream(std::istream& input_stream) { //LL_INFOS() << "importing volume" << LL_ENDL; const S32 BUFSIZE = 16384; @@ -4414,17 +4414,17 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream) } } - return TRUE; + return true; } -BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const +bool LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const { output_stream <<"\tshape 0\n"; output_stream <<"\t{\n"; mPathParams.exportLegacyStream(output_stream); mProfileParams.exportLegacyStream(output_stream); output_stream << "\t}\n"; - return TRUE; + return true; } LLSD LLVolumeParams::sculptAsLLSD() const @@ -4498,12 +4498,12 @@ const F32 MIN_CONCAVE_PATH_WEDGE = 0.111111f; // 1/9 unity // returns TRUE if the shape can be approximated with a convex shape // for collison purposes -BOOL LLVolumeParams::isConvex() const +bool LLVolumeParams::isConvex() const { if (!getSculptID().isNull()) { // can't determine, be safe and say no: - return FALSE; + return false; } F32 path_length = mPathParams.getEnd() - mPathParams.getBegin(); @@ -4516,7 +4516,7 @@ BOOL LLVolumeParams::isConvex() const && LL_PCODE_PATH_LINE != path_type) ) ) { // twist along a "not too short" path is concave - return FALSE; + return false; } F32 profile_length = mProfileParams.getEnd() - mProfileParams.getBegin(); @@ -4540,36 +4540,36 @@ BOOL LLVolumeParams::isConvex() const if (!convex_profile) { // profile is concave - return FALSE; + return false; } if ( LL_PCODE_PATH_LINE == path_type ) { // straight paths with convex profile - return TRUE; + return true; } - BOOL concave_path = (path_length < 1.0f) && (path_length > 0.5f); + bool concave_path = (path_length < 1.0f) && (path_length > 0.5f); if (concave_path) { - return FALSE; + return false; } // we're left with spheres, toroids and tubes if ( LL_PCODE_PROFILE_CIRCLE_HALF == profile_type ) { // at this stage all spheres must be convex - return TRUE; + return true; } // it's a toroid or tube if ( path_length <= MIN_CONCAVE_PATH_WEDGE ) { // effectively convex - return TRUE; + return true; } - return FALSE; + return false; } // debug @@ -4647,7 +4647,7 @@ LLFaceID LLVolume::generateFaceMask() return new_mask; } -BOOL LLVolume::isFaceMaskValid(LLFaceID face_mask) +bool LLVolume::isFaceMaskValid(LLFaceID face_mask) { LLFaceID test_mask = 0; for(S32 i = 0; i < getNumFaces(); i++) @@ -4658,7 +4658,7 @@ BOOL LLVolume::isFaceMaskValid(LLFaceID face_mask) return test_mask == face_mask; } -BOOL LLVolume::isConvex() const +bool LLVolume::isConvex() const { // mParams.isConvex() may return FALSE even though the final // geometry is actually convex due to LOD approximations. @@ -4944,7 +4944,7 @@ void LLVolumeFace::freeData() destroyOctree(); } -BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build) +bool LLVolumeFace::create(LLVolume* volume, BOOL partial_build) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME @@ -4952,7 +4952,7 @@ BOOL LLVolumeFace::create(LLVolume* volume, BOOL partial_build) destroyOctree(); LL_CHECK_MEMORY - BOOL ret = FALSE ; + bool ret = false ; if (mTypeMask & CAP_MASK) { ret = createCap(volume, partial_build); @@ -5768,7 +5768,7 @@ void LerpPlanarVertex(LLVolumeFace::VertexData& v0, vout.setNormal(v0.getNormal()); } -BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) +bool LLVolumeFace::createUnCutCubeCap(LLVolume* volume, bool partial_build) { LL_CHECK_MEMORY @@ -6000,11 +6000,11 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) } LL_CHECK_MEMORY - return TRUE; + return true; } -BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) +bool LLVolumeFace::createCap(LLVolume* volume, bool partial_build) { if (!(mTypeMask & HOLLOW_MASK) && !(mTypeMask & OPEN_MASK) && @@ -6210,36 +6210,36 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) (paV[0]*pbV[1] - pbV[0]*paV[1]) + (pbV[0]*p2V[1] - p2V[0]*pbV[1]); - BOOL use_tri1a2 = TRUE; - BOOL tri_1a2 = TRUE; - BOOL tri_21b = TRUE; + bool use_tri1a2 = true; + bool tri_1a2 = true; + bool tri_21b = true; if (area_1a2 < 0) { - tri_1a2 = FALSE; + tri_1a2 = false; } if (area_2ab < 0) { // Can't use, because it contains point b - tri_1a2 = FALSE; + tri_1a2 = false; } if (area_21b < 0) { - tri_21b = FALSE; + tri_21b = false; } if (area_1ba < 0) { // Can't use, because it contains point b - tri_21b = FALSE; + tri_21b = false; } if (!tri_1a2) { - use_tri1a2 = FALSE; + use_tri1a2 = false; } else if (!tri_21b) { - use_tri1a2 = TRUE; + use_tri1a2 = true; } else { @@ -6251,11 +6251,11 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) if (d1.dot3(d1) < d2.dot3(d2)) { - use_tri1a2 = TRUE; + use_tri1a2 = true; } else { - use_tri1a2 = FALSE; + use_tri1a2 = false; } } @@ -6316,36 +6316,36 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) (paV[0]*pbV[1] - pbV[0]*paV[1]) + (pbV[0]*p2V[1] - p2V[0]*pbV[1]); - BOOL use_tri1a2 = TRUE; - BOOL tri_1a2 = TRUE; - BOOL tri_21b = TRUE; + bool use_tri1a2 = true; + bool tri_1a2 = true; + bool tri_21b = true; if (area_1a2 < 0) { - tri_1a2 = FALSE; + tri_1a2 = false; } if (area_2ab < 0) { // Can't use, because it contains point b - tri_1a2 = FALSE; + tri_1a2 = false; } if (area_21b < 0) { - tri_21b = FALSE; + tri_21b = false; } if (area_1ba < 0) { // Can't use, because it contains point b - tri_21b = FALSE; + tri_21b = false; } if (!tri_1a2) { - use_tri1a2 = FALSE; + use_tri1a2 = false; } else if (!tri_21b) { - use_tri1a2 = TRUE; + use_tri1a2 = true; } else { @@ -6356,11 +6356,11 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) if (d1.dot3(d1) < d2.dot3(d2)) { - use_tri1a2 = TRUE; + use_tri1a2 = true; } else { - use_tri1a2 = FALSE; + use_tri1a2 = false; } } @@ -6439,7 +6439,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) norm[i].load4a(normal.getF32ptr()); } - return TRUE; + return true; } void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVector4a *normal, @@ -6657,18 +6657,18 @@ void LLVolumeFace::fillFromLegacyData(std::vector& v, } } -BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) +bool LLVolumeFace::createSide(LLVolume* volume, bool partial_build) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME LL_CHECK_MEMORY - BOOL flat = mTypeMask & FLAT_MASK; + bool flat = mTypeMask & FLAT_MASK; U8 sculpt_type = volume->getParams().getSculptType(); U8 sculpt_stitching = sculpt_type & LL_SCULPT_TYPE_MASK; - BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT; - BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; - BOOL sculpt_reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR + bool sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT; + bool sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; + bool sculpt_reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR S32 num_vertices, num_indices; @@ -7039,10 +7039,10 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) LLVector4a top; top.setSub(pos[0], pos[mNumS*(mNumT-2)]); - BOOL s_bottom_converges = (top.dot3(top) < 0.000001f); + bool s_bottom_converges = (top.dot3(top) < 0.000001f); top.setSub(pos[mNumS-1], pos[mNumS*(mNumT-2)+mNumS-1]); - BOOL s_top_converges = (top.dot3(top) < 0.000001f); + bool s_top_converges = (top.dot3(top) < 0.000001f); if (sculpt_stitching == LL_SCULPT_TYPE_NONE) // logic for non-sculpt volumes { @@ -7090,20 +7090,20 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) } else // logic for sculpt volumes { - BOOL average_poles = FALSE; - BOOL wrap_s = FALSE; - BOOL wrap_t = FALSE; + bool average_poles = false; + bool wrap_s = false; + bool wrap_t = false; if (sculpt_stitching == LL_SCULPT_TYPE_SPHERE) - average_poles = TRUE; + average_poles = true; if ((sculpt_stitching == LL_SCULPT_TYPE_SPHERE) || (sculpt_stitching == LL_SCULPT_TYPE_TORUS) || (sculpt_stitching == LL_SCULPT_TYPE_CYLINDER)) - wrap_s = TRUE; + wrap_s = true; if (sculpt_stitching == LL_SCULPT_TYPE_TORUS) - wrap_t = TRUE; + wrap_t = true; if (average_poles) @@ -7168,7 +7168,7 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) LL_CHECK_MEMORY - return TRUE; + return true; } //adapted from Lengyel, Eric. "Computing Tangent Space Basis Vectors for an Arbitrary Mesh". Terathon Software 3D Graphics Library, 2001. http://www.terathon.com/code/tangent.html diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 0158ca9bcd..4ea0604f26 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -201,7 +201,7 @@ const U8 LL_SCULPT_FLAG_MASK = LL_SCULPT_FLAG_INVERT | LL_SCULPT_FLAG_MIRROR; const S32 LL_SCULPT_MESH_MAX_FACES = 8; -extern BOOL gDebugGL; +extern bool gDebugGL; class LLProfileParams { @@ -254,11 +254,11 @@ public: void copyParams(const LLProfileParams ¶ms); - BOOL importFile(LLFILE *fp); - BOOL exportFile(LLFILE *fp) const; + bool importFile(LLFILE *fp); + bool exportFile(LLFILE *fp) const; - BOOL importLegacyStream(std::istream& input_stream); - BOOL exportLegacyStream(std::ostream& output_stream) const; + bool importLegacyStream(std::istream& input_stream); + bool exportLegacyStream(std::ostream& output_stream) const; LLSD asLLSD() const; operator LLSD() const { return asLLSD(); } @@ -390,11 +390,11 @@ public: void copyParams(const LLPathParams ¶ms); - BOOL importFile(LLFILE *fp); - BOOL exportFile(LLFILE *fp) const; + bool importFile(LLFILE *fp); + bool exportFile(LLFILE *fp) const; - BOOL importLegacyStream(std::istream& input_stream); - BOOL exportLegacyStream(std::ostream& output_stream) const; + bool importLegacyStream(std::istream& input_stream); + bool exportLegacyStream(std::ostream& output_stream) const; LLSD asLLSD() const; operator LLSD() const { return asLLSD(); } @@ -582,11 +582,11 @@ public: const LLPathParams &getPathParams() const {return mPathParams;} LLPathParams &getPathParams() {return mPathParams;} - BOOL importFile(LLFILE *fp); - BOOL exportFile(LLFILE *fp) const; + bool importFile(LLFILE *fp); + bool exportFile(LLFILE *fp) const; - BOOL importLegacyStream(std::istream& input_stream); - BOOL exportLegacyStream(std::ostream& output_stream) const; + bool importLegacyStream(std::istream& input_stream); + bool exportLegacyStream(std::ostream& output_stream) const; LLSD sculptAsLLSD() const; bool sculptFromLLSD(LLSD& sd); @@ -652,7 +652,7 @@ public: const U8& getSculptType() const { return mSculptType; } bool isSculpt() const; bool isMeshSculpt() const; - BOOL isConvex() const; + bool isConvex() const; // 'begin' and 'end' should be in range [0, 1] (they will be clamped) // (begin, end) = (0, 1) will not change the volume @@ -870,7 +870,7 @@ private: void freeData(); public: - BOOL create(LLVolume* volume, BOOL partial_build = FALSE); + bool create(LLVolume* volume, BOOL partial_build = FALSE); void createTangents(); void resizeVertices(S32 num_verts); @@ -990,9 +990,9 @@ private: LLOctreeNode* mOctree; LLVolumeTriangle* mOctreeTriangles; - BOOL createUnCutCubeCap(LLVolume* volume, BOOL partial_build = FALSE); - BOOL createCap(LLVolume* volume, BOOL partial_build = FALSE); - BOOL createSide(LLVolume* volume, BOOL partial_build = FALSE); + bool createUnCutCubeCap(LLVolume* volume, bool partial_build = false); + bool createCap(LLVolume* volume, bool partial_build = false); + bool createSide(LLVolume* volume, bool partial_build = false); }; class LLVolume : public LLRefCount @@ -1036,10 +1036,10 @@ public: void regen(); void genTangents(S32 face); - BOOL isConvex() const; - BOOL isCap(S32 face); - BOOL isFlat(S32 face); - BOOL isUnique() const { return mUnique; } + bool isConvex() const; + bool isCap(S32 face); + bool isFlat(S32 face); + bool isUnique() const { return mUnique; } S32 getSculptLevel() const { return mSculptLevel; } void setSculptLevel(S32 level) { mSculptLevel = level; } @@ -1069,7 +1069,7 @@ public: LLFaceID generateFaceMask(); - BOOL isFaceMaskValid(LLFaceID face_mask); + bool isFaceMaskValid(LLFaceID face_mask); static S32 sNumMeshPoints; friend std::ostream& operator<<(std::ostream &s, const LLVolume &volume); @@ -1100,7 +1100,7 @@ private: void sculptGenerateSpherePlaceholder(); protected: - BOOL generate(); + bool generate(); void createVolumeFaces(); public: bool unpackVolumeFaces(std::istream& is, S32 size); @@ -1128,7 +1128,7 @@ public: LLAlignedArray mMesh; - BOOL mGenerateSingleFace; + bool mGenerateSingleFace; face_list_t mVolumeFaces; public: diff --git a/indra/llmath/xform.cpp b/indra/llmath/xform.cpp index 5d8b93d5e8..8999abda60 100644 --- a/indra/llmath/xform.cpp +++ b/indra/llmath/xform.cpp @@ -52,12 +52,12 @@ LLXform* LLXform::getRoot() const return (LLXform*)root; } -BOOL LLXform::isRoot() const +bool LLXform::isRoot() const { return (!mParent); } -BOOL LLXform::isRootEdit() const +bool LLXform::isRootEdit() const { return (!mParent); } diff --git a/indra/llmath/xform.h b/indra/llmath/xform.h index 54b0f6d9ec..96c4ab4d51 100644 --- a/indra/llmath/xform.h +++ b/indra/llmath/xform.h @@ -86,7 +86,7 @@ public: void getLocalMat4(LLMatrix4 &mat) const { mat.initAll(mScale, mRotation, mPosition); } - inline BOOL setParent(LLXform *parent); + inline bool setParent(LLXform *parent); inline void setPosition(const LLVector3& pos); inline void setPosition(const F32 x, const F32 y, const F32 z); @@ -119,8 +119,8 @@ public: LLXform* getParent() const { return mParent; } LLXform* getRoot() const; - virtual BOOL isRoot() const; - virtual BOOL isRootEdit() const; + virtual bool isRoot() const; + virtual bool isRootEdit() const; const LLVector3& getPosition() const { return mPosition; } const LLVector3& getScale() const { return mScale; } @@ -159,12 +159,12 @@ protected: }; -BOOL LLXform::setParent(LLXform* parent) +bool LLXform::setParent(LLXform* parent) { // Validate and make sure we're not creating a loop if (parent == mParent) { - return TRUE; + return true; } if (parent) { @@ -174,13 +174,13 @@ BOOL LLXform::setParent(LLXform* parent) if (cur_par == this) { //warn("LLXform::setParent Creating loop when setting parent!"); - return FALSE; + return false; } cur_par = cur_par->mParent; } } mParent = parent; - return TRUE; + return true; } void LLXform::setPosition(const LLVector3& pos) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 60d95c3367..2f76e686ec 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -354,9 +354,9 @@ void LLAssetStorage::_init(LLMessageSystem *msg, LLAssetStorage::~LLAssetStorage() { - mShutDown = TRUE; + mShutDown = true; - _cleanupRequests(TRUE, LL_ERR_CIRCUIT_GONE); + _cleanupRequests(true, LL_ERR_CIRCUIT_GONE); if (gMessageSystem) { @@ -378,10 +378,10 @@ void LLAssetStorage::setUpstream(const LLHost &upstream_host) void LLAssetStorage::checkForTimeouts() { - _cleanupRequests(FALSE, LL_ERR_TCP_TIMEOUT); + _cleanupRequests(false, LL_ERR_TCP_TIMEOUT); } -void LLAssetStorage::_cleanupRequests(BOOL all, S32 error) +void LLAssetStorage::_cleanupRequests(bool all, S32 error) { F64Seconds mt_secs = LLMessageSystem::getMessageTimeSeconds(); @@ -436,7 +436,7 @@ void LLAssetStorage::_cleanupRequests(BOOL all, S32 error) } -BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType type) +bool LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType type) { return LLFileSystem::getExists(uuid, type); } @@ -450,7 +450,7 @@ bool LLAssetStorage::findInCacheAndInvokeCallback(const LLUUID& uuid, LLAssetTyp llassert(callback != NULL); } - BOOL exists = LLFileSystem::getExists(uuid, type); + bool exists = LLFileSystem::getExists(uuid, type); if (exists) { LLFileSystem file(uuid, type); @@ -482,7 +482,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LLAssetStorage::LLGetAssetCallback callback, void *user_data, - BOOL is_priority) + bool is_priority) { LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << LL_ENDL; @@ -523,7 +523,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, return; } - BOOL exists = LLFileSystem::getExists(uuid, type); + bool exists = LLFileSystem::getExists(uuid, type); LLFileSystem file(uuid, type); U32 size = exists ? file.getSize() : 0; @@ -547,7 +547,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, file.remove(); } - BOOL duplicate = FALSE; + bool duplicate = false; // check to see if there's a pending download of this uuid already for (request_list_t::iterator iter = mPendingDownloads.begin(); @@ -566,7 +566,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, // this is a duplicate request // queue the request, but don't actually ask for it again - duplicate = TRUE; + duplicate = true; } } if (duplicate) @@ -700,7 +700,7 @@ void LLAssetStorage::getEstateAsset( EstateAssetType etype, LLGetAssetCallback callback, void *user_data, - BOOL is_priority) + bool is_priority) { LL_DEBUGS() << "LLAssetStorage::getEstateAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << ", estatetype " << etype << LL_ENDL; @@ -724,7 +724,7 @@ void LLAssetStorage::getEstateAsset( return; } - BOOL exists = LLFileSystem::getExists(asset_id, atype); + bool exists = LLFileSystem::getExists(asset_id, atype); LLFileSystem file(asset_id, atype); U32 size = exists ? file.getSize() : 0; @@ -846,7 +846,7 @@ void LLAssetStorage::getInvItemAsset( LLAssetType::EType atype, LLGetAssetCallback callback, void *user_data, - BOOL is_priority) + bool is_priority) { LL_DEBUGS() << "LLAssetStorage::getInvItemAsset() - " << asset_id << "," << LLAssetType::lookup(atype) << LL_ENDL; @@ -995,12 +995,12 @@ void LLAssetStorage::uploadCompleteCallback( return; } LLAssetRequest *req = (LLAssetRequest *)user_data; - BOOL success = TRUE; + bool success = true; if (result) { LL_WARNS("AssetStorage") << "LLAssetStorage::uploadCompleteCallback " << result << ":" << getErrorString(result) << " trying to upload file to upstream provider" << LL_ENDL; - success = FALSE; + success = false; } // we're done grabbing the file, tell the client @@ -1030,7 +1030,7 @@ void LLAssetStorage::processUploadComplete(LLMessageSystem *msg, void **user_dat this_ptr->_callUploadCallbacks(uuid, asset_type, success, LLExtStat::NONE); } -void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status ) +void LLAssetStorage::_callUploadCallbacks(const LLUUID &uuid, LLAssetType::EType asset_type, bool success, LLExtStat ext_status ) { // SJB: We process the callbacks in reverse order, I do not know if this is important, // but I didn't want to mess with it. @@ -1348,7 +1348,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, S32, LLExtStat), void *user_data, - BOOL is_priority) + bool is_priority) { // check for duplicates here, since we're about to fool the normal duplicate checker for (request_list_t::iterator iter = mPendingDownloads.begin(); @@ -1391,7 +1391,7 @@ void LLAssetStorage::legacyGetDataCallback(const LLUUID &uuid, std::string filename; // Check if the asset is marked toxic, and don't load bad stuff - BOOL toxic = gAssetStorage->isAssetToxic( uuid ); + bool toxic = gAssetStorage->isAssetToxic( uuid ); if ( !status && !toxic ) @@ -1489,9 +1489,9 @@ void LLAssetStorage::reportMetric( const LLUUID& asset_id, const LLAssetType::ET // Check if an asset is in the toxic map. If it is, the entry is updated -BOOL LLAssetStorage::isAssetToxic( const LLUUID& uuid ) +bool LLAssetStorage::isAssetToxic( const LLUUID& uuid ) { - BOOL is_toxic = FALSE; + bool is_toxic = false; if ( !uuid.isNull() ) { @@ -1499,8 +1499,8 @@ BOOL LLAssetStorage::isAssetToxic( const LLUUID& uuid ) if ( iter != mToxicAssetMap.end() ) { // Found toxic asset (*iter).second = LLFrameTimer::getTotalTime() + TOXIC_ASSET_LIFETIME; - is_toxic = TRUE; - } + is_toxic = true; + } } return is_toxic; } @@ -1509,7 +1509,7 @@ BOOL LLAssetStorage::isAssetToxic( const LLUUID& uuid ) // Clean the toxic asset list, remove old entries -void LLAssetStorage::flushOldToxicAssets( BOOL force_it ) +void LLAssetStorage::flushOldToxicAssets( bool force_it ) { // Scan and look for old entries U64 now = LLFrameTimer::getTotalTime(); diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 274e6a50ad..d9c95485f6 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -232,11 +232,11 @@ public: void setUpstream(const LLHost &upstream_host); - BOOL hasLocalAsset(const LLUUID &uuid, LLAssetType::EType type); + bool hasLocalAsset(const LLUUID &uuid, LLAssetType::EType type); // public interface methods // note that your callback may get called BEFORE the function returns - void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE); + void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, bool is_priority = false); /* * TransactionID version @@ -259,19 +259,19 @@ public: void getEstateAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id, const LLUUID &asset_id, LLAssetType::EType atype, EstateAssetType etype, - LLGetAssetCallback callback, void *user_data, BOOL is_priority); + LLGetAssetCallback callback, void *user_data, bool is_priority); void getInvItemAsset(const LLHost &object_sim, const LLUUID &agent_id, const LLUUID &session_id, const LLUUID &owner_id, const LLUUID &task_id, const LLUUID &item_id, const LLUUID &asset_id, LLAssetType::EType atype, - LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE); // Get a particular inventory item. + LLGetAssetCallback cb, void *user_data, bool is_priority = false); // Get a particular inventory item. // Check if an asset is in the toxic map. If it is, the entry is updated - BOOL isAssetToxic( const LLUUID& uuid ); + bool isAssetToxic( const LLUUID& uuid ); // Clean the toxic asset list, remove old entries - void flushOldToxicAssets( BOOL force_it ); + void flushOldToxicAssets( bool force_it ); // Add an item to the toxic asset map void markAssetToxic( const LLUUID& uuid ); @@ -352,7 +352,7 @@ public: // deprecated file-based methods // Not overriden - void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, BOOL is_priority = FALSE); + void getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(const char*, const LLUUID&, void *, S32, LLExtStat), void *user_data, bool is_priority = false); /* * TransactionID version @@ -374,12 +374,12 @@ public: // add extra methods to handle metadata protected: - void _cleanupRequests(BOOL all, S32 error); - void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, BOOL success, LLExtStat ext_status); + void _cleanupRequests(bool all, S32 error); + void _callUploadCallbacks(const LLUUID &uuid, const LLAssetType::EType asset_type, bool success, LLExtStat ext_status); virtual void _queueDataRequest(const LLUUID& uuid, LLAssetType::EType type, LLGetAssetCallback callback, - void *user_data, BOOL duplicate, - BOOL is_priority) = 0; + void *user_data, bool duplicate, + bool is_priority) = 0; private: void _init(LLMessageSystem *msg, diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index a2e85cf6c2..59dd64336e 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -215,7 +215,7 @@ public: Impl(LLMessageSystem* msg); ~Impl(); - BOOL getName(const LLUUID& id, std::string& first, std::string& last); + bool getName(const LLUUID& id, std::string& first, std::string& last); boost::signals2::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback); void addPending(const LLUUID& id, const LLHost& host); @@ -402,13 +402,13 @@ void LLCacheName::exportFile(std::ostream& ostr) } -BOOL LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last) +bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last) { if(id.isNull()) { first = sCacheName["nobody"]; last.clear(); - return TRUE; + return true; } LLCacheNameEntry* entry = get_ptr_in_map(mCache, id ); @@ -416,7 +416,7 @@ BOOL LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin { first = entry->mFirstName; last = entry->mLastName; - return TRUE; + return true; } else { @@ -426,7 +426,7 @@ BOOL LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin { mAskNameQueue.insert(id); } - return FALSE; + return false; } } @@ -440,22 +440,22 @@ void LLCacheName::localizeCacheName(std::string key, std::string value) LL_WARNS()<< " Error localizing cache key " << key << " To "<< value<mGroupName; - return TRUE; + return true; } else { @@ -480,27 +480,27 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group) { impl.mAskGroupQueue.insert(id); } - return FALSE; + return false; } } -BOOL LLCacheName::getUUID(const std::string& first, const std::string& last, LLUUID& id) +bool LLCacheName::getUUID(const std::string& first, const std::string& last, LLUUID& id) { std::string full_name = buildFullName(first, last); return getUUID(full_name, id); } -BOOL LLCacheName::getUUID(const std::string& full_name, LLUUID& id) +bool LLCacheName::getUUID(const std::string& full_name, LLUUID& id) { ReverseCache::iterator iter = impl.mReverseCache.find(full_name); if (iter != impl.mReverseCache.end()) { id = iter->second; - return TRUE; + return true; } else { - return FALSE; + return false; } } diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h index d238c3a247..d4c18d4d4c 100644 --- a/indra/llmessage/llcachename.h +++ b/indra/llmessage/llcachename.h @@ -71,11 +71,11 @@ public: // If available, copies name ("bobsmith123" or "James Linden") into string // If not available, copies the string "waiting". // Returns TRUE iff available. - BOOL getFullName(const LLUUID& id, std::string& full_name); + bool getFullName(const LLUUID& id, std::string& full_name); // Reverse lookup of UUID from name - BOOL getUUID(const std::string& first, const std::string& last, LLUUID& id); - BOOL getUUID(const std::string& fullname, LLUUID& id); + bool getUUID(const std::string& first, const std::string& last, LLUUID& id); + bool getUUID(const std::string& fullname, LLUUID& id); // IDEVO Temporary code // Clean up new-style "bobsmith123 Resident" names to "bobsmith123" for display @@ -100,7 +100,7 @@ public: // provided. The caller must allocate at least // DB_GROUP_NAME_BUF_SIZE characters. If not available, this // method copies the string "waiting". Returns TRUE iff available. - BOOL getGroupName(const LLUUID& id, std::string& group); + bool getGroupName(const LLUUID& id, std::string& group); // Call the callback with the group or avatar name. // If the data is currently available, may call the callback immediatly diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index a9a292958f..bb667201a0 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -282,7 +282,7 @@ S32 LLCircuitData::resendUnackedPackets(const F64Seconds now) // reliable_iter iter; - BOOL have_resend_overflow = FALSE; + bool have_resend_overflow = false; for (iter = mUnackedPackets.begin(); iter != mUnackedPackets.end();) { packetp = iter->second; @@ -488,7 +488,7 @@ void LLCircuit::removeCircuitData(const LLHost &host) mLastCircuit = NULL; } -void LLCircuitData::setAlive(BOOL b_alive) +void LLCircuitData::setAlive(bool b_alive) { if (mbAlive != b_alive) { @@ -500,12 +500,12 @@ void LLCircuitData::setAlive(BOOL b_alive) { mLastPingReceivedTime = LLMessageSystem::getMessageTimeSeconds(); mPingsInTransit = 0; - mBlocked = FALSE; + mBlocked = false; } } -void LLCircuitData::setAllowTimeout(BOOL allow) +void LLCircuitData::setAllowTimeout(bool allow) { mbAllowTimeout = allow; @@ -513,7 +513,7 @@ void LLCircuitData::setAllowTimeout(BOOL allow) { // resuming circuit // make sure it's alive - setAlive(TRUE); + setAlive(true); } } @@ -599,7 +599,7 @@ void LLCircuit::resendUnackedPackets(S32& unacked_list_length, S32& unacked_list } -BOOL LLCircuitData::isDuplicateResend(TPACKETID packetnum) +bool LLCircuitData::isDuplicateResend(TPACKETID packetnum) { return (mRecentlyReceivedReliablePackets.find(packetnum) != mRecentlyReceivedReliablePackets.end()); } @@ -632,7 +632,7 @@ LLCircuitData* LLCircuit::findCircuit(const LLHost& host) const } -BOOL LLCircuit::isCircuitAlive(const LLHost& host) const +bool LLCircuit::isCircuitAlive(const LLHost& host) const { LLCircuitData *cdp = findCircuit(host); if(cdp) @@ -640,7 +640,7 @@ BOOL LLCircuit::isCircuitAlive(const LLHost& host) const return cdp->mbAlive; } - return FALSE; + return false; } void LLCircuitData::setTimeoutCallback(void (*callback_func)(const LLHost &host, void *user_data), void *user_data) @@ -649,7 +649,7 @@ void LLCircuitData::setTimeoutCallback(void (*callback_func)(const LLHost &host, mTimeoutUserData = user_data; } -void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent) +void LLCircuitData::checkPacketInID(TPACKETID id, bool receive_resent) { // Done as floats so we don't have to worry about running out of room // with U32 getting poked into an S32. @@ -844,7 +844,7 @@ void LLCircuit::updateWatchDogTimers(LLMessageSystem *msgsys) } -BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) +bool LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) { F64Seconds cur_time = LLMessageSystem::getMessageTimeSeconds(); mLastPingSendTime = cur_time; @@ -852,7 +852,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) if (!checkCircuitTimeout()) { // Pass this back to the calling LLCircuit, this circuit needs to be cleaned up. - return FALSE; + return false; } // WARNING! @@ -866,7 +866,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) // This is to handle the case if we actually manage to wrap our // packet IDs - the oldest will actually have a higher packet ID // than the current. - BOOL wrapped = FALSE; + bool wrapped = false; reliable_iter iter; iter = mUnackedPackets.upper_bound(getPacketOutID()); if (iter == mUnackedPackets.end()) @@ -874,19 +874,19 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) // Nothing AFTER this one, so we want the lowest packet ID // then. iter = mUnackedPackets.begin(); - wrapped = TRUE; + wrapped = true; } TPACKETID packet_id = 0; // Check against the "final" packets - BOOL wrapped_final = FALSE; + bool wrapped_final = false; reliable_iter iter_final; iter_final = mFinalRetryPackets.upper_bound(getPacketOutID()); if (iter_final == mFinalRetryPackets.end()) { iter_final = mFinalRetryPackets.begin(); - wrapped_final = TRUE; + wrapped_final = true; } //LL_INFOS() << mHost << " - unacked count " << mUnackedPackets.size() << LL_ENDL; @@ -922,12 +922,12 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) } else { - BOOL had_unacked = FALSE; + bool had_unacked = false; if (iter != mUnackedPackets.end()) { // Unacked list has the lowest so far packet_id = iter->first; - had_unacked = TRUE; + had_unacked = true; //LL_INFOS() << mHost << ": Unacked" << LL_ENDL; } @@ -989,7 +989,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys) } } - return TRUE; + return true; } @@ -1041,7 +1041,7 @@ void LLCircuitData::clearDuplicateList(TPACKETID oldest_id) //LL_INFOS() << "Recent list after: " << mRecentlyReceivedReliablePackets.size() << LL_ENDL; } -BOOL LLCircuitData::checkCircuitTimeout() +bool LLCircuitData::checkCircuitTimeout() { F64Seconds time_since_last_ping = LLMessageSystem::getMessageTimeSeconds() - mLastPingReceivedTime; @@ -1049,7 +1049,7 @@ BOOL LLCircuitData::checkCircuitTimeout() if (time_since_last_ping > mHeartbeatTimeout) { LL_WARNS() << "LLCircuitData::checkCircuitTimeout for " << mHost << " last ping " << time_since_last_ping << " seconds ago." < PING_START_BLOCK)) { - mBlocked = TRUE; + mBlocked = true; } } @@ -1344,19 +1344,19 @@ U32 LLCircuitData::getPacketsLost() const } -BOOL LLCircuitData::isAlive() const +bool LLCircuitData::isAlive() const { return mbAlive; } -BOOL LLCircuitData::isBlocked() const +bool LLCircuitData::isBlocked() const { return mBlocked; } -BOOL LLCircuitData::getAllowTimeout() const +bool LLCircuitData::getAllowTimeout() const { return mbAllowTimeout; } @@ -1402,13 +1402,13 @@ F32Milliseconds LLCircuitData::getPingDelayAveraged() } -BOOL LLCircuitData::getTrusted() const +bool LLCircuitData::getTrusted() const { return mTrusted; } -void LLCircuitData::setTrusted(BOOL t) +void LLCircuitData::setTrusted(bool t) { mTrusted = t; } diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index b8021bc9f0..95e470b543 100644 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -100,7 +100,7 @@ public: void setRemoteID(const LLUUID& id) { mRemoteID = id; } void setRemoteSessionID(const LLUUID& id) { mRemoteSessionID = id; } - void setTrusted(BOOL t); + void setTrusted(bool t); // The local end point ID is used when establishing a trusted circuit. // no matching set function for getLocalEndPointID() @@ -111,9 +111,9 @@ public: S32 getPingsInTransit() const { return mPingsInTransit; } // ACCESSORS - BOOL isAlive() const; - BOOL isBlocked() const; - BOOL getAllowTimeout() const; + bool isAlive() const; + bool isBlocked() const; + bool getAllowTimeout() const; F32Milliseconds getPingDelayAveraged(); F32Milliseconds getPingInTransitTime(); U32 getPacketsIn() const; @@ -122,7 +122,7 @@ public: U32 getPacketsOut() const; U32 getPacketsLost() const; TPACKETID getPacketOutID() const; - BOOL getTrusted() const; + bool getTrusted() const; F32 getAgeInSeconds() const; S32 getUnackedPacketCount() const { return mUnackedPacketCount; } S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; } @@ -164,31 +164,31 @@ public: protected: TPACKETID nextPacketOutID(); void setPacketInID(TPACKETID id); - void checkPacketInID(TPACKETID id, BOOL receive_resent); + void checkPacketInID(TPACKETID id, bool receive_resent); void setPingDelay(U32Milliseconds ping); - BOOL checkCircuitTimeout(); // Return FALSE if the circuit is dead and should be cleaned up + bool checkCircuitTimeout(); // Return false if the circuit is dead and should be cleaned up void addBytesIn(S32Bytes bytes); void addBytesOut(S32Bytes bytes); U8 nextPingID() { mLastPingID++; return mLastPingID; } - BOOL updateWatchDogTimers(LLMessageSystem *msgsys); // Return FALSE if the circuit is dead and should be cleaned up + bool updateWatchDogTimers(LLMessageSystem *msgsys); // Return false if the circuit is dead and should be cleaned up void addReliablePacket(S32 mSocket, U8 *buf_ptr, S32 buf_len, LLReliablePacketParams *params); - BOOL isDuplicateResend(TPACKETID packetnum); + bool isDuplicateResend(TPACKETID packetnum); // Call this method when a reliable message comes in - this will // correctly place the packet in the correct list to be acked // later. RAack = requested ack - BOOL collectRAck(TPACKETID packet_num); + bool collectRAck(TPACKETID packet_num); void setTimeoutCallback(void (*callback_func)(const LLHost &host, void *user_data), void *user_data); - void setAlive(BOOL b_alive); - void setAllowTimeout(BOOL allow); + void setAlive(bool b_alive); + void setAllowTimeout(bool allow); protected: // Identification for this circuit. @@ -212,12 +212,12 @@ protected: void (*mTimeoutCallback)(const LLHost &host, void *user_data); void *mTimeoutUserData; - BOOL mTrusted; // Is this circuit trusted? - BOOL mbAllowTimeout; // Machines can "pause" circuits, forcing them not to be dropped + bool mTrusted; // Is this circuit trusted? + bool mbAllowTimeout; // Machines can "pause" circuits, forcing them not to be dropped - BOOL mbAlive; // Indicates whether a circuit is "alive", i.e. responded to pings + bool mbAlive; // Indicates whether a circuit is "alive", i.e. responded to pings - BOOL mBlocked; // Blocked is true if the circuit is hosed, i.e. far behind on pings + bool mBlocked; // Blocked is true if the circuit is hosed, i.e. far behind on pings // Not sure what the difference between this and mLastPingSendTime is F64Seconds mPingTime; // Time at which a ping was sent. @@ -293,7 +293,7 @@ public: // ACCESSORS LLCircuitData* findCircuit(const LLHost& host) const; - BOOL isCircuitAlive(const LLHost& host) const; + bool isCircuitAlive(const LLHost& host) const; // MANIPULATORS LLCircuitData *addCircuitData(const LLHost &host, TPACKETID in_id); diff --git a/indra/llmessage/llclassifiedflags.cpp b/indra/llmessage/llclassifiedflags.cpp index f6084d4a60..bf8c9171a7 100644 --- a/indra/llmessage/llclassifiedflags.cpp +++ b/indra/llmessage/llclassifiedflags.cpp @@ -36,7 +36,7 @@ #include "llclassifiedflags.h" -ClassifiedFlags pack_classified_flags_request(BOOL auto_renew, BOOL inc_pg, BOOL inc_mature, BOOL inc_adult) +ClassifiedFlags pack_classified_flags_request(bool auto_renew, bool inc_pg, bool inc_mature, bool inc_adult) { U8 rv = 0; if(inc_pg) rv |= CLASSIFIED_QUERY_INC_PG; @@ -47,7 +47,7 @@ ClassifiedFlags pack_classified_flags_request(BOOL auto_renew, BOOL inc_pg, BOOL return rv; } -ClassifiedFlags pack_classified_flags(BOOL auto_renew, BOOL inc_pg, BOOL inc_mature, BOOL inc_adult) +ClassifiedFlags pack_classified_flags(bool auto_renew, bool inc_pg, bool inc_mature, bool inc_adult) { U8 rv = 0; if(inc_pg) rv |= CLASSIFIED_QUERY_INC_PG; diff --git a/indra/llmessage/llclassifiedflags.h b/indra/llmessage/llclassifiedflags.h index 17fc867453..0365ea8f09 100644 --- a/indra/llmessage/llclassifiedflags.h +++ b/indra/llmessage/llclassifiedflags.h @@ -51,7 +51,7 @@ const S32 MAX_CLASSIFIEDS = 100; // This function is used in AO viewers to pack old query flags into the request // so that they can talk to old dataservers properly. When the AO servers are deployed on agni // we can revert back to ClassifiedFlags pack_classified_flags and get rider of this one. -ClassifiedFlags pack_classified_flags_request(BOOL auto_renew, BOOL is_pg, BOOL is_mature, BOOL is_adult); +ClassifiedFlags pack_classified_flags_request(bool auto_renew, bool is_pg, bool is_mature, bool is_adult); ClassifiedFlags pack_classified_flags(BOOL auto_renew, BOOL is_pg, BOOL is_mature, BOOL is_adult); bool is_cf_mature(ClassifiedFlags flags); diff --git a/indra/llmessage/llhost.cpp b/indra/llmessage/llhost.cpp index ae5c2ecf69..30e4109729 100644 --- a/indra/llmessage/llhost.cpp +++ b/indra/llmessage/llhost.cpp @@ -103,7 +103,7 @@ std::string LLHost::getHostName() const } } -BOOL LLHost::setHostByName(const std::string& hostname) +bool LLHost::setHostByName(const std::string& hostname) { hostent *he; std::string local_name(hostname); @@ -123,7 +123,7 @@ BOOL LLHost::setHostByName(const std::string& hostname) if (he) { mIP = *(U32 *)he->h_addr_list[0]; - return TRUE; + return true; } else { @@ -147,7 +147,7 @@ BOOL LLHost::setHostByName(const std::string& hostname) LL_WARNS() << "LLHost::setAddress(): unknown error - " << error_number << LL_ENDL; break; } - return FALSE; + return false; } } diff --git a/indra/llmessage/llhost.h b/indra/llmessage/llhost.h index 79cad4b123..dd12e381d4 100644 --- a/indra/llmessage/llhost.h +++ b/indra/llmessage/llhost.h @@ -80,7 +80,7 @@ public: void setAddress( const std::string& ipstr ) { mIP = ip_string_to_u32(ipstr.c_str()); } void setAddress( U32 ip ) { mIP = ip; } void setPort( U32 port ) { mPort = port; } - BOOL setHostByName(const std::string& hname); + bool setHostByName(const std::string& hname); LLHost& operator=(const LLHost &rhs); void invalidate() { mIP = INVALID_HOST_IP_ADDRESS; mPort = INVALID_PORT;}; diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp index dd5a655d7e..52102e55c8 100644 --- a/indra/llmessage/llinstantmessage.cpp +++ b/indra/llmessage/llinstantmessage.cpp @@ -54,7 +54,7 @@ const S32 IM_TTL = 1; void pack_instant_message( LLMessageSystem* msg, const LLUUID& from_id, - BOOL from_group, + bool from_group, const LLUUID& session_id, const LLUUID& to_id, const std::string& name, @@ -93,7 +93,7 @@ void pack_instant_message( void pack_instant_message_block( LLMessageSystem* msg, const LLUUID& from_id, - BOOL from_group, + bool from_group, const LLUUID& session_id, const LLUUID& to_id, const std::string& name, diff --git a/indra/llmessage/llinstantmessage.h b/indra/llmessage/llinstantmessage.h index 55cda15405..383fe2591a 100644 --- a/indra/llmessage/llinstantmessage.h +++ b/indra/llmessage/llinstantmessage.h @@ -180,7 +180,7 @@ extern const S32 IM_TTL; void pack_instant_message( LLMessageSystem* msgsystem, const LLUUID& from_id, - BOOL from_group, + bool from_group, const LLUUID& session_id, const LLUUID& to_id, const std::string& name, @@ -198,7 +198,7 @@ void pack_instant_message( void pack_instant_message_block( LLMessageSystem* msgsystem, const LLUUID& from_id, - BOOL from_group, + bool from_group, const LLUUID& session_id, const LLUUID& to_id, const std::string& name, diff --git a/indra/llmessage/llmail.cpp b/indra/llmessage/llmail.cpp index fcda2a85f6..b22cd8cccd 100644 --- a/indra/llmessage/llmail.cpp +++ b/indra/llmessage/llmail.cpp @@ -102,7 +102,7 @@ void disconnect_smtp() // Returns TRUE on success. // message should NOT be SMTP escaped. // static -BOOL LLMail::send( +bool LLMail::send( const char* from_name, const char* from_address, const char* to_name, @@ -120,7 +120,7 @@ BOOL LLMail::send( headers); if(header.empty()) { - return FALSE; + return false; } std::string message_str; @@ -129,8 +129,8 @@ BOOL LLMail::send( message_str = message; } bool rv = send(header, message_str, to_address, from_address); - if(rv) return TRUE; - return FALSE; + if(rv) return true; + return false; } // static diff --git a/indra/llmessage/llmail.h b/indra/llmessage/llmail.h index 3791714363..f97a443c47 100644 --- a/indra/llmessage/llmail.h +++ b/indra/llmessage/llmail.h @@ -48,7 +48,7 @@ public: * @param to_address The email recipient address * @param subject The subject of the email * @param headers optional X-Foo headers in an llsd map. - * @return Returns TRUE if the call succeeds, FALSE otherwise. + * @return Returns true if the call succeeds, false otherwise. * * Results in: * From: "from_name" @@ -57,7 +57,7 @@ public: * * message */ - static BOOL send( + static bool send( const char* from_name, const char* from_address, const char* to_name, diff --git a/indra/llmessage/llmessagebuilder.h b/indra/llmessage/llmessagebuilder.h index bf5be929f2..75bd5f5cc7 100644 --- a/indra/llmessage/llmessagebuilder.h +++ b/indra/llmessage/llmessagebuilder.h @@ -49,14 +49,14 @@ public: virtual void newMessage(const char* name) = 0; virtual void nextBlock(const char* blockname) = 0; - virtual BOOL removeLastBlock() = 0; // TODO: babbage: remove this horror + virtual bool removeLastBlock() = 0; // TODO: babbage: remove this horror /** All add* methods expect pointers to canonical strings. */ virtual void addBinaryData( const char* varname, const void* data, S32 size) = 0; - virtual void addBOOL(const char* varname, BOOL b) = 0; + virtual void addBOOL(const char* varname, bool b) = 0; virtual void addS8(const char* varname, S8 s) = 0; virtual void addU8(const char* varname, U8 u) = 0; virtual void addS16(const char* varname, S16 i) = 0; @@ -76,12 +76,12 @@ public: virtual void addString(const char* varname, const char* s) = 0; virtual void addString(const char* varname, const std::string& s) = 0; - virtual BOOL isMessageFull(const char* blockname) const = 0; + virtual bool isMessageFull(const char* blockname) const = 0; virtual void compressMessage(U8*& buf_ptr, U32& buffer_length) = 0; virtual S32 getMessageSize() = 0; - virtual BOOL isBuilt() const = 0; - virtual BOOL isClear() const = 0; + virtual bool isBuilt() const = 0; + virtual bool isClear() const = 0; virtual U32 buildMessage( U8* buffer, U32 buffer_size, @@ -90,7 +90,7 @@ public: virtual void clearMessage() = 0; // TODO: babbage: remove this horror - virtual void setBuilt(BOOL b) = 0; + virtual void setBuilt(bool b) = 0; virtual const char* getMessageName() const = 0; diff --git a/indra/llmessage/llmessagereader.cpp b/indra/llmessage/llmessagereader.cpp index 1d1bee7f59..4a6f5145b3 100644 --- a/indra/llmessage/llmessagereader.cpp +++ b/indra/llmessage/llmessagereader.cpp @@ -27,7 +27,7 @@ #include "linden_common.h" #include "llmessagereader.h" -static BOOL sTimeDecodes = FALSE; +static bool sTimeDecodes = false; static F32 sTimeDecodesSpamThreshold = 0.05f; @@ -38,7 +38,7 @@ LLMessageReader::~LLMessageReader() } //static -void LLMessageReader::setTimeDecodes(BOOL b) +void LLMessageReader::setTimeDecodes(bool b) { sTimeDecodes = b; } @@ -49,8 +49,8 @@ void LLMessageReader::setTimeDecodesSpamThreshold(F32 seconds) sTimeDecodesSpamThreshold = seconds; } -//static -BOOL LLMessageReader::getTimeDecodes() +//static +bool LLMessageReader::getTimeDecodes() { return sTimeDecodes; } diff --git a/indra/llmessage/llmessagereader.h b/indra/llmessage/llmessagereader.h index 647f267785..2f64371f63 100644 --- a/indra/llmessage/llmessagereader.h +++ b/indra/llmessage/llmessagereader.h @@ -84,8 +84,9 @@ class LLMessageReader virtual void copyToBuilder(LLMessageBuilder&) const = 0; - static void setTimeDecodes(BOOL b); - static BOOL getTimeDecodes(); + + static void setTimeDecodes(bool b); + static bool getTimeDecodes(); static void setTimeDecodesSpamThreshold(F32 seconds); static F32 getTimeDecodesSpamThreshold(); }; diff --git a/indra/llmessage/llmessagetemplateparser.cpp b/indra/llmessage/llmessagetemplateparser.cpp index 1f7c09dbe5..3e81fed49e 100644 --- a/indra/llmessage/llmessagetemplateparser.cpp +++ b/indra/llmessage/llmessagetemplateparser.cpp @@ -42,7 +42,7 @@ // * - repeat last check // checks 'a' -BOOL b_return_alphanumeric_ok(char c) +bool b_return_alphanumeric_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) @@ -51,26 +51,26 @@ BOOL b_return_alphanumeric_ok(char c) &&( (c < '0') ||(c > '9'))) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'c' -BOOL b_return_character_ok(char c) +bool b_return_character_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) &&( (c < 'a') ||(c > 'z'))) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'f' -BOOL b_return_first_variable_ok(char c) +bool b_return_first_variable_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) @@ -78,13 +78,13 @@ BOOL b_return_first_variable_ok(char c) ||(c > 'z')) &&(c != '_')) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'v' -BOOL b_return_variable_ok(char c) +bool b_return_variable_ok(char c) { if ( ( (c < 'A') ||(c > 'Z')) @@ -94,35 +94,35 @@ BOOL b_return_variable_ok(char c) ||(c > '9')) &&(c != '_')) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 's' -BOOL b_return_signed_integer_ok(char c) +bool b_return_signed_integer_ok(char c) { if ( ( (c < '0') ||(c > '9')) &&(c != '-')) { - return FALSE; + return false; } - return TRUE; + return true; } // checks 'd' -BOOL b_return_integer_ok(char c) +bool b_return_integer_ok(char c) { if ( (c < '0') ||(c > '9')) { - return FALSE; + return false; } - return TRUE; + return true; } -BOOL (*gParseCheckCharacters[])(char c) = +bool (*gParseCheckCharacters[])(char c) = { b_return_alphanumeric_ok, b_return_character_ok, @@ -156,7 +156,7 @@ S32 get_checker_number(char checker) } // check token based on passed simplified regular expression -BOOL b_check_token(const char *token, const char *regexp) +bool b_check_token(const char *token, const char *regexp) { S32 tptr, rptr = 0; S32 current_checker, next_checker = 0; @@ -166,13 +166,13 @@ BOOL b_check_token(const char *token, const char *regexp) if (current_checker == -1) { LL_ERRS() << "Invalid regular expression value!" << LL_ENDL; - return FALSE; + return false; } if (current_checker == 9999) { LL_ERRS() << "Regular expression can't start with *!" << LL_ENDL; - return FALSE; + return false; } for (tptr = 0; token[tptr]; tptr++) @@ -196,40 +196,40 @@ BOOL b_check_token(const char *token, const char *regexp) } } } - return TRUE; + return true; } // C variable can be made up of upper or lower case letters, underscores, or numbers, but can't start with a number -BOOL b_variable_ok(const char *token) +bool b_variable_ok(const char *token) { if (!b_check_token(token, "fv*")) { LL_WARNS() << "Token '" << token << "' isn't a variable!" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } // An integer is made up of the digits 0-9 and may be preceded by a '-' -BOOL b_integer_ok(const char *token) +bool b_integer_ok(const char *token) { if (!b_check_token(token, "sd*")) { LL_WARNS() << "Token isn't an integer!" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } // An integer is made up of the digits 0-9 -BOOL b_positive_integer_ok(const char *token) +bool b_positive_integer_ok(const char *token) { if (!b_check_token(token, "d*")) { LL_WARNS() << "Token isn't an integer!" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp index 14582aaf32..bddb9e14d6 100644 --- a/indra/llmessage/llmessagethrottle.cpp +++ b/indra/llmessage/llmessagethrottle.cpp @@ -66,13 +66,13 @@ void LLMessageThrottle::pruneEntries() // Look for the first entry younger than the maximum age. F32 max_age = (F32)MAX_MESSAGE_AGE[cat]; - BOOL found = FALSE; + bool found = false; while (r_iterator != r_last && !found) { if ( LLFrameTimer::getTotalTime() - (*r_iterator).getEntryTime() < max_age ) { // We found a young enough entry. - found = TRUE; + found = true; // Did we find at least one entry to remove? if (r_iterator != message_list->rbegin()) @@ -95,7 +95,7 @@ void LLMessageThrottle::pruneEntries() } } -BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg) +bool LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg) { message_list_t* message_list = &(mMessageList[MTC_VIEWER_ALERT]); @@ -114,16 +114,16 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg { // This message was not found. Add it to the list. message_list->push_front(entry); - return TRUE; + return true; } else { // This message was already in the list. - return FALSE; + return false; } } -BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, const std::string& mesg) +bool LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, const std::string& mesg) { message_list_t* message_list = &(mMessageList[MTC_AGENT_ALERT]); @@ -142,12 +142,12 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c { // This message was not found. Add it to the list. message_list->push_front(entry); - return TRUE; + return true; } else { // This message was already in the list. - return FALSE; + return false; } } diff --git a/indra/llmessage/llmessagethrottle.h b/indra/llmessage/llmessagethrottle.h index 4ea84f712a..ae62b43920 100644 --- a/indra/llmessage/llmessagethrottle.h +++ b/indra/llmessage/llmessagethrottle.h @@ -59,8 +59,8 @@ public: LLMessageThrottle(); ~LLMessageThrottle(); - BOOL addViewerAlert (const LLUUID& to, const std::string& mesg); - BOOL addAgentAlert (const LLUUID& agent, const LLUUID& task, const std::string& mesg); + bool addViewerAlert (const LLUUID& to, const std::string& mesg); + bool addAgentAlert (const LLUUID& agent, const LLUUID& task, const std::string& mesg); void pruneEntries(); diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp index c51883ee3d..761e990c76 100644 --- a/indra/llmessage/llnamevalue.cpp +++ b/indra/llmessage/llnamevalue.cpp @@ -676,13 +676,13 @@ LLVector3 *LLNameValue::getVec3() } -BOOL LLNameValue::sendToData() const +bool LLNameValue::sendToData() const { return (mSendto == NVS_DATA_SIM || mSendto == NVS_DATA_SIM_VIEWER); } -BOOL LLNameValue::sendToViewer() const +bool LLNameValue::sendToViewer() const { return (mSendto == NVS_SIM_VIEWER || mSendto == NVS_DATA_SIM_VIEWER); } diff --git a/indra/llmessage/llnamevalue.h b/indra/llmessage/llnamevalue.h index f8b556b5fe..92b20284ef 100644 --- a/indra/llmessage/llnamevalue.h +++ b/indra/llmessage/llnamevalue.h @@ -139,8 +139,8 @@ public: const char *getClass() const { return mStringClass; } const char *getSendto() const { return mStringSendto; } - BOOL sendToData() const; - BOOL sendToViewer() const; + bool sendToData() const; + bool sendToViewer() const; void callCallback(); std::string printNameValue() const; diff --git a/indra/llmessage/llpacketack.cpp b/indra/llmessage/llpacketack.cpp index c3c022c297..8e04934286 100644 --- a/indra/llmessage/llpacketack.cpp +++ b/indra/llmessage/llpacketack.cpp @@ -58,7 +58,7 @@ LLReliablePacket::LLReliablePacket( else { mRetries = 0; - mPingBasedRetry = TRUE; + mPingBasedRetry = true; mTimeout = F32Seconds(0.f); mCallback = NULL; mCallbackData = NULL; diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index 687212ea10..7ba76bea25 100644 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -97,12 +97,12 @@ void LLPacketRing::setDropPercentage (F32 percent_to_drop) mDropPercentage = percent_to_drop; } -void LLPacketRing::setUseInThrottle(const BOOL use_throttle) +void LLPacketRing::setUseInThrottle(const bool use_throttle) { mUseInThrottle = use_throttle; } -void LLPacketRing::setUseOutThrottle(const BOOL use_throttle) +void LLPacketRing::setUseOutThrottle(const bool use_throttle) { mUseOutThrottle = use_throttle; } @@ -161,7 +161,7 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap) // If using the throttle, simulate a limited size input buffer. if (mUseInThrottle) { - BOOL done = FALSE; + bool done = false; // push any current net packet (if any) onto delay ring while (!done) @@ -270,9 +270,9 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap) return packet_size; } -BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host) +bool LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host) { - BOOL status = TRUE; + bool status = true; if (!mUseOutThrottle) { return sendPacketImpl(h_socket, send_buffer, buf_size, host ); @@ -344,7 +344,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL return status; } -BOOL LLPacketRing::sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host) +bool LLPacketRing::sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host) { if (!LLProxy::isSOCKSProxyEnabled()) diff --git a/indra/llmessage/llpacketring.h b/indra/llmessage/llpacketring.h index b214271e78..888ee927b5 100644 --- a/indra/llmessage/llpacketring.h +++ b/indra/llmessage/llpacketring.h @@ -46,14 +46,14 @@ public: void dropPackets(U32); void setDropPercentage (F32 percent_to_drop); - void setUseInThrottle(const BOOL use_throttle); - void setUseOutThrottle(const BOOL use_throttle); + void setUseInThrottle(const bool use_throttle); + void setUseOutThrottle(const bool use_throttle); void setInBandwidth(const F32 bps); void setOutBandwidth(const F32 bps); S32 receivePacket (S32 socket, char *datap); S32 receiveFromRing (S32 socket, char *datap); - BOOL sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host); + bool sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host); inline LLHost getLastSender(); inline LLHost getLastReceivingInterface(); @@ -61,8 +61,8 @@ public: S32 getAndResetActualInBits() { S32 bits = mActualBitsIn; mActualBitsIn = 0; return bits;} S32 getAndResetActualOutBits() { S32 bits = mActualBitsOut; mActualBitsOut = 0; return bits;} protected: - BOOL mUseInThrottle; - BOOL mUseOutThrottle; + bool mUseInThrottle; + bool mUseOutThrottle; // For simulating a lower-bandwidth connection - BPS LLThrottle mInThrottle; @@ -84,7 +84,7 @@ protected: LLHost mLastReceivingIF; private: - BOOL sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host); + bool sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host); }; diff --git a/indra/llmessage/llpartdata.cpp b/indra/llmessage/llpartdata.cpp index 6664eb02dc..a4852cefba 100644 --- a/indra/llmessage/llpartdata.cpp +++ b/indra/llmessage/llpartdata.cpp @@ -71,31 +71,31 @@ S32 LLPartData::getSize() const } -BOOL LLPartData::unpackLegacy(LLDataPacker &dp) +bool LLPartData::unpackLegacy(LLDataPacker &dp) { LLColor4U coloru; dp.unpackU32(mFlags, "pdflags"); - dp.unpackFixed(mMaxAge, "pdmaxage", FALSE, 8, 8); + dp.unpackFixed(mMaxAge, "pdmaxage", false, 8, 8); dp.unpackColor4U(coloru, "pdstartcolor"); mStartColor.setVec(coloru); dp.unpackColor4U(coloru, "pdendcolor"); mEndColor.setVec(coloru); - dp.unpackFixed(mStartScale.mV[0], "pdstartscalex", FALSE, 3, 5); - dp.unpackFixed(mStartScale.mV[1], "pdstartscaley", FALSE, 3, 5); - dp.unpackFixed(mEndScale.mV[0], "pdendscalex", FALSE, 3, 5); - dp.unpackFixed(mEndScale.mV[1], "pdendscaley", FALSE, 3, 5); + dp.unpackFixed(mStartScale.mV[0], "pdstartscalex", false, 3, 5); + dp.unpackFixed(mStartScale.mV[1], "pdstartscaley", false, 3, 5); + dp.unpackFixed(mEndScale.mV[0], "pdendscalex", false, 3, 5); + dp.unpackFixed(mEndScale.mV[1], "pdendscaley", false, 3, 5); mStartGlow = 0.f; mEndGlow = 0.f; mBlendFuncSource = LLPartData::LL_PART_BF_SOURCE_ALPHA; mBlendFuncDest = LLPartData::LL_PART_BF_ONE_MINUS_SOURCE_ALPHA; - return TRUE; + return true; } -BOOL LLPartData::unpack(LLDataPacker &dp) +bool LLPartData::unpack(LLDataPacker &dp) { S32 size = 0; dp.unpackS32(size, "partsize"); @@ -105,7 +105,7 @@ BOOL LLPartData::unpack(LLDataPacker &dp) if (mFlags & LL_PART_DATA_GLOW) { - if (size < PS_PART_DATA_GLOW_SIZE) return FALSE; + if (size < PS_PART_DATA_GLOW_SIZE) return false; U8 tmp_glow = 0; dp.unpackU8(tmp_glow,"pdstartglow"); @@ -123,7 +123,7 @@ BOOL LLPartData::unpack(LLDataPacker &dp) if (mFlags & LL_PART_DATA_BLEND) { - if (size < PS_PART_DATA_BLEND_SIZE) return FALSE; + if (size < PS_PART_DATA_BLEND_SIZE) return false; dp.unpackU8(mBlendFuncSource,"pdblendsource"); dp.unpackU8(mBlendFuncDest,"pdblenddest"); size -= PS_PART_DATA_BLEND_SIZE; @@ -144,11 +144,11 @@ BOOL LLPartData::unpack(LLDataPacker &dp) } //this particle system won't display properly, better to not show anything - return FALSE; + return false; } - return TRUE; + return true; } void LLPartData::setFlags(const U32 flags) @@ -240,44 +240,44 @@ LLPartSysData::LLPartSysData() mNumParticles = 0; } -BOOL LLPartSysData::unpackSystem(LLDataPacker &dp) +bool LLPartSysData::unpackSystem(LLDataPacker &dp) { dp.unpackU32(mCRC, "pscrc"); dp.unpackU32(mFlags, "psflags"); dp.unpackU8(mPattern, "pspattern"); - dp.unpackFixed(mMaxAge, "psmaxage", FALSE, 8, 8); - dp.unpackFixed(mStartAge, "psstartage", FALSE, 8, 8); - dp.unpackFixed(mInnerAngle, "psinnerangle", FALSE, 3, 5); - dp.unpackFixed(mOuterAngle, "psouterangle", FALSE, 3, 5); - dp.unpackFixed(mBurstRate, "psburstrate", FALSE, 8, 8); + dp.unpackFixed(mMaxAge, "psmaxage", false, 8, 8); + dp.unpackFixed(mStartAge, "psstartage", false, 8, 8); + dp.unpackFixed(mInnerAngle, "psinnerangle", false, 3, 5); + dp.unpackFixed(mOuterAngle, "psouterangle", false, 3, 5); + dp.unpackFixed(mBurstRate, "psburstrate", false, 8, 8); mBurstRate = llmax(0.01f, mBurstRate); - dp.unpackFixed(mBurstRadius, "psburstradius", FALSE, 8, 8); - dp.unpackFixed(mBurstSpeedMin, "psburstspeedmin", FALSE, 8, 8); - dp.unpackFixed(mBurstSpeedMax, "psburstspeedmax", FALSE, 8, 8); + dp.unpackFixed(mBurstRadius, "psburstradius", false, 8, 8); + dp.unpackFixed(mBurstSpeedMin, "psburstspeedmin", false, 8, 8); + dp.unpackFixed(mBurstSpeedMax, "psburstspeedmax", false, 8, 8); dp.unpackU8(mBurstPartCount, "psburstpartcount"); - dp.unpackFixed(mAngularVelocity.mV[0], "psangvelx", TRUE, 8, 7); - dp.unpackFixed(mAngularVelocity.mV[1], "psangvely", TRUE, 8, 7); - dp.unpackFixed(mAngularVelocity.mV[2], "psangvelz", TRUE, 8, 7); + dp.unpackFixed(mAngularVelocity.mV[0], "psangvelx", true, 8, 7); + dp.unpackFixed(mAngularVelocity.mV[1], "psangvely", true, 8, 7); + dp.unpackFixed(mAngularVelocity.mV[2], "psangvelz", true, 8, 7); - dp.unpackFixed(mPartAccel.mV[0], "psaccelx", TRUE, 8, 7); - dp.unpackFixed(mPartAccel.mV[1], "psaccely", TRUE, 8, 7); - dp.unpackFixed(mPartAccel.mV[2], "psaccelz", TRUE, 8, 7); + dp.unpackFixed(mPartAccel.mV[0], "psaccelx", true, 8, 7); + dp.unpackFixed(mPartAccel.mV[1], "psaccely", true, 8, 7); + dp.unpackFixed(mPartAccel.mV[2], "psaccelz", true, 8, 7); dp.unpackUUID(mPartImageID, "psuuid"); dp.unpackUUID(mTargetUUID, "pstargetuuid"); - return TRUE; + return true; } -BOOL LLPartSysData::unpackLegacy(LLDataPacker &dp) +bool LLPartSysData::unpackLegacy(LLDataPacker &dp) { unpackSystem(dp); mPartData.unpackLegacy(dp); - return TRUE; + return true; } -BOOL LLPartSysData::unpack(LLDataPacker &dp) +bool LLPartSysData::unpack(LLDataPacker &dp) { // syssize is currently unused. Adding now when modifying the 'version to make extensible in the future S32 size = 0; @@ -300,7 +300,7 @@ BOOL LLPartSysData::unpack(LLDataPacker &dp) { dp.unpackU8(feh, "whippang"); } - return FALSE; + return false; } unpackSystem(dp); @@ -324,7 +324,7 @@ std::ostream& operator<<(std::ostream& s, const LLPartSysData &data) return s; } -BOOL LLPartSysData::isNullPS(const S32 block_num) +bool LLPartSysData::isNullPS(const S32 block_num) { U8 ps_data_block[PS_MAX_DATA_BLOCK_SIZE]; U32 crc; @@ -335,13 +335,13 @@ BOOL LLPartSysData::isNullPS(const S32 block_num) if (!size) { - return TRUE; + return true; } if (size > PS_MAX_DATA_BLOCK_SIZE) { //size is too big, newer particle version unsupported - return TRUE; + return true; } gMessageSystem->getBinaryData("ObjectData", "PSBlock", ps_data_block, size, block_num, PS_MAX_DATA_BLOCK_SIZE); @@ -355,7 +355,7 @@ BOOL LLPartSysData::isNullPS(const S32 block_num) if (tmp > PS_SYS_DATA_BLOCK_SIZE) { //unknown system data block size, don't know how to parse it, treat as NULL - return TRUE; + return true; } } @@ -363,12 +363,12 @@ BOOL LLPartSysData::isNullPS(const S32 block_num) if (crc == 0) { - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLPartSysData::unpackBlock(const S32 block_num) +bool LLPartSysData::unpackBlock(const S32 block_num) { U8 ps_data_block[PS_MAX_DATA_BLOCK_SIZE]; @@ -378,7 +378,7 @@ BOOL LLPartSysData::unpackBlock(const S32 block_num) if (size > PS_MAX_DATA_BLOCK_SIZE) { // Larger packets are newer and unsupported - return FALSE; + return false; } // Get from message diff --git a/indra/llmessage/llpartdata.h b/indra/llmessage/llpartdata.h index ed5c1a6ac7..c61e411a23 100644 --- a/indra/llmessage/llpartdata.h +++ b/indra/llmessage/llpartdata.h @@ -88,10 +88,10 @@ public: mParameter(0.f) { } - BOOL unpackLegacy(LLDataPacker &dp); - BOOL unpack(LLDataPacker &dp); + bool unpackLegacy(LLDataPacker &dp); + bool unpack(LLDataPacker &dp); - BOOL pack(LLDataPacker &dp); + bool pack(LLDataPacker &dp); bool hasGlow() const; bool hasBlendFunc() const; @@ -183,11 +183,11 @@ class LLPartSysData public: LLPartSysData(); - BOOL unpack(LLDataPacker &dp); - BOOL unpackLegacy(LLDataPacker &dp); - BOOL unpackBlock(const S32 block_num); + bool unpack(LLDataPacker &dp); + bool unpackLegacy(LLDataPacker &dp); + bool unpackBlock(const S32 block_num); - static BOOL isNullPS(const S32 block_num); // Returns FALSE if this is a "NULL" particle system (i.e. no system) + static bool isNullPS(const S32 block_num); // Returns false if this is a "NULL" particle system (i.e. no system) bool isLegacyCompatible() const; @@ -227,7 +227,7 @@ public: S32 getdataBlockSize() const; private: - BOOL unpackSystem(LLDataPacker &dp); + bool unpackSystem(LLDataPacker &dp); public: // Public because I'm lazy.... diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp index 49456c71ed..7ea0c55afd 100644 --- a/indra/llmessage/llsdmessagebuilder.cpp +++ b/indra/llmessage/llsdmessagebuilder.cpp @@ -68,8 +68,8 @@ void LLSDMessageBuilder::newMessage(const char* name) // virtual void LLSDMessageBuilder::clearMessage() { - mbSBuilt = FALSE; - mbSClear = TRUE; + mbSBuilt = false; + mbSClear = true; mCurrentMessage = LLSD::emptyMap(); mCurrentMessageName = ""; @@ -96,10 +96,10 @@ void LLSDMessageBuilder::nextBlock(const char* blockname) } // TODO: Remove this horror... -BOOL LLSDMessageBuilder::removeLastBlock() +bool LLSDMessageBuilder::removeLastBlock() { /* TODO: finish implementing this */ - return FALSE; + return false; } void LLSDMessageBuilder::addBinaryData( @@ -168,9 +168,9 @@ void LLSDMessageBuilder::addIPPort(const char* varname, U16 v) (*mCurrentBlock)[varname] = v; } -void LLSDMessageBuilder::addBOOL(const char* varname, BOOL v) +void LLSDMessageBuilder::addBOOL(const char* varname, bool v) { - (*mCurrentBlock)[varname] = (v == TRUE); + (*mCurrentBlock)[varname] = (v == true); } void LLSDMessageBuilder::addString(const char* varname, const char* v) @@ -218,9 +218,9 @@ void LLSDMessageBuilder::compressMessage(U8*& buf_ptr, U32& buffer_length) { } -BOOL LLSDMessageBuilder::isMessageFull(const char* blockname) const +bool LLSDMessageBuilder::isMessageFull(const char* blockname) const { - return FALSE; + return false; } U32 LLSDMessageBuilder::buildMessage(U8*, U32, U8) @@ -400,13 +400,13 @@ const LLSD& LLSDMessageBuilder::getMessage() const } //virtual -void LLSDMessageBuilder::setBuilt(BOOL b) { mbSBuilt = b; } +void LLSDMessageBuilder::setBuilt(bool b) { mbSBuilt = b; } //virtual -BOOL LLSDMessageBuilder::isBuilt() const {return mbSBuilt;} +bool LLSDMessageBuilder::isBuilt() const {return mbSBuilt;} //virtual -BOOL LLSDMessageBuilder::isClear() const {return mbSClear;} +bool LLSDMessageBuilder::isClear() const {return mbSClear;} //virtual S32 LLSDMessageBuilder::getMessageSize() diff --git a/indra/llmessage/llsdmessagebuilder.h b/indra/llmessage/llsdmessagebuilder.h index 9c7c1bfde3..f1e824f5d4 100644 --- a/indra/llmessage/llsdmessagebuilder.h +++ b/indra/llmessage/llsdmessagebuilder.h @@ -48,14 +48,14 @@ public: virtual void newMessage(const char* name); virtual void nextBlock(const char* blockname); - virtual BOOL removeLastBlock(); // TODO: babbage: remove this horror... + virtual bool removeLastBlock(); // TODO: babbage: remove this horror... /** All add* methods expect pointers to canonical varname strings. */ virtual void addBinaryData( const char* varname, const void* data, S32 size); - virtual void addBOOL(const char* varname, BOOL b); + virtual void addBOOL(const char* varname, bool b); virtual void addS8(const char* varname, S8 s); virtual void addU8(const char* varname, U8 u); virtual void addS16(const char* varname, S16 i); @@ -75,18 +75,18 @@ public: virtual void addString(const char* varname, const char* s); virtual void addString(const char* varname, const std::string& s); - virtual BOOL isMessageFull(const char* blockname) const; + virtual bool isMessageFull(const char* blockname) const; virtual void compressMessage(U8*& buf_ptr, U32& buffer_length); - virtual BOOL isBuilt() const; - virtual BOOL isClear() const; + virtual bool isBuilt() const; + virtual bool isClear() const; virtual U32 buildMessage(U8* buffer, U32 buffer_size, U8 offset_to_data); /**< Null implementation which returns 0. */ virtual void clearMessage(); // TODO: babbage: remove this horror. - virtual void setBuilt(BOOL b); + virtual void setBuilt(bool b); virtual S32 getMessageSize(); virtual const char* getMessageName() const; diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp index 5ac5f6c580..fad94ecab6 100644 --- a/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/indra/llmessage/lltemplatemessagebuilder.cpp @@ -220,7 +220,7 @@ void LLTemplateMessageBuilder::nextBlock(const char* blockname) } // TODO: Remove this horror... -BOOL LLTemplateMessageBuilder::removeLastBlock() +bool LLTemplateMessageBuilder::removeLastBlock() { if (mCurrentSBlockName) { @@ -268,18 +268,18 @@ BOOL LLTemplateMessageBuilder::removeLastBlock() << ". Block: " << block_name << ". Number: " << num_blocks << LL_ENDL; - return FALSE; + return false; } else { // Decrement the counter. block_data->mBlockNumber--; - return TRUE; + return true; } } } } - return FALSE; + return false; } // add data to variable in current block @@ -445,7 +445,7 @@ void LLTemplateMessageBuilder::addIPPort(const char *varname, U16 u) addData(varname, &u, MVT_IP_PORT, sizeof(u)); } -void LLTemplateMessageBuilder::addBOOL(const char* varname, BOOL b) +void LLTemplateMessageBuilder::addBOOL(const char* varname, bool b) { // Can't just cast a BOOL (actually a U32) to a U8. // In some cases the low order bits will be zero. @@ -584,15 +584,15 @@ void LLTemplateMessageBuilder::compressMessage(U8*& buf_ptr, U32& buffer_length) } } -BOOL LLTemplateMessageBuilder::isMessageFull(const char* blockname) const +bool LLTemplateMessageBuilder::isMessageFull(const char* blockname) const { if(mCurrentSendTotal > MTUBYTES) { - return TRUE; + return true; } if(!blockname) { - return FALSE; + return false; } char* bnamep = (char*)blockname; S32 max; @@ -614,9 +614,9 @@ BOOL LLTemplateMessageBuilder::isMessageFull(const char* blockname) const } if(mCurrentSMessageData->mMemberBlocks[bnamep]->mBlockNumber >= max) { - return TRUE; + return true; } - return FALSE; + return false; } static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* template_data, LLMsgData* message_data) @@ -877,13 +877,13 @@ void LLTemplateMessageBuilder::copyFromLLSD(const LLSD&) } //virtual -void LLTemplateMessageBuilder::setBuilt(BOOL b) { mbSBuilt = b; } +void LLTemplateMessageBuilder::setBuilt(bool b) { mbSBuilt = b; } //virtual -BOOL LLTemplateMessageBuilder::isBuilt() const {return mbSBuilt;} +bool LLTemplateMessageBuilder::isBuilt() const {return mbSBuilt;} //virtual -BOOL LLTemplateMessageBuilder::isClear() const {return mbSClear;} +bool LLTemplateMessageBuilder::isClear() const {return mbSClear;} //virtual S32 LLTemplateMessageBuilder::getMessageSize() {return mCurrentSendTotal;} diff --git a/indra/llmessage/lltemplatemessagebuilder.h b/indra/llmessage/lltemplatemessagebuilder.h index 4f614a4657..b8b4b36c3d 100644 --- a/indra/llmessage/lltemplatemessagebuilder.h +++ b/indra/llmessage/lltemplatemessagebuilder.h @@ -49,12 +49,12 @@ public: virtual void newMessage(const char* name); virtual void nextBlock(const char* blockname); - virtual BOOL removeLastBlock(); // TODO: babbage: remove this horror... + virtual bool removeLastBlock(); // TODO: babbage: remove this horror... /** All add* methods expect pointers to canonical varname strings. */ virtual void addBinaryData(const char *varname, const void *data, S32 size); - virtual void addBOOL(const char* varname, BOOL b); + virtual void addBOOL(const char* varname, bool b); virtual void addS8(const char* varname, S8 s); virtual void addU8(const char* varname, U8 u); virtual void addS16(const char* varname, S16 i); @@ -74,18 +74,18 @@ public: virtual void addString(const char* varname, const char* s); virtual void addString(const char* varname, const std::string& s); - virtual BOOL isMessageFull(const char* blockname) const; + virtual bool isMessageFull(const char* blockname) const; virtual void compressMessage(U8*& buf_ptr, U32& buffer_length); - virtual BOOL isBuilt() const; - virtual BOOL isClear() const; + virtual bool isBuilt() const; + virtual bool isClear() const; virtual U32 buildMessage(U8* buffer, U32 buffer_size, U8 offset_to_data); /**< Return built message size */ virtual void clearMessage(); // TODO: babbage: remove this horror. - virtual void setBuilt(BOOL b); + virtual void setBuilt(bool b); virtual S32 getMessageSize(); virtual const char* getMessageName() const; diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 8a41d5565d..0ff49a2308 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -286,9 +286,9 @@ void LLTemplateMessageReader::getU8(const char *block, const char *var, void LLTemplateMessageReader::getBOOL(const char *block, const char *var, bool &b, S32 blocknum ) { - U8 value; - getData(block, var, &value, sizeof(U8), blocknum); - b = (BOOL) value; + bool value; + getData(block, var, &value, sizeof(bool), blocknum); + b = value; } void LLTemplateMessageReader::getS16(const char *block, const char *var, @@ -443,7 +443,7 @@ S32 LLTemplateMessageReader::getMessageSize() const } // Returns template for the message contained in buffer -BOOL LLTemplateMessageReader::decodeTemplate( +bool LLTemplateMessageReader::decodeTemplate( const U8* buffer, S32 buffer_size, // inputs LLMessageTemplate** msg_template ) // outputs { @@ -453,7 +453,7 @@ BOOL LLTemplateMessageReader::decodeTemplate( if (buffer_size <= 0) { LL_WARNS() << "No message waiting for decode!" << LL_ENDL; - return(FALSE); + return(false); } U32 num = 0; @@ -489,7 +489,7 @@ BOOL LLTemplateMessageReader::decodeTemplate( { LL_WARNS() << "Packet with unusable length received (too short): " << buffer_size << LL_ENDL; - return(FALSE); + return(false); } LLMessageTemplate* temp = get_ptr_in_map(mMessageNumbers,num); @@ -503,10 +503,10 @@ BOOL LLTemplateMessageReader::decodeTemplate( LL_WARNS_ONCE() << "Message #" << std::hex << num << std::dec << " received but not registered!" << LL_ENDL; //gMessageSystem->callExceptionFunc(MX_UNREGISTERED_MESSAGE); - return(FALSE); + return(false); } - return(TRUE); + return(true); } void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ) @@ -531,7 +531,7 @@ void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S3 static LLTrace::BlockTimerStatHandle FTM_PROCESS_MESSAGES("Process Messages"); // decode a given message -BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender ) +bool LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender ) { LL_RECORD_BLOCK_TIME(FTM_PROCESS_MESSAGES); @@ -592,7 +592,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender else { LL_ERRS() << "Unknown block type" << LL_ENDL; - return FALSE; + return false; } LLMsgBlkData* cur_data_block = NULL; @@ -698,7 +698,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender && !mCurrentRMessageTemplate->mMemberBlocks.empty()) { LL_DEBUGS() << "Empty message '" << mCurrentRMessageTemplate->mName << "' (no blocks)" << LL_ENDL; - return FALSE; + return false; } { @@ -747,16 +747,16 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender } } } - return TRUE; + return true; } -BOOL LLTemplateMessageReader::validateMessage(const U8* buffer, - S32 buffer_size, +bool LLTemplateMessageReader::validateMessage(const U8* buffer, + S32 buffer_size, const LLHost& sender, bool trusted) { mReceiveSize = buffer_size; - BOOL valid = decodeTemplate(buffer, buffer_size, &mCurrentRMessageTemplate ); + bool valid = decodeTemplate(buffer, buffer_size, &mCurrentRMessageTemplate ); if(valid) { mCurrentRMessageTemplate->mReceiveCount++; @@ -773,7 +773,7 @@ BOOL LLTemplateMessageReader::validateMessage(const U8* buffer, << " from " << ((trusted) ? "trusted " : "untrusted ") << sender << LL_ENDL; - valid = FALSE; + valid = false; } if(valid && isUdpBanned()) @@ -781,12 +781,12 @@ BOOL LLTemplateMessageReader::validateMessage(const U8* buffer, LL_WARNS() << "Received UDP black listed message " << getMessageName() << " from " << sender << LL_ENDL; - valid = FALSE; + valid = false; } return valid; } -BOOL LLTemplateMessageReader::readMessage(const U8* buffer, +bool LLTemplateMessageReader::readMessage(const U8* buffer, const LLHost& sender) { return decodeData(buffer, sender); diff --git a/indra/llmessage/lltemplatemessagereader.h b/indra/llmessage/lltemplatemessagereader.h index 88889cd7d2..14656230e3 100644 --- a/indra/llmessage/lltemplatemessagereader.h +++ b/indra/llmessage/lltemplatemessagereader.h @@ -98,9 +98,9 @@ public: virtual void copyToBuilder(LLMessageBuilder&) const; - BOOL validateMessage(const U8* buffer, S32 buffer_size, + bool validateMessage(const U8* buffer, S32 buffer_size, const LLHost& sender, bool trusted = false); - BOOL readMessage(const U8* buffer, const LLHost& sender); + bool readMessage(const U8* buffer, const LLHost& sender); bool isTrusted() const; bool isBanned(bool trusted_source) const; @@ -111,12 +111,12 @@ private: void getData(const char *blockname, const char *varname, void *datap, S32 size = 0, S32 blocknum = 0, S32 max_size = S32_MAX); - BOOL decodeTemplate(const U8* buffer, S32 buffer_size, // inputs + bool decodeTemplate(const U8* buffer, S32 buffer_size, // inputs LLMessageTemplate** msg_template ); // outputs void logRanOffEndOfPacket( const LLHost& host, const S32 where, const S32 wanted ); - BOOL decodeData(const U8* buffer, const LLHost& sender ); + bool decodeData(const U8* buffer, const LLHost& sender ); S32 mReceiveSize; LLMessageTemplate* mCurrentRMessageTemplate; diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index e659414e8c..dc02b5ea90 100644 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp @@ -57,9 +57,9 @@ F32 LLThrottle::getAvailable() return mAvailable + (mRate * elapsed_time.value()); } -BOOL LLThrottle::checkOverflow(const F32 amount) +bool LLThrottle::checkOverflow(const F32 amount) { - BOOL retval = TRUE; + bool retval = true; F32 lookahead_amount = mRate * mLookaheadSecs; @@ -72,17 +72,17 @@ BOOL LLThrottle::checkOverflow(const F32 amount) { // ...enough space to send this message // Also do if > lookahead so we can use if amount > capped amount. - retval = FALSE; + retval = false; } return retval; } -BOOL LLThrottle::throttleOverflow(const F32 amount) +bool LLThrottle::throttleOverflow(const F32 amount) { F32Seconds elapsed_time; F32 lookahead_amount; - BOOL retval = TRUE; + bool retval = true; lookahead_amount = mRate * mLookaheadSecs; @@ -97,12 +97,12 @@ BOOL LLThrottle::throttleOverflow(const F32 amount) // ...channel completely open, so allow send regardless // of size. This allows sends on very low BPS channels. mAvailable = lookahead_amount; - retval = FALSE; + retval = false; } else if (mAvailable > amount) { // ...enough space to send this message - retval = FALSE; + retval = false; } // We actually already sent the bits. @@ -236,15 +236,15 @@ void LLThrottleGroup::resetDynamicAdjust() } -BOOL LLThrottleGroup::setNominalBPS(F32* throttle_vec) +bool LLThrottleGroup::setNominalBPS(F32* throttle_vec) { - BOOL changed = FALSE; + bool changed = false; S32 i; for (i = 0; i < TC_EOF; i++) { if (mNominalBPS[i] != throttle_vec[i]) { - changed = TRUE; + changed = true; mNominalBPS[i] = throttle_vec[i]; } } @@ -285,9 +285,9 @@ S32 LLThrottleGroup::getAvailable(S32 throttle_cat) } -BOOL LLThrottleGroup::checkOverflow(S32 throttle_cat, F32 bits) +bool LLThrottleGroup::checkOverflow(S32 throttle_cat, F32 bits) { - BOOL retval = TRUE; + bool retval = true; F32 category_bps = mCurrentBPS[throttle_cat]; F32 lookahead_bits = category_bps * THROTTLE_LOOKAHEAD_TIME; @@ -302,23 +302,23 @@ BOOL LLThrottleGroup::checkOverflow(S32 throttle_cat, F32 bits) // ...channel completely open, so allow send regardless // of size. This allows sends on very low BPS channels. mBitsAvailable[throttle_cat] = lookahead_bits; - retval = FALSE; + retval = false; } else if ( bits_available > bits ) { // ...enough space to send this message - retval = FALSE; + retval = false; } return retval; } -BOOL LLThrottleGroup::throttleOverflow(S32 throttle_cat, F32 bits) +bool LLThrottleGroup::throttleOverflow(S32 throttle_cat, F32 bits) { F32Seconds elapsed_time; F32 category_bps; F32 lookahead_bits; - BOOL retval = TRUE; + bool retval = true; category_bps = mCurrentBPS[throttle_cat]; lookahead_bits = category_bps * THROTTLE_LOOKAHEAD_TIME; @@ -333,12 +333,12 @@ BOOL LLThrottleGroup::throttleOverflow(S32 throttle_cat, F32 bits) // ...channel completely open, so allow send regardless // of size. This allows sends on very low BPS channels. mBitsAvailable[throttle_cat] = lookahead_bits; - retval = FALSE; + retval = false; } else if ( mBitsAvailable[throttle_cat] > bits ) { // ...enough space to send this message - retval = FALSE; + retval = false; } // We actually already sent the bits. @@ -354,7 +354,7 @@ BOOL LLThrottleGroup::throttleOverflow(S32 throttle_cat, F32 bits) } -BOOL LLThrottleGroup::dynamicAdjust() +bool LLThrottleGroup::dynamicAdjust() { const F32Seconds DYNAMIC_ADJUST_TIME(1.0f); const F32 CURRENT_PERIOD_WEIGHT = .25f; // how much weight to give to last period while determining BPS utilization @@ -370,7 +370,7 @@ BOOL LLThrottleGroup::dynamicAdjust() // Only dynamically adjust every few seconds if ((mt_sec - mDynamicAdjustTime) < DYNAMIC_ADJUST_TIME) { - return FALSE; + return false; } mDynamicAdjustTime = mt_sec; @@ -394,11 +394,11 @@ BOOL LLThrottleGroup::dynamicAdjust() // Look for busy channels // TODO: Fold into loop above. - BOOL channels_busy = FALSE; + bool channels_busy = false; F32 busy_nominal_sum = 0; - BOOL channel_busy[TC_EOF]; - BOOL channel_idle[TC_EOF]; - BOOL channel_over_nominal[TC_EOF]; + bool channel_busy[TC_EOF]; + bool channel_idle[TC_EOF]; + bool channel_over_nominal[TC_EOF]; for (i = 0; i < TC_EOF; i++) { @@ -406,34 +406,34 @@ BOOL LLThrottleGroup::dynamicAdjust() if (mBitsSentHistory[i] >= BUSY_PERCENT * DYNAMIC_ADJUST_TIME.value() * mCurrentBPS[i]) { // this channel is busy - channels_busy = TRUE; + channels_busy = true; busy_nominal_sum += mNominalBPS[i]; // use for allocation of pooled idle bandwidth - channel_busy[i] = TRUE; + channel_busy[i] = true; } else { - channel_busy[i] = FALSE; + channel_busy[i] = false; } // Is this an idle channel? if ((mBitsSentHistory[i] < IDLE_PERCENT * DYNAMIC_ADJUST_TIME.value() * mCurrentBPS[i]) && (mBitsAvailable[i] > 0)) { - channel_idle[i] = TRUE; + channel_idle[i] = true; } else { - channel_idle[i] = FALSE; + channel_idle[i] = false; } // Is this an overpumped channel? if (mCurrentBPS[i] > mNominalBPS[i]) { - channel_over_nominal[i] = TRUE; + channel_over_nominal[i] = true; } else { - channel_over_nominal[i] = FALSE; + channel_over_nominal[i] = false; } } @@ -573,5 +573,5 @@ BOOL LLThrottleGroup::dynamicAdjust() } } } - return TRUE; + return true; } diff --git a/indra/llmessage/llthrottle.h b/indra/llmessage/llthrottle.h index e43e54f61b..9b829e788a 100644 --- a/indra/llmessage/llthrottle.h +++ b/indra/llmessage/llthrottle.h @@ -41,8 +41,8 @@ public: ~LLThrottle() { } void setRate(const F32 rate); - BOOL checkOverflow(const F32 amount); // I'm about to add an amount, TRUE if would overflow throttle - BOOL throttleOverflow(const F32 amount); // I just sent amount, TRUE if that overflowed the throttle + bool checkOverflow(const F32 amount); // I'm about to add an amount, TRUE if would overflow throttle + bool throttleOverflow(const F32 amount); // I just sent amount, TRUE if that overflowed the throttle F32 getAvailable(); // Return the available bits F32 getRate() const { return mRate; } @@ -73,10 +73,10 @@ public: ~LLThrottleGroup() { } void resetDynamicAdjust(); - BOOL checkOverflow(S32 throttle_cat, F32 bits); // I'm about to send bits, TRUE if would overflow channel - BOOL throttleOverflow(S32 throttle_cat, F32 bits); // I just sent bits, TRUE if that overflowed the channel - BOOL dynamicAdjust(); // Shift bandwidth from idle channels to busy channels, TRUE if adjustment occurred - BOOL setNominalBPS(F32* throttle_vec); // TRUE if any value was different, resets adjustment system if was different + bool checkOverflow(S32 throttle_cat, F32 bits); // I'm about to send bits, TRUE if would overflow channel + bool throttleOverflow(S32 throttle_cat, F32 bits); // I just sent bits, TRUE if that overflowed the channel + bool dynamicAdjust(); // Shift bandwidth from idle channels to busy channels, TRUE if adjustment occurred + bool setNominalBPS(F32* throttle_vec); // TRUE if any value was different, resets adjustment system if was different S32 getAvailable(S32 throttle_cat); // Return bits available in the channel diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index 452b77fb6d..fb901644c7 100644 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -254,7 +254,7 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **) msgp->getBinaryData("TransferInfo", "Params", tmp, size); LLDataPackerBinaryBuffer dpb(tmp, MAX_PARAMS_SIZE); - BOOL unpack_ok = tsp->unpackParams(dpb); + bool unpack_ok = tsp->unpackParams(dpb); if (!unpack_ok) { // This should only happen if the data is corrupt or @@ -505,7 +505,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) // NOTE: THERE IS A CUT AND PASTE OF THIS CODE IN THE TRANSFERINFO HANDLER // SO WE CAN PLAY BACK DELAYED PACKETS THERE!!!!!!!!!!!!!!!!!!!!!!!!! // - BOOL done = FALSE; + bool done = false; while (!done) { LLTSCode ret_code = ttp->dataCallback(packet_id, tmp_data, size); @@ -780,7 +780,7 @@ void LLTransferSourceChannel::updateTransfers() LLPriQueueMap::pqm_iter iter, next; - BOOL done = FALSE; + bool done = false; for (iter = mTransferSources.mMap.begin(); (iter != mTransferSources.mMap.end()) && !done;) { //LL_INFOS() << "LLTransferSourceChannel::updateTransfers()" << LL_ENDL; @@ -791,7 +791,7 @@ void LLTransferSourceChannel::updateTransfers() LLTransferSource *tsp = iter->second; U8 *datap = NULL; S32 data_size = 0; - BOOL delete_data = FALSE; + bool delete_data = false; S32 packet_id = 0; S32 sent_bytes = 0; LLTSCode status = LLTS_OK; @@ -1335,7 +1335,7 @@ void LLTransferSourceParamsInvItem::packParams(LLDataPacker &dp) const } -BOOL LLTransferSourceParamsInvItem::unpackParams(LLDataPacker &dp) +bool LLTransferSourceParamsInvItem::unpackParams(LLDataPacker &dp) { S32 tmp_at; @@ -1349,7 +1349,7 @@ BOOL LLTransferSourceParamsInvItem::unpackParams(LLDataPacker &dp) mAssetType = (LLAssetType::EType)tmp_at; - return TRUE; + return true; } LLTransferSourceParamsEstate::LLTransferSourceParamsEstate() : @@ -1387,7 +1387,7 @@ void LLTransferSourceParamsEstate::packParams(LLDataPacker &dp) const } -BOOL LLTransferSourceParamsEstate::unpackParams(LLDataPacker &dp) +bool LLTransferSourceParamsEstate::unpackParams(LLDataPacker &dp) { S32 tmp_et; @@ -1397,5 +1397,5 @@ BOOL LLTransferSourceParamsEstate::unpackParams(LLDataPacker &dp) mEstateAssetType = (EstateAssetType)tmp_et; - return TRUE; + return true; } diff --git a/indra/llmessage/lltransfermanager.h b/indra/llmessage/lltransfermanager.h index 6aad153c24..a756771445 100644 --- a/indra/llmessage/lltransfermanager.h +++ b/indra/llmessage/lltransfermanager.h @@ -263,7 +263,7 @@ public: virtual ~LLTransferSourceParams(); virtual void packParams(LLDataPacker &dp) const = 0; - virtual BOOL unpackParams(LLDataPacker &dp) = 0; + virtual bool unpackParams(LLDataPacker &dp) = 0; LLTransferSourceType getType() const { return mType; } @@ -300,13 +300,13 @@ protected: const S32 max_bytes, U8 **datap, S32 &returned_bytes, - BOOL &delete_returned) = 0; + bool &delete_returned) = 0; // The completionCallback is GUARANTEED to be called before the destructor. virtual void completionCallback(const LLTSCode status) = 0; virtual void packParams(LLDataPacker& dp) const = 0; - virtual BOOL unpackParams(LLDataPacker& dp) = 0; + virtual bool unpackParams(LLDataPacker& dp) = 0; virtual S32 getNextPacketID() { return mLastPacketID + 1; } virtual void setLastPacketID(const S32 packet_id) { mLastPacketID = packet_id; } @@ -440,7 +440,7 @@ public: LLTransferSourceParamsInvItem(); virtual ~LLTransferSourceParamsInvItem() {} /*virtual*/ void packParams(LLDataPacker &dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); void setAgentSession(const LLUUID &agent_id, const LLUUID &session_id); void setInvItem(const LLUUID &owner_id, const LLUUID &task_id, const LLUUID &item_id); @@ -472,7 +472,7 @@ public: LLTransferSourceParamsEstate(); virtual ~LLTransferSourceParamsEstate() {} /*virtual*/ void packParams(LLDataPacker &dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); void setAgentSession(const LLUUID &agent_id, const LLUUID &session_id); void setEstateAssetType(const EstateAssetType etype); diff --git a/indra/llmessage/lltransfersourceasset.cpp b/indra/llmessage/lltransfersourceasset.cpp index 027283232d..32fdc83f0e 100644 --- a/indra/llmessage/lltransfersourceasset.cpp +++ b/indra/llmessage/lltransfersourceasset.cpp @@ -62,7 +62,7 @@ void LLTransferSourceAsset::initTransfer() mParams.getAssetType(), LLTransferSourceAsset::responderCallback, tidp, - FALSE); + false); } else { @@ -91,7 +91,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id, const S32 max_bytes, U8 **data_handle, S32 &returned_bytes, - BOOL &delete_returned) + bool &delete_returned) { //LL_INFOS() << "LLTransferSourceAsset::dataCallback" << LL_ENDL; if (!mGotResponse) @@ -164,7 +164,7 @@ void LLTransferSourceAsset::packParams(LLDataPacker& dp) const mParams.packParams(dp); } -BOOL LLTransferSourceAsset::unpackParams(LLDataPacker &dp) +bool LLTransferSourceAsset::unpackParams(LLDataPacker &dp) { //LL_INFOS() << "LLTransferSourceAsset::unpackParams" << LL_ENDL; return mParams.unpackParams(dp); @@ -240,7 +240,7 @@ void LLTransferSourceParamsAsset::packParams(LLDataPacker &dp) const } -BOOL LLTransferSourceParamsAsset::unpackParams(LLDataPacker &dp) +bool LLTransferSourceParamsAsset::unpackParams(LLDataPacker &dp) { S32 tmp_at; @@ -249,6 +249,6 @@ BOOL LLTransferSourceParamsAsset::unpackParams(LLDataPacker &dp) mAssetType = (LLAssetType::EType)tmp_at; - return TRUE; + return true; } diff --git a/indra/llmessage/lltransfersourceasset.h b/indra/llmessage/lltransfersourceasset.h index 585e683cb3..f2a5dc214e 100644 --- a/indra/llmessage/lltransfersourceasset.h +++ b/indra/llmessage/lltransfersourceasset.h @@ -38,7 +38,7 @@ public: LLTransferSourceParamsAsset(); virtual ~LLTransferSourceParamsAsset() {} /*virtual*/ void packParams(LLDataPacker &dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); void setAsset(const LLUUID &asset_id, const LLAssetType::EType asset_type); @@ -65,15 +65,15 @@ protected: const S32 max_bytes, U8 **datap, S32 &returned_bytes, - BOOL &delete_returned); + bool &delete_returned); /*virtual*/ void completionCallback(const LLTSCode status); virtual void packParams(LLDataPacker& dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); protected: LLTransferSourceParamsAsset mParams; - BOOL mGotResponse; + bool mGotResponse; S32 mCurPos; }; diff --git a/indra/llmessage/lltransfersourcefile.cpp b/indra/llmessage/lltransfersourcefile.cpp index 1f284a158d..1192a6e461 100644 --- a/indra/llmessage/lltransfersourcefile.cpp +++ b/indra/llmessage/lltransfersourcefile.cpp @@ -86,7 +86,7 @@ LLTSCode LLTransferSourceFile::dataCallback(const S32 packet_id, const S32 max_bytes, U8 **data_handle, S32 &returned_bytes, - BOOL &delete_returned) + bool &delete_returned) { //LL_INFOS() << "LLTransferSourceFile::dataCallback" << LL_ENDL; @@ -141,7 +141,7 @@ void LLTransferSourceFile::packParams(LLDataPacker& dp) const mParams.packParams(dp); } -BOOL LLTransferSourceFile::unpackParams(LLDataPacker &dp) +bool LLTransferSourceFile::unpackParams(LLDataPacker &dp) { //LL_INFOS() << "LLTransferSourceFile::unpackParams" << LL_ENDL; return mParams.unpackParams(dp); @@ -150,7 +150,7 @@ BOOL LLTransferSourceFile::unpackParams(LLDataPacker &dp) LLTransferSourceParamsFile::LLTransferSourceParamsFile() : LLTransferSourceParams(LLTST_FILE), - mDeleteOnCompletion(FALSE) + mDeleteOnCompletion(false) { } @@ -162,7 +162,7 @@ void LLTransferSourceParamsFile::packParams(LLDataPacker &dp) const } -BOOL LLTransferSourceParamsFile::unpackParams(LLDataPacker &dp) +bool LLTransferSourceParamsFile::unpackParams(LLDataPacker &dp) { dp.unpackString(mFilename, "Filename"); U8 delete_flag; @@ -170,5 +170,5 @@ BOOL LLTransferSourceParamsFile::unpackParams(LLDataPacker &dp) mDeleteOnCompletion = delete_flag; LL_INFOS() << "Unpacked filename: " << mFilename << LL_ENDL; - return TRUE; + return true; } diff --git a/indra/llmessage/lltransfersourcefile.h b/indra/llmessage/lltransfersourcefile.h index 985042417e..bda6bad14f 100644 --- a/indra/llmessage/lltransfersourcefile.h +++ b/indra/llmessage/lltransfersourcefile.h @@ -35,7 +35,7 @@ public: LLTransferSourceParamsFile(); virtual ~LLTransferSourceParamsFile() {} /*virtual*/ void packParams(LLDataPacker &dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); void setFilename(const std::string &filename) { mFilename = filename; } std::string getFilename() const { return mFilename; } @@ -61,11 +61,11 @@ protected: const S32 max_bytes, U8 **datap, S32 &returned_bytes, - BOOL &delete_returned); + bool &delete_returned); /*virtual*/ void completionCallback(const LLTSCode status); virtual void packParams(LLDataPacker& dp) const; - /*virtual*/ BOOL unpackParams(LLDataPacker &dp); + /*virtual*/ bool unpackParams(LLDataPacker &dp); protected: LLTransferSourceParamsFile mParams; diff --git a/indra/llmessage/lluseroperation.cpp b/indra/llmessage/lluseroperation.cpp index c506af19ce..d56997c7de 100644 --- a/indra/llmessage/lluseroperation.cpp +++ b/indra/llmessage/lluseroperation.cpp @@ -72,14 +72,14 @@ void LLUserOperation::SetNoExpireFlag(const BOOL flag) mNoExpire = flag; } -BOOL LLUserOperation::isExpired() +bool LLUserOperation::isExpired() { if (!mNoExpire) { const F32 EXPIRE_TIME_SECS = 10.f; return mTimer.getElapsedTimeF32() > EXPIRE_TIME_SECS; } - return FALSE; + return false; } void LLUserOperation::expire() @@ -128,7 +128,7 @@ LLUserOperation* LLUserOperationMgr::findOperation(const LLUUID& tid) } -BOOL LLUserOperationMgr::deleteOperation(LLUserOperation* op) +bool LLUserOperationMgr::deleteOperation(LLUserOperation* op) { size_t rv = 0; if(op) @@ -138,7 +138,7 @@ BOOL LLUserOperationMgr::deleteOperation(LLUserOperation* op) delete op; op = NULL; } - return rv ? TRUE : FALSE; + return rv ? true : false; } void LLUserOperationMgr::deleteExpiredOperations() diff --git a/indra/llmessage/lluseroperation.h b/indra/llmessage/lluseroperation.h index 7db5f0b27f..88e5f82622 100644 --- a/indra/llmessage/lluseroperation.h +++ b/indra/llmessage/lluseroperation.h @@ -44,7 +44,7 @@ public: const LLUUID& getAgentID() const { return mAgentID; } // Operation never got necessary data, so expired - virtual BOOL isExpired(); + virtual bool isExpired(); // ability to mark this operation as never expiring. void SetNoExpireFlag(const BOOL flag); @@ -54,7 +54,7 @@ public: // Run the operation. This will only be called in the case of an // actual success or failure of the operation. - virtual BOOL execute(BOOL transaction_success) = 0; + virtual bool execute(BOOL transaction_success) = 0; // This method is called when the user op has expired, and is // about to be deleted by the manager. This gives the user op the @@ -68,7 +68,7 @@ protected: LLUUID mAgentID; LLUUID mTransactionID; LLFrameTimer mTimer; - BOOL mNoExpire; // this is used for operations that expect an answer and will wait till it gets one. + bool mNoExpire; // this is used for operations that expect an answer and will wait till it gets one. }; @@ -80,7 +80,7 @@ public: void addOperation(LLUserOperation* op); LLUserOperation* findOperation(const LLUUID& transaction_id); - BOOL deleteOperation(LLUserOperation* op); + bool deleteOperation(LLUserOperation* op); // Call this method every once in a while to clean up old // transactions. diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index 93d5cfc131..ad291df717 100644 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp @@ -327,7 +327,7 @@ S32 LLXfer::processEOF() /////////////////////////////////////////////////////////// -S32 LLXfer::encodePacketNum(S32 packet_num, BOOL is_EOF) +S32 LLXfer::encodePacketNum(S32 packet_num, bool is_EOF) { if (is_EOF) { diff --git a/indra/llmessage/llxfer.h b/indra/llmessage/llxfer.h index a906674dec..cfd9f83d54 100644 --- a/indra/llmessage/llxfer.h +++ b/indra/llmessage/llxfer.h @@ -103,7 +103,7 @@ class LLXfer virtual S32 suck(S32 start_position); virtual S32 flush(); - virtual S32 encodePacketNum(S32 packet_num, BOOL is_eof); + virtual S32 encodePacketNum(S32 packet_num, bool is_eof); virtual void setXferSize (S32 data_size); virtual S32 getMaxBufferSize(); diff --git a/indra/llmessage/llxfer_file.cpp b/indra/llmessage/llxfer_file.cpp index 7fd4222fb7..f5e9071aa4 100644 --- a/indra/llmessage/llxfer_file.cpp +++ b/indra/llmessage/llxfer_file.cpp @@ -412,14 +412,14 @@ S32 LLXfer_File::processEOF() /////////////////////////////////////////////////////////// -BOOL LLXfer_File::matchesLocalFilename(const std::string& filename) +bool LLXfer_File::matchesLocalFilename(const std::string& filename) { return (filename == mLocalFilename); } /////////////////////////////////////////////////////////// -BOOL LLXfer_File::matchesRemoteFilename(const std::string& filename, ELLPath remote_path) +bool LLXfer_File::matchesRemoteFilename(const std::string& filename, ELLPath remote_path) { return ((filename == mRemoteFilename) && (remote_path == mRemotePath)); } diff --git a/indra/llmessage/llxfer_file.h b/indra/llmessage/llxfer_file.h index ab9374549e..15a0120932 100644 --- a/indra/llmessage/llxfer_file.h +++ b/indra/llmessage/llxfer_file.h @@ -69,8 +69,8 @@ class LLXfer_File : public LLXfer virtual S32 suck(S32 start_position); virtual S32 flush(); - virtual BOOL matchesLocalFilename(const std::string& filename); - virtual BOOL matchesRemoteFilename(const std::string& filename, ELLPath remote_path); + virtual bool matchesLocalFilename(const std::string& filename); + virtual bool matchesRemoteFilename(const std::string& filename, ELLPath remote_path); virtual S32 getMaxBufferSize(); diff --git a/indra/llmessage/llxfer_vfile.cpp b/indra/llmessage/llxfer_vfile.cpp index 12419b342d..f478825d97 100644 --- a/indra/llmessage/llxfer_vfile.cpp +++ b/indra/llmessage/llxfer_vfile.cpp @@ -367,14 +367,14 @@ S32 LLXfer_VFile::processEOF() //////////////////////////////////////////////////////////// -BOOL LLXfer_VFile::matchesLocalFile(const LLUUID &id, LLAssetType::EType type) +bool LLXfer_VFile::matchesLocalFile(const LLUUID &id, LLAssetType::EType type) { return (id == mLocalID && type == mType); } ////////////////////////////////////////////////////////// -BOOL LLXfer_VFile::matchesRemoteFile(const LLUUID &id, LLAssetType::EType type) +bool LLXfer_VFile::matchesRemoteFile(const LLUUID &id, LLAssetType::EType type) { return (id == mRemoteID && type == mType); } diff --git a/indra/llmessage/llxfer_vfile.h b/indra/llmessage/llxfer_vfile.h index d82bab5f6c..71eaeb7393 100644 --- a/indra/llmessage/llxfer_vfile.h +++ b/indra/llmessage/llxfer_vfile.h @@ -72,8 +72,8 @@ class LLXfer_VFile : public LLXfer virtual S32 suck(S32 start_position); virtual S32 flush(); - virtual BOOL matchesLocalFile(const LLUUID &id, LLAssetType::EType type); - virtual BOOL matchesRemoteFile(const LLUUID &id, LLAssetType::EType type); + virtual bool matchesLocalFile(const LLUUID &id, LLAssetType::EType type); + virtual bool matchesRemoteFile(const LLUUID &id, LLAssetType::EType type); virtual void setXferSize(S32 xfer_size); virtual S32 getMaxBufferSize(); diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index 956ecc11a3..591dbc18c2 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -367,7 +367,7 @@ U64 LLXferManager::getNextID () /////////////////////////////////////////////////////////// -S32 LLXferManager::encodePacketNum(S32 packet_num, BOOL is_EOF) +S32 LLXferManager::encodePacketNum(S32 packet_num, bool is_EOF) { if (is_EOF) { @@ -385,7 +385,7 @@ S32 LLXferManager::decodePacketNum(S32 packet_num) /////////////////////////////////////////////////////////// -BOOL LLXferManager::isLastPacket(S32 packet_num) +bool LLXferManager::isLastPacket(S32 packet_num) { return(packet_num & 0x80000000); } @@ -396,11 +396,11 @@ U64 LLXferManager::requestFile(const std::string& local_filename, const std::string& remote_filename, ELLPath remote_path, const LLHost& remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void**,S32,LLExtStat), void** user_data, - BOOL is_priority, - BOOL use_big_packets) + bool is_priority, + bool use_big_packets) { LLXfer_File* file_xfer_p = NULL; @@ -464,7 +464,7 @@ void LLXferManager::requestVFile(const LLUUID& local_id, const LLHost& remote_host, void (*callback)(void**,S32,LLExtStat), void** user_data, - BOOL is_priority) + bool is_priority) { LLXfer_VFile * xfer_p = NULL; @@ -1235,7 +1235,7 @@ void LLXferManager::startPendingDownloads() /////////////////////////////////////////////////////////// -void LLXferManager::addToList(LLXfer* xferp, xfer_list_t & xfer_list, BOOL is_priority) +void LLXferManager::addToList(LLXfer* xferp, xfer_list_t & xfer_list, bool is_priority) { if(is_priority) { diff --git a/indra/llmessage/llxfermanager.h b/indra/llmessage/llxfermanager.h index f49209bed0..17625aedfa 100644 --- a/indra/llmessage/llxfermanager.h +++ b/indra/llmessage/llxfermanager.h @@ -100,7 +100,7 @@ class LLXferManager protected: // implementation methods virtual void startPendingDownloads(); - virtual void addToList(LLXfer* xferp, xfer_list_t & xfer_list, BOOL is_priority); + virtual void addToList(LLXfer* xferp, xfer_list_t & xfer_list, bool is_priority); std::multiset mExpectedTransfers; // files that are authorized to transfer out std::multiset mExpectedRequests; // files that are authorized to be downloaded on top of std::multiset mExpectedVFileTransfers; // files that are authorized to transfer out @@ -135,9 +135,9 @@ class LLXferManager // general utility routines virtual void registerCallbacks(LLMessageSystem *mesgsys); virtual U64 getNextID (); - virtual S32 encodePacketNum(S32 packet_num, BOOL is_eof); - virtual S32 decodePacketNum(S32 packet_num); - virtual BOOL isLastPacket(S32 packet_num); + virtual S32 encodePacketNum(S32 packet_num, bool is_eof); + virtual S32 decodePacketNum(S32 packet_num); + virtual bool isLastPacket(S32 packet_num); // file requesting routines // .. to file @@ -145,19 +145,19 @@ class LLXferManager const std::string& remote_filename, ELLPath remote_path, const LLHost& remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void**,S32,LLExtStat), void** user_data, - BOOL is_priority = FALSE, - BOOL use_big_packets = FALSE); + bool is_priority = false, + bool use_big_packets = false); /* // .. to memory virtual void requestFile(const std::string& remote_filename, ELLPath remote_path, const LLHost &remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void*, S32, void**, S32, LLExtStat), void** user_data, - BOOL is_priority = FALSE); + bool is_priority = false); */ // vfile requesting // .. to vfile @@ -165,7 +165,7 @@ class LLXferManager LLAssetType::EType type, const LLHost& remote_host, void (*callback)(void**,S32,LLExtStat), void** user_data, - BOOL is_priority = FALSE); + bool is_priority = false); /** When arbitrary files are requested to be transfered (by giving a dir of LL_PATH_NONE) they must be "expected", but having something pre-authorize them. This pair of functions diff --git a/indra/llmessage/llxorcipher.cpp b/indra/llmessage/llxorcipher.cpp index 9053e1b2f1..17651b1ecf 100644 --- a/indra/llmessage/llxorcipher.cpp +++ b/indra/llmessage/llxorcipher.cpp @@ -109,7 +109,7 @@ void LLXORCipher::init(const U8* pad, U32 pad_len) #ifdef _DEBUG // static -BOOL LLXORCipher::testHarness() +bool LLXORCipher::testHarness() { const U32 PAD_LEN = 3; const U8 PAD[] = "abc"; @@ -122,7 +122,7 @@ BOOL LLXORCipher::testHarness() cipher.encrypt((U8*)MESSAGE, MSG_LENGTH, encrypted, MSG_LENGTH); cipher.decrypt(encrypted, MSG_LENGTH, decrypted, MSG_LENGTH); - if(0 != memcmp((void*)MESSAGE, decrypted, MSG_LENGTH)) return FALSE; - return TRUE; + if(0 != memcmp((void*)MESSAGE, decrypted, MSG_LENGTH)) return false; + return true; } #endif diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index 5e24061959..d11efab7ab 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -362,7 +362,7 @@ void LLMessageSystem::clearReceiveState() } -BOOL LLMessageSystem::poll(F32 seconds) +bool LLMessageSystem::poll(F32 seconds) { S32 num_socks; apr_status_t status; @@ -373,11 +373,11 @@ BOOL LLMessageSystem::poll(F32 seconds) } if (num_socks) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -468,7 +468,7 @@ LLCircuitData* LLMessageSystem::findCircuit(const LLHost& host, else { // wake up the circuit - cdp->setAlive(TRUE); + cdp->setAlive(true); if(resetPacketId) { @@ -484,10 +484,10 @@ LLCircuitData* LLMessageSystem::findCircuit(const LLHost& host, // Returns TRUE if a valid, on-circuit message has been received. // Requiring a non-const LockMessageChecker reference ensures that // mMessageReader has been set to mTemplateMessageReader. -BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) +bool LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) { // Pump - BOOL valid_packet = FALSE; + bool valid_packet = false; LLTransferTargetVFile::updateQueue(); @@ -506,8 +506,8 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) { clearReceiveState(); - BOOL recv_reliable = FALSE; - BOOL recv_resent = FALSE; + BOOL recv_reliable = false; + BOOL recv_resent = false; S32 acks = 0; S32 true_rcv_size = 0; @@ -531,7 +531,7 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) callExceptionFunc(MX_PACKET_TOO_SHORT); } // no data in packet receive buffer - valid_packet = FALSE; + valid_packet = false; } else { @@ -554,7 +554,7 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) LL_WARNS("Messaging") << "Malformed packet received. Packet size " << receive_size << " with invalid no. of acks " << acks << LL_ENDL; - valid_packet = FALSE; + valid_packet = false; continue; } } @@ -593,11 +593,11 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) if (buffer[0] & LL_RELIABLE_FLAG) { - recv_reliable = TRUE; + recv_reliable = true; } if (buffer[0] & LL_RESENT_FLAG) { - recv_resent = TRUE; + recv_resent = true; if (cdp && cdp->isDuplicateResend(mCurrentRecvPacketID)) { // We need to ACK here to suppress @@ -635,7 +635,7 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) LL_INFOS("Messaging") << str.str() << LL_ENDL; } mPacketsIn++; - valid_packet = FALSE; + valid_packet = false; continue; } } @@ -664,7 +664,7 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) { logMsgFromInvalidCircuit( host, recv_reliable ); clearReceiveState(); - valid_packet = FALSE; + valid_packet = false; } if( @@ -677,12 +677,12 @@ BOOL LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) clearReceiveState(); sendDenyTrustedCircuit(host); - valid_packet = FALSE; + valid_packet = false; } if( valid_packet ) { - logValidMsg(cdp, host, recv_reliable, recv_resent, (BOOL)(acks>0) ); + logValidMsg(cdp, host, recv_reliable, recv_resent, acks>0 ); valid_packet = mTemplateMessageReader->readMessage(buffer, host); } @@ -943,7 +943,7 @@ void LLMessageSystem::nextBlock(const char *blockname) nextBlockFast(LLMessageStringTable::getInstance()->getString(blockname)); } -BOOL LLMessageSystem::isSendFull(const char* blockname) +bool LLMessageSystem::isSendFull(const char* blockname) { char* stringTableName = NULL; if(NULL != blockname) @@ -953,7 +953,7 @@ BOOL LLMessageSystem::isSendFull(const char* blockname) return isSendFullFast(stringTableName); } -BOOL LLMessageSystem::isSendFullFast(const char* blockname) +bool LLMessageSystem::isSendFullFast(const char* blockname) { return mMessageBuilder->isMessageFull(blockname); } @@ -961,7 +961,7 @@ BOOL LLMessageSystem::isSendFullFast(const char* blockname) // blow away the last block of a message, return FALSE if that leaves no blocks or there wasn't a block to remove // TODO: Babbage: Remove this horror. -BOOL LLMessageSystem::removeLastBlock() +bool LLMessageSystem::removeLastBlock() { return mMessageBuilder->removeLastBlock(); } @@ -1524,7 +1524,7 @@ void LLMessageSystem::enableCircuit(const LLHost &host, BOOL trusted) } else { - cdp->setAlive(TRUE); + cdp->setAlive(true); } cdp->setTrusted(trusted); } @@ -1595,14 +1595,14 @@ void LLMessageSystem::setCircuitTimeoutCallback(const LLHost &host, void (*callb } -BOOL LLMessageSystem::checkCircuitBlocked(const U32 circuit) +bool LLMessageSystem::checkCircuitBlocked(const U32 circuit) { LLHost host = findHost(circuit); if (!host.isOk()) { LL_DEBUGS("Messaging") << "checkCircuitBlocked: Unknown circuit " << circuit << LL_ENDL; - return TRUE; + return true; } LLCircuitData *cdp = mCircuitInfo.findCircuit(host); @@ -1613,18 +1613,18 @@ BOOL LLMessageSystem::checkCircuitBlocked(const U32 circuit) else { LL_INFOS("Messaging") << "checkCircuitBlocked(circuit): Unknown host - " << host << LL_ENDL; - return FALSE; + return false; } } -BOOL LLMessageSystem::checkCircuitAlive(const U32 circuit) +bool LLMessageSystem::checkCircuitAlive(const U32 circuit) { LLHost host = findHost(circuit); if (!host.isOk()) { LL_DEBUGS("Messaging") << "checkCircuitAlive: Unknown circuit " << circuit << LL_ENDL; - return FALSE; + return false; } LLCircuitData *cdp = mCircuitInfo.findCircuit(host); @@ -1635,11 +1635,11 @@ BOOL LLMessageSystem::checkCircuitAlive(const U32 circuit) else { LL_INFOS("Messaging") << "checkCircuitAlive(circuit): Unknown host - " << host << LL_ENDL; - return FALSE; + return false; } } -BOOL LLMessageSystem::checkCircuitAlive(const LLHost &host) +bool LLMessageSystem::checkCircuitAlive(const LLHost &host) { LLCircuitData *cdp = mCircuitInfo.findCircuit(host); if (cdp) @@ -1649,7 +1649,7 @@ BOOL LLMessageSystem::checkCircuitAlive(const LLHost &host) else { LL_DEBUGS("Messaging") << "checkCircuitAlive(host): Unknown host - " << host << LL_ENDL; - return FALSE; + return false; } } @@ -2291,7 +2291,7 @@ void process_create_trusted_circuit(LLMessageSystem *msg, void **) their_digest[MD5HEX_STR_SIZE - 1] = '\0'; if(msg->isMatchingDigestForWindowAndUUIDs(their_digest, TRUST_TIME_WINDOW, local_id, remote_id)) { - cdp->setTrusted(TRUE); + cdp->setTrusted(true); LL_INFOS("Messaging") << "Trusted digest from " << msg->getSender() << LL_ENDL; return; } @@ -2715,7 +2715,7 @@ void LLMessageSystem::dumpReceiveCounts() -BOOL LLMessageSystem::isClear() const +bool LLMessageSystem::isClear() const { return mMessageBuilder->isClear(); } @@ -2981,12 +2981,12 @@ void LLMessageSystem::setExceptionFunc(EMessageException e, } } -BOOL LLMessageSystem::callExceptionFunc(EMessageException exception) +bool LLMessageSystem::callExceptionFunc(EMessageException exception) { callbacks_t::iterator it = mExceptionCallbacks.find(exception); if(it == mExceptionCallbacks.end()) { - return FALSE; + return false; } exception_t& ex = it->second; @@ -2995,12 +2995,12 @@ BOOL LLMessageSystem::callExceptionFunc(EMessageException exception) if (!ex_cb) { LL_WARNS("Messaging") << "LLMessageSystem::callExceptionFunc: bad message exception callback." << LL_ENDL; - return FALSE; + return false; } (ex_cb)(this, ex.second, exception); - return TRUE; + return true; } void LLMessageSystem::setTimingFunc(msg_timing_callback func, void* data) @@ -3009,14 +3009,14 @@ void LLMessageSystem::setTimingFunc(msg_timing_callback func, void* data) mTimingCallbackData = data; } -BOOL LLMessageSystem::isCircuitCodeKnown(U32 code) const +bool LLMessageSystem::isCircuitCodeKnown(U32 code) const { if(mCircuitCodes.find(code) == mCircuitCodes.end()) - return FALSE; - return TRUE; + return false; + return true; } -BOOL LLMessageSystem::isMessageFast(const char *msg) +bool LLMessageSystem::isMessageFast(const char *msg) { return msg == mMessageReader->getMessageName(); } @@ -3561,12 +3561,12 @@ void LLMessageSystem::addIPPort(const char *varname, U16 v) mMessageBuilder->addIPPort(LLMessageStringTable::getInstance()->getString(varname), v); } -void LLMessageSystem::addBOOLFast(const char* varname, BOOL v) +void LLMessageSystem::addBOOLFast(const char* varname, bool v) { mMessageBuilder->addBOOL(varname, v); } -void LLMessageSystem::addBOOL(const char* varname, BOOL v) +void LLMessageSystem::addBOOL(const char* varname, bool v) { mMessageBuilder->addBOOL(LLMessageStringTable::getInstance()->getString(varname), v); } @@ -3969,7 +3969,7 @@ S32 LLMessageSystem::getReceiveSize() const } //static -void LLMessageSystem::setTimeDecodes( BOOL b ) +void LLMessageSystem::setTimeDecodes( bool b ) { LLMessageReader::setTimeDecodes(b); } diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index c041a69d79..c40da26067 100644 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -390,7 +390,7 @@ public: void setExceptionFunc(EMessageException exception, msg_exception_callback func, void* data = NULL); // Call the specified exception func, and return TRUE if a // function was found and called. Otherwise return FALSE. - BOOL callExceptionFunc(EMessageException exception); + bool callExceptionFunc(EMessageException exception); // Set a function that will be called once per packet processed with the // hashed message name and the time spent in the processing handler function @@ -407,18 +407,18 @@ public: } // This method returns true if the code is in the circuit codes map. - BOOL isCircuitCodeKnown(U32 code) const; + bool isCircuitCodeKnown(U32 code) const; // usually called in response to an AddCircuitCode message, but // may also be called by the login process. bool addCircuitCode(U32 code, const LLUUID& session_id); - BOOL poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received - BOOL checkMessages(LockMessageChecker&, S64 frame_count = 0 ); + bool poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received + bool checkMessages(LockMessageChecker&, S64 frame_count = 0 ); void processAcks(LockMessageChecker&, F32 collect_time = 0.f); - BOOL isMessageFast(const char *msg); - BOOL isMessage(const char *msg) + bool isMessageFast(const char *msg); + bool isMessage(const char *msg) { return isMessageFast(LLMessageStringTable::getInstance()->getString(msg)); } @@ -482,8 +482,8 @@ public: void addBinaryDataFast(const char *varname, const void *data, S32 size); void addBinaryData(const char *varname, const void *data, S32 size); - void addBOOLFast( const char* varname, BOOL b); // typed, checks storage space - void addBOOL( const char* varname, BOOL b); // typed, checks storage space + void addBOOLFast( const char* varname, bool b); // typed, checks storage space + void addBOOL( const char* varname, bool b); // typed, checks storage space void addS8Fast( const char *varname, S8 s); // typed, checks storage space void addS8( const char *varname, S8 s); // typed, checks storage space void addU8Fast( const char *varname, U8 u); // typed, checks storage space @@ -528,10 +528,10 @@ public: // you need to go to the next block type or need to start a new // message. Specify the current blockname to check block counts, // otherwise the method only checks against MTU. - BOOL isSendFull(const char* blockname = NULL); - BOOL isSendFullFast(const char* blockname = NULL); + bool isSendFull(const char* blockname = NULL); + bool isSendFullFast(const char* blockname = NULL); - BOOL removeLastBlock(); + bool removeLastBlock(); //void buildMessage(); @@ -717,9 +717,9 @@ public: void setCircuitAllowTimeout(const LLHost &host, BOOL allow); void setCircuitTimeoutCallback(const LLHost &host, void (*callback_func)(const LLHost &host, void *user_data), void *user_data); - BOOL checkCircuitBlocked(const U32 circuit); - BOOL checkCircuitAlive(const U32 circuit); - BOOL checkCircuitAlive(const LLHost &host); + bool checkCircuitBlocked(const U32 circuit); + bool checkCircuitAlive(const U32 circuit); + bool checkCircuitAlive(const LLHost &host); void setCircuitProtection(BOOL b_protect); U32 findCircuitCode(const LLHost &host); LLHost findHost(const U32 circuit_code); @@ -738,7 +738,7 @@ public: void dumpReceiveCounts(); // dumps receive count for each message type to LL_INFOS() void dumpCircuitInfo(); // Circuit information to LL_INFOS() - BOOL isClear() const; // returns mbSClear; + bool isClear() const; // returns mbSClear; S32 flush(const LLHost &host); U32 getListenPort( void ) const; @@ -765,8 +765,8 @@ public: static U64Microseconds getMessageTimeUsecs(const BOOL update = FALSE); // Get the current message system time in microseconds static F64Seconds getMessageTimeSeconds(const BOOL update = FALSE); // Get the current message system time in seconds - static void setTimeDecodes(BOOL b); - static void setTimeDecodesSpamThreshold(F32 seconds); + static void setTimeDecodes(bool b); + static void setTimeDecodesSpamThreshold(F32 seconds); // message handlers internal to the message systesm //static void processAssignCircuitCode(LLMessageSystem* msg, void**); diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp index d87de38aa5..d42a7ef989 100644 --- a/indra/llmessage/partsyspacket.cpp +++ b/indra/llmessage/partsyspacket.cpp @@ -1052,7 +1052,7 @@ U32 LLPartSysCompressedPacket::readWindDiffusionFactor(LLPartInitData *in, U32 s return startByte; } -BOOL LLPartSysCompressedPacket::fromLLPartInitData(LLPartInitData *in, U32 &bytesUsed) +bool LLPartSysCompressedPacket::fromLLPartInitData(LLPartInitData *in, U32 &bytesUsed) { writeFlagByte(in); @@ -1171,7 +1171,7 @@ BOOL LLPartSysCompressedPacket::fromLLPartInitData(LLPartInitData *in, U32 &byte return TRUE; } -BOOL LLPartSysCompressedPacket::toLLPartInitData(LLPartInitData *out, U32 *bytesUsed) +bool LLPartSysCompressedPacket::toLLPartInitData(LLPartInitData *out, U32 *bytesUsed) { U32 currByte = 4; @@ -1259,21 +1259,21 @@ BOOL LLPartSysCompressedPacket::toLLPartInitData(LLPartInitData *out, U32 *bytes } *bytesUsed = currByte; - return TRUE; + return true; } -BOOL LLPartSysCompressedPacket::fromUnsignedBytes(U8 *in, U32 bytesUsed) +bool LLPartSysCompressedPacket::fromUnsignedBytes(U8 *in, U32 bytesUsed) { if ((in != NULL) && (bytesUsed <= sizeof(mData))) { memcpy(mData, in, bytesUsed); /* Flawfinder: ignore */ mNumBytes = bytesUsed; - return TRUE; + return true; } else { LL_ERRS() << "NULL input data or number of bytes exceed mData size" << LL_ENDL; - return FALSE; + return false; } } @@ -1283,10 +1283,10 @@ U32 LLPartSysCompressedPacket::bufferSize() return mNumBytes; } -BOOL LLPartSysCompressedPacket::toUnsignedBytes(U8 *out) +bool LLPartSysCompressedPacket::toUnsignedBytes(U8 *out) { memcpy(out, mData, mNumBytes); /* Flawfinder: ignore */ - return TRUE; + return true; } U8 * LLPartSysCompressedPacket::getBytePtr() diff --git a/indra/llmessage/partsyspacket.h b/indra/llmessage/partsyspacket.h index d9abecea3f..0a8e433cbd 100644 --- a/indra/llmessage/partsyspacket.h +++ b/indra/llmessage/partsyspacket.h @@ -202,10 +202,10 @@ class LLPartSysCompressedPacket public: LLPartSysCompressedPacket(); ~LLPartSysCompressedPacket(); - BOOL fromLLPartInitData(LLPartInitData *in, U32 &bytesUsed); - BOOL toLLPartInitData(LLPartInitData *out, U32 *bytesUsed); - BOOL fromUnsignedBytes(U8 *in, U32 bytesUsed); - BOOL toUnsignedBytes(U8 *out); + bool fromLLPartInitData(LLPartInitData *in, U32 &bytesUsed); + bool toLLPartInitData(LLPartInitData *out, U32 *bytesUsed); + bool fromUnsignedBytes(U8 *in, U32 bytesUsed); + bool toUnsignedBytes(U8 *out); U32 bufferSize(); U8 *getBytePtr(); diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 4b0fbc0466..2ded1d1906 100644 --- a/indra/llrender/llgl.h +++ b/indra/llrender/llgl.h @@ -45,7 +45,7 @@ #include "llglheaders.h" #include "glh/glh_linear.h" -extern BOOL gDebugGL; +extern bool gDebugGL; extern BOOL gDebugSession; extern BOOL gDebugGLSession; extern llofstream gFailLog; diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 6315b2cd7c..78c4c90663 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -2072,9 +2072,9 @@ S64 LLImageGL::getMipBytes(S32 discard_level) const return res; } -BOOL LLImageGL::isJustBound() const +bool LLImageGL::isJustBound() const { - return (BOOL)(sLastFrameTime - mLastBindTime < 0.5f); + return sLastFrameTime - mLastBindTime < 0.5f; } BOOL LLImageGL::getBoundRecently() const diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index a9a6b93cb3..1b77fd0964 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -148,7 +148,7 @@ public: S64 getBytes(S32 discard_level = -1) const; S64 getMipBytes(S32 discard_level = -1) const; BOOL getBoundRecently() const; - BOOL isJustBound() const; + bool isJustBound() const; BOOL getHasExplicitFormat() const { return mHasExplicitFormat; } LLGLenum getPrimaryFormat() const { return mFormatPrimary; } LLGLenum getFormatType() const { return mFormatType; } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 89d3428d9b..4ffd9198a2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -286,7 +286,7 @@ extern void init_apple_menu(const char* product); extern BOOL gRandomizeFramerate; extern BOOL gPeriodicSlowFrame; -extern BOOL gDebugGL; +extern bool gDebugGL; #if LL_DARWIN extern bool gHiDPISupport; diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 4b22f7427b..24e7d8af04 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -1344,7 +1344,7 @@ void LLPanelRequestTools::sendRequest(const LLHost& host) { gXferManager->requestFile(std::string("terrain.raw"), std::string("terrain.raw"), LL_PATH_NONE, host, - FALSE, + false, terrain_download_done, NULL); } diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index a7a7ed1b70..01763e4934 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -782,7 +782,7 @@ void LLMuteList::processMuteListUpdate(LLMessageSystem* msg, void**) filename, LL_PATH_CACHE, msg->getSender(), - TRUE, // make the remote file temporary. + true, // make the remote file temporary. onFileMuteList, (void**)local_filename_and_path, LLXferManager::HIGH_PRIORITY); diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index aa9ff012c3..2c47ef0e32 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -361,8 +361,8 @@ void LLViewerAssetStorage::_queueDataRequest( LLAssetType::EType atype, LLGetAssetCallback callback, void *user_data, - BOOL duplicate, - BOOL is_priority) + bool duplicate, + bool is_priority) { mCountRequests++; queueRequestHttp(uuid, atype, callback, user_data, duplicate, is_priority); @@ -373,8 +373,8 @@ void LLViewerAssetStorage::queueRequestHttp( LLAssetType::EType atype, LLGetAssetCallback callback, void *user_data, - BOOL duplicate, - BOOL is_priority) + bool duplicate, + bool is_priority) { LL_DEBUGS("ViewerAsset") << "Request asset via HTTP " << uuid << " type " << LLAssetType::lookup(atype) << LL_ENDL; diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index c3719d0918..cc1854d496 100644 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -70,15 +70,15 @@ protected: LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, - BOOL duplicate, - BOOL is_priority) override; + bool duplicate, + bool is_priority) override; void queueRequestHttp(const LLUUID& uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, - BOOL duplicate, - BOOL is_priority); + bool duplicate, + bool is_priority); void capsRecvForRegion(const LLUUID& region_id, std::string pumpname); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 61cc1dee25..9b5719ea1c 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -95,7 +95,7 @@ std::string gLastRunVersion; extern BOOL gResizeScreenTexture; extern BOOL gResizeShadowTexture; -extern BOOL gDebugGL; +extern bool gDebugGL; //////////////////////////////////////////////////////////////////////////// // Listeners diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8bf69d54bd..cf14b59292 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6805,7 +6805,7 @@ void process_initiate_download(LLMessageSystem* msg, void**) sim_filename, LL_PATH_NONE, msg->getSender(), - FALSE, // don't delete remote + false, // don't delete remote callback_download_complete, (void**)new std::string(viewer_filename)); } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index a0a9da5bec..1b7c668b7d 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3186,7 +3186,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) U64 new_id = gXferManager->requestFile(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ft->mFilename), ft->mFilename, LL_PATH_CACHE, object->mRegionp->getHost(), - TRUE, + true, &LLViewerObject::processTaskInvFile, (void**)ft, // This takes ownership of ft LLXferManager::HIGH_PRIORITY); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 0917a819d0..a91da62f80 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2140,13 +2140,13 @@ void LLVOVolume::updateFaceSize(S32 idx) } } -BOOL LLVOVolume::isRootEdit() const +bool LLVOVolume::isRootEdit() const { if (mParent && !((LLViewerObject*)mParent)->isAvatar()) { - return FALSE; + return false; } - return TRUE; + return true; } //virtual diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index b65450a3f2..b8ccc26cad 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -134,7 +134,7 @@ public: BOOL isVisible() const ; BOOL isActive() const override; BOOL isAttachment() const override; - BOOL isRootEdit() const override; // overridden for sake of attachments treating themselves as a root object + bool isRootEdit() const override; // overridden for sake of attachments treating themselves as a root object BOOL isHUDAttachment() const override; void generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 3a1edb0d00..7f83f17def 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -209,7 +209,7 @@ const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TE extern S32 gBoxFrame; //extern BOOL gHideSelectedObjects; extern BOOL gDisplaySwapBuffers; -extern BOOL gDebugGL; +extern bool gDebugGL; extern BOOL gCubeSnapshot; extern BOOL gSnapshotNoPost; -- cgit v1.3 From d9bd57762edee6a5a2031ab896b6994746fdf4af Mon Sep 17 00:00:00 2001 From: Lars Næsbye Christensen Date: Sun, 18 Feb 2024 18:12:56 +0100 Subject: revert to U8 --- indra/llmessage/lltemplatemessagereader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index 0ff49a2308..064c6e5bd4 100644 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp @@ -286,9 +286,9 @@ void LLTemplateMessageReader::getU8(const char *block, const char *var, void LLTemplateMessageReader::getBOOL(const char *block, const char *var, bool &b, S32 blocknum ) { - bool value; - getData(block, var, &value, sizeof(bool), blocknum); - b = value; + U8 value; + getData(block, var, &value, sizeof(U8), blocknum); + b = (bool)value; } void LLTemplateMessageReader::getS16(const char *block, const char *var, -- cgit v1.3 From c2e00c0403b95ef10264807bdbfc3b1e4fdf0921 Mon Sep 17 00:00:00 2001 From: Lars Næsbye Christensen Date: Sun, 18 Feb 2024 19:15:07 +0100 Subject: fix some tests --- indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp | 10 +++++----- indra/newview/tests/llviewercontrollistener_test.cpp | 2 +- indra/test/llpermissions_tut.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp index e20f61b73f..fd4f10f39a 100644 --- a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp +++ b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp @@ -47,16 +47,16 @@ void LLMessageSystem::clearReceiveState(void) char gUdpDispatchedData[MAX_BUFFER_SIZE]; bool gUdpDispatchWasCalled = false; -BOOL LLTemplateMessageReader::readMessage(const U8* data,class LLHost const &) -{ +bool LLTemplateMessageReader::readMessage(const U8* data,class LLHost const &) +{ gUdpDispatchWasCalled = true; strcpy(gUdpDispatchedData, reinterpret_cast(data)); return true; } -BOOL gValidateMessage = FALSE; -BOOL LLTemplateMessageReader::validateMessage(const U8*, S32 buffer_size, LLHost const &sender, bool trusted) -{ +bool gValidateMessage = false; +bool LLTemplateMessageReader::validateMessage(const U8*, S32 buffer_size, LLHost const &sender, bool trusted) +{ return gValidateMessage; } diff --git a/indra/newview/tests/llviewercontrollistener_test.cpp b/indra/newview/tests/llviewercontrollistener_test.cpp index bb005e997b..175c442dc5 100644 --- a/indra/newview/tests/llviewercontrollistener_test.cpp +++ b/indra/newview/tests/llviewercontrollistener_test.cpp @@ -40,7 +40,7 @@ namespace tut { Global.declareString("strvar", "woof", "string variable"); // together we will stroll the boolvar, ma cherie - Global.declareBOOL("boolvar", TRUE, "bool variable"); + Global.declareBOOL("boolvar", true, "bool variable"); } }; typedef test_group llviewercontrollistener_group; diff --git a/indra/test/llpermissions_tut.cpp b/indra/test/llpermissions_tut.cpp index a3cb70d065..3006987432 100644 --- a/indra/test/llpermissions_tut.cpp +++ b/indra/test/llpermissions_tut.cpp @@ -262,7 +262,7 @@ namespace tut { LLPermissions perm; LLUUID agent; - BOOL set = 1; + bool set = true; U32 bits = PERM_TRANSFER | PERM_MODIFY; ensure("setBaseBits():failed ", perm.setBaseBits(agent, set, bits)); ensure("setOwnerBits():failed ", perm.setOwnerBits(agent, set, bits)); -- cgit v1.3 From 321f283032688f0feddc696654e86f62af07121a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 19 Feb 2024 15:01:44 +0100 Subject: Replace remaining BOOL with bool llinventory and llmessage --- indra/llcharacter/llkeyframemotion.cpp | 4 +- indra/llcharacter/llkeyframemotion.h | 2 +- indra/llcommon/llstringtable.h | 2 +- indra/llinventory/llfoldertype.cpp | 60 +++++----- indra/llinventory/llinventory.h | 2 +- indra/llinventory/llparcel.cpp | 50 ++++---- indra/llinventory/llparcel.h | 172 +++++++++++++-------------- indra/llinventory/llpermissions.h | 14 +-- indra/llinventory/llsaleinfo.cpp | 2 +- indra/llinventory/lltransactionflags.cpp | 9 +- indra/llinventory/lltransactionflags.h | 8 +- indra/llmessage/llassetstorage.cpp | 16 +-- indra/llmessage/llassetstorage.h | 14 +-- indra/llmessage/llblowfishcipher.h | 2 +- indra/llmessage/llcachename.cpp | 2 +- indra/llmessage/llcircuit.cpp | 14 +-- indra/llmessage/llclassifiedflags.h | 2 +- indra/llmessage/llmessagetemplate.h | 6 +- indra/llmessage/llmessagetemplateparser.cpp | 4 +- indra/llmessage/llpacketack.h | 8 +- indra/llmessage/llpacketring.cpp | 4 +- indra/llmessage/llregionflags.h | 2 +- indra/llmessage/llregionhandle.h | 8 +- indra/llmessage/llsdmessagebuilder.cpp | 12 +- indra/llmessage/llsdmessagebuilder.h | 4 +- indra/llmessage/lltemplatemessagebuilder.cpp | 16 ++- indra/llmessage/lltemplatemessagebuilder.h | 4 +- indra/llmessage/llthrottle.cpp | 2 +- indra/llmessage/lltransfermanager.cpp | 14 +-- indra/llmessage/lltransfermanager.h | 12 +- indra/llmessage/lltransfersourceasset.cpp | 10 +- indra/llmessage/lltransfersourcefile.cpp | 4 +- indra/llmessage/lltransfersourcefile.h | 6 +- indra/llmessage/lltransfertargetvfile.cpp | 4 +- indra/llmessage/lltransfertargetvfile.h | 2 +- indra/llmessage/lluseroperation.cpp | 8 +- indra/llmessage/lluseroperation.h | 4 +- indra/llmessage/llxfer.cpp | 10 +- indra/llmessage/llxfer.h | 4 +- indra/llmessage/llxfer_file.cpp | 18 +-- indra/llmessage/llxfer_file.h | 10 +- indra/llmessage/llxfer_mem.cpp | 8 +- indra/llmessage/llxfer_mem.h | 4 +- indra/llmessage/llxfer_vfile.cpp | 8 +- indra/llmessage/llxfer_vfile.h | 2 +- indra/llmessage/llxfermanager.cpp | 6 +- indra/llmessage/llxfermanager.h | 8 +- indra/llmessage/llxorcipher.h | 14 +-- indra/llmessage/machine.h | 2 +- indra/llmessage/message.cpp | 104 ++++++++-------- indra/llmessage/message.h | 42 +++---- indra/llmessage/message_string_table.cpp | 4 +- indra/llmessage/net.cpp | 24 ++-- indra/llmessage/net.h | 2 +- indra/llmessage/partsyspacket.cpp | 4 +- indra/llmessage/patch_code.cpp | 8 +- indra/llmessage/patch_dct.cpp | 16 +-- indra/llmessage/patch_idct.cpp | 20 ++-- indra/newview/llpanellandmedia.cpp | 8 +- indra/newview/llviewermediafocus.cpp | 2 +- indra/newview/llviewerparcelmedia.cpp | 19 ++- 61 files changed, 427 insertions(+), 429 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index ba6cc025be..fa87ad8c29 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -1339,12 +1339,14 @@ bool LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id, boo return false; } - if (!dp.unpackS32(joint_motion_list->mLoop, "loop")) + S32 loop{ 0 }; + if (!dp.unpackS32(loop, "loop")) { LL_WARNS() << "can't read loop" << " for animation " << asset_id << LL_ENDL; return false; } + joint_motion_list->mLoop = static_cast(loop); //SL-17206 hack to alter Female_land loop setting, while current behavior won't be changed serverside LLUUID const female_land_anim("ca1baf4d-0a18-5a1f-0330-e4bd1e71f09e"); diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h index 56c4364fd8..4acebeba27 100644 --- a/indra/llcharacter/llkeyframemotion.h +++ b/indra/llcharacter/llkeyframemotion.h @@ -398,7 +398,7 @@ public: public: std::vector mJointMotionArray; F32 mDuration; - BOOL mLoop; + bool mLoop; F32 mLoopInPoint; F32 mLoopOutPoint; F32 mEaseInDuration; diff --git a/indra/llcommon/llstringtable.h b/indra/llcommon/llstringtable.h index 0a292c8bac..bbf61bb8ac 100644 --- a/indra/llcommon/llstringtable.h +++ b/indra/llcommon/llstringtable.h @@ -51,7 +51,7 @@ public: ~LLStringTableEntry(); void incCount() { mCount++; } - BOOL decCount() { return --mCount; } + bool decCount() { return --mCount != 0; } char *mString; S32 mCount; diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp index d2c3b419ab..c1d54bc210 100644 --- a/indra/llinventory/llfoldertype.cpp +++ b/indra/llinventory/llfoldertype.cpp @@ -84,47 +84,47 @@ protected: LLFolderDictionary::LLFolderDictionary() { // TYPE NAME, PROTECTED, AUTOMATIC, SINGLETON - addEntry(LLFolderType::FT_TEXTURE, new FolderEntry("texture", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_SOUND, new FolderEntry("sound", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_CALLINGCARD, new FolderEntry("callcard", TRUE, TRUE, FALSE)); - addEntry(LLFolderType::FT_LANDMARK, new FolderEntry("landmark", TRUE, FALSE, FALSE)); - addEntry(LLFolderType::FT_CLOTHING, new FolderEntry("clothing", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_OBJECT, new FolderEntry("object", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_NOTECARD, new FolderEntry("notecard", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_ROOT_INVENTORY, new FolderEntry("root_inv", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_LSL_TEXT, new FolderEntry("lsltext", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_BODYPART, new FolderEntry("bodypart", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_TRASH, new FolderEntry("trash", TRUE, FALSE, TRUE)); - addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new FolderEntry("snapshot", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_LOST_AND_FOUND, new FolderEntry("lstndfnd", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_ANIMATION, new FolderEntry("animatn", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_GESTURE, new FolderEntry("gesture", TRUE, TRUE, TRUE)); - addEntry(LLFolderType::FT_FAVORITE, new FolderEntry("favorite", TRUE, FALSE, TRUE)); + addEntry(LLFolderType::FT_TEXTURE, new FolderEntry("texture", true, true, true)); + addEntry(LLFolderType::FT_SOUND, new FolderEntry("sound", true, true, true)); + addEntry(LLFolderType::FT_CALLINGCARD, new FolderEntry("callcard", true, true, false)); + addEntry(LLFolderType::FT_LANDMARK, new FolderEntry("landmark", true, false, false)); + addEntry(LLFolderType::FT_CLOTHING, new FolderEntry("clothing", true, true, true)); + addEntry(LLFolderType::FT_OBJECT, new FolderEntry("object", true, true, true)); + addEntry(LLFolderType::FT_NOTECARD, new FolderEntry("notecard", true, true, true)); + addEntry(LLFolderType::FT_ROOT_INVENTORY, new FolderEntry("root_inv", true, true, true)); + addEntry(LLFolderType::FT_LSL_TEXT, new FolderEntry("lsltext", true, true, true)); + addEntry(LLFolderType::FT_BODYPART, new FolderEntry("bodypart", true, true, true)); + addEntry(LLFolderType::FT_TRASH, new FolderEntry("trash", true, false, true)); + addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new FolderEntry("snapshot", true, true, true)); + addEntry(LLFolderType::FT_LOST_AND_FOUND, new FolderEntry("lstndfnd", true, true, true)); + addEntry(LLFolderType::FT_ANIMATION, new FolderEntry("animatn", true, true, true)); + addEntry(LLFolderType::FT_GESTURE, new FolderEntry("gesture", true, true, true)); + addEntry(LLFolderType::FT_FAVORITE, new FolderEntry("favorite", true, false, true)); for (S32 ensemble_num = S32(LLFolderType::FT_ENSEMBLE_START); ensemble_num <= S32(LLFolderType::FT_ENSEMBLE_END); ensemble_num++) { - addEntry(LLFolderType::EType(ensemble_num), new FolderEntry("ensemble", FALSE, FALSE, FALSE)); // Not used + addEntry(LLFolderType::EType(ensemble_num), new FolderEntry("ensemble", false, false, false)); // Not used } - addEntry(LLFolderType::FT_CURRENT_OUTFIT, new FolderEntry("current", TRUE, FALSE, TRUE)); - addEntry(LLFolderType::FT_OUTFIT, new FolderEntry("outfit", FALSE, FALSE, FALSE)); - addEntry(LLFolderType::FT_MY_OUTFITS, new FolderEntry("my_otfts", TRUE, FALSE, TRUE)); + addEntry(LLFolderType::FT_CURRENT_OUTFIT, new FolderEntry("current", true, false, true)); + addEntry(LLFolderType::FT_OUTFIT, new FolderEntry("outfit", false, false, false)); + addEntry(LLFolderType::FT_MY_OUTFITS, new FolderEntry("my_otfts", true, false, true)); - addEntry(LLFolderType::FT_MESH, new FolderEntry("mesh", TRUE, FALSE, FALSE)); // Not used? + addEntry(LLFolderType::FT_MESH, new FolderEntry("mesh", true, false, false)); // Not used? - addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", TRUE, FALSE, TRUE)); - addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", TRUE, FALSE, FALSE)); + addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", true, false, true)); + addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", true, false, false)); - addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE, FALSE, FALSE)); + addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", true, false, false)); - addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new FolderEntry("merchant", FALSE, FALSE, FALSE)); - addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new FolderEntry("stock", FALSE, FALSE, FALSE)); - addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new FolderEntry("version", FALSE, FALSE, FALSE)); + addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new FolderEntry("merchant", false, false, false)); + addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new FolderEntry("stock", false, false, false)); + addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new FolderEntry("version", false, false, false)); - addEntry(LLFolderType::FT_SETTINGS, new FolderEntry("settings", TRUE, FALSE, TRUE)); - addEntry(LLFolderType::FT_MATERIAL, new FolderEntry("material", TRUE, FALSE, TRUE)); + addEntry(LLFolderType::FT_SETTINGS, new FolderEntry("settings", true, false, true)); + addEntry(LLFolderType::FT_MATERIAL, new FolderEntry("material", true, false, true)); - addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE, FALSE, FALSE)); + addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", false, false, false)); }; // static diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 695b04097f..a14b7258af 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -268,7 +268,7 @@ public: //-------------------------------------------------------------------- public: virtual bool importLegacyStream(std::istream& input_stream); - virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = TRUE) const; + virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = true) const; LLSD exportLLSD() const; bool importLLSD(const LLSD& cat_data); diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 78dcf40ac6..598e28921d 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -119,7 +119,7 @@ LLParcel::ECategory category_ui_string_to_category(const std::string& s); LLParcel::LLParcel() { - init(LLUUID::null, TRUE, FALSE, FALSE, 0, 0, 0, 0, 0, 1.f, 0); + init(LLUUID::null, true, false, false, 0, 0, 0, 0, 0, 1.f, 0); } @@ -191,13 +191,13 @@ void LLParcel::init(const LLUUID &owner_id, setMediaType(LLStringUtil::null); mMediaID.setNull(); mMediaAutoScale = 0; - mMediaLoop = TRUE; + mMediaLoop = 1; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); - mMediaAllowNavigate = TRUE; + mMediaAllowNavigate = 1; mMediaURLTimeout = 0.0f; - mMediaPreventCameraZoom = FALSE; + mMediaPreventCameraZoom = 0; mGroupID.setNull(); @@ -219,20 +219,20 @@ void LLParcel::init(const LLUUID &owner_id, setSelectedPrimCount(0); setTempPrimCount(0); setCleanOtherTime(0); - setRegionPushOverride(FALSE); - setRegionDenyAnonymousOverride(FALSE); - setRegionDenyAgeUnverifiedOverride(FALSE); + setRegionPushOverride(false); + setRegionDenyAnonymousOverride(false); + setRegionDenyAgeUnverifiedOverride(false); setParcelPrimBonus(parcel_object_bonus); setPreviousOwnerID(LLUUID::null); - setPreviouslyGroupOwned(FALSE); + setPreviouslyGroupOwned(false); - setSeeAVs(TRUE); - setAllowGroupAVSounds(TRUE); - setAllowAnyAVSounds(TRUE); - setHaveNewParcelLimitData(FALSE); + setSeeAVs(true); + setAllowGroupAVSounds(true); + setAllowAnyAVSounds(true); + setHaveNewParcelLimitData(false); - setRegionAllowEnvironmentOverride(FALSE); + setRegionAllowEnvironmentOverride(false); setParcelEnvironmentVersion(INVALID_PARCEL_ENVIRONMENT_VERSION); setObscureMOAP(false); @@ -949,7 +949,7 @@ const std::string& LLParcel::getActionString(LLParcel::EAction action) bool LLParcel::isSaleTimerExpired(const U64& time) { - if (mSaleTimerExpires.getStarted() == FALSE) + if (mSaleTimerExpires.getStarted() == false) { return false; } @@ -1011,11 +1011,11 @@ void LLParcel::expireSale( mSaleTimerExpires.setTimerExpirySec(0.0); mSaleTimerExpires.stop(); setPreviousOwnerID(LLUUID::null); - setPreviouslyGroupOwned(FALSE); - setSellWithObjects(FALSE); + setPreviouslyGroupOwned(false); + setSellWithObjects(false); type = TRANS_LAND_RELEASE; mStatus = OS_NONE; - flags = pack_transaction_flags(mGroupOwned, FALSE); + flags = pack_transaction_flags(mGroupOwned, false); mAuthBuyerID.setNull(); from_id = mOwnerID; mOwnerID.setNull(); @@ -1037,7 +1037,7 @@ void LLParcel::completeSale( // Purchased parcels are assumed to no longer be for sale. // Otherwise someone can snipe the sale. - setForSale(FALSE); + setForSale(false); setAuctionID(0); // Turn off show directory, since it's a recurring fee that @@ -1062,11 +1062,11 @@ void LLParcel::clearSale() mStatus = OS_LEASED; } mAuthBuyerID.setNull(); - setForSale(FALSE); + setForSale(false); setAuctionID(0); setPreviousOwnerID(LLUUID::null); - setPreviouslyGroupOwned(FALSE); - setSellWithObjects(FALSE); + setPreviouslyGroupOwned(false); + setSellWithObjects(false); } bool LLParcel::isPublic() const @@ -1093,15 +1093,15 @@ void LLParcel::clearParcel() setMediaID(LLUUID::null); setMediaDesc(LLStringUtil::null); setMediaAutoScale(0); - setMediaLoop(TRUE); + setMediaLoop(1); mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); - setMediaAllowNavigate(TRUE); - setMediaPreventCameraZoom(FALSE); + setMediaAllowNavigate(1); + setMediaPreventCameraZoom(0); setMediaURLTimeout(0.0f); setMusicURL(LLStringUtil::null); - setInEscrow(FALSE); + setInEscrow(false); setAuthorizedBuyerID(LLUUID::null); setCategory(C_NONE); setSnapshotID(LLUUID::null); diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index e3c27e7d73..ba85f5cdef 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -277,7 +277,7 @@ public: void setUserLocation(const LLVector3& pos) { mUserLocation = pos; } void setUserLookAt(const LLVector3& rot) { mUserLookAt = rot; } void setLandingType(const ELandingType type) { mLandingType = type; } - void setSeeAVs(BOOL see_avs) { mSeeAVs = see_avs; } + void setSeeAVs(bool see_avs) { mSeeAVs = see_avs; } void setHaveNewParcelLimitData(bool have_new_parcel_data) { mHaveNewParcelLimitData = have_new_parcel_data; } // Remove this once hidden AV feature is fully available grid-wide void setAuctionID(U32 auction_id) { mAuctionID = auction_id;} @@ -288,24 +288,24 @@ public: virtual void setArea(S32 area, S32 sim_object_limit); void setDiscountRate(F32 rate); - void setAllowModify(BOOL b) { setParcelFlag(PF_CREATE_OBJECTS, b); } - void setAllowGroupModify(BOOL b) { setParcelFlag(PF_CREATE_GROUP_OBJECTS, b); } - void setAllowAllObjectEntry(BOOL b) { setParcelFlag(PF_ALLOW_ALL_OBJECT_ENTRY, b); } - void setAllowGroupObjectEntry(BOOL b) { setParcelFlag(PF_ALLOW_GROUP_OBJECT_ENTRY, b); } - void setAllowTerraform(BOOL b){setParcelFlag(PF_ALLOW_TERRAFORM, b); } - void setAllowDamage(BOOL b) { setParcelFlag(PF_ALLOW_DAMAGE, b); } - void setAllowFly(BOOL b) { setParcelFlag(PF_ALLOW_FLY, b); } - void setAllowGroupScripts(BOOL b) { setParcelFlag(PF_ALLOW_GROUP_SCRIPTS, b); } - void setAllowOtherScripts(BOOL b) { setParcelFlag(PF_ALLOW_OTHER_SCRIPTS, b); } - void setAllowDeedToGroup(BOOL b) { setParcelFlag(PF_ALLOW_DEED_TO_GROUP, b); } - void setContributeWithDeed(BOOL b) { setParcelFlag(PF_CONTRIBUTE_WITH_DEED, b); } - void setForSale(BOOL b) { setParcelFlag(PF_FOR_SALE, b); } - void setSoundOnly(BOOL b) { setParcelFlag(PF_SOUND_LOCAL, b); } - void setDenyAnonymous(BOOL b) { setParcelFlag(PF_DENY_ANONYMOUS, b); } - void setDenyAgeUnverified(BOOL b) { setParcelFlag(PF_DENY_AGEUNVERIFIED, b); } - void setRestrictPushObject(BOOL b) { setParcelFlag(PF_RESTRICT_PUSHOBJECT, b); } - void setAllowGroupAVSounds(BOOL b) { mAllowGroupAVSounds = b; } - void setAllowAnyAVSounds(BOOL b) { mAllowAnyAVSounds = b; } + void setAllowModify(bool b) { setParcelFlag(PF_CREATE_OBJECTS, b); } + void setAllowGroupModify(bool b) { setParcelFlag(PF_CREATE_GROUP_OBJECTS, b); } + void setAllowAllObjectEntry(bool b) { setParcelFlag(PF_ALLOW_ALL_OBJECT_ENTRY, b); } + void setAllowGroupObjectEntry(bool b) { setParcelFlag(PF_ALLOW_GROUP_OBJECT_ENTRY, b); } + void setAllowTerraform(bool b){setParcelFlag(PF_ALLOW_TERRAFORM, b); } + void setAllowDamage(bool b) { setParcelFlag(PF_ALLOW_DAMAGE, b); } + void setAllowFly(bool b) { setParcelFlag(PF_ALLOW_FLY, b); } + void setAllowGroupScripts(bool b) { setParcelFlag(PF_ALLOW_GROUP_SCRIPTS, b); } + void setAllowOtherScripts(bool b) { setParcelFlag(PF_ALLOW_OTHER_SCRIPTS, b); } + void setAllowDeedToGroup(bool b) { setParcelFlag(PF_ALLOW_DEED_TO_GROUP, b); } + void setContributeWithDeed(bool b) { setParcelFlag(PF_CONTRIBUTE_WITH_DEED, b); } + void setForSale(bool b) { setParcelFlag(PF_FOR_SALE, b); } + void setSoundOnly(bool b) { setParcelFlag(PF_SOUND_LOCAL, b); } + void setDenyAnonymous(bool b) { setParcelFlag(PF_DENY_ANONYMOUS, b); } + void setDenyAgeUnverified(bool b) { setParcelFlag(PF_DENY_AGEUNVERIFIED, b); } + void setRestrictPushObject(bool b) { setParcelFlag(PF_RESTRICT_PUSHOBJECT, b); } + void setAllowGroupAVSounds(bool b) { mAllowGroupAVSounds = b; } + void setAllowAnyAVSounds(bool b) { mAllowAnyAVSounds = b; } void setObscureMOAP(bool b) { mObscureMOAP = b; } void setDrawDistance(F32 dist) { mDrawDistance = dist; } @@ -315,9 +315,9 @@ public: void setPassPrice(S32 price) { mPassPrice = price; } void setPassHours(F32 hours) { mPassHours = hours; } -// BOOL importStream(std::istream& input_stream); +// bool importStream(std::istream& input_stream); bool importAccessEntry(std::istream& input_stream, LLAccessEntry* entry); - // BOOL exportStream(std::ostream& output_stream); + // bool exportStream(std::ostream& output_stream); void packMessage(LLMessageSystem* msg); void packMessage(LLSD& msg); @@ -372,7 +372,7 @@ public: const LLUUID& getGroupID() const { return mGroupID; } S32 getPassPrice() const { return mPassPrice; } F32 getPassHours() const { return mPassHours; } - BOOL getIsGroupOwned() const { return mGroupOwned; } + bool getIsGroupOwned() const { return mGroupOwned; } U32 getAuctionID() const { return mAuctionID; } bool isInEscrow() const { return mInEscrow; } @@ -462,62 +462,62 @@ public: { return (mParcelFlags & PF_ALLOW_DEED_TO_GROUP) ? true : false; } // Does the owner want to make a contribution along with the deed. - BOOL getContributeWithDeed() const - { return (mParcelFlags & PF_CONTRIBUTE_WITH_DEED) ? TRUE : FALSE; } + bool getContributeWithDeed() const + { return (mParcelFlags & PF_CONTRIBUTE_WITH_DEED) ? true : false; } // heightfield can be modified - BOOL getAllowTerraform() const - { return (mParcelFlags & PF_ALLOW_TERRAFORM) ? TRUE : FALSE; } + bool getAllowTerraform() const + { return (mParcelFlags & PF_ALLOW_TERRAFORM) ? true : false; } // avatars can be hurt here - BOOL getAllowDamage() const - { return (mParcelFlags & PF_ALLOW_DAMAGE) ? TRUE : FALSE; } - - BOOL getAllowFly() const - { return (mParcelFlags & PF_ALLOW_FLY) ? TRUE : FALSE; } - - BOOL getAllowGroupScripts() const - { return (mParcelFlags & PF_ALLOW_GROUP_SCRIPTS) ? TRUE : FALSE; } - - BOOL getAllowOtherScripts() const - { return (mParcelFlags & PF_ALLOW_OTHER_SCRIPTS) ? TRUE : FALSE; } - - BOOL getAllowAllObjectEntry() const - { return (mParcelFlags & PF_ALLOW_ALL_OBJECT_ENTRY) ? TRUE : FALSE; } - - BOOL getAllowGroupObjectEntry() const - { return (mParcelFlags & PF_ALLOW_GROUP_OBJECT_ENTRY) ? TRUE : FALSE; } - - BOOL getForSale() const - { return (mParcelFlags & PF_FOR_SALE) ? TRUE : FALSE; } - BOOL getSoundLocal() const - { return (mParcelFlags & PF_SOUND_LOCAL) ? TRUE : FALSE; } - BOOL getParcelFlagAllowVoice() const - { return (mParcelFlags & PF_ALLOW_VOICE_CHAT) ? TRUE : FALSE; } - BOOL getParcelFlagUseEstateVoiceChannel() const - { return (mParcelFlags & PF_USE_ESTATE_VOICE_CHAN) ? TRUE : FALSE; } - BOOL getAllowPublish() const - { return (mParcelFlags & PF_ALLOW_PUBLISH) ? TRUE : FALSE; } - BOOL getMaturePublish() const - { return (mParcelFlags & PF_MATURE_PUBLISH) ? TRUE : FALSE; } - BOOL getRestrictPushObject() const - { return (mParcelFlags & PF_RESTRICT_PUSHOBJECT) ? TRUE : FALSE; } - BOOL getRegionPushOverride() const + bool getAllowDamage() const + { return (mParcelFlags & PF_ALLOW_DAMAGE) ? true : false; } + + bool getAllowFly() const + { return (mParcelFlags & PF_ALLOW_FLY) ? true : false; } + + bool getAllowGroupScripts() const + { return (mParcelFlags & PF_ALLOW_GROUP_SCRIPTS) ? true : false; } + + bool getAllowOtherScripts() const + { return (mParcelFlags & PF_ALLOW_OTHER_SCRIPTS) ? true : false; } + + bool getAllowAllObjectEntry() const + { return (mParcelFlags & PF_ALLOW_ALL_OBJECT_ENTRY) ? true : false; } + + bool getAllowGroupObjectEntry() const + { return (mParcelFlags & PF_ALLOW_GROUP_OBJECT_ENTRY) ? true : false; } + + bool getForSale() const + { return (mParcelFlags & PF_FOR_SALE) ? true : false; } + bool getSoundLocal() const + { return (mParcelFlags & PF_SOUND_LOCAL) ? true : false; } + bool getParcelFlagAllowVoice() const + { return (mParcelFlags & PF_ALLOW_VOICE_CHAT) ? true : false; } + bool getParcelFlagUseEstateVoiceChannel() const + { return (mParcelFlags & PF_USE_ESTATE_VOICE_CHAN) ? true : false; } + bool getAllowPublish() const + { return (mParcelFlags & PF_ALLOW_PUBLISH) ? true : false; } + bool getMaturePublish() const + { return (mParcelFlags & PF_MATURE_PUBLISH) ? true : false; } + bool getRestrictPushObject() const + { return (mParcelFlags & PF_RESTRICT_PUSHOBJECT) ? true : false; } + bool getRegionPushOverride() const { return mRegionPushOverride; } - BOOL getRegionDenyAnonymousOverride() const + bool getRegionDenyAnonymousOverride() const { return mRegionDenyAnonymousOverride; } - BOOL getRegionDenyAgeUnverifiedOverride() const + bool getRegionDenyAgeUnverifiedOverride() const { return mRegionDenyAgeUnverifiedOverride; } - BOOL getRegionAllowAccessOverride() const + bool getRegionAllowAccessOverride() const { return mRegionAllowAccessoverride; } - BOOL getRegionAllowEnvironmentOverride() const + bool getRegionAllowEnvironmentOverride() const { return mRegionAllowEnvironmentOverride; } S32 getParcelEnvironmentVersion() const { return mCurrentEnvironmentVersion; } - BOOL getAllowGroupAVSounds() const { return mAllowGroupAVSounds; } - BOOL getAllowAnyAVSounds() const { return mAllowAnyAVSounds; } + bool getAllowGroupAVSounds() const { return mAllowGroupAVSounds; } + bool getAllowAnyAVSounds() const { return mAllowAnyAVSounds; } bool getObscureMOAP() const { return mObscureMOAP; } @@ -582,30 +582,30 @@ public: void setParcelPrimBonus(F32 bonus) { mParcelPrimBonus = bonus; } void setCleanOtherTime(S32 time) { mCleanOtherTime = time; } - void setRegionPushOverride(BOOL override) {mRegionPushOverride = override; } - void setRegionDenyAnonymousOverride(BOOL override) { mRegionDenyAnonymousOverride = override; } - void setRegionDenyAgeUnverifiedOverride(BOOL override) { mRegionDenyAgeUnverifiedOverride = override; } - void setRegionAllowAccessOverride(BOOL override) { mRegionAllowAccessoverride = override; } - void setRegionAllowEnvironmentOverride(BOOL override) { mRegionAllowEnvironmentOverride = override; } + void setRegionPushOverride(bool override) {mRegionPushOverride = override; } + void setRegionDenyAnonymousOverride(bool override) { mRegionDenyAnonymousOverride = override; } + void setRegionDenyAgeUnverifiedOverride(bool override) { mRegionDenyAgeUnverifiedOverride = override; } + void setRegionAllowAccessOverride(bool override) { mRegionAllowAccessoverride = override; } + void setRegionAllowEnvironmentOverride(bool override) { mRegionAllowEnvironmentOverride = override; } void setParcelEnvironmentVersion(S32 version) { mCurrentEnvironmentVersion = version; } // Accessors for parcel sellWithObjects void setPreviousOwnerID(LLUUID prev_owner) { mPreviousOwnerID = prev_owner; } - void setPreviouslyGroupOwned(BOOL b) { mPreviouslyGroupOwned = b; } - void setSellWithObjects(BOOL b) { setParcelFlag(PF_SELL_PARCEL_OBJECTS, b); } + void setPreviouslyGroupOwned(bool b) { mPreviouslyGroupOwned = b; } + void setSellWithObjects(bool b) { setParcelFlag(PF_SELL_PARCEL_OBJECTS, b); } LLUUID getPreviousOwnerID() const { return mPreviousOwnerID; } - BOOL getPreviouslyGroupOwned() const { return mPreviouslyGroupOwned; } - BOOL getSellWithObjects() const { return (mParcelFlags & PF_SELL_PARCEL_OBJECTS) ? TRUE : FALSE; } + bool getPreviouslyGroupOwned() const { return mPreviouslyGroupOwned; } + bool getSellWithObjects() const { return (mParcelFlags & PF_SELL_PARCEL_OBJECTS) ? true : false; } protected: LLUUID mID; LLUUID mOwnerID; LLUUID mGroupID; - BOOL mGroupOwned; // TRUE if mOwnerID is a group_id + bool mGroupOwned; // true if mOwnerID is a group_id LLUUID mPreviousOwnerID; - BOOL mPreviouslyGroupOwned; + bool mPreviouslyGroupOwned; EOwnershipStatus mStatus; ECategory mCategory; @@ -614,8 +614,8 @@ protected: LLVector3 mUserLocation; LLVector3 mUserLookAt; ELandingType mLandingType; - BOOL mSeeAVs; // Avatars on this parcel are visible from outside it - BOOL mHaveNewParcelLimitData; // Remove once hidden AV feature is grid-wide + bool mSeeAVs; // Avatars on this parcel are visible from outside it + bool mHaveNewParcelLimitData; // Remove once hidden AV feature is grid-wide LLTimer mSaleTimerExpires; LLTimer mMediaResetTimer; @@ -666,13 +666,13 @@ protected: S32 mTempPrimCount; F32 mParcelPrimBonus; S32 mCleanOtherTime; - BOOL mRegionPushOverride; - BOOL mRegionDenyAnonymousOverride; - BOOL mRegionDenyAgeUnverifiedOverride; - BOOL mRegionAllowAccessoverride; - BOOL mRegionAllowEnvironmentOverride; - BOOL mAllowGroupAVSounds; - BOOL mAllowAnyAVSounds; + bool mRegionPushOverride; + bool mRegionDenyAnonymousOverride; + bool mRegionDenyAgeUnverifiedOverride; + bool mRegionAllowAccessoverride; + bool mRegionAllowEnvironmentOverride; + bool mAllowGroupAVSounds; + bool mAllowAnyAVSounds; bool mObscureMOAP; S32 mCurrentEnvironmentVersion; @@ -692,13 +692,11 @@ public: void setExperienceKeyType(const LLUUID& experience_key, U32 type); U32 countExperienceKeyType(U32 type); - U32 getExperienceKeyType(const LLUUID& experience_key)const; LLAccessEntry::map getExperienceKeysByType(U32 type)const; void clearExperienceKeysByType(U32 type); private: xp_type_map_t mExperienceKeys; - }; diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h index a8acef098a..da3d3244db 100644 --- a/indra/llinventory/llpermissions.h +++ b/indra/llinventory/llpermissions.h @@ -285,20 +285,20 @@ public: // They also return true if the object isn't owned, or the // requesting agent is a system agent. See llpermissionsflags.h // for bits. - //BOOL allowDeleteBy(const LLUUID& agent_id) const { return allowModifyBy(agent_id); } - //BOOL allowEditBy(const LLUUID& agent_id) const { return allowModifyBy(agent_id); } + //bool allowDeleteBy(const LLUUID& agent_id) const { return allowModifyBy(agent_id); } + //bool allowEditBy(const LLUUID& agent_id) const { return allowModifyBy(agent_id); } // saves last owner and sets current owner - //BOOL setOwner(const LLUUID& agent, const LLUUID& owner); + //bool setOwner(const LLUUID& agent, const LLUUID& owner); // This method saves the last owner, sets the current owner to the // one provided, and sets the base mask as indicated. - //BOOL setOwner(const LLUUID& agent, const LLUUID& owner, U32 new_base_mask); + //bool setOwner(const LLUUID& agent, const LLUUID& owner, U32 new_base_mask); // Attempt to set or clear the given bitmask. Returns TRUE if you // are allowed to modify the permissions. If you attempt to turn // on bits not allowed by the base bits, the function will return // TRUE, but those bits will not be set. - //BOOL setGroupBits( const LLUUID& agent, BOOL set, PermissionMask bits); - //BOOL setEveryoneBits(const LLUUID& agent, BOOL set, PermissionMask bits); + //bool setGroupBits( const LLUUID& agent, bool set, PermissionMask bits); + //bool setEveryoneBits(const LLUUID& agent, bool set, PermissionMask bits); // // MISC METHODS and OPERATORS @@ -361,7 +361,7 @@ bool LLPermissions::allowTransferTo(const LLUUID &agent_id) const } else { - return ((mOwner == agent_id) ? TRUE : allowOperationBy(PERM_TRANSFER, mOwner)); + return ((mOwner == agent_id) ? true : allowOperationBy(PERM_TRANSFER, mOwner)); } } diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp index 4ab22d4002..7bce5fd0cb 100644 --- a/indra/llinventory/llsaleinfo.cpp +++ b/indra/llinventory/llsaleinfo.cpp @@ -163,7 +163,7 @@ bool LLSaleInfo::importLegacyStream(std::istream& input_stream, bool& has_perm_m else if (!strcmp("perm_mask", keyword)) { //LL_INFOS() << "found deprecated keyword perm_mask" << LL_ENDL; - has_perm_mask = TRUE; + has_perm_mask = true; sscanf(valuestr, "%x", &perm_mask); } else diff --git a/indra/llinventory/lltransactionflags.cpp b/indra/llinventory/lltransactionflags.cpp index e21f29df41..72e0d83d2a 100644 --- a/indra/llinventory/lltransactionflags.cpp +++ b/indra/llinventory/lltransactionflags.cpp @@ -38,7 +38,7 @@ const U8 TRANSACTION_FLAG_OWNER_GROUP = 4; const U8 TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION = 8; const U8 TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION_REMOVAL = 16; -U8 pack_transaction_flags(BOOL is_source_group, BOOL is_dest_group) +U8 pack_transaction_flags(bool is_source_group, bool is_dest_group) { U8 rv = 0; if(is_source_group) rv |= TRANSACTION_FLAG_SOURCE_GROUP; @@ -46,17 +46,17 @@ U8 pack_transaction_flags(BOOL is_source_group, BOOL is_dest_group) return rv; } -BOOL is_tf_source_group(TransactionFlags flags) +bool is_tf_source_group(TransactionFlags flags) { return ((flags & TRANSACTION_FLAG_SOURCE_GROUP) == TRANSACTION_FLAG_SOURCE_GROUP); } -BOOL is_tf_dest_group(TransactionFlags flags) +bool is_tf_dest_group(TransactionFlags flags) { return ((flags & TRANSACTION_FLAG_DEST_GROUP) == TRANSACTION_FLAG_DEST_GROUP); } -BOOL is_tf_owner_group(TransactionFlags flags) +bool is_tf_owner_group(TransactionFlags flags) { return ((flags & TRANSACTION_FLAG_OWNER_GROUP) == TRANSACTION_FLAG_OWNER_GROUP); } @@ -79,6 +79,7 @@ void append_reason( break; case TRANS_GROUP_LAND_DEED: ostr << " for deeding land"; + break; default: break; } diff --git a/indra/llinventory/lltransactionflags.h b/indra/llinventory/lltransactionflags.h index 8227f3bcc2..ca426035b4 100644 --- a/indra/llinventory/lltransactionflags.h +++ b/indra/llinventory/lltransactionflags.h @@ -39,10 +39,10 @@ extern const TransactionFlags TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION; extern const TransactionFlags TRANSACTION_FLAG_SIMULTANEOUS_CONTRIBUTION_REMOVAL; // very simple helper functions -TransactionFlags pack_transaction_flags(BOOL is_source_group, BOOL is_dest_group); -BOOL is_tf_source_group(TransactionFlags flags); -BOOL is_tf_dest_group(TransactionFlags flags); -BOOL is_tf_owner_group(TransactionFlags flags); +TransactionFlags pack_transaction_flags(bool is_source_group, bool is_dest_group); +bool is_tf_source_group(TransactionFlags flags); +bool is_tf_dest_group(TransactionFlags flags); +bool is_tf_owner_group(TransactionFlags flags); // stupid helper functions which should be replaced with some kind of // internationalizeable message. diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 2f76e686ec..13fda24e62 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -198,14 +198,14 @@ LLBaseDownloadRequest::LLBaseDownloadRequest(const LLUUID &uuid, const LLAssetTy mDownCallback(), mUserData(NULL), mHost(), - mIsTemp(FALSE), - mIsPriority(FALSE), - mDataSentInFirstPacket(FALSE), - mDataIsInCache(FALSE) + mIsTemp(false), + mIsPriority(false), + mDataSentInFirstPacket(false), + mDataIsInCache(false) { // Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been // running a message system loop. - mTime = LLMessageSystem::getMessageTimeSeconds(TRUE); + mTime = LLMessageSystem::getMessageTimeSeconds(true); } // virtual @@ -228,8 +228,8 @@ LLAssetRequest::LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType type : LLBaseDownloadRequest(uuid, type), mUpCallback(), mInfoCallback( NULL ), - mIsLocal(FALSE), - mIsUserWaiting(FALSE), + mIsLocal(false), + mIsUserWaiting(false), mTimeout(LL_ASSET_STORAGE_TIMEOUT), mBytesFetched(0) { @@ -344,7 +344,7 @@ void LLAssetStorage::_init(LLMessageSystem *msg, LLXferManager *xfer, const LLHost &upstream_host) { - mShutDown = FALSE; + mShutDown = false; mMessageSys = msg; mXferManager = xfer; diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index d9c95485f6..dd63724039 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -122,11 +122,11 @@ public: void *mUserData; LLHost mHost; - BOOL mIsTemp; + bool mIsTemp; F64Seconds mTime; // Message system time - BOOL mIsPriority; - BOOL mDataSentInFirstPacket; - BOOL mDataIsInCache; + bool mIsPriority; + bool mDataSentInFirstPacket; + bool mDataIsInCache; }; class LLAssetRequest : public LLBaseDownloadRequest @@ -143,8 +143,8 @@ public: // void (*mUpCallback)(const LLUUID&, void *, S32, LLExtStat); void (*mInfoCallback)(LLAssetInfo *, void *, S32); - BOOL mIsLocal; - BOOL mIsUserWaiting; // We don't want to try forever if a user is waiting for a result. + bool mIsLocal; + bool mIsUserWaiting; // We don't want to try forever if a user is waiting for a result. F64Seconds mTimeout; // Amount of time before timing out. LLUUID mRequestingAgentID; // Only valid for uploads from an agent F64 mBytesFetched; @@ -209,7 +209,7 @@ public: }; protected: - BOOL mShutDown; + bool mShutDown; LLHost mUpstreamHost; LLMessageSystem *mMessageSys; diff --git a/indra/llmessage/llblowfishcipher.h b/indra/llmessage/llblowfishcipher.h index e2e54526e8..65228df11f 100644 --- a/indra/llmessage/llblowfishcipher.h +++ b/indra/llmessage/llblowfishcipher.h @@ -46,7 +46,7 @@ public: /*virtual*/ U32 requiredEncryptionSpace(U32 src_len) const; #ifdef _DEBUG - static BOOL testHarness(); + static bool testHarness(); #endif private: diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 59dd64336e..c90b6d86ad 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -99,7 +99,7 @@ public: } void done() { mID.setNull(); } - bool isDone() const { return mID.isNull() != FALSE; } + bool isDone() const { return mID.isNull() != false; } }; class ReplySender diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index bb667201a0..a0bf999dee 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -73,10 +73,10 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id, mHighestPacketID(in_id), mTimeoutCallback(NULL), mTimeoutUserData(NULL), - mTrusted(FALSE), - mbAllowTimeout(TRUE), - mbAlive(TRUE), - mBlocked(FALSE), + mTrusted(false), + mbAllowTimeout(true), + mbAlive(true), + mBlocked(false), mPingTime(0.0), mLastPingSendTime(0.0), mLastPingReceivedTime(0.0), @@ -111,7 +111,7 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id, { // Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been // running a message system loop. - F64Seconds mt_sec = LLMessageSystem::getMessageTimeSeconds(TRUE); + F64Seconds mt_sec = LLMessageSystem::getMessageTimeSeconds(true); F32 distribution_offset = ll_frand(); mPingTime = mt_sec; @@ -1273,7 +1273,7 @@ void LLCircuitData::pingTimerStop(const U8 ping_id) { // Ack, we got our ping response on the same frame! Sigh, let's get a real time otherwise // all of our ping calculations will be skewed. - mt_secs = LLMessageSystem::getMessageTimeSeconds(TRUE); + mt_secs = LLMessageSystem::getMessageTimeSeconds(true); } mLastPingReceivedTime = mt_secs; @@ -1291,7 +1291,7 @@ void LLCircuitData::pingTimerStop(const U8 ping_id) mPingsInTransit = delta_ping; if (mBlocked && (mPingsInTransit <= PING_RELEASE_BLOCK)) { - mBlocked = FALSE; + mBlocked = false; } } diff --git a/indra/llmessage/llclassifiedflags.h b/indra/llmessage/llclassifiedflags.h index 0365ea8f09..9298b90357 100644 --- a/indra/llmessage/llclassifiedflags.h +++ b/indra/llmessage/llclassifiedflags.h @@ -53,7 +53,7 @@ const S32 MAX_CLASSIFIEDS = 100; // we can revert back to ClassifiedFlags pack_classified_flags and get rider of this one. ClassifiedFlags pack_classified_flags_request(bool auto_renew, bool is_pg, bool is_mature, bool is_adult); -ClassifiedFlags pack_classified_flags(BOOL auto_renew, BOOL is_pg, BOOL is_mature, BOOL is_adult); +ClassifiedFlags pack_classified_flags(bool auto_renew, bool is_pg, bool is_mature, bool is_adult); bool is_cf_mature(ClassifiedFlags flags); //bool is_cf_enabled(ClassifiedFlags flags); bool is_cf_update_time(ClassifiedFlags flags); diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index a44e16fc3a..41aca4ab91 100644 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -361,14 +361,14 @@ public: mUserData = user_data; } - BOOL callHandlerFunc(LLMessageSystem *msgsystem) const + bool callHandlerFunc(LLMessageSystem *msgsystem) const { if (mHandlerFunc) { mHandlerFunc(msgsystem, mUserData); - return TRUE; + return true; } - return FALSE; + return false; } bool isUdpBanned() const diff --git a/indra/llmessage/llmessagetemplateparser.cpp b/indra/llmessage/llmessagetemplateparser.cpp index 3e81fed49e..4b61272454 100644 --- a/indra/llmessage/llmessagetemplateparser.cpp +++ b/indra/llmessage/llmessagetemplateparser.cpp @@ -180,12 +180,12 @@ bool b_check_token(const char *token, const char *regexp) if (current_checker == -1) { LL_ERRS() << "Input exceeds regular expression!\nDid you forget a *?" << LL_ENDL; - return FALSE; + return false; } if (!gParseCheckCharacters[current_checker](token[tptr])) { - return FALSE; + return false; } if (next_checker != 9999) { diff --git a/indra/llmessage/llpacketack.h b/indra/llmessage/llpacketack.h index f0ed923f19..76e2e43acb 100644 --- a/indra/llmessage/llpacketack.h +++ b/indra/llmessage/llpacketack.h @@ -35,7 +35,7 @@ class LLReliablePacketParams public: LLHost mHost; S32 mRetries; - BOOL mPingBasedRetry; + bool mPingBasedRetry; F32Seconds mTimeout; void (*mCallback)(void **,S32); void** mCallbackData; @@ -53,7 +53,7 @@ public: { mHost.invalidate(); mRetries = 0; - mPingBasedRetry = TRUE; + mPingBasedRetry = true; mTimeout = F32Seconds(0.f); mCallback = NULL; mCallbackData = NULL; @@ -63,7 +63,7 @@ public: void set( const LLHost& host, S32 retries, - BOOL ping_based_retry, + bool ping_based_retry, F32Seconds timeout, void (*callback)(void**,S32), void** callback_data, char* name) @@ -98,7 +98,7 @@ protected: S32 mSocket; LLHost mHost; S32 mRetries; - BOOL mPingBasedRetry; + bool mPingBasedRetry; F32Seconds mTimeout; void (*mCallback)(void**,S32); void** mCallbackData; diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index 7ba76bea25..8e098bfc8c 100644 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -45,8 +45,8 @@ /////////////////////////////////////////////////////////// LLPacketRing::LLPacketRing () : - mUseInThrottle(FALSE), - mUseOutThrottle(FALSE), + mUseInThrottle(false), + mUseOutThrottle(false), mInThrottle(256000.f), mOutThrottle(64000.f), mActualBitsIn(0), diff --git a/indra/llmessage/llregionflags.h b/indra/llmessage/llregionflags.h index 464bf05250..489765e0ac 100644 --- a/indra/llmessage/llregionflags.h +++ b/indra/llmessage/llregionflags.h @@ -106,7 +106,7 @@ const U64 REGION_FLAGS_ESTATE_MASK = REGION_FLAGS_EXTERNALLY_VISIBLE | REGION_FLAGS_DENY_ANONYMOUS | REGION_FLAGS_DENY_AGEUNVERIFIED; -inline BOOL is_prelude( U64 flags ) +inline bool is_prelude( U64 flags ) { // definition of prelude does not depend on fixed-sun return 0 == (flags & REGION_FLAGS_PRELUDE_UNSET) diff --git a/indra/llmessage/llregionhandle.h b/indra/llmessage/llregionhandle.h index 085757dcbc..284426c148 100644 --- a/indra/llmessage/llregionhandle.h +++ b/indra/llmessage/llregionhandle.h @@ -63,13 +63,13 @@ inline U64 to_region_handle_global(const F32 x_global, const F32 y_global) return region_handle; } -inline BOOL to_region_handle(const F32 x_pos, const F32 y_pos, U64 *region_handle) +inline bool to_region_handle(const F32 x_pos, const F32 y_pos, U64 *region_handle) { U32 x_int, y_int; if (x_pos < 0.f) { // LL_WARNS() << "to_region_handle:Clamping negative x position " << x_pos << " to zero!" << LL_ENDL; - return FALSE; + return false; } else { @@ -78,14 +78,14 @@ inline BOOL to_region_handle(const F32 x_pos, const F32 y_pos, U64 *region_handl if (y_pos < 0.f) { // LL_WARNS() << "to_region_handle:Clamping negative y position " << y_pos << " to zero!" << LL_ENDL; - return FALSE; + return false; } else { y_int = (U32)ll_round(y_pos); } *region_handle = to_region_handle(x_int, y_int); - return TRUE; + return true; } // stuff the word-frame XY location of sim's SouthWest corner in x_pos, y_pos diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp index 7ea0c55afd..309cf53bef 100644 --- a/indra/llmessage/llsdmessagebuilder.cpp +++ b/indra/llmessage/llsdmessagebuilder.cpp @@ -44,8 +44,8 @@ LLSDMessageBuilder::LLSDMessageBuilder() : mCurrentBlock(NULL), mCurrentMessageName(""), mCurrentBlockName(""), - mbSBuilt(FALSE), - mbSClear(TRUE) + mbSBuilt(false), + mbSClear(true) { } @@ -58,8 +58,8 @@ LLSDMessageBuilder::~LLSDMessageBuilder() // virtual void LLSDMessageBuilder::newMessage(const char* name) { - mbSBuilt = FALSE; - mbSClear = FALSE; + mbSBuilt = false; + mbSClear = false; mCurrentMessage = LLSD::emptyMap(); mCurrentMessageName = (char*)name; @@ -170,7 +170,7 @@ void LLSDMessageBuilder::addIPPort(const char* varname, U16 v) void LLSDMessageBuilder::addBOOL(const char* varname, bool v) { - (*mCurrentBlock)[varname] = (v == true); + (*mCurrentBlock)[varname] = v; } void LLSDMessageBuilder::addString(const char* varname, const char* v) @@ -354,7 +354,7 @@ void LLSDMessageBuilder::copyFromMessageData(const LLMsgData& data) break; case MVT_BOOL: - addBOOL(varname, *(BOOL*)mvci.getData()); + addBOOL(varname, *(bool*)mvci.getData()); break; case MVT_IP_ADDR: diff --git a/indra/llmessage/llsdmessagebuilder.h b/indra/llmessage/llsdmessagebuilder.h index f1e824f5d4..2c728977ca 100644 --- a/indra/llmessage/llsdmessagebuilder.h +++ b/indra/llmessage/llsdmessagebuilder.h @@ -119,8 +119,8 @@ private: LLSD* mCurrentBlock; std::string mCurrentMessageName; std::string mCurrentBlockName; - BOOL mbSBuilt; - BOOL mbSClear; + bool mbSBuilt; + bool mbSClear; }; #endif // LL_LLSDMESSAGEBUILDER_H diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp index fad94ecab6..4188feb318 100644 --- a/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/indra/llmessage/lltemplatemessagebuilder.cpp @@ -42,8 +42,8 @@ LLTemplateMessageBuilder::LLTemplateMessageBuilder(const message_template_name_m mCurrentSDataBlock(NULL), mCurrentSMessageName(NULL), mCurrentSBlockName(NULL), - mbSBuilt(FALSE), - mbSClear(TRUE), + mbSBuilt(false), + mbSClear(true), mCurrentSendTotal(0), mMessageTemplates(name_template_map) { @@ -59,8 +59,8 @@ LLTemplateMessageBuilder::~LLTemplateMessageBuilder() // virtual void LLTemplateMessageBuilder::newMessage(const char *name) { - mbSBuilt = FALSE; - mbSClear = FALSE; + mbSBuilt = false; + mbSClear = false; mCurrentSendTotal = 0; @@ -103,8 +103,8 @@ void LLTemplateMessageBuilder::newMessage(const char *name) // virtual void LLTemplateMessageBuilder::clearMessage() { - mbSBuilt = FALSE; - mbSClear = TRUE; + mbSBuilt = false; + mbSClear = true; mCurrentSendTotal = 0; @@ -447,8 +447,6 @@ void LLTemplateMessageBuilder::addIPPort(const char *varname, U16 u) void LLTemplateMessageBuilder::addBOOL(const char* varname, bool b) { - // Can't just cast a BOOL (actually a U32) to a U8. - // In some cases the low order bits will be zero. U8 temp = (b != 0); addData(varname, &temp, MVT_BOOL, sizeof(temp)); } @@ -823,7 +821,7 @@ U32 LLTemplateMessageBuilder::buildMessage( { result += buildBlock(buffer + result, buffer_size - result, *iter, mCurrentSMessageData); } - mbSBuilt = TRUE; + mbSBuilt = true; return result; } diff --git a/indra/llmessage/lltemplatemessagebuilder.h b/indra/llmessage/lltemplatemessagebuilder.h index b8b4b36c3d..f02ed0c06d 100644 --- a/indra/llmessage/lltemplatemessagebuilder.h +++ b/indra/llmessage/lltemplatemessagebuilder.h @@ -106,8 +106,8 @@ private: LLMsgBlkData* mCurrentSDataBlock; char* mCurrentSMessageName; char* mCurrentSBlockName; - BOOL mbSBuilt; - BOOL mbSClear; + bool mbSBuilt; + bool mbSClear; S32 mCurrentSendTotal; const message_template_name_map_t& mMessageTemplates; }; diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index dc02b5ea90..0cfe5dbf38 100644 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp @@ -37,7 +37,7 @@ LLThrottle::LLThrottle(const F32 rate) mRate = rate; mAvailable = 0.f; mLookaheadSecs = 0.25f; - mLastSendTime = LLMessageSystem::getMessageTimeSeconds(TRUE); + mLastSendTime = LLMessageSystem::getMessageTimeSeconds(true); } diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index fb901644c7..bad12101e5 100644 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -49,7 +49,7 @@ LLTransferSource::stype_scfunc_map LLTransferSource::sSourceCreateMap; // LLTransferManager::LLTransferManager() : - mValid(FALSE) + mValid(false) { S32 i; for (i = 0; i < LLTTT_NUM_TYPES; i++) @@ -78,7 +78,7 @@ void LLTransferManager::init() { LL_ERRS() << "Double initializing LLTransferManager!" << LL_ENDL; } - mValid = TRUE; + mValid = true; // Register message system handlers gMessageSystem->setHandlerFunc("TransferRequest", processTransferRequest, NULL); @@ -90,7 +90,7 @@ void LLTransferManager::init() void LLTransferManager::cleanup() { - mValid = FALSE; + mValid = false; host_tc_map::iterator iter; for (iter = mTransferConnections.begin(); iter != mTransferConnections.end(); iter++) @@ -342,7 +342,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **) //LL_INFOS() << "Receiving " << transfer_id << ", size " << size << " bytes" << LL_ENDL; ttp->setSize(size); - ttp->setGotInfo(TRUE); + ttp->setGotInfo(true); // OK, at this point we to handle any delayed transfer packets (which could happen // if this packet was lost) @@ -557,7 +557,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **) else { // No matching delayed packet, abort it. - done = TRUE; + done = true; } } } @@ -822,7 +822,7 @@ void LLTransferSourceChannel::updateTransfers() gMessageSystem->addS32("Status", status); gMessageSystem->addBinaryData("Data", datap, data_size); sent_bytes = gMessageSystem->getCurrentSendTotal(); - gMessageSystem->sendReliable(getHost(), LL_DEFAULT_RELIABLE_RETRIES, TRUE, F32Seconds(0.f), + gMessageSystem->sendReliable(getHost(), LL_DEFAULT_RELIABLE_RETRIES, true, F32Seconds(0.f), LLTransferManager::reliablePacketCallback, (void**)cb_uuid); // Do bookkeeping for the throttle @@ -1207,7 +1207,7 @@ LLTransferTarget::LLTransferTarget( mSourceType(source_type), mID(transfer_id), mChannelp(NULL), - mGotInfo(FALSE), + mGotInfo(false), mSize(0), mLastPacketID(-1) { diff --git a/indra/llmessage/lltransfermanager.h b/indra/llmessage/lltransfermanager.h index a756771445..15097642b4 100644 --- a/indra/llmessage/lltransfermanager.h +++ b/indra/llmessage/lltransfermanager.h @@ -121,7 +121,7 @@ public: LLTransferSource *findTransferSource(const LLUUID &transfer_id); - BOOL isValid() const { return mValid; } + bool isValid() const { return mValid; } static void processTransferRequest(LLMessageSystem *mesgsys, void **); static void processTransferInfo(LLMessageSystem *mesgsys, void **); @@ -138,13 +138,13 @@ public: void addTransferBitsOut(const LLTransferChannelType tctype, const S32 bits) { mTransferBitsOut[tctype] += bits; } protected: LLTransferConnection *getTransferConnection(const LLHost &host); - BOOL removeTransferConnection(const LLHost &host); + bool removeTransferConnection(const LLHost &host); protected: // Convenient typedefs typedef std::map host_tc_map; - BOOL mValid; + bool mValid; LLHost mHost; S32 mTransferBitsIn[LLTTT_NUM_TYPES]; @@ -408,8 +408,8 @@ protected: virtual S32 getNextPacketID() { return mLastPacketID + 1; } virtual void setLastPacketID(const S32 packet_id) { mLastPacketID = packet_id; } void setSize(const S32 size) { mSize = size; } - void setGotInfo(const BOOL got_info) { mGotInfo = got_info; } - BOOL gotInfo() const { return mGotInfo; } + void setGotInfo(const bool got_info) { mGotInfo = got_info; } + bool gotInfo() const { return mGotInfo; } bool addDelayedPacket( const S32 packet_id, @@ -425,7 +425,7 @@ protected: LLTransferSourceType mSourceType; LLUUID mID; LLTransferTargetChannel *mChannelp; - BOOL mGotInfo; + bool mGotInfo; S32 mSize; S32 mLastPacketID; diff --git a/indra/llmessage/lltransfersourceasset.cpp b/indra/llmessage/lltransfersourceasset.cpp index 32fdc83f0e..50956aeb6d 100644 --- a/indra/llmessage/lltransfersourceasset.cpp +++ b/indra/llmessage/lltransfersourceasset.cpp @@ -36,7 +36,7 @@ LLTransferSourceAsset::LLTransferSourceAsset(const LLUUID &request_id, const F32 priority) : LLTransferSource(LLTST_ASSET, request_id, priority), - mGotResponse(FALSE), + mGotResponse(false), mCurPos(0) { } @@ -120,7 +120,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id, return LLTS_ERROR; } - delete_returned = TRUE; + delete_returned = true; U8 *tmpp = new U8[max_bytes]; *data_handle = tmpp; if (!vf.read(tmpp, max_bytes)) /* Flawfinder: Ignore */ @@ -129,7 +129,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id, delete[] tmpp; *data_handle = NULL; returned_bytes = 0; - delete_returned = FALSE; + delete_returned = false; return LLTS_ERROR; } @@ -144,7 +144,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id, delete[] tmpp; *data_handle = NULL; returned_bytes = 0; - delete_returned = FALSE; + delete_returned = false; } return LLTS_DONE; } @@ -194,7 +194,7 @@ void LLTransferSourceAsset::responderCallback(const LLUUID& uuid, LLAssetType::E LLTSCode status; - tsap->mGotResponse = TRUE; + tsap->mGotResponse = true; if (LL_ERR_NOERR == result) { // Everything's OK. diff --git a/indra/llmessage/lltransfersourcefile.cpp b/indra/llmessage/lltransfersourcefile.cpp index 1192a6e461..ccf0dd7fe0 100644 --- a/indra/llmessage/lltransfersourcefile.cpp +++ b/indra/llmessage/lltransfersourcefile.cpp @@ -102,7 +102,7 @@ LLTSCode LLTransferSourceFile::dataCallback(const S32 packet_id, } // Grab up until the max number of bytes from the file. - delete_returned = TRUE; + delete_returned = true; U8 *tmpp = new U8[max_bytes]; *data_handle = tmpp; returned_bytes = (S32)fread(tmpp, 1, max_bytes, mFP); @@ -111,7 +111,7 @@ LLTSCode LLTransferSourceFile::dataCallback(const S32 packet_id, delete[] tmpp; *data_handle = NULL; returned_bytes = 0; - delete_returned = FALSE; + delete_returned = false; return LLTS_DONE; } diff --git a/indra/llmessage/lltransfersourcefile.h b/indra/llmessage/lltransfersourcefile.h index bda6bad14f..60100e5a65 100644 --- a/indra/llmessage/lltransfersourcefile.h +++ b/indra/llmessage/lltransfersourcefile.h @@ -40,12 +40,12 @@ public: void setFilename(const std::string &filename) { mFilename = filename; } std::string getFilename() const { return mFilename; } - void setDeleteOnCompletion(BOOL enabled) { mDeleteOnCompletion = enabled; } - BOOL getDeleteOnCompletion() { return mDeleteOnCompletion; } + void setDeleteOnCompletion(bool enabled) { mDeleteOnCompletion = enabled; } + bool getDeleteOnCompletion() { return mDeleteOnCompletion; } protected: std::string mFilename; // ONLY DELETE THINGS OFF THE SIM IF THE FILENAME BEGINS IN 'TEMP' - BOOL mDeleteOnCompletion; + bool mDeleteOnCompletion; }; class LLTransferSourceFile : public LLTransferSource diff --git a/indra/llmessage/lltransfertargetvfile.cpp b/indra/llmessage/lltransfertargetvfile.cpp index f6faadf87f..2806e08ebd 100644 --- a/indra/llmessage/lltransfertargetvfile.cpp +++ b/indra/llmessage/lltransfertargetvfile.cpp @@ -94,7 +94,7 @@ LLTransferTargetVFile::LLTransferTargetVFile( const LLUUID& uuid, LLTransferSourceType src_type) : LLTransferTarget(LLTTT_VFILE, uuid, src_type), - mNeedsCreate(TRUE) + mNeedsCreate(true) { mTempID.generate(); } @@ -141,7 +141,7 @@ LLTSCode LLTransferTargetVFile::dataCallback(const S32 packet_id, U8 *in_datap, LLFileSystem vf(mTempID, mParams.getAssetType(), LLFileSystem::APPEND); if (mNeedsCreate) { - mNeedsCreate = FALSE; + mNeedsCreate = false; } if (!in_size) diff --git a/indra/llmessage/lltransfertargetvfile.h b/indra/llmessage/lltransfertargetvfile.h index 39a9125f1b..2e6e5a8d40 100644 --- a/indra/llmessage/lltransfertargetvfile.h +++ b/indra/llmessage/lltransfertargetvfile.h @@ -86,7 +86,7 @@ protected: LLTransferTargetParamsVFile mParams; - BOOL mNeedsCreate; + bool mNeedsCreate; LLUUID mTempID; }; diff --git a/indra/llmessage/lluseroperation.cpp b/indra/llmessage/lluseroperation.cpp index d56997c7de..3e387d3d5e 100644 --- a/indra/llmessage/lluseroperation.cpp +++ b/indra/llmessage/lluseroperation.cpp @@ -41,7 +41,7 @@ LLUserOperationMgr* gUserOperationMgr = NULL; LLUserOperation::LLUserOperation(const LLUUID& agent_id) : mAgentID(agent_id), mTimer(), - mNoExpire(FALSE) + mNoExpire(false) { mTransactionID.generate(); } @@ -51,7 +51,7 @@ LLUserOperation::LLUserOperation(const LLUUID& agent_id, mAgentID(agent_id), mTransactionID(transaction_id), mTimer(), - mNoExpire(FALSE) + mNoExpire(false) { } @@ -59,7 +59,7 @@ LLUserOperation::LLUserOperation(const LLUUID& agent_id, // transaction, agent, et. after construction. LLUserOperation::LLUserOperation() : mTimer(), - mNoExpire(FALSE) + mNoExpire(false) { } @@ -67,7 +67,7 @@ LLUserOperation::~LLUserOperation() { } -void LLUserOperation::SetNoExpireFlag(const BOOL flag) +void LLUserOperation::SetNoExpireFlag(const bool flag) { mNoExpire = flag; } diff --git a/indra/llmessage/lluseroperation.h b/indra/llmessage/lluseroperation.h index 88e5f82622..9d0f4d04d1 100644 --- a/indra/llmessage/lluseroperation.h +++ b/indra/llmessage/lluseroperation.h @@ -47,14 +47,14 @@ public: virtual bool isExpired(); // ability to mark this operation as never expiring. - void SetNoExpireFlag(const BOOL flag); + void SetNoExpireFlag(const bool flag); // Send request to the dataserver virtual void sendRequest() = 0; // Run the operation. This will only be called in the case of an // actual success or failure of the operation. - virtual bool execute(BOOL transaction_success) = 0; + virtual bool execute(bool transaction_success) = 0; // This method is called when the user op has expired, and is // about to be deleted by the manager. This gives the user op the diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index ad291df717..854f5664f0 100644 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp @@ -63,13 +63,13 @@ void LLXfer::init (S32 chunk_size) mXferSize = 0; mStatus = e_LL_XFER_UNINITIALIZED; - mWaitingForACK = FALSE; + mWaitingForACK = false; mCallback = NULL; mCallbackDataHandle = NULL; mCallbackResult = 0; - mBufferContainsEOF = FALSE; + mBufferContainsEOF = false; mBuffer = NULL; mBufferLength = 0; mBufferStartOffset = 0; @@ -187,7 +187,7 @@ void LLXfer::sendPacket(S32 packet_num) { char fdata_buf[LL_XFER_LARGE_PAYLOAD+4]; /* Flawfinder: ignore */ S32 fdata_size = mChunkSize; - BOOL last_packet = FALSE; + bool last_packet = false; S32 num_copy = 0; // if the desired packet is not in our current buffered excerpt from the file. . . @@ -217,7 +217,7 @@ void LLXfer::sendPacket(S32 packet_num) if (((U32)(desired_read_position + fdata_size) >= (U32)mBufferLength) && (mBufferContainsEOF)) { - last_packet = TRUE; + last_packet = true; } if (packet_num) @@ -270,7 +270,7 @@ void LLXfer::sendPacket(S32 packet_num) } ACKTimer.reset(); - mWaitingForACK = TRUE; + mWaitingForACK = true; } if (last_packet) { diff --git a/indra/llmessage/llxfer.h b/indra/llmessage/llxfer.h index cfd9f83d54..6b236df1a5 100644 --- a/indra/llmessage/llxfer.h +++ b/indra/llmessage/llxfer.h @@ -63,11 +63,11 @@ class LLXfer char *mBuffer; U32 mBufferLength; // Size of valid data, not actual allocated buffer size U32 mBufferStartOffset; - BOOL mBufferContainsEOF; + bool mBufferContainsEOF; ELLXferStatus mStatus; - BOOL mWaitingForACK; + bool mWaitingForACK; void (*mCallback)(void **,S32,LLExtStat); void **mCallbackDataHandle; diff --git a/indra/llmessage/llxfer_file.cpp b/indra/llmessage/llxfer_file.cpp index f5e9071aa4..ef2915ede3 100644 --- a/indra/llmessage/llxfer_file.cpp +++ b/indra/llmessage/llxfer_file.cpp @@ -49,10 +49,10 @@ S32 copy_file(const std::string& from, const std::string& to); LLXfer_File::LLXfer_File (S32 chunk_size) : LLXfer(chunk_size) { - init(LLStringUtil::null, FALSE, chunk_size); + init(LLStringUtil::null, false, chunk_size); } -LLXfer_File::LLXfer_File (const std::string& local_filename, BOOL delete_local_on_completion, S32 chunk_size) +LLXfer_File::LLXfer_File (const std::string& local_filename, bool delete_local_on_completion, S32 chunk_size) : LLXfer(chunk_size) { init(local_filename, delete_local_on_completion, chunk_size); @@ -67,7 +67,7 @@ LLXfer_File::~LLXfer_File () /////////////////////////////////////////////////////////// -void LLXfer_File::init (const std::string& local_filename, BOOL delete_local_on_completion, S32 chunk_size) +void LLXfer_File::init (const std::string& local_filename, bool delete_local_on_completion, S32 chunk_size) { mFp = NULL; @@ -75,8 +75,8 @@ void LLXfer_File::init (const std::string& local_filename, BOOL delete_local_on_ mRemoteFilename.clear(); mRemotePath = LL_PATH_NONE; mTempFilename.clear(); - mDeleteLocalOnCompletion = FALSE; - mDeleteRemoteOnCompletion = FALSE; + mDeleteLocalOnCompletion = false; + mDeleteRemoteOnCompletion = false; if (!local_filename.empty()) { @@ -120,7 +120,7 @@ S32 LLXfer_File::initializeRequest(U64 xfer_id, const std::string& remote_filename, ELLPath remote_path, const LLHost& remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void**,S32,LLExtStat), void** user_data) { @@ -174,7 +174,7 @@ S32 LLXfer_File::startDownload() gMessageSystem->addStringFast(_PREHASH_Filename, mRemoteFilename); gMessageSystem->addU8("FilePath", (U8) mRemotePath); gMessageSystem->addBOOL("DeleteOnCompletion", mDeleteRemoteOnCompletion); - gMessageSystem->addBOOL("UseBigPackets", BOOL(mChunkSize == LL_XFER_LARGE_PAYLOAD)); + gMessageSystem->addBOOL("UseBigPackets", mChunkSize == LL_XFER_LARGE_PAYLOAD); gMessageSystem->addUUIDFast(_PREHASH_VFileID, LLUUID::null); gMessageSystem->addS16Fast(_PREHASH_VFileType, -1); @@ -287,11 +287,11 @@ S32 LLXfer_File::suck(S32 start_position) if (feof(mFp)) { - mBufferContainsEOF = TRUE; + mBufferContainsEOF = true; } else { - mBufferContainsEOF = FALSE; + mBufferContainsEOF = false; } } else diff --git a/indra/llmessage/llxfer_file.h b/indra/llmessage/llxfer_file.h index 15a0120932..24bfd993bd 100644 --- a/indra/llmessage/llxfer_file.h +++ b/indra/llmessage/llxfer_file.h @@ -39,15 +39,15 @@ class LLXfer_File : public LLXfer ELLPath mRemotePath; std::string mTempFilename; - BOOL mDeleteLocalOnCompletion; - BOOL mDeleteRemoteOnCompletion; + bool mDeleteLocalOnCompletion; + bool mDeleteRemoteOnCompletion; public: LLXfer_File (S32 chunk_size); - LLXfer_File (const std::string& local_filename, BOOL delete_local_on_completion, S32 chunk_size); + LLXfer_File (const std::string& local_filename, bool delete_local_on_completion, S32 chunk_size); virtual ~LLXfer_File(); - virtual void init(const std::string& local_filename, BOOL delete_local_on_completion, S32 chunk_size); + virtual void init(const std::string& local_filename, bool delete_local_on_completion, S32 chunk_size); virtual void cleanup(); virtual S32 initializeRequest(U64 xfer_id, @@ -55,7 +55,7 @@ class LLXfer_File : public LLXfer const std::string& remote_filename, ELLPath remote_path, const LLHost& remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void**,S32,LLExtStat), void** user_data); virtual S32 startDownload(); diff --git a/indra/llmessage/llxfer_mem.cpp b/indra/llmessage/llxfer_mem.cpp index da8534ecdc..42afaad93b 100644 --- a/indra/llmessage/llxfer_mem.cpp +++ b/indra/llmessage/llxfer_mem.cpp @@ -52,7 +52,7 @@ void LLXfer_Mem::init () { mRemoteFilename.clear(); mRemotePath = LL_PATH_NONE; - mDeleteRemoteOnCompletion = FALSE; + mDeleteRemoteOnCompletion = false; } /////////////////////////////////////////////////////////// @@ -73,7 +73,7 @@ void LLXfer_Mem::setXferSize (S32 xfer_size) mBufferLength = 0; mBufferStartOffset = 0; - mBufferContainsEOF = TRUE; + mBufferContainsEOF = true; // cout << "starting transfer of size: " << xfer_size << endl; } @@ -124,7 +124,7 @@ S32 LLXfer_Mem::initializeRequest(U64 xfer_id, const std::string& remote_filename, ELLPath remote_path, const LLHost& remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void*,S32,void**,S32,LLExtStat), void** user_data) { @@ -164,7 +164,7 @@ S32 LLXfer_Mem::startDownload() gMessageSystem->addStringFast(_PREHASH_Filename, mRemoteFilename); gMessageSystem->addU8("FilePath", (U8) mRemotePath); gMessageSystem->addBOOL("DeleteOnCompletion", mDeleteRemoteOnCompletion); - gMessageSystem->addBOOL("UseBigPackets", BOOL(mChunkSize == LL_XFER_LARGE_PAYLOAD)); + gMessageSystem->addBOOL("UseBigPackets", mChunkSize == LL_XFER_LARGE_PAYLOAD); gMessageSystem->addUUIDFast(_PREHASH_VFileID, LLUUID::null); gMessageSystem->addS16Fast(_PREHASH_VFileType, -1); diff --git a/indra/llmessage/llxfer_mem.h b/indra/llmessage/llxfer_mem.h index d07779de87..25bd363235 100644 --- a/indra/llmessage/llxfer_mem.h +++ b/indra/llmessage/llxfer_mem.h @@ -39,7 +39,7 @@ class LLXfer_Mem : public LLXfer void (*mCallback)(void *, S32, void **, S32, LLExtStat); std::string mRemoteFilename; ELLPath mRemotePath; - BOOL mDeleteRemoteOnCompletion; + bool mDeleteRemoteOnCompletion; public: @@ -59,7 +59,7 @@ class LLXfer_Mem : public LLXfer const std::string& remote_filename, ELLPath remote_path, const LLHost& remote_host, - BOOL delete_remote_on_completion, + bool delete_remote_on_completion, void (*callback)(void*,S32,void**,S32,LLExtStat), void** user_data); virtual S32 startDownload(); diff --git a/indra/llmessage/llxfer_vfile.cpp b/indra/llmessage/llxfer_vfile.cpp index f478825d97..3322188694 100644 --- a/indra/llmessage/llxfer_vfile.cpp +++ b/indra/llmessage/llxfer_vfile.cpp @@ -138,7 +138,7 @@ S32 LLXfer_VFile::initializeRequest(U64 xfer_id, mBufferLength = 0; mPacketNum = 0; mTempID.generate(); - mDeleteTempFile = TRUE; + mDeleteTempFile = true; mStatus = e_LL_XFER_PENDING; return retval; } @@ -156,8 +156,8 @@ S32 LLXfer_VFile::startDownload() gMessageSystem->addU64Fast(_PREHASH_ID, mID); gMessageSystem->addStringFast(_PREHASH_Filename, ""); gMessageSystem->addU8("FilePath", (U8) LL_PATH_NONE); - gMessageSystem->addBOOL("DeleteOnCompletion", FALSE); - gMessageSystem->addBOOL("UseBigPackets", BOOL(mChunkSize == LL_XFER_LARGE_PAYLOAD)); + gMessageSystem->addBOOL("DeleteOnCompletion", false); + gMessageSystem->addBOOL("UseBigPackets", mChunkSize == LL_XFER_LARGE_PAYLOAD); gMessageSystem->addUUIDFast(_PREHASH_VFileID, mRemoteID); gMessageSystem->addS16Fast(_PREHASH_VFileType, (S16)mType); @@ -345,7 +345,7 @@ S32 LLXfer_VFile::processEOF() { // Rename worked: the original file is gone. Clear mDeleteTempFile // so we don't attempt to delete the file in cleanup() - mDeleteTempFile = FALSE; + mDeleteTempFile = false; } } else diff --git a/indra/llmessage/llxfer_vfile.h b/indra/llmessage/llxfer_vfile.h index 71eaeb7393..032c5e2533 100644 --- a/indra/llmessage/llxfer_vfile.h +++ b/indra/llmessage/llxfer_vfile.h @@ -44,7 +44,7 @@ class LLXfer_VFile : public LLXfer std::string mName; - BOOL mDeleteTempFile; + bool mDeleteTempFile; public: LLXfer_VFile (); diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index 591dbc18c2..6187d439d9 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -79,7 +79,7 @@ void LLXferManager::init() setMaxIncomingXfers(LL_DEFAULT_MAX_REQUEST_FIFO_XFERS); // Turn on or off ack throttling - mUseAckThrottling = FALSE; + mUseAckThrottling = false; setAckThrottleBPS(100000); } @@ -116,7 +116,7 @@ void LLXferManager::setHardLimitOutgoingXfersPerCircuit(S32 max_num) mHardLimitOutgoingXfersPerCircuit = max_num; } -void LLXferManager::setUseAckThrottling(const BOOL use) +void LLXferManager::setUseAckThrottling(const bool use) { mUseAckThrottling = use; } @@ -1005,7 +1005,7 @@ void LLXferManager::processConfirmation (LLMessageSystem *mesgsys, void ** /*use if (xferp) { // cout << "confirmed packet #" << packetNum << " ping: "<< xferp->ACKTimer.getElapsedTimeF32() << endl; - xferp->mWaitingForACK = FALSE; + xferp->mWaitingForACK = false; if (xferp->mStatus == e_LL_XFER_IN_PROGRESS) { xferp->sendNextPacket(); diff --git a/indra/llmessage/llxfermanager.h b/indra/llmessage/llxfermanager.h index 17625aedfa..5b42e781eb 100644 --- a/indra/llmessage/llxfermanager.h +++ b/indra/llmessage/llxfermanager.h @@ -76,7 +76,7 @@ class LLXferManager S32 mHardLimitOutgoingXfersPerCircuit; // At this limit, kill off the connection S32 mMaxIncomingXfers; - BOOL mUseAckThrottling; // Use ack throttling to cap file xfer bandwidth + bool mUseAckThrottling; // Use ack throttling to cap file xfer bandwidth std::deque mXferAckQueue; LLThrottle mAckThrottle; public: @@ -85,8 +85,8 @@ class LLXferManager // an xfer must happen asap. enum { - LOW_PRIORITY = FALSE, - HIGH_PRIORITY = TRUE, + LOW_PRIORITY = false, + HIGH_PRIORITY = true, }; // Linked FIFO list, add to the front and pull from back @@ -113,7 +113,7 @@ class LLXferManager virtual void init(); virtual void cleanup(); - void setUseAckThrottling(const BOOL use); + void setUseAckThrottling(const bool use); void setAckThrottleBPS(const F32 bps); // list management routines diff --git a/indra/llmessage/llxorcipher.h b/indra/llmessage/llxorcipher.h index c5b0700f0d..cd1fed3ba4 100644 --- a/indra/llmessage/llxorcipher.h +++ b/indra/llmessage/llxorcipher.h @@ -43,18 +43,18 @@ public: LLXORCipher& operator=(const LLXORCipher& cipher); // Cipher functions - /*virtual*/ U32 encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len); - /*virtual*/ U32 decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len); - /*virtual*/ U32 requiredEncryptionSpace(U32 src_len) const; + U32 encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) override; + U32 decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) override; + U32 requiredEncryptionSpace(U32 src_len) const override; // special syntactic-sugar since xor can be performed in place. - BOOL encrypt(U8* buf, U32 len) { return encrypt((const U8*)buf, len, buf, len); } - BOOL decrypt(U8* buf, U32 len) { return decrypt((const U8*)buf, len, buf, len); } + bool encrypt(U8* buf, U32 len) { return encrypt((const U8*)buf, len, buf, len) > 0; } + bool decrypt(U8* buf, U32 len) { return decrypt((const U8*)buf, len, buf, len) > 0; } #ifdef _DEBUG // This function runs tests to make sure the crc is - // working. Returns TRUE if it is. - static BOOL testHarness(); + // working. Returns true if it is. + static bool testHarness(); #endif protected: diff --git a/indra/llmessage/machine.h b/indra/llmessage/machine.h index 07aadd47d2..6505a88639 100644 --- a/indra/llmessage/machine.h +++ b/indra/llmessage/machine.h @@ -65,7 +65,7 @@ public: // The control port is the listen port of the parent process that // launched this machine. 0 means none or not known. const S32 &getControlPort() const { return mControlPort; } - BOOL isValid() const { return (mHost.getPort() != 0); } // TRUE if corresponds to functioning machine + bool isValid() const { return (mHost.getPort() != 0); } // TRUE if corresponds to functioning machine // set functions void setMachineType(EMachineType machine_type) { mMachineType = machine_type; } diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index d11efab7ab..91a1250857 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -148,11 +148,11 @@ static const char* nullToEmpty(const char* s) void LLMessageSystem::init() { // initialize member variables - mVerboseLog = FALSE; + mVerboseLog = false; - mbError = FALSE; + mbError = false; mErrorCode = 0; - mSendReliable = FALSE; + mSendReliable = false; mUnackedListDepth = 0; mUnackedListSize = 0; @@ -214,7 +214,7 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port, mVersionFlags = 0x0; // default to not accepting packets from not alive circuits - mbProtected = TRUE; + mbProtected = true; // default to blocking trusted connections on a public interface if one is specified mBlockUntrustedInterface = true; @@ -239,7 +239,7 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port, S32 error = start_net(mSocket, mPort); if (error != 0) { - mbError = TRUE; + mbError = true; mErrorCode = error; } // LL_DEBUGS("Messaging") << << "*** port: " << mPort << LL_ENDL; @@ -288,7 +288,7 @@ void LLMessageSystem::loadTemplateFile(const std::string& filename, bool failure if(filename.empty()) { LL_ERRS("Messaging") << "No template filename specified" << LL_ENDL; - mbError = TRUE; + mbError = true; return; } @@ -300,7 +300,7 @@ void LLMessageSystem::loadTemplateFile(const std::string& filename, bool failure } else { LL_WARNS("Messaging") << "Failed to open template: " << filename << LL_ENDL; } - mbError = TRUE; + mbError = true; return; } @@ -506,8 +506,8 @@ bool LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count ) { clearReceiveState(); - BOOL recv_reliable = false; - BOOL recv_resent = false; + bool recv_reliable = false; + bool recv_resent = false; S32 acks = 0; S32 true_rcv_size = 0; @@ -768,7 +768,7 @@ void LLMessageSystem::processAcks(LockMessageChecker&, F32 collect_time) } } - BOOL dump = FALSE; + bool dump = false; { // Check the status of circuits mCircuitInfo.updateWatchDogTimers(this); @@ -793,17 +793,17 @@ void LLMessageSystem::processAcks(LockMessageChecker&, F32 collect_time) { if (mNumMessageCounts >= mMaxMessageCounts) { - dump = TRUE; + dump = true; } } if (mMaxMessageTime >= F32Seconds(0.f)) { // This is one of the only places where we're required to get REAL message system time. - mReceiveTime = getMessageTimeSeconds(TRUE) - mMessageCountTime; + mReceiveTime = getMessageTimeSeconds(true) - mMessageCountTime; if (mReceiveTime > mMaxMessageTime) { - dump = TRUE; + dump = true; } } } @@ -833,7 +833,7 @@ void LLMessageSystem::copyMessageReceivedToSend() { mMessageBuilder = mLLSDMessageBuilder; } - mSendReliable = FALSE; + mSendReliable = false; mMessageBuilder->newMessage(mMessageReader->getMessageName()); mMessageReader->copyToBuilder(*mMessageBuilder); } @@ -928,7 +928,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host, LLStoredMessagePtr message) void LLMessageSystem::clearMessage() { - mSendReliable = FALSE; + mSendReliable = false; mMessageBuilder->clearMessage(); } @@ -968,7 +968,7 @@ bool LLMessageSystem::removeLastBlock() S32 LLMessageSystem::sendReliable(const LLHost &host) { - return sendReliable(host, LL_DEFAULT_RELIABLE_RETRIES, TRUE, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL); + return sendReliable(host, LL_DEFAULT_RELIABLE_RETRIES, true, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL); } @@ -987,15 +987,15 @@ S32 LLMessageSystem::sendSemiReliable(const LLHost &host, void (*callback)(void timeout = LL_SEMIRELIABLE_TIMEOUT_FACTOR * LL_AVERAGED_PING_MAX; } - const S32 retries = 0; - const BOOL ping_based_timeout = FALSE; + constexpr S32 retries = 0; + constexpr bool ping_based_timeout = false; return sendReliable(host, retries, ping_based_timeout, timeout, callback, callback_data); } // send the message via a UDP packet S32 LLMessageSystem::sendReliable( const LLHost &host, S32 retries, - BOOL ping_based_timeout, + bool ping_based_timeout, F32Seconds timeout, void (*callback)(void **,S32), void ** callback_data) @@ -1013,7 +1013,7 @@ S32 LLMessageSystem::sendReliable( const LLHost &host, } } - mSendReliable = TRUE; + mSendReliable = true; mReliablePacketParams.set(host, retries, ping_based_timeout, timeout, callback, callback_data, const_cast(mMessageBuilder->getMessageName())); @@ -1040,7 +1040,7 @@ void LLMessageSystem::forwardReliable(const U32 circuit_code) S32 LLMessageSystem::forwardReliable( const LLHost &host, S32 retries, - BOOL ping_based_timeout, + bool ping_based_timeout, F32Seconds timeout, void (*callback)(void **,S32), void ** callback_data) @@ -1067,9 +1067,9 @@ S32 LLMessageSystem::flushSemiReliable(const LLHost &host, void (*callback)(void S32 send_bytes = 0; if (mMessageBuilder->getMessageSize()) { - mSendReliable = TRUE; + mSendReliable = true; // No need for ping-based retry as not going to retry - mReliablePacketParams.set(host, 0, FALSE, timeout, callback, + mReliablePacketParams.set(host, 0, false, timeout, callback, callback_data, const_cast(mMessageBuilder->getMessageName())); send_bytes = sendMessage(host); @@ -1169,7 +1169,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) host.getUntrustedSimulatorCap(), mLLSDMessageBuilder->getMessageName(), message, cb)); - mSendReliable = FALSE; + mSendReliable = false; mReliablePacketParams.clear(); return 1; } @@ -1218,7 +1218,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) // tack packet acks onto the end of this message S32 space_left = (MTUBYTES - buffer_length) / sizeof(TPACKETID); // space left for packet ids S32 ack_count = (S32)cdp->mAcks.size(); - BOOL is_ack_appended = FALSE; + bool is_ack_appended = false; std::vector acks; if((space_left > 0) && (ack_count > 0) && (mMessageBuilder->getMessageName() != _PREHASH_PacketAck)) @@ -1269,10 +1269,10 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) // tack the count in the final byte U8 count = (U8)append_ack_count; buf_ptr[buffer_length++] = count; - is_ack_appended = TRUE; + is_ack_appended = true; } - BOOL success; + bool success; success = mPacketRing.sendPacket(mSocket, (char *)buf_ptr, buffer_length, host); if (!success) @@ -1307,12 +1307,12 @@ S32 LLMessageSystem::sendMessage(const LLHost &host) mPacketsOut++; mTotalBytesOut += buffer_length; - mSendReliable = FALSE; + mSendReliable = false; mReliablePacketParams.clear(); return buffer_length; } -void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, BOOL recv_reliable ) +void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, bool recv_reliable ) { if(mVerboseLog) { @@ -1339,7 +1339,7 @@ void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, BOOL recv_re // TODO: babbage: work out if we need these // mMessageCountList[mNumMessageCounts].mMessageNum = mCurrentRMessageTemplate->mMessageNumber; mMessageCountList[mNumMessageCounts].mMessageBytes = mMessageReader->getMessageSize(); - mMessageCountList[mNumMessageCounts].mInvalid = TRUE; + mMessageCountList[mNumMessageCounts].mInvalid = true; mNumMessageCounts++; } } @@ -1392,12 +1392,12 @@ void LLMessageSystem::logTrustedMsgFromUntrustedCircuit( const LLHost& host ) // = mCurrentRMessageTemplate->mMessageNumber; mMessageCountList[mNumMessageCounts].mMessageBytes = mMessageReader->getMessageSize(); - mMessageCountList[mNumMessageCounts].mInvalid = TRUE; + mMessageCountList[mNumMessageCounts].mInvalid = true; mNumMessageCounts++; } } -void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, BOOL recv_reliable, BOOL recv_resent, BOOL recv_acks ) +void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, bool recv_reliable, bool recv_resent, bool recv_acks ) { if (mNumMessageCounts >= MAX_MESSAGE_COUNT_NUM) { @@ -1408,7 +1408,7 @@ void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, BOOL r // TODO: babbage: work out if we need these //mMessageCountList[mNumMessageCounts].mMessageNum = mCurrentRMessageTemplate->mMessageNumber; mMessageCountList[mNumMessageCounts].mMessageBytes = mMessageReader->getMessageSize(); - mMessageCountList[mNumMessageCounts].mInvalid = FALSE; + mMessageCountList[mNumMessageCounts].mInvalid = false; mNumMessageCounts++; } @@ -1502,7 +1502,7 @@ void LLMessageSystem::getCircuitInfo(LLSD& info) const } // returns whether the given host is on a trusted circuit -BOOL LLMessageSystem::getCircuitTrust(const LLHost &host) +bool LLMessageSystem::getCircuitTrust(const LLHost &host) { LLCircuitData *cdp = mCircuitInfo.findCircuit(host); if (cdp) @@ -1510,12 +1510,12 @@ BOOL LLMessageSystem::getCircuitTrust(const LLHost &host) return cdp->getTrusted(); } - return FALSE; + return false; } // Activate a circuit, and set its trust level (TRUE if trusted, // FALSE if not). -void LLMessageSystem::enableCircuit(const LLHost &host, BOOL trusted) +void LLMessageSystem::enableCircuit(const LLHost &host, bool trusted) { LLCircuitData *cdp = mCircuitInfo.findCircuit(host); if (!cdp) @@ -1576,7 +1576,7 @@ void LLMessageSystem::disableCircuit(const LLHost &host) } -void LLMessageSystem::setCircuitAllowTimeout(const LLHost &host, BOOL allow) +void LLMessageSystem::setCircuitAllowTimeout(const LLHost &host, bool allow) { LLCircuitData *cdp = mCircuitInfo.findCircuit(host); if (cdp) @@ -1654,7 +1654,7 @@ bool LLMessageSystem::checkCircuitAlive(const LLHost &host) } -void LLMessageSystem::setCircuitProtection(BOOL b_protect) +void LLMessageSystem::setCircuitProtection(bool b_protect) { mbProtected = b_protect; } @@ -1782,7 +1782,7 @@ void open_circuit(LLMessageSystem *msgsystem, void** /*user_data*/) msgsystem->getIPPortFast(_PREHASH_CircuitInfo, _PREHASH_Port, port); // By default, OpenCircuit's are untrusted - msgsystem->enableCircuit(LLHost(ip, port), FALSE); + msgsystem->enableCircuit(LLHost(ip, port), false); } void close_circuit(LLMessageSystem *msgsystem, void** /*user_data*/) @@ -1947,9 +1947,9 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg, // passed the circuit code and session id check, so we will go // ahead and persist the ID associated. LLCircuitData *cdp = msg->mCircuitInfo.findCircuit(msg->getSender()); - BOOL had_circuit_already = cdp ? TRUE : FALSE; + bool had_circuit_already = cdp ? true : false; - msg->enableCircuit(msg->getSender(), FALSE); + msg->enableCircuit(msg->getSender(), false); cdp = msg->mCircuitInfo.findCircuit(msg->getSender()); if(cdp) { @@ -1973,7 +1973,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg, // doesn't get properly duplicate suppressed. Not a BIG deal, but it's somewhat confusing // (and bad from a state point of view). DJS 9/23/04 // - cdp->checkPacketInID(gMessageSystem->mCurrentRecvPacketID, FALSE ); // Since this is the first message on the circuit, by definition it's not resent. + cdp->checkPacketInID(gMessageSystem->mCurrentRecvPacketID, false ); // Since this is the first message on the circuit, by definition it's not resent. } msg->mIPPortToCircuitCode[ip_port_in] = circuit_code_in; @@ -2460,13 +2460,13 @@ bool start_messaging_system( if (!gMessageSystem) { LL_ERRS("AppInit") << "Messaging system initialization failed." << LL_ENDL; - return FALSE; + return false; } // bail if system encountered an error. if(!gMessageSystem->isOK()) { - return FALSE; + return false; } if (b_dump_prehash_file) @@ -2517,12 +2517,12 @@ bool start_messaging_system( // Initialize the transfer manager gTransferManager.init(); - return TRUE; + return true; } void LLMessageSystem::startLogging() { - mVerboseLog = TRUE; + mVerboseLog = true; std::ostringstream str; str << "START MESSAGE LOG" << std::endl; str << "Legend:" << std::endl; @@ -2536,7 +2536,7 @@ void LLMessageSystem::stopLogging() { if(mVerboseLog) { - mVerboseLog = FALSE; + mVerboseLog = false; LL_INFOS("Messaging") << "END MESSAGE LOG" << LL_ENDL; } } @@ -2757,7 +2757,7 @@ S32 LLMessageSystem::zeroCodeAdjustCurrentSendTotal() 0); } // TODO: babbage: remove this horror - mMessageBuilder->setBuilt(FALSE); + mMessageBuilder->setBuilt(false); S32 count = mSendSize; @@ -3357,7 +3357,7 @@ void LLMessageSystem::dumpPacketToLog() //static -U64Microseconds LLMessageSystem::getMessageTimeUsecs(const BOOL update) +U64Microseconds LLMessageSystem::getMessageTimeUsecs(const bool update) { if (gMessageSystem) { @@ -3374,7 +3374,7 @@ U64Microseconds LLMessageSystem::getMessageTimeUsecs(const BOOL update) } //static -F64Seconds LLMessageSystem::getMessageTimeSeconds(const BOOL update) +F64Seconds LLMessageSystem::getMessageTimeSeconds(const bool update) { if (gMessageSystem) { @@ -3432,7 +3432,7 @@ void LLMessageSystem::newMessageFast(const char *name) mMessageBuilder = mTemplateMessageBuilder; } } - mSendReliable = FALSE; + mSendReliable = false; mMessageBuilder->newMessage(name); } @@ -3923,7 +3923,7 @@ void LLMessageSystem::getString(const char *block, const char *var, blocknum); } -BOOL LLMessageSystem::has(const char *blockname) const +bool LLMessageSystem::has(const char *blockname) const { return getNumberOfBlocks(blockname) > 0; } diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index c40da26067..c167d7ff57 100644 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -74,7 +74,7 @@ public: char *getString(const char *str); U32 mUsed; - BOOL mEmpty[MESSAGE_NUMBER_OF_HASH_BUCKETS]; + bool mEmpty[MESSAGE_NUMBER_OF_HASH_BUCKETS]; char mString[MESSAGE_NUMBER_OF_HASH_BUCKETS][MESSAGE_MAX_STRINGS_LENGTH]; /* Flawfinder: ignore */ }; @@ -296,7 +296,7 @@ class LLMessageSystem : public LLMessageSenderInterface LLReliablePacketParams mReliablePacketParams; // Set this flag to TRUE when you want *very* verbose logs. - BOOL mVerboseLog; + bool mVerboseLog; F32 mMessageFileVersionNumber; @@ -314,7 +314,7 @@ public: S32 mSystemVersionServer; U32 mVersionFlags; - BOOL mbProtected; + bool mbProtected; U32 mNumberHighFreqMessages; U32 mNumberMediumFreqMessages; @@ -347,7 +347,7 @@ public: S64 mTotalBytesIn; // total size of all uncompressed packets in S64 mTotalBytesOut; // total size of all uncompressed packets out - BOOL mSendReliable; // does the outgoing message require a pos ack? + bool mSendReliable; // does the outgoing message require a pos ack? LLCircuit mCircuitInfo; F64Seconds mCircuitPrintTime; // used to print circuit debug info every couple minutes @@ -370,7 +370,7 @@ public: ~LLMessageSystem(); - BOOL isOK() const { return !mbError; } + bool isOK() const { return !mbError; } S32 getErrorCode() const { return mErrorCode; } // Read file and build message templates filename must point to a @@ -548,7 +548,7 @@ public: // Use this one if you DON'T want automatic ping-based retry. S32 sendReliable( const LLHost &host, S32 retries, - BOOL ping_based_retries, + bool ping_based_retries, F32Seconds timeout, void (*callback)(void **,S32), void ** callback_data); @@ -568,7 +568,7 @@ public: S32 forwardReliable( const LLHost &host, S32 retries, - BOOL ping_based_timeout, + bool ping_based_timeout, F32Seconds timeout, void (*callback)(void **,S32), void ** callback_data); @@ -579,7 +579,7 @@ private: S32 sendMessage(const LLHost &host, const char* name, const LLSD& message); public: - // BOOL decodeData(const U8 *buffer, const LLHost &host); + // bool decodeData(const U8 *buffer, const LLHost &host); /** gets binary data from the current message. @@ -659,7 +659,7 @@ public: U32 getOurCircuitCode(); - void enableCircuit(const LLHost &host, BOOL trusted); + void enableCircuit(const LLHost &host, bool trusted); void disableCircuit(const LLHost &host); // Use this to establish trust on startup and in response to @@ -712,20 +712,20 @@ public: // returns whether the given host is on a trusted circuit // Note:DaveH/Babbage some trusted messages can be received without a circuit - BOOL getCircuitTrust(const LLHost &host); + bool getCircuitTrust(const LLHost &host); - void setCircuitAllowTimeout(const LLHost &host, BOOL allow); + void setCircuitAllowTimeout(const LLHost &host, bool allow); void setCircuitTimeoutCallback(const LLHost &host, void (*callback_func)(const LLHost &host, void *user_data), void *user_data); bool checkCircuitBlocked(const U32 circuit); bool checkCircuitAlive(const U32 circuit); bool checkCircuitAlive(const LLHost &host); - void setCircuitProtection(BOOL b_protect); + void setCircuitProtection(bool b_protect); U32 findCircuitCode(const LLHost &host); LLHost findHost(const U32 circuit_code); void sanityCheck(); - BOOL has(const char *blockname) const; + bool has(const char *blockname) const; S32 getNumberOfBlocksFast(const char *blockname) const; S32 getNumberOfBlocks(const char *blockname) const; S32 getSizeFast(const char *blockname, const char *varname) const; @@ -762,8 +762,8 @@ public: void setMaxMessageTime(const F32 seconds); // Max time to process messages before warning and dumping (neg to disable) void setMaxMessageCounts(const S32 num); // Max number of messages before dumping (neg to disable) - static U64Microseconds getMessageTimeUsecs(const BOOL update = FALSE); // Get the current message system time in microseconds - static F64Seconds getMessageTimeSeconds(const BOOL update = FALSE); // Get the current message system time in seconds + static U64Microseconds getMessageTimeUsecs(const bool update = false); // Get the current message system time in microseconds + static F64Seconds getMessageTimeSeconds(const bool update = false); // Get the current message system time in seconds static void setTimeDecodes(bool b); static void setTimeDecodesSpamThreshold(F32 seconds); @@ -839,11 +839,11 @@ private: LLUUID mSessionID; void addTemplate(LLMessageTemplate *templatep); - BOOL decodeTemplate( const U8* buffer, S32 buffer_size, LLMessageTemplate** msg_template ); + bool decodeTemplate( const U8* buffer, S32 buffer_size, LLMessageTemplate** msg_template ); - void logMsgFromInvalidCircuit( const LLHost& sender, BOOL recv_reliable ); + void logMsgFromInvalidCircuit( const LLHost& sender, bool recv_reliable ); void logTrustedMsgFromUntrustedCircuit( const LLHost& sender ); - void logValidMsg(LLCircuitData *cdp, const LLHost& sender, BOOL recv_reliable, BOOL recv_resent, BOOL recv_acks ); + void logValidMsg(LLCircuitData *cdp, const LLHost& sender, bool recv_reliable, bool recv_resent, bool recv_acks ); void logRanOffEndOfPacket( const LLHost& sender ); class LLMessageCountInfo @@ -851,7 +851,7 @@ private: public: U32 mMessageNum; U32 mMessageBytes; - BOOL mInvalid; + bool mInvalid; }; LLMessagePollInfo *mPollInfop; @@ -862,7 +862,7 @@ private: // Must be valid during decode - BOOL mbError; + bool mbError; S32 mErrorCode; F64Seconds mResendDumpTime; // The last time we dumped resends @@ -885,7 +885,7 @@ private: LLTimer mMessageSystemTimer; static F32 mTimeDecodesSpamThreshold; // If mTimeDecodes is on, all this many seconds for each msg decode before spamming - static BOOL mTimeDecodes; // Measure time for all message decodes if TRUE; + static bool mTimeDecodes; // Measure time for all message decodes if TRUE; msg_timing_callback mTimingCallback; void* mTimingCallbackData; diff --git a/indra/llmessage/message_string_table.cpp b/indra/llmessage/message_string_table.cpp index e4f5fb3a38..8bcc452e3f 100644 --- a/indra/llmessage/message_string_table.cpp +++ b/indra/llmessage/message_string_table.cpp @@ -47,7 +47,7 @@ LLMessageStringTable::LLMessageStringTable() { for (U32 i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) { - mEmpty[i] = TRUE; + mEmpty[i] = true; mString[i][0] = 0; } } @@ -75,7 +75,7 @@ char* LLMessageStringTable::getString(const char *str) // not found, so add! strncpy(mString[hash_value], str, MESSAGE_MAX_STRINGS_LENGTH); /* Flawfinder: ignore */ mString[hash_value][MESSAGE_MAX_STRINGS_LENGTH - 1] = 0; - mEmpty[hash_value] = FALSE; + mEmpty[hash_value] = false; mUsed++; if (mUsed >= MESSAGE_NUMBER_OF_HASH_BUCKETS - 1) { diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp index 60030bb920..e43751f23e 100644 --- a/indra/llmessage/net.cpp +++ b/indra/llmessage/net.cpp @@ -339,7 +339,7 @@ S32 receive_packet(int hSocket, char * receiveBuffer) } // Returns TRUE on success. -BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort) +bool send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort) { // Sends a packet to the address set in initNet // @@ -364,7 +364,7 @@ BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, i // assume it is. JNC 2002.01.18 if (WSAECONNRESET == WSAGetLastError()) { - return TRUE; + return true; } LL_INFOS() << "sendto() failed to " << u32_to_ip_string(recipient) << ":" << nPort << ", Error " << last_error << LL_ENDL; @@ -598,11 +598,11 @@ int receive_packet(int hSocket, char * receiveBuffer) return nRet; } -BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient, int nPort) +bool send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient, int nPort) { int ret; - BOOL success; - BOOL resend; + bool success; + bool resend; S32 send_attempts = 0; stDstAddr.sin_addr.s_addr = recipient; @@ -616,34 +616,34 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient, if (ret >= 0) { // successful send - success = TRUE; - resend = FALSE; + success = true; + resend = false; } else { // send failed, check to see if we should resend - success = FALSE; + success = false; if (errno == EAGAIN) { // say nothing, just repeat send LL_INFOS() << "sendto() reported buffer full, resending (attempt " << send_attempts << ")" << LL_ENDL; LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL; - resend = TRUE; + resend = true; } else if (errno == ECONNREFUSED) { // response to ICMP connection refused message on earlier send LL_INFOS() << "sendto() reported connection refused, resending (attempt " << send_attempts << ")" << LL_ENDL; LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL; - resend = TRUE; + resend = true; } else { // some other error LL_INFOS() << "sendto() failed: " << errno << ", " << strerror(errno) << LL_ENDL; LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL; - resend = FALSE; + resend = false; } } } @@ -652,7 +652,7 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient, if (send_attempts >= 3) { LL_INFOS() << "sendPacket() bailed out of send!" << LL_ENDL; - return FALSE; + return false; } return success; diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h index beb67bae4e..3d45899a56 100644 --- a/indra/llmessage/net.h +++ b/indra/llmessage/net.h @@ -43,7 +43,7 @@ void end_net(S32& socket_out); // returns size of packet or -1 in case of error S32 receive_packet(int hSocket, char * receiveBuffer); -BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort); // Returns TRUE on success. +bool send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort); // Returns TRUE on success. //void get_sender(char * tmp); LLHost get_sender(); diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp index d42a7ef989..846b11a5d0 100644 --- a/indra/llmessage/partsyspacket.cpp +++ b/indra/llmessage/partsyspacket.cpp @@ -89,7 +89,7 @@ void gSetInitDataDefaults(LLPartInitData *setMe) setMe->mFlags[i] = 0x00; } - setMe->createMe = TRUE; + setMe->createMe = true; setMe->maxParticles = 25; setMe->initialParticles = 25; @@ -1168,7 +1168,7 @@ bool LLPartSysCompressedPacket::fromLLPartInitData(LLPartInitData *in, U32 &byte // llprintline("returning from \"fromLLPartInitData\" with %d bytes\n", bytesUsed); - return TRUE; + return true; } bool LLPartSysCompressedPacket::toLLPartInitData(LLPartInitData *out, U32 *bytesUsed) diff --git a/indra/llmessage/patch_code.cpp b/indra/llmessage/patch_code.cpp index 32f8d80782..c3c3e2b3b3 100644 --- a/indra/llmessage/patch_code.cpp +++ b/indra/llmessage/patch_code.cpp @@ -130,7 +130,7 @@ void code_patch(LLBitPack &bitpack, S32 *patch, S32 postquant) { S32 i, j, patch_size = gPatchSize, wbits = gWordBits; S32 temp; - BOOL b_eob; + bool b_eob; if ( (postquant > patch_size*patch_size) ||(postquant < 0)) @@ -143,16 +143,16 @@ void code_patch(LLBitPack &bitpack, S32 *patch, S32 postquant) for (i = 0; i < patch_size*patch_size; i++) { - b_eob = FALSE; + b_eob = false; temp = patch[i]; if (!temp) { - b_eob = TRUE; + b_eob = true; for (j = i; j < patch_size*patch_size - postquant; j++) { if (patch[j]) { - b_eob = FALSE; + b_eob = false; break; } } diff --git a/indra/llmessage/patch_dct.cpp b/indra/llmessage/patch_dct.cpp index b5518b61ea..2144b4e712 100644 --- a/indra/llmessage/patch_dct.cpp +++ b/indra/llmessage/patch_dct.cpp @@ -85,8 +85,8 @@ S32 gCopyMatrix[LARGE_PATCH_SIZE*LARGE_PATCH_SIZE]; void build_copy_matrix(S32 size) { S32 i, j, count; - BOOL b_diag = FALSE; - BOOL b_right = TRUE; + bool b_diag = false; + bool b_right = true; i = 0; j = 0; @@ -107,8 +107,8 @@ void build_copy_matrix(S32 size) i++; else j++; - b_right = FALSE; - b_diag = TRUE; + b_right = false; + b_diag = true; } else { @@ -116,8 +116,8 @@ void build_copy_matrix(S32 size) j++; else i++; - b_right = TRUE; - b_diag = TRUE; + b_right = true; + b_diag = true; } } else @@ -129,7 +129,7 @@ void build_copy_matrix(S32 size) if ( (i == size - 1) ||(j == 0)) { - b_diag = FALSE; + b_diag = false; } } else @@ -139,7 +139,7 @@ void build_copy_matrix(S32 size) if ( (i == 0) ||(j == size - 1)) { - b_diag = FALSE; + b_diag = false; } } } diff --git a/indra/llmessage/patch_idct.cpp b/indra/llmessage/patch_idct.cpp index 9ce35df284..687c1734c5 100644 --- a/indra/llmessage/patch_idct.cpp +++ b/indra/llmessage/patch_idct.cpp @@ -74,8 +74,8 @@ S32 gDeCopyMatrix[LARGE_PATCH_SIZE*LARGE_PATCH_SIZE]; void build_decopy_matrix(S32 size) { S32 i, j, count; - BOOL b_diag = FALSE; - BOOL b_right = TRUE; + bool b_diag = false; + bool b_right = true; i = 0; j = 0; @@ -96,8 +96,8 @@ void build_decopy_matrix(S32 size) i++; else j++; - b_right = FALSE; - b_diag = TRUE; + b_right = false; + b_diag = true; } else { @@ -105,8 +105,8 @@ void build_decopy_matrix(S32 size) j++; else i++; - b_right = TRUE; - b_diag = TRUE; + b_right = true; + b_diag = true; } } else @@ -118,7 +118,7 @@ void build_decopy_matrix(S32 size) if ( (i == size - 1) ||(j == 0)) { - b_diag = FALSE; + b_diag = false; } } else @@ -128,7 +128,7 @@ void build_decopy_matrix(S32 size) if ( (i == 0) ||(j == size - 1)) { - b_diag = FALSE; + b_diag = false; } } } @@ -658,8 +658,8 @@ void decompress_patchv(LLVector3 *v, S32 *cpatch, LLPatchHeader *ph) F32 mult = ooq*range; F32 addval = mult*(F32)(1<<(prequant - 1))+hmin; -// BOOL b_diag = FALSE; -// BOOL b_right = TRUE; +// bool b_diag = false; +// bool b_right = true; for (i = 0; i < size*size; i++) { diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index ca252d1455..ed4ed2c610 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -149,14 +149,14 @@ void LLPanelLandMedia::refresh() mMediaTypeCombo->setEnabled( can_change_media ); getChild("mime_type")->setValue(mime_type); - mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () ); + mMediaAutoScaleCheck->set( static_cast(parcel->getMediaAutoScale()) ); mMediaAutoScaleCheck->setEnabled ( can_change_media ); // Special code to disable looping checkbox for HTML MIME type // (DEV-10042 -- Parcel Media: "Loop Media" should be disabled for static media types) bool allow_looping = LLMIMETypes::findAllowLooping( mime_type ); if ( allow_looping ) - mMediaLoopCheck->set( parcel->getMediaLoop () ); + mMediaLoopCheck->set( static_cast(parcel->getMediaLoop()) ); else mMediaLoopCheck->set( false ); mMediaLoopCheck->setEnabled ( can_change_media && allow_looping ); @@ -275,8 +275,8 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) std::string media_url = self->mMediaURLEdit->getText(); std::string media_desc = self->mMediaDescEdit->getText(); std::string mime_type = self->getChild("mime_type")->getValue().asString(); - U8 media_auto_scale = self->mMediaAutoScaleCheck->get(); - U8 media_loop = self->mMediaLoopCheck->get(); + U8 media_auto_scale = static_cast(self->mMediaAutoScaleCheck->get()); + U8 media_loop = static_cast(self->mMediaLoopCheck->get()); S32 media_width = (S32)self->mMediaWidthCtrl->get(); S32 media_height = (S32)self->mMediaHeightCtrl->get(); LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID(); diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index e914e2121c..f9425a9269 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -125,7 +125,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer objectp, S32 fac if(mMediaControls.get()) { - if(face_auto_zoom && ! parcel->getMediaPreventCameraZoom()) + if(face_auto_zoom && !static_cast(parcel->getMediaPreventCameraZoom())) { // Zoom in on this face mMediaControls.get()->resetZoomLevel(false); diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 83b05e6b4d..05698738b3 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -400,8 +400,8 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg) std::string media_type; S32 media_width = 0; S32 media_height = 0; - U8 media_auto_scale = FALSE; - U8 media_loop = FALSE; + U8 media_auto_scale = 0; + U8 media_loop = 0; msg->getUUID( "DataBlock", "MediaID", media_id ); char media_url_buffer[257]; @@ -420,16 +420,15 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg) } LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - BOOL same = FALSE; if (parcel) { - same = ((parcel->getMediaURL() == media_url) && - (parcel->getMediaType() == media_type) && - (parcel->getMediaID() == media_id) && - (parcel->getMediaWidth() == media_width) && - (parcel->getMediaHeight() == media_height) && - (parcel->getMediaAutoScale() == media_auto_scale) && - (parcel->getMediaLoop() == media_loop)); + bool same = ((parcel->getMediaURL() == media_url) && + (parcel->getMediaType() == media_type) && + (parcel->getMediaID() == media_id) && + (parcel->getMediaWidth() == media_width) && + (parcel->getMediaHeight() == media_height) && + (parcel->getMediaAutoScale() == media_auto_scale) && + (parcel->getMediaLoop() == media_loop)); if (!same) { -- cgit v1.3 From e160758b5c32f7b4b9622a5c25c7c53070395c7d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 1 Mar 2024 13:48:46 +0100 Subject: Convert remaining TRUE/FALSE to true/false --- indra/llcorehttp/_httpservice.cpp | 2 +- indra/llimage/tests/llimageworker_test.cpp | 2 +- indra/llinventory/tests/inventorymisc_test.cpp | 4 ++-- indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp | 8 ++++---- indra/llmessage/tests/llxfer_file_test.cpp | 2 +- indra/llprimitive/tests/llprimitive_test.cpp | 14 +++++++------- indra/llxml/llcontrol.cpp | 4 ++-- indra/llxml/tests/llcontrol_test.cpp | 6 +++--- indra/newview/tests/lllogininstance_test.cpp | 10 +++++----- indra/newview/tests/llsechandler_basic_test.cpp | 2 +- indra/newview/tests/llviewerhelputil_test.cpp | 2 +- indra/test/llsaleinfo_tut.cpp | 8 ++++---- indra/test/lltemplatemessagebuilder_tut.cpp | 2 +- indra/test/message_tut.cpp | 2 +- 14 files changed, 34 insertions(+), 34 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llcorehttp/_httpservice.cpp b/indra/llcorehttp/_httpservice.cpp index 294acd7f63..88ddf5b995 100644 --- a/indra/llcorehttp/_httpservice.cpp +++ b/indra/llcorehttp/_httpservice.cpp @@ -317,7 +317,7 @@ void HttpService::threadRun(LLCoreInt::HttpThread * thread) } catch (std::bad_alloc&) { - LLMemory::logMemoryInfo(TRUE); + LLMemory::logMemoryInfo(true); //output possible call stacks to log file. LLError::LLCallStacks::print(); diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 0a97b739b0..b0212af66e 100644 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -150,7 +150,7 @@ namespace tut ensure("LLImageDecodeThread: threaded constructor failed", mThread != NULL); // Insert something in the queue bool done = false; - LLImageDecodeThread::handle_t decodeHandle = mThread->decodeImage(NULL, 0, FALSE, new responder_test(&done)); + LLImageDecodeThread::handle_t decodeHandle = mThread->decodeImage(NULL, 0, false, new responder_test(&done)); // Verifies we get back a valid handle ensure("LLImageDecodeThread: threaded decodeImage(), returned handle is null", decodeHandle != 0); // Wait till the thread has time to handle the work order (though it doesn't do much per work order...) diff --git a/indra/llinventory/tests/inventorymisc_test.cpp b/indra/llinventory/tests/inventorymisc_test.cpp index 039fa938dd..0f38dd9104 100644 --- a/indra/llinventory/tests/inventorymisc_test.cpp +++ b/indra/llinventory/tests/inventorymisc_test.cpp @@ -374,7 +374,7 @@ namespace tut LLPointer src1 = create_random_inventory_item(); std::ostringstream ostream; - src1->exportLegacyStream(ostream, TRUE); + src1->exportLegacyStream(ostream, true); std::istringstream istream(ostream.str()); LLPointer src2 = new LLInventoryItem(); @@ -496,7 +496,7 @@ namespace tut LLPointer src1 = create_random_inventory_cat(); std::ostringstream ostream; - src1->exportLegacyStream(ostream, TRUE); + src1->exportLegacyStream(ostream, true); std::istringstream istream(ostream.str()); LLPointer src2 = new LLInventoryCategory(); diff --git a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp index fd4f10f39a..3f87a4aff6 100644 --- a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp +++ b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp @@ -84,7 +84,7 @@ namespace tut mMessageName = "MessageName"; gUdpDispatchWasCalled = false; gClearRecvWasCalled = false; - gValidateMessage = FALSE; + gValidateMessage = false; mMessage["body"]["binary-template-data"] = std::vector(); } @@ -121,7 +121,7 @@ namespace tut { LLTemplateMessageReader* pReader = NULL; LLTemplateMessageDispatcher t(*pReader); - gValidateMessage = TRUE; + gValidateMessage = true; std::vector vector_data; fillVector(vector_data, gBinaryTemplateData); mMessage["body"]["binary-template-data"] = vector_data; @@ -138,7 +138,7 @@ namespace tut std::vector vector_data; fillVector(vector_data, gBinaryTemplateData); mMessage["body"]["binary-template-data"] = vector_data; - gValidateMessage = FALSE; + gValidateMessage = false; t.dispatch(mMessageName, mMessage, mResponsePtr); ensure("clear received message was called", gClearRecvWasCalled); } @@ -149,7 +149,7 @@ namespace tut { LLTemplateMessageReader* pReader = NULL; LLTemplateMessageDispatcher t(*pReader); - gValidateMessage = TRUE; + gValidateMessage = true; std::vector vector_data; fillVector(vector_data, gBinaryTemplateData); mMessage["body"]["binary-template-data"] = vector_data; diff --git a/indra/llmessage/tests/llxfer_file_test.cpp b/indra/llmessage/tests/llxfer_file_test.cpp index a8c1adf9b4..cf95d2627c 100644 --- a/indra/llmessage/tests/llxfer_file_test.cpp +++ b/indra/llmessage/tests/llxfer_file_test.cpp @@ -51,7 +51,7 @@ namespace tut oversized_filename += 'X'; } - LLXfer_File xff(oversized_filename, FALSE, 1); + LLXfer_File xff(oversized_filename, false, 1); ensure("oversized local_filename nul-terminated", xff.getFileName().length() < LL_MAX_PATH); } diff --git a/indra/llprimitive/tests/llprimitive_test.cpp b/indra/llprimitive/tests/llprimitive_test.cpp index 0ff0795fdc..284edc5901 100644 --- a/indra/llprimitive/tests/llprimitive_test.cpp +++ b/indra/llprimitive/tests/llprimitive_test.cpp @@ -46,7 +46,7 @@ public: if (mVolumeTest.isNull() || volume_params != mCurrParamsTest || detail != mCurrDetailTest) { F32 volume_detail = LLVolumeLODGroup::getVolumeScaleFromDetail(detail); - mVolumeTest = new LLVolume(volume_params, volume_detail, FALSE, FALSE); + mVolumeTest = new LLVolume(volume_params, volume_detail, false, false); mCurrParamsTest = volume_params; mCurrDetailTest = detail; return mVolumeTest; @@ -193,7 +193,7 @@ namespace tut ensure(!primitive.isChanged(LLXform::GEOMETRY)); // Make sure setVolume returns true - ensure(primitive.setVolume(params, 0, true) == TRUE); + ensure(primitive.setVolume(params, 0, true) == true); LLVolume* new_volume = primitive.getVolume(); // make sure new volume was actually created @@ -210,12 +210,12 @@ namespace tut ensure(primitive.isChanged(LLXform::GEOMETRY)); // Run it twice to make sure it doesn't create a different one if params are the same - ensure(primitive.setVolume(params, 0, true) == FALSE); + ensure(primitive.setVolume(params, 0, true) == false); ensure(new_volume == primitive.getVolume()); // Change the param definition and try setting it again. params.setRevolutions(4); - ensure(primitive.setVolume(params, 0, true) == TRUE); + ensure(primitive.setVolume(params, 0, true) == true); // Ensure that we now have a different volume ensure(new_volume != primitive.getVolume()); @@ -238,7 +238,7 @@ namespace tut ensure(!primitive.isChanged(LLXform::GEOMETRY)); // Make sure setVolume returns true - ensure(primitive.setVolume(params, 0, false) == TRUE); + ensure(primitive.setVolume(params, 0, false) == true); LLVolume* new_volume = primitive.getVolume(); @@ -256,12 +256,12 @@ namespace tut ensure(primitive.isChanged(LLXform::GEOMETRY)); // Run it twice to make sure it doesn't create a different one if params are the same - ensure(primitive.setVolume(params, 0, false) == FALSE); + ensure(primitive.setVolume(params, 0, false) == false); ensure(new_volume == primitive.getVolume()); // Change the param definition and try setting it again. params.setRevolutions(4); - ensure(primitive.setVolume(params, 0, false) == TRUE); + ensure(primitive.setVolume(params, 0, false) == true); // Ensure that we now have a different volume ensure(new_volume != primitive.getVolume()); diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index f665621b66..e626bac7d0 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -1002,7 +1002,7 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v { infile.close(); LL_WARNS("Settings") << "Unable to parse LLSD control file " << filename << ". Trying Legacy Method." << LL_ENDL; - return loadFromFileLegacy(filename, TRUE, TYPE_STRING); + return loadFromFileLegacy(filename, true, TYPE_STRING); } U32 validitems = 0; @@ -1188,7 +1188,7 @@ void main() // ...invalid data type getfoo = (F32_CONTROL) gGlobals.resolveName("gFoo"); - getfoo->set(TRUE); + getfoo->set(true); getfoo->dump(); // ...out of range data diff --git a/indra/llxml/tests/llcontrol_test.cpp b/indra/llxml/tests/llcontrol_test.cpp index f7e43d6def..0c0ef61d23 100644 --- a/indra/llxml/tests/llcontrol_test.cpp +++ b/indra/llxml/tests/llcontrol_test.cpp @@ -112,7 +112,7 @@ namespace tut LLControlGroup test_cg("foo2"); std::string temp_test_file = (mTestConfigDir + "setting_llsd_temp.xml"); mCleanups.push_back(temp_test_file); - mCG->saveToFile(temp_test_file.c_str(), TRUE); + mCG->saveToFile(temp_test_file.c_str(), true); results = test_cg.loadFromFile(temp_test_file.c_str()); ensure("number of changed settings loaded", (results == 1)); ensure("value of changed settings loaded", (test_cg.getU32("TestSetting") == 13)); @@ -129,12 +129,12 @@ namespace tut int results = mCG->loadFromFile(mTestConfigFile.c_str(), true); LLControlVariable* control = mCG->getControl("TestSetting"); LLSD new_value = 13; - control->setValue(new_value, FALSE); + control->setValue(new_value, false); ensure_equals("value of changed setting", mCG->getU32("TestSetting"), 13); LLControlGroup test_cg("foo3"); std::string temp_test_file = (mTestConfigDir + "setting_llsd_persist_temp.xml"); mCleanups.push_back(temp_test_file); - mCG->saveToFile(temp_test_file.c_str(), TRUE); + mCG->saveToFile(temp_test_file.c_str(), true); results = test_cg.loadFromFile(temp_test_file.c_str()); //If we haven't changed any settings, then we shouldn't have any settings to load ensure("number of non-persisted changed settings loaded", (results == 0)); diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 2afa6a1b2a..70a73b9ca8 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -345,13 +345,13 @@ namespace tut gTOSReplyPump = 0; // clear the callback. - gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("NoInventoryLibrary", false, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("ConnectAsGod", false, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("UseDebugMenus", false, "", LLControlVariable::PERSIST_NO); gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO); gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("CmdLineSkipUpdater", TRUE, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("LoginLastLocation", false, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("CmdLineSkipUpdater", true, "", LLControlVariable::PERSIST_NO); LLSD authenticator = LLSD::emptyMap(); LLSD identifier = LLSD::emptyMap(); diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index 18b424c95b..c04d8cdc35 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -964,7 +964,7 @@ namespace tut // test creation of credentials my_cred = handler->createCredential("mysavedgrid", my_id, my_authenticator); // test save without saving authenticator. - handler->saveCredential(my_cred, FALSE); + handler->saveCredential(my_cred, false); my_new_cred = handler->loadCredential("mysavedgrid"); ensure_equals("saved credential without auth", (const std::string)my_new_cred->getIdentifier()["type"], "test_type"); diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index ddcc4d8f7a..828c0da96c 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -75,7 +75,7 @@ static void substitute_string(std::string &input, const std::string &search, con #include "../llagent.h" LLAgent::LLAgent() : mAgentAccess(NULL) { } LLAgent::~LLAgent() { } -bool LLAgent::isGodlike() const { return FALSE; } +bool LLAgent::isGodlike() const { return false; } LLAgent gAgent; diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp index 04af75c2d1..2973824e62 100644 --- a/indra/test/llsaleinfo_tut.cpp +++ b/indra/test/llsaleinfo_tut.cpp @@ -54,7 +54,7 @@ namespace tut LLSaleInfo saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("1. The getSaleType() fn failed", LLSaleInfo::FS_COPY == llsaleinfo.getSaleType()); - ensure("2. LLSaleInfo::isForSale() fn failed", TRUE == llsaleinfo.isForSale()); + ensure("2. LLSaleInfo::isForSale() fn failed", true == llsaleinfo.isForSale()); ensure("3. The getSalePrice() fn failed", sale_price == llsaleinfo.getSalePrice()); ensure("4. The getCRC32() fn failed", 235833404 == llsaleinfo.getCRC32()); ensure("5. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_COPY == llsaleinfo.lookup(sale)); @@ -68,7 +68,7 @@ namespace tut saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("8. The getSaleType() and setSaleType() fn failed", LLSaleInfo::FS_ORIGINAL == llsaleinfo.getSaleType()); - ensure("9. LLSaleInfo::isForSale() fn failed", TRUE == llsaleinfo.isForSale()); + ensure("9. LLSaleInfo::isForSale() fn failed", true == llsaleinfo.isForSale()); ensure("10. The getSalePrice() fn failed", 10000000 == llsaleinfo.getSalePrice()); ensure("11. The getCRC32() fn failed", 127911702 == llsaleinfo.getCRC32()); ensure("12. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_CONTENTS == llsaleinfo.lookup(sale)); @@ -82,7 +82,7 @@ namespace tut saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("15. The getSaleType() and setSaleType() fn failed", LLSaleInfo::FS_CONTENTS == llsaleinfo.getSaleType()); - ensure("16. LLSaleInfo::isForSale() fn failed", TRUE == llsaleinfo.isForSale()); + ensure("16. LLSaleInfo::isForSale() fn failed", true == llsaleinfo.isForSale()); ensure("17. The getSalePrice() fn failed", 55000550 == llsaleinfo.getSalePrice()); ensure("18. The getCRC32() fn failed", 408735656 == llsaleinfo.getCRC32()); ensure("19. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_ORIGINAL == llsaleinfo.lookup(sale)); @@ -96,7 +96,7 @@ namespace tut saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("22. The getSaleType() and setSaleType() fn failed", LLSaleInfo::FS_NOT == llsaleinfo.getSaleType()); - ensure("23. LLSaleInfo::isForSale() fn failed", FALSE == llsaleinfo.isForSale()); + ensure("23. LLSaleInfo::isForSale() fn failed", false == llsaleinfo.isForSale()); ensure("24. The getSalePrice() fn failed", 0 == llsaleinfo.getSalePrice()); ensure("25. The getCRC32() fn failed", 0 == llsaleinfo.getCRC32()); ensure("26. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_NOT == llsaleinfo.lookup(sale)); diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 12a323ac4d..36968b8e0f 100644 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -61,7 +61,7 @@ namespace tut 1, 0, 0, - FALSE, + false, "notasharedsecret", NULL, false, diff --git a/indra/test/message_tut.cpp b/indra/test/message_tut.cpp index 76063e6db1..0a3e6621aa 100644 --- a/indra/test/message_tut.cpp +++ b/indra/test/message_tut.cpp @@ -75,7 +75,7 @@ namespace tut 1, 0, 0, - FALSE, + false, "notasharedsecret", NULL, false, -- cgit v1.3 From 53d4fcd3597d2042b2c82bd3aaa41f61fdb7b3d5 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 27 Mar 2024 19:51:59 -0400 Subject: Remove dead googlemock dependency and related setup code --- autobuild.xml | 46 ---------------------- indra/cmake/CMakeLists.txt | 1 - indra/cmake/GoogleMock.cmake | 32 ---------------- indra/cmake/LLAddBuildTest.cmake | 7 ---- indra/llcorehttp/CMakeLists.txt | 1 - indra/llmessage/CMakeLists.txt | 1 - indra/llmessage/tests/llmockhttpclient.h | 66 -------------------------------- indra/test/CMakeLists.txt | 2 - indra/test/test.cpp | 17 -------- 9 files changed, 173 deletions(-) delete mode 100644 indra/cmake/GoogleMock.cmake delete mode 100644 indra/llmessage/tests/llmockhttpclient.h (limited to 'indra/llmessage') diff --git a/autobuild.xml b/autobuild.xml index 387699ed47..182f7876ce 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -711,52 +711,6 @@ description glh - is a platform-indepenedent C++ OpenGL helper library - googlemock - - platforms - - darwin64 - - archive - - hash - dce3174b12136746f5f910e311e895c1b47bf8fb - hash_algorithm - sha1 - url - https://github.com/secondlife/3p-googlemock/releases/download/v1.7.0.2b109d4/googlemock-1.7.0.2b109d4-darwin64-2b109d4.tar.zst - - name - darwin64 - - windows64 - - archive - - hash - 265813f84b04c3b03f3d7d33e149b3d5e3cf31db - hash_algorithm - sha1 - url - https://github.com/secondlife/3p-googlemock/releases/download/v1.7.0.2b109d4/googlemock-1.7.0.2b109d4-windows64-2b109d4.tar.zst - - name - windows64 - - - license - BSD - license_file - LICENSES/gmock.txt - copyright - Copyright 2008, Google Inc. - version - 1.7.0.2b109d4 - name - googlemock - description - a library for writing and using C++ mock classes - gstreamer platforms diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 737609c89c..a9f8643f3b 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -26,7 +26,6 @@ set(cmake_SOURCE_FILES FreeType.cmake GLEXT.cmake GLH.cmake - GoogleMock.cmake Havok.cmake Hunspell.cmake ICU4C.cmake diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake deleted file mode 100644 index e4520fe96e..0000000000 --- a/indra/cmake/GoogleMock.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) -include(Linking) - -include_guard() - -add_library( ll::googlemock INTERFACE IMPORTED ) -if(USE_CONAN) - target_link_libraries( ll::googlemock INTERFACE CONAN_PKG::gtest ) - - #Not very nice, but for the moment we need this for tut.hpp - target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) - return() -endif() - -use_prebuilt_binary(googlemock) - -target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) - -if (LINUX) - # VWR-24366: gmock is underlinked, it needs gtest. - target_link_libraries( ll::googlemock INTERFACE gmock gtest) -elseif(WINDOWS) - target_link_libraries( ll::googlemock INTERFACE gmock) - target_include_directories( ll::googlemock SYSTEM INTERFACE - ${LIBS_PREBUILT_DIR}/include - ${LIBS_PREBUILT_DIR}/include/gmock) -elseif(DARWIN) - target_link_libraries( ll::googlemock INTERFACE gmock gtest) -endif(LINUX) - - diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 2172b56da2..6408f1200c 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -1,7 +1,6 @@ # -*- cmake -*- include(00-Common) include(LLTestCommand) -include(GoogleMock) include(bugsplat) include(Tut) @@ -19,10 +18,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) # # More info and examples at: https://wiki.secondlife.com/wiki/How_to_add_unit_tests_to_indra_code - # This here looks weird, but is needed. It will inject GoogleMock into projects that forgot to include `this` (LLAddBuildTest.cmake) - # But through some other means have access to this macro - include(GoogleMock) - if(LL_TEST_VERBOSE) message("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}") endif() @@ -41,7 +36,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) set(alltest_LIBRARIES llcommon - ll::googlemock ) if(NOT "${project}" STREQUAL "llmath") # add llmath as a dep unless the tested module *is* llmath! @@ -204,7 +198,6 @@ FUNCTION(LL_ADD_INTEGRATION_TEST set(libraries ${library_dependencies} - ll::googlemock ) # Add test executable build target diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 87796abd3c..5650c4c8ba 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -3,7 +3,6 @@ project(llcorehttp) include(00-Common) -include(GoogleMock) include(CURL) include(OpenSSL) include(NGHTTP2) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index e44309476b..40d08f4f17 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -3,7 +3,6 @@ project(llmessage) include(00-Common) -include(GoogleMock) include(LLAddBuildTest) include(LLCommon) include(LLCoreHttp) diff --git a/indra/llmessage/tests/llmockhttpclient.h b/indra/llmessage/tests/llmockhttpclient.h deleted file mode 100644 index af26bf8803..0000000000 --- a/indra/llmessage/tests/llmockhttpclient.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file - * @brief - * - * $LicenseInfo:firstyear=2008&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -/* Macro Definitions */ -#ifndef LL_LLMOCKHTTPCLIENT_H -#define LL_LLMOCKHTTPCLIENT_H - -#include "linden_common.h" -#include "llhttpclientinterface.h" - -#include - -class LLMockHTTPClient : public LLHTTPClientInterface -{ -public: - MOCK_METHOD2(get, void(const std::string& url, LLCurl::ResponderPtr responder)); - MOCK_METHOD3(get, void(const std::string& url, LLCurl::ResponderPtr responder, const LLSD& headers)); - MOCK_METHOD3(put, void(const std::string& url, const LLSD& body, LLCurl::ResponderPtr responder)); -}; - -// A helper to match responder types -template -struct ResponderType -{ - bool operator()(LLCurl::ResponderPtr ptr) const - { - T* p = dynamic_cast(ptr.get()); - return p != NULL; - } -}; - -inline bool operator==(const LLSD& l, const LLSD& r) -{ - std::ostringstream ls, rs; - ls << l; - rs << r; - return ls.str() == rs.str(); - -} - - -#endif //LL_LLMOCKHTTPCLIENT_H - diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 4a0a8716c4..3dcddf9dc2 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -9,7 +9,6 @@ include(Linking) include(Tut) include(LLAddBuildTest) include(bugsplat) -include(GoogleMock) set(test_SOURCE_FILES io.cpp @@ -65,7 +64,6 @@ target_link_libraries(lltest llxml llcommon llcorehttp - ll::googlemock ) if (WINDOWS) diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 94478a5263..be3b326afe 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -53,17 +53,6 @@ # include "ctype_workaround.h" #endif -#ifndef LL_WINDOWS - -typedef struct { - void *re_pcre; - size_t re_nsub; - size_t re_erroffset; -} regex_t; -#include -#include -#endif - #if LL_MSVC #pragma warning (push) #pragma warning (disable : 4702) // warning C4702: unreachable code @@ -528,12 +517,6 @@ static LLTrace::ThreadRecorder* sMasterThreadRecorder = NULL; int main(int argc, char **argv) { - // The following line must be executed to initialize Google Mock - // (and Google Test) before running the tests. -#ifndef LL_WINDOWS - ::testing::InitGoogleMock(&argc, argv); -#endif - ll_init_apr(); apr_getopt_t* os = NULL; if(APR_SUCCESS != apr_getopt_init(&os, gAPRPoolp, argc, argv)) -- cgit v1.3 From 17e1f3692c5c1e9cbc6ba6895b312a8baae9aec2 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Fri, 5 Apr 2024 19:03:58 -0400 Subject: Port from JsonCPP to Boost.Json for json parsing and serializing (#1054) --- autobuild.xml | 60 -------- indra/cmake/CMakeLists.txt | 1 - indra/cmake/JsonCpp.cmake | 17 --- indra/cmake/LLCommon.cmake | 1 - indra/llcommon/CMakeLists.txt | 2 - indra/llcommon/llsdjson.cpp | 80 ++++++----- indra/llcommon/llsdjson.h | 6 +- indra/llmessage/CMakeLists.txt | 1 - indra/llmessage/llcorehttputil.cpp | 39 +++--- indra/newview/CMakeLists.txt | 1 - indra/newview/llappviewerwin32.cpp | 17 +-- indra/newview/llgltfmateriallist.cpp | 3 - indra/newview/llmarketplacefunctions.cpp | 2 - indra/newview/lltranslate.cpp | 226 ++++++++++++++----------------- indra/newview/lltranslate.h | 5 - indra/newview/llwebprofile.cpp | 2 +- 16 files changed, 179 insertions(+), 284 deletions(-) delete mode 100644 indra/cmake/JsonCpp.cmake (limited to 'indra/llmessage') diff --git a/autobuild.xml b/autobuild.xml index cfc883a979..31f378e4ba 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1021,66 +1021,6 @@ description JPEG encoding, decoding library - jsoncpp - - platforms - - darwin64 - - archive - - hash - 07761ab01e61d5d6b40d303ffafd85ec055ec9f7 - hash_algorithm - sha1 - url - https://github.com/secondlife/3p-jsoncpp/releases/download/v0.5.0.bc46e62/jsoncpp-0.5.0.bc46e62-darwin64-bc46e62.tar.zst - - name - darwin64 - - linux64 - - archive - - hash - 97e268754808cb2fbd682c4d3beafd2c598e1ba7 - hash_algorithm - sha1 - url - https://github.com/secondlife/3p-jsoncpp/releases/download/v0.5.0.bc46e62/jsoncpp-0.5.0.bc46e62-linux64-bc46e62.tar.zst - - name - linux64 - - windows64 - - archive - - hash - 500e455b210d6bc4985185cef2472987ed3034bf - hash_algorithm - sha1 - url - https://github.com/secondlife/3p-jsoncpp/releases/download/v0.5.0.bc46e62/jsoncpp-0.5.0.bc46e62-windows64-bc46e62.tar.zst - - name - windows64 - - - license - public domain - license_file - LICENSES/jsoncpp.txt - copyright - Copyright (c) 2007-2010 Baptiste Lepilleur - version - 0.5.0.bc46e62 - name - jsoncpp - description - jsoncpp is an implementation of a JSON (http://json.org) reader and writer in C++. - kdu platforms diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index a9f8643f3b..262c455d63 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -29,7 +29,6 @@ set(cmake_SOURCE_FILES Havok.cmake Hunspell.cmake ICU4C.cmake - JsonCpp.cmake LLAddBuildTest.cmake LLAppearance.cmake LLAudio.cmake diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake deleted file mode 100644 index 17f8e47a97..0000000000 --- a/indra/cmake/JsonCpp.cmake +++ /dev/null @@ -1,17 +0,0 @@ -# -*- cmake -*- - -include(Prebuilt) -include_guard() -add_library( ll::jsoncpp INTERFACE IMPORTED ) - -use_system_binary(jsoncpp) - -use_prebuilt_binary(jsoncpp) -if (WINDOWS) - target_link_libraries( ll::jsoncpp INTERFACE json_libmd.lib ) -elseif (DARWIN) - target_link_libraries( ll::jsoncpp INTERFACE libjson_darwin_libmt.a ) -elseif (LINUX) - target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-4.1.3_libmt.a ) -endif (WINDOWS) -target_include_directories( ll::jsoncpp SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index 869d5805f2..9e3707ff17 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -6,6 +6,5 @@ include(EXPAT) include(Tracy) include(xxHash) include(ZLIBNG) -include(JsonCpp) include(XmlRpcEpi) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 26955cfc08..50079abb96 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -9,7 +9,6 @@ include(bugsplat) include(Linking) include(Boost) include(LLSharedLibs) -include(JsonCpp) include(Copy3rdPartyLibs) include(ZLIBNG) include(URIPARSER) @@ -278,7 +277,6 @@ target_link_libraries( llcommon ll::apr ll::expat - ll::jsoncpp ll::zlib-ng ll::boost ll::uriparser diff --git a/indra/llcommon/llsdjson.cpp b/indra/llcommon/llsdjson.cpp index 8caaaee534..2fe24693dd 100644 --- a/indra/llcommon/llsdjson.cpp +++ b/indra/llcommon/llsdjson.cpp @@ -31,46 +31,56 @@ #include "llsdjson.h" +#include "llsdutil.h" #include "llerror.h" #include "../llmath/llmath.h" +#if LL_WINDOWS +#pragma warning (push) +#pragma warning (disable : 4702) // compiler thinks unreachable code +#endif +#include +#if LL_WINDOWS +#pragma warning (pop) +#endif + + + //========================================================================= -LLSD LlsdFromJson(const Json::Value &val) +LLSD LlsdFromJson(const boost::json::value& val) { LLSD result; - switch (val.type()) + switch (val.kind()) { default: - case Json::nullValue: - break; - case Json::intValue: - result = LLSD(static_cast(val.asInt())); + case boost::json::kind::null: break; - case Json::uintValue: - result = LLSD(static_cast(val.asUInt())); + case boost::json::kind::int64: + case boost::json::kind::uint64: + result = LLSD(val.to_number()); break; - case Json::realValue: - result = LLSD(static_cast(val.asDouble())); + case boost::json::kind::double_: + result = LLSD(val.to_number()); break; - case Json::stringValue: - result = LLSD(static_cast(val.asString())); + case boost::json::kind::string: + result = LLSD(boost::json::value_to(val)); break; - case Json::booleanValue: - result = LLSD(static_cast(val.asBool())); + case boost::json::kind::bool_: + result = LLSD(val.as_bool()); break; - case Json::arrayValue: + case boost::json::kind::array: result = LLSD::emptyArray(); - for (Json::ValueConstIterator it = val.begin(); it != val.end(); ++it) + for (const auto &element : val.as_array()) { - result.append(LlsdFromJson((*it))); + result.append(LlsdFromJson(element)); } break; - case Json::objectValue: + case boost::json::kind::object: result = LLSD::emptyMap(); - for (Json::ValueConstIterator it = val.begin(); it != val.end(); ++it) + for (const auto& element : val.as_object()) { - result[it.memberName()] = LlsdFromJson((*it)); + result[element.key()] = LlsdFromJson(element.value()); } break; } @@ -78,44 +88,48 @@ LLSD LlsdFromJson(const Json::Value &val) } //========================================================================= -Json::Value LlsdToJson(const LLSD &val) +boost::json::value LlsdToJson(const LLSD &val) { - Json::Value result; + boost::json::value result; switch (val.type()) { case LLSD::TypeUndefined: - result = Json::Value::null; + result = nullptr; break; case LLSD::TypeBoolean: - result = Json::Value(static_cast(val.asBoolean())); + result = val.asBoolean(); break; case LLSD::TypeInteger: - result = Json::Value(static_cast(val.asInteger())); + result = val.asInteger(); break; case LLSD::TypeReal: - result = Json::Value(static_cast(val.asReal())); + result = val.asReal(); break; case LLSD::TypeURI: case LLSD::TypeDate: case LLSD::TypeUUID: case LLSD::TypeString: - result = Json::Value(val.asString()); + result = val.asString(); break; case LLSD::TypeMap: - result = Json::Value(Json::objectValue); - for (LLSD::map_const_iterator it = val.beginMap(); it != val.endMap(); ++it) + { + boost::json::object& obj = result.emplace_object(); + for (const auto& llsd_dat : llsd::inMap(val)) { - result[it->first] = LlsdToJson(it->second); + obj[llsd_dat.first] = LlsdToJson(llsd_dat.second); } break; + } case LLSD::TypeArray: - result = Json::Value(Json::arrayValue); - for (LLSD::array_const_iterator it = val.beginArray(); it != val.endArray(); ++it) + { + boost::json::array& json_array = result.emplace_array(); + for (const auto& llsd_dat : llsd::inArray(val)) { - result.append(LlsdToJson(*it)); + json_array.push_back(LlsdToJson(llsd_dat)); } break; + } case LLSD::TypeBinary: default: LL_ERRS("LlsdToJson") << "Unsupported conversion to JSON from LLSD type (" << val.type() << ")." << LL_ENDL; diff --git a/indra/llcommon/llsdjson.h b/indra/llcommon/llsdjson.h index e56cf03b45..7173e26046 100644 --- a/indra/llcommon/llsdjson.h +++ b/indra/llcommon/llsdjson.h @@ -34,7 +34,7 @@ #include "stdtypes.h" #include "llsd.h" -#include "json/value.h" +#include /// Convert a parsed JSON structure into LLSD maintaining member names and /// array indexes. @@ -53,7 +53,7 @@ /// /// For maps and arrays child entries will be converted and added to the structure. /// Order is preserved for an array but not for objects. -LLSD LlsdFromJson(const Json::Value &val); +LLSD LlsdFromJson(const boost::json::value &val); /// Convert an LLSD object into Parsed JSON object maintaining member names and /// array indexs. @@ -72,6 +72,6 @@ LLSD LlsdFromJson(const Json::Value &val); /// TypeMap | object /// TypeArray | array /// TypeBinary | unsupported -Json::Value LlsdToJson(const LLSD &val); +boost::json::value LlsdToJson(const LLSD &val); #endif // LL_LLSDJSON_H diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 40d08f4f17..5322139304 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -10,7 +10,6 @@ include(LLAddBuildTest) include(Python) include(Tut) include(Python) -include(JsonCpp) set(llmessage_SOURCE_FILES llassetstorage.cpp diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 460740cebc..7619b46fed 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -35,8 +35,7 @@ #include "llsd.h" #include "llsdjson.h" #include "llsdserialize.h" -#include "json/reader.h" // JSON -#include "json/writer.h" // JSON +#include "boost/json.hpp" // Boost.Json #include "llfilesystem.h" #include "message.h" // for getting the port @@ -585,15 +584,12 @@ LLSD HttpCoroJSONHandler::handleSuccess(LLCore::HttpResponse * response, LLCore: } LLCore::BufferArrayStream bas(body); - Json::Value jsonRoot; - try - { - bas >> jsonRoot; - } - catch (std::runtime_error& e) + boost::json::error_code ec; + boost::json::value jsonRoot = boost::json::parse(bas, ec); + if(ec.failed()) { // deserialization failed. Record the reason and pass back an empty map for markup. - status = LLCore::HttpStatus(499, std::string(e.what())); + status = LLCore::HttpStatus(499, std::string(ec.what())); return result; } @@ -613,14 +609,11 @@ LLSD HttpCoroJSONHandler::parseBody(LLCore::HttpResponse *response, bool &succes } LLCore::BufferArrayStream bas(body); - Json::Value jsonRoot; - try + boost::json::error_code ec; + boost::json::value jsonRoot = boost::json::parse(bas, ec); + if (ec.failed()) { - bas >> jsonRoot; - } - catch (std::runtime_error&) - { success = false; return LLSD(); } @@ -802,12 +795,12 @@ LLSD HttpCoroutineAdapter::postJsonAndSuspend(LLCore::HttpRequest::ptr_t request { LLCore::BufferArrayStream outs(rawbody.get()); - Json::Value root = LlsdToJson(body); - Json::FastWriter writer; + auto root = LlsdToJson(body); + std::string value = boost::json::serialize(root); - LL_WARNS("Http::post") << "JSON Generates: \"" << writer.write(root) << "\"" << LL_ENDL; + LL_WARNS("Http::post") << "JSON Generates: \"" << value << "\"" << LL_ENDL; - outs << writer.write(root); + outs << value; } return postAndSuspend_(request, url, rawbody, options, headers, httpHandler); @@ -861,11 +854,11 @@ LLSD HttpCoroutineAdapter::putJsonAndSuspend(LLCore::HttpRequest::ptr_t request, { LLCore::BufferArrayStream outs(rawbody.get()); - Json::Value root = LlsdToJson(body); - Json::FastWriter writer; + auto root = LlsdToJson(body); + std::string value = boost::json::serialize(root); - LL_WARNS("Http::put") << "JSON Generates: \"" << writer.write(root) << "\"" << LL_ENDL; - outs << writer.write(root); + LL_WARNS("Http::put") << "JSON Generates: \"" << value << "\"" << LL_ENDL; + outs << value; } return putAndSuspend_(request, url, rawbody, options, headers, httpHandler); diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 58aa04829b..3eb3fadbf1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -19,7 +19,6 @@ include(EXPAT) include(Hunspell) include(ICU4C) include(JPEGEncoderBasic) -include(JsonCpp) include(LLAppearance) include(LLAudio) include(LLCA) diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index efda6e05b0..dcd48ebd33 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -75,7 +75,7 @@ // Bugsplat (http://bugsplat.com) crash reporting tool #ifdef LL_BUGSPLAT #include "BugSplat.h" -#include "json/reader.h" // JsonCpp +#include "boost/json.hpp" // Boost.Json #include "llagent.h" // for agent location #include "llviewerregion.h" #include "llvoavatarself.h" // for agent name @@ -722,24 +722,25 @@ bool LLAppViewerWin32::init() } else { - Json::Reader reader; - Json::Value build_data; - if (!reader.parse(inf, build_data, false)) // don't collect comments + boost::json::error_code ec; + boost::json::value build_data = boost::json::parse(inf, ec); + if(ec.failed()) { // gah, the typo is baked into Json::Reader API LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, can't parse '" << build_data_fname - << "': " << reader.getFormatedErrorMessages() << LL_ENDL; + << "': " << ec.what() << LL_ENDL; } else { - Json::Value BugSplat_DB = build_data["BugSplat DB"]; - if (!BugSplat_DB) + if (!build_data.is_object() || !build_data.as_object().contains("BugSplat DB")) { LL_WARNS("BUGSPLAT") << "Can't initialize BugSplat, no 'BugSplat DB' entry in '" << build_data_fname << "'" << LL_ENDL; } else { + boost::json::value BugSplat_DB = build_data.at("BugSplat DB"); + // Got BugSplat_DB, onward! std::wstring version_string(WSTRINGIZE(LL_VIEWER_VERSION_MAJOR << '.' << LL_VIEWER_VERSION_MINOR << '.' << @@ -761,7 +762,7 @@ bool LLAppViewerWin32::init() // have to convert normal wide strings to strings of __wchar_t sBugSplatSender = new MiniDmpSender( - WCSTR(BugSplat_DB.asString()), + WCSTR(boost::json::value_to(BugSplat_DB)), WCSTR(LL_TO_WSTRING(LL_VIEWER_CHANNEL)), WCSTR(version_string), nullptr, // szAppIdentifier -- set later diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp index 92c58a2dbc..7ff9277d73 100644 --- a/indra/newview/llgltfmateriallist.cpp +++ b/indra/newview/llgltfmateriallist.cpp @@ -47,9 +47,6 @@ #include "tinygltf/tiny_gltf.h" #include -#include "json/reader.h" -#include "json/value.h" - #include LLGLTFMaterialList gGLTFMaterialList; diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp index 8784f403cb..2c98ba3d42 100644 --- a/indra/newview/llmarketplacefunctions.cpp +++ b/indra/newview/llmarketplacefunctions.cpp @@ -42,8 +42,6 @@ #include "llviewermedia.h" #include "llviewernetwork.h" #include "llviewerregion.h" -#include "json/reader.h" // JSON -#include "json/writer.h" // JSON #include "lleventcoro.h" #include "llcoros.h" #include "llcorehttputil.h" diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 6526e1df92..02947c8c0f 100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp @@ -36,11 +36,11 @@ #include "llversioninfo.h" #include "llviewercontrol.h" #include "llcoros.h" -#include "json/reader.h" #include "llcorehttputil.h" #include "llurlregistry.h" #include "stringize.h" +#include static const std::string AZURE_NOTRANSLATE_OPENING_TAG("
"); static const std::string AZURE_NOTRANSLATE_CLOSING_TAG("
"); @@ -346,11 +346,11 @@ public: private: static void parseErrorResponse( - const Json::Value& root, + const boost::json::value& root, int& status, std::string& err_msg); static bool parseTranslation( - const Json::Value& root, + const boost::json::value& root, std::string& translation, std::string& detected_lang); static std::string getAPIKey(); @@ -399,19 +399,13 @@ bool LLGoogleTranslationHandler::parseResponse( std::string& detected_lang, std::string& err_msg) const { - Json::Value root; - Json::Reader reader; - - if (!reader.parse(body, root)) - { - err_msg = reader.getFormatedErrorMessages(); - return false; - } - - if (!root.isObject()) // empty response? should not happen - { - return false; - } + boost::json::error_code ec; + boost::json::value root = boost::json::parse(body, ec); + if (ec.failed()) + { + err_msg = ec.what(); + return false; + } if (status != HTTP_OK) { @@ -432,48 +426,55 @@ bool LLGoogleTranslationHandler::isConfigured() const // static void LLGoogleTranslationHandler::parseErrorResponse( - const Json::Value& root, + const boost::json::value& root, int& status, std::string& err_msg) { - const Json::Value& error = root.get("error", 0); - if (!error.isObject() || !error.isMember("message") || !error.isMember("code")) - { - return; - } + boost::json::error_code ec; + auto message = root.find_pointer("/data/message", ec); + auto code = root.find_pointer("/data/code", ec); + if (!message || !code) + { + return; + } - err_msg = error["message"].asString(); - status = error["code"].asInt(); + auto message_val = boost::json::try_value_to(*message); + auto code_val = boost::json::try_value_to(*code); + if (!message_val || !code_val) + { + return; + } + + err_msg = message_val.value(); + status = code_val.value(); } // static bool LLGoogleTranslationHandler::parseTranslation( - const Json::Value& root, + const boost::json::value& root, std::string& translation, std::string& detected_lang) { - // JsonCpp is prone to aborting the program on failed assertions, - // so be super-careful and verify the response format. - const Json::Value& data = root.get("data", 0); - if (!data.isObject() || !data.isMember("translations")) - { - return false; - } + boost::json::error_code ec; + auto translated_text = root.find_pointer("/data/translations/0/translatedText", ec); + if (!translated_text) return false; - const Json::Value& translations = data["translations"]; - if (!translations.isArray() || translations.size() == 0) - { - return false; - } + auto text_val = boost::json::try_value_to(*translated_text); + if (!text_val) + { + LL_WARNS() << "Failed to parse translation" << text_val.error() << LL_ENDL; + return false; + } - const Json::Value& first = translations[0U]; - if (!first.isObject() || !first.isMember("translatedText")) - { - return false; - } + translation = text_val.value(); + + auto language = root.find_pointer("/data/translations/0/detectedSourceLanguage", ec); + if (language) + { + auto lang_val = boost::json::try_value_to(*language); + detected_lang = lang_val ? lang_val.value() : ""; + } - translation = first["translatedText"].asString(); - detected_lang = first.get("detectedSourceLanguage", "").asString(); return true; } @@ -655,12 +656,11 @@ bool LLAzureTranslationHandler::checkVerificationResponse( // Expected: "{\"error\":{\"code\":400000,\"message\":\"One of the request inputs is not valid.\"}}" // But for now just verify response is a valid json - Json::Value root; - Json::Reader reader; - - if (!reader.parse(response["error_body"].asString(), root)) + boost::json::error_code ec; + boost::json::value root = boost::json::parse(response["error_body"].asString(), ec); + if (ec.failed()) { - LL_DEBUGS("Translate") << "Failed to parse error_body:" << reader.getFormatedErrorMessages() << LL_ENDL; + LL_DEBUGS("Translate") << "Failed to parse error_body:" << ec.what() << LL_ENDL; return false; } @@ -679,57 +679,36 @@ bool LLAzureTranslationHandler::parseResponse( if (status != HTTP_OK) { if (http_response.has("error_body")) - err_msg = parseErrorResponse(http_response["error_body"].asString()); + err_msg = parseErrorResponse(http_response["error_body"].asString()); return false; } //Example: // "[{\"detectedLanguage\":{\"language\":\"en\",\"score\":1.0},\"translations\":[{\"text\":\"Hello, what is your name?\",\"to\":\"en\"}]}]" - Json::Value root; - Json::Reader reader; - - if (!reader.parse(body, root)) - { - err_msg = reader.getFormatedErrorMessages(); - return false; - } - - if (!root.isArray()) // empty response? should not happen + boost::json::error_code ec; + boost::json::value root = boost::json::parse(body, ec); + if (ec.failed()) { + err_msg = ec.what(); return false; } + auto language = root.find_pointer("/0/detectedLanguage/language", ec); + if (!language) return false; - // Request succeeded, extract translation from the response. + auto translated_text = root.find_pointer("/0/translations/0/text", ec); + if (!translated_text) return false; - const Json::Value& data = root[0U]; - if (!data.isObject() - || !data.isMember("detectedLanguage") - || !data.isMember("translations")) + auto lang_val = boost::json::try_value_to(*language); + auto text_val = boost::json::try_value_to(*translated_text); + if (!lang_val || !text_val) { + LL_WARNS() << "Failed to parse translation" << lang_val.error() << text_val.error() << LL_ENDL; return false; } - const Json::Value& detectedLanguage = data["detectedLanguage"]; - if (!detectedLanguage.isObject() || !detectedLanguage.isMember("language")) - { - return false; - } - detected_lang = detectedLanguage["language"].asString(); - - const Json::Value& translations = data["translations"]; - if (!translations.isArray() || translations.size() == 0) - { - return false; - } - - const Json::Value& first = translations[0U]; - if (!first.isObject() || !first.isMember("text")) - { - return false; - } - - translation = first["text"].asString(); + detected_lang = lang_val.value(); + translation = text_val.value(); return true; } @@ -747,27 +726,25 @@ std::string LLAzureTranslationHandler::parseErrorResponse( // Expected: "{\"error\":{\"code\":400000,\"message\":\"One of the request inputs is not valid.\"}}" // But for now just verify response is a valid json with an error - Json::Value root; - Json::Reader reader; - - if (!reader.parse(body, root)) + boost::json::error_code ec; + boost::json::value root = boost::json::parse(body, ec); + if (ec.failed()) { - return std::string(); + return {}; } - if (!root.isObject() || !root.isMember("error")) + auto err_msg = root.find_pointer("/error/message", ec); + if (!err_msg) { - return std::string(); + return {}; } - const Json::Value& error_map = root["error"]; - - if (!error_map.isObject() || !error_map.isMember("message")) + auto err_msg_val = boost::json::try_value_to(*err_msg); + if (!err_msg_val) { - return std::string(); + return {}; } - - return error_map["message"].asString(); + return err_msg_val.value(); } // static @@ -974,39 +951,39 @@ bool LLDeepLTranslationHandler::parseResponse( //Example: // "{\"translations\":[{\"detected_source_language\":\"EN\",\"text\":\"test\"}]}" - Json::Value root; - Json::Reader reader; - - if (!reader.parse(body, root)) + boost::json::error_code ec; + boost::json::value root = boost::json::parse(body, ec); + if (ec.failed()) { - err_msg = reader.getFormatedErrorMessages(); + err_msg = ec.message(); return false; } - if (!root.isObject() - || !root.isMember("translations")) // empty response? should not happen + auto detected_langp = root.find_pointer("/translations/0/detected_source_language", ec); + if (!detected_langp || ec.failed()) // empty response? should not happen { + err_msg = ec.message(); return false; } // Request succeeded, extract translation from the response. - const Json::Value& translations = root["translations"]; - if (!translations.isArray() || translations.size() == 0) + auto text_valp = root.find_pointer("/translations/0/text", ec); + if (!text_valp || ec.failed()) { + err_msg = ec.message(); return false; } - const Json::Value& data= translations[0U]; - if (!data.isObject() - || !data.isMember("detected_source_language") - || !data.isMember("text")) + auto lang_result = boost::json::try_value_to(*detected_langp); + auto text_result = boost::json::try_value_to(*text_valp); + if (!lang_result || !text_result) { return false; } - detected_lang = data["detected_source_language"].asString(); + detected_lang = lang_result.value(); LLStringUtil::toLower(detected_lang); - translation = data["text"].asString(); + translation = text_result.value(); return true; } @@ -1022,21 +999,24 @@ std::string LLDeepLTranslationHandler::parseErrorResponse( const std::string& body) { // Example: "{\"message\":\"One of the request inputs is not valid.\"}" - - Json::Value root; - Json::Reader reader; - - if (!reader.parse(body, root)) - { - return std::string(); + boost::json::error_code ec; + boost::json::value root = boost::json::parse(body, ec); + if (ec.failed()) + { + return {}; } - if (!root.isObject() || !root.isMember("message")) + auto message_ptr = root.find_pointer("/message", ec); + if (!message_ptr || ec.failed()) { - return std::string(); + return {}; } - return root["message"].asString(); + auto message_val = boost::json::try_value_to(*message_ptr); + if (!message_val) + return {}; + + return message_val.value(); } // static diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h index 4a5d80737c..30fb8d74df 100644 --- a/indra/newview/lltranslate.h +++ b/indra/newview/lltranslate.h @@ -32,11 +32,6 @@ #include "llsingleton.h" -namespace Json -{ - class Value; -} - class LLTranslationAPIHandler; /** * Entry point for machine translation services. diff --git a/indra/newview/llwebprofile.cpp b/indra/newview/llwebprofile.cpp index ade9bbd847..45388becc7 100644 --- a/indra/newview/llwebprofile.cpp +++ b/indra/newview/llwebprofile.cpp @@ -42,7 +42,7 @@ #include "llcorehttputil.h" // third-party -#include "json/reader.h" // JSON + /* * Workflow: -- cgit v1.3 From 5f4d312c8d2b6ba0fd13279ccfc569acd4f37c82 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 24 Apr 2024 19:49:27 +0200 Subject: Fix BOOL vs bool issues after merge --- indra/llinventory/llpermissions.h | 4 ++-- indra/llmessage/lldatapacker.cpp | 2 +- indra/newview/llappviewer.cpp | 2 +- indra/newview/lloutfitslist.cpp | 2 +- indra/newview/llpanelprofileclassifieds.cpp | 4 ++-- indra/newview/llpanelprofilepicks.cpp | 4 ++-- indra/newview/llplacesinventorypanel.cpp | 2 +- indra/newview/tests/llviewerassetstats_test.cpp | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h index f6a3db463d..4f6920f27a 100644 --- a/indra/llinventory/llpermissions.h +++ b/indra/llinventory/llpermissions.h @@ -151,10 +151,10 @@ public: U32 getMaskEveryone() const { return mMaskEveryone; } U32 getMaskNextOwner() const { return mMaskNextOwner; } - // return TRUE if the object has any owner + // return true if the object has any owner bool isOwned() const { return (mOwner.notNull() || mIsGroupOwned); } - // return TRUE if group_id is owner. + // return true if group_id is owner. bool isGroupOwned() const { return mIsGroupOwned; } // This API returns true if the object is owned at all, and false diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp index 745eb70f14..1545443798 100644 --- a/indra/llmessage/lldatapacker.cpp +++ b/indra/llmessage/lldatapacker.cpp @@ -302,7 +302,7 @@ bool LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char if (size < 0) { LL_WARNS() << "LLDataPackerBinaryBuffer::unpackBinaryData unpacked invalid size, aborting!" << LL_ENDL; - return FALSE; + return false; } mCurBufferp += 4; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 46c49d142a..3411454e46 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4701,7 +4701,7 @@ void LLAppViewer::idle() F32 agent_update_time = agent_update_timer.getElapsedTimeF32(); F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time; bool timed_out = agent_update_time > (1.0f / (F32)AGENT_UPDATES_PER_SECOND); - BOOL force_send = + bool force_send = // if there is something to send (gAgent.controlFlagsDirty() && timed_out) // if something changed diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index a7f9f53b9f..060f10d813 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -1356,7 +1356,7 @@ bool LLOutfitAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask) .delay_time(LLView::getTooltipTimeout()) .create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1)) .create_params(params)); - return TRUE; + return true; } return LLAccordionCtrlTab::handleToolTip(x, y, mask); diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp index 4c12cd742d..b39e4fddf1 100644 --- a/indra/newview/llpanelprofileclassifieds.cpp +++ b/indra/newview/llpanelprofileclassifieds.cpp @@ -650,8 +650,8 @@ bool LLPanelProfileClassified::postBuild() mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelProfileClassified::onTextureSelected, this)); mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelProfileClassified::onTexturePickerMouseEnter, this)); mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelProfileClassified::onTexturePickerMouseLeave, this)); - mSnapshotCtrl->setAllowLocalTexture(FALSE); - mSnapshotCtrl->setBakeTextureEnabled(FALSE); + mSnapshotCtrl->setAllowLocalTexture(false); + mSnapshotCtrl->setBakeTextureEnabled(false); mEditIcon->setVisible(false); mMapButton->setCommitCallback(boost::bind(&LLPanelProfileClassified::onMapClick, this)); diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index 07b9ad1c3b..7a0b4ff1ce 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -590,8 +590,8 @@ bool LLPanelProfilePick::postBuild() mSnapshotCtrl = getChild("pick_snapshot"); mSnapshotCtrl->setCommitCallback(boost::bind(&LLPanelProfilePick::onSnapshotChanged, this)); - mSnapshotCtrl->setAllowLocalTexture(FALSE); - mSnapshotCtrl->setBakeTextureEnabled(FALSE); + mSnapshotCtrl->setAllowLocalTexture(false); + mSnapshotCtrl->setBakeTextureEnabled(false); childSetAction("teleport_btn", boost::bind(&LLPanelProfilePick::onClickTeleport, this)); childSetAction("show_on_map_btn", boost::bind(&LLPanelProfilePick::onClickMap, this)); diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index 8ee2b1e330..ccb2feac10 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -128,5 +128,5 @@ bool LLPlacesInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool dro { return LLInventoryPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } - return FALSE; + return false; } diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp index e2e7f09c3b..bdf91d0f07 100644 --- a/indra/newview/tests/llviewerassetstats_test.cpp +++ b/indra/newview/tests/llviewerassetstats_test.cpp @@ -43,7 +43,7 @@ namespace LLStatViewer LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample"); } -void LLVOAvatar::getNearbyRezzedStats(std::vector& counts) +void LLVOAvatar::getNearbyRezzedStats(std::vector& counts, F32& avg_cloud_time, S32& cloud_avatars) { counts.resize(3); counts[0] = 0; -- cgit v1.3