diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 6a98e50eb8..2ada3ead63 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -837,7 +837,7 @@ std::wstring windows_message(DWORD error) return out.str(); } -boost::optional llstring_getoptenv(const std::string& key) +std::optional llstring_getoptenv(const std::string& key) { auto wkey = ll_convert_string_to_wide(key); // Take a wild guess as to how big the buffer should be. @@ -855,8 +855,8 @@ boost::optional llstring_getoptenv(const std::string& key) // did that (ultimately) succeed? if (n) { - // great, return populated boost::optional - return boost::optional(&buffer[0]); + // great, return populated std::optional + return std::make_optional(&buffer[0]); } // not successful @@ -867,23 +867,23 @@ boost::optional llstring_getoptenv(const std::string& key) LL_WARNS() << "GetEnvironmentVariableW('" << key << "') failed: " << windows_message(last_error) << LL_ENDL; } - // return empty boost::optional + // return empty std::optional return {}; } #else // ! LL_WINDOWS -boost::optional llstring_getoptenv(const std::string& key) +std::optional llstring_getoptenv(const std::string& key) { auto found = getenv(key.c_str()); if (found) { - // return populated boost::optional - return boost::optional(found); + // return populated std::optional + return std::make_optional(found); } else { - // return empty boost::optional + // return empty std::optional return {}; } } diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 1c5e243e7d..891606cb8e 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -28,8 +28,9 @@ #define LL_LLSTRING_H #include -#include +#include #include +#include #include #include // std::wcslen() //#include @@ -42,7 +43,6 @@ // [RLVa:KB] - Checked: RLVa-2.1.0 #include // [/RLVa:KB] -#include #if LL_LINUX #include @@ -354,7 +354,7 @@ public: * (key is always UTF-8) * detect absence by (! return value) */ - static boost::optional getoptenv(const std::string& key); + static std::optional getoptenv(const std::string& key); static void addCRLF(string_type& string); static void removeCRLF(string_type& string); @@ -833,11 +833,11 @@ STRING windows_message() { return windows_message(GetLastError()); } //@} -LL_COMMON_API boost::optional llstring_getoptenv(const std::string& key); +LL_COMMON_API std::optional llstring_getoptenv(const std::string& key); #else // ! LL_WINDOWS -LL_COMMON_API boost::optional llstring_getoptenv(const std::string& key); +LL_COMMON_API std::optional llstring_getoptenv(const std::string& key); #endif // ! LL_WINDOWS @@ -1787,17 +1787,17 @@ bool LLStringUtilBase::endsWith( // static template -auto LLStringUtilBase::getoptenv(const std::string& key) -> boost::optional +auto LLStringUtilBase::getoptenv(const std::string& key) -> std::optional { auto found(llstring_getoptenv(key)); if (found) { - // return populated boost::optional + // return populated std::optional return { ll_convert(*found) }; } else { - // empty boost::optional + // empty std::optional return {}; } } diff --git a/indra/llcommon/tests/llstring_test.cpp b/indra/llcommon/tests/llstring_test.cpp index 3e31a5d667..1e4bc1c910 100644 --- a/indra/llcommon/tests/llstring_test.cpp +++ b/indra/llcommon/tests/llstring_test.cpp @@ -80,12 +80,12 @@ namespace tut void string_index_object_t::test<3>() { std::string str("Len=5"); - ensure("isValidIndex failed", LLStringUtil::isValidIndex(str, 0) == TRUE && - LLStringUtil::isValidIndex(str, 5) == TRUE && - LLStringUtil::isValidIndex(str, 6) == FALSE); + ensure("isValidIndex failed", LLStringUtil::isValidIndex(str, 0) == true && + LLStringUtil::isValidIndex(str, 5) == true && + LLStringUtil::isValidIndex(str, 6) == false); std::string str1; - ensure("isValidIndex failed fo rempty string", LLStringUtil::isValidIndex(str1, 0) == FALSE); + ensure("isValidIndex failed fo rempty string", LLStringUtil::isValidIndex(str1, 0) == false); } template<> template<> @@ -153,10 +153,10 @@ namespace tut void string_index_object_t::test<10>() { std::string str_val("Second"); - ensure("1. isHead failed", LLStringUtil::isHead(str_val, "SecondLife Source") == TRUE); - ensure("2. isHead failed", LLStringUtil::isHead(str_val, " SecondLife Source") == FALSE); + ensure("1. isHead failed", LLStringUtil::isHead(str_val, "SecondLife Source") == true); + ensure("2. isHead failed", LLStringUtil::isHead(str_val, " SecondLife Source") == false); std::string str_val2(""); - ensure("3. isHead failed", LLStringUtil::isHead(str_val2, "") == FALSE); + ensure("3. isHead failed", LLStringUtil::isHead(str_val2, "") == false); } template<> template<> @@ -206,10 +206,10 @@ namespace tut void string_index_object_t::test<15>() { std::string str_val("Hello.\n\r\t"); - ensure("containsNonprintable failed", LLStringUtil::containsNonprintable(str_val) == TRUE); + ensure("containsNonprintable failed", LLStringUtil::containsNonprintable(str_val) == true); str_val = "ABC "; - ensure("containsNonprintable failed", LLStringUtil::containsNonprintable(str_val) == FALSE); + ensure("containsNonprintable failed", LLStringUtil::containsNonprintable(str_val) == false); } template<> template<> @@ -457,17 +457,17 @@ namespace tut std::string lhs_str("PROgraM12files"); std::string rhs_str("PROgram12Files"); ensure("compareDict 1 failed", LLStringUtil::compareDict(lhs_str, rhs_str) < 0); - ensure("precedesDict 1 failed", LLStringUtil::precedesDict(lhs_str, rhs_str) == TRUE); + ensure("precedesDict 1 failed", LLStringUtil::precedesDict(lhs_str, rhs_str) == true); lhs_str = "PROgram12Files"; rhs_str = "PROgram12Files"; ensure("compareDict 2 failed", LLStringUtil::compareDict(lhs_str, rhs_str) == 0); - ensure("precedesDict 2 failed", LLStringUtil::precedesDict(lhs_str, rhs_str) == FALSE); + ensure("precedesDict 2 failed", LLStringUtil::precedesDict(lhs_str, rhs_str) == false); lhs_str = "PROgram12Files"; rhs_str = "PROgRAM12FILES"; ensure("compareDict 3 failed", LLStringUtil::compareDict(lhs_str, rhs_str) > 0); - ensure("precedesDict 3 failed", LLStringUtil::precedesDict(lhs_str, rhs_str) == FALSE); + ensure("precedesDict 3 failed", LLStringUtil::precedesDict(lhs_str, rhs_str) == false); } template<> template<> diff --git a/indra/llcorehttp/bufferarray.cpp b/indra/llcorehttp/bufferarray.cpp index 8d2e7c6a63..f70a163cef 100644 --- a/indra/llcorehttp/bufferarray.cpp +++ b/indra/llcorehttp/bufferarray.cpp @@ -149,7 +149,7 @@ size_t BufferArray::append(const void * src, size_t len) } catch (std::bad_alloc&) { - LLMemory::logMemoryInfo(TRUE); + LLMemory::logMemoryInfo(true); //output possible call stacks to log file. LLError::LLCallStacks::print(); diff --git a/indra/llfilesystem/lldir_win32.cpp b/indra/llfilesystem/lldir_win32.cpp index f35029b97b..5ad5d9eaea 100644 --- a/indra/llfilesystem/lldir_win32.cpp +++ b/indra/llfilesystem/lldir_win32.cpp @@ -56,7 +56,7 @@ namespace void prelog(const std::string& message) { - boost::optional prelog_name; + std::optional prelog_name; switch (state) { diff --git a/indra/llmath/tests/llbbox_test.cpp b/indra/llmath/tests/llbbox_test.cpp index fd0dbb58fc..373e2d02a0 100644 --- a/indra/llmath/tests/llbbox_test.cpp +++ b/indra/llmath/tests/llbbox_test.cpp @@ -340,11 +340,11 @@ namespace tut LLBBox bbox1(LLVector3(1.0f, 1.0f, 1.0f), LLQuaternion(), LLVector3(1.0f, 2.0f, 3.0f), LLVector3(3.0f, 4.0f, 5.0f)); - ensure("containsPointLocal(0,0,0)", bbox1.containsPointLocal(LLVector3(0.0f, 0.0f, 0.0f)) == FALSE); - ensure("containsPointLocal(1,2,3)", bbox1.containsPointLocal(LLVector3(1.0f, 2.0f, 3.0f)) == TRUE); - ensure("containsPointLocal(0.999,2,3)", bbox1.containsPointLocal(LLVector3(0.999f, 2.0f, 3.0f)) == FALSE); - ensure("containsPointLocal(3,4,5)", bbox1.containsPointLocal(LLVector3(3.0f, 4.0f, 5.0f)) == TRUE); - ensure("containsPointLocal(3,4,5.001)", bbox1.containsPointLocal(LLVector3(3.0f, 4.0f, 5.001f)) == FALSE); + ensure("containsPointLocal(0,0,0)", bbox1.containsPointLocal(LLVector3(0.0f, 0.0f, 0.0f)) == false); + ensure("containsPointLocal(1,2,3)", bbox1.containsPointLocal(LLVector3(1.0f, 2.0f, 3.0f)) == true); + ensure("containsPointLocal(0.999,2,3)", bbox1.containsPointLocal(LLVector3(0.999f, 2.0f, 3.0f)) == false); + ensure("containsPointLocal(3,4,5)", bbox1.containsPointLocal(LLVector3(3.0f, 4.0f, 5.0f)) == true); + ensure("containsPointLocal(3,4,5.001)", bbox1.containsPointLocal(LLVector3(3.0f, 4.0f, 5.001f)) == false); } template<> template<> @@ -357,11 +357,11 @@ namespace tut LLBBox bbox1(LLVector3(1.0f, 1.0f, 1.0f), LLQuaternion(), LLVector3(1.0f, 2.0f, 3.0f), LLVector3(3.0f, 4.0f, 5.0f)); - ensure("containsPointAgent(0,0,0)", bbox1.containsPointAgent(LLVector3(0.0f, 0.0f, 0.0f)) == FALSE); - ensure("containsPointAgent(2,3,4)", bbox1.containsPointAgent(LLVector3(2.0f, 3.0f, 4.0f)) == TRUE); - ensure("containsPointAgent(2,2.999,4)", bbox1.containsPointAgent(LLVector3(2.0f, 2.999f, 4.0f)) == FALSE); - ensure("containsPointAgent(4,5,6)", bbox1.containsPointAgent(LLVector3(4.0f, 5.0f, 6.0f)) == TRUE); - ensure("containsPointAgent(4,5.001,6)", bbox1.containsPointAgent(LLVector3(4.0f, 5.001f, 6.0f)) == FALSE); + ensure("containsPointAgent(0,0,0)", bbox1.containsPointAgent(LLVector3(0.0f, 0.0f, 0.0f)) == false); + ensure("containsPointAgent(2,3,4)", bbox1.containsPointAgent(LLVector3(2.0f, 3.0f, 4.0f)) == true); + ensure("containsPointAgent(2,2.999,4)", bbox1.containsPointAgent(LLVector3(2.0f, 2.999f, 4.0f)) == false); + ensure("containsPointAgent(4,5,6)", bbox1.containsPointAgent(LLVector3(4.0f, 5.0f, 6.0f)) == true); + ensure("containsPointAgent(4,5.001,6)", bbox1.containsPointAgent(LLVector3(4.0f, 5.001f, 6.0f)) == false); } } diff --git a/indra/llmath/tests/llrect_test.cpp b/indra/llmath/tests/llrect_test.cpp index d740173e69..365f298636 100644 --- a/indra/llmath/tests/llrect_test.cpp +++ b/indra/llmath/tests/llrect_test.cpp @@ -471,13 +471,13 @@ namespace tut LLRectf rect(1.0f, 3.0f, 3.0f, 1.0f); - ensure("(0,0) not in rect", rect.pointInRect(0.0f, 0.0f) == FALSE); - ensure("(2,2) in rect", rect.pointInRect(2.0f, 2.0f) == TRUE); - ensure("(1,1) in rect", rect.pointInRect(1.0f, 1.0f) == TRUE); - ensure("(3,3) not in rect", rect.pointInRect(3.0f, 3.0f) == FALSE); - ensure("(2.999,2.999) in rect", rect.pointInRect(2.999f, 2.999f) == TRUE); - ensure("(2.999,3.0) not in rect", rect.pointInRect(2.999f, 3.0f) == FALSE); - ensure("(3.0,2.999) not in rect", rect.pointInRect(3.0f, 2.999f) == FALSE); + ensure("(0,0) not in rect", rect.pointInRect(0.0f, 0.0f) == false); + ensure("(2,2) in rect", rect.pointInRect(2.0f, 2.0f) == true); + ensure("(1,1) in rect", rect.pointInRect(1.0f, 1.0f) == true); + ensure("(3,3) not in rect", rect.pointInRect(3.0f, 3.0f) == false); + ensure("(2.999,2.999) in rect", rect.pointInRect(2.999f, 2.999f) == true); + ensure("(2.999,3.0) not in rect", rect.pointInRect(2.999f, 3.0f) == false); + ensure("(3.0,2.999) not in rect", rect.pointInRect(3.0f, 2.999f) == false); } template<> template<> @@ -489,13 +489,13 @@ namespace tut LLRectf rect(1.0f, 3.0f, 3.0f, 1.0f); - ensure("(0,0) in local rect", rect.localPointInRect(0.0f, 0.0f) == TRUE); - ensure("(-0.0001,-0.0001) not in local rect", rect.localPointInRect(-0.0001f, -0.001f) == FALSE); - ensure("(1,1) in local rect", rect.localPointInRect(1.0f, 1.0f) == TRUE); - ensure("(2,2) not in local rect", rect.localPointInRect(2.0f, 2.0f) == FALSE); - ensure("(1.999,1.999) in local rect", rect.localPointInRect(1.999f, 1.999f) == TRUE); - ensure("(1.999,2.0) not in local rect", rect.localPointInRect(1.999f, 2.0f) == FALSE); - ensure("(2.0,1.999) not in local rect", rect.localPointInRect(2.0f, 1.999f) == FALSE); + ensure("(0,0) in local rect", rect.localPointInRect(0.0f, 0.0f) == true); + ensure("(-0.0001,-0.0001) not in local rect", rect.localPointInRect(-0.0001f, -0.001f) == false); + ensure("(1,1) in local rect", rect.localPointInRect(1.0f, 1.0f) == true); + ensure("(2,2) not in local rect", rect.localPointInRect(2.0f, 2.0f) == false); + ensure("(1.999,1.999) in local rect", rect.localPointInRect(1.999f, 1.999f) == true); + ensure("(1.999,2.0) not in local rect", rect.localPointInRect(1.999f, 2.0f) == false); + ensure("(2.0,1.999) not in local rect", rect.localPointInRect(2.0f, 1.999f) == false); } template<> template<> diff --git a/indra/llmath/tests/v2math_test.cpp b/indra/llmath/tests/v2math_test.cpp index 4d6a2eca93..06e1292941 100644 --- a/indra/llmath/tests/v2math_test.cpp +++ b/indra/llmath/tests/v2math_test.cpp @@ -93,15 +93,15 @@ namespace tut { F32 x =-2.0f, y = -3.0f ; LLVector2 vec2(x,y); - ensure_equals("abs():Fail", vec2.abs(), TRUE); + ensure_equals("abs():Fail", vec2.abs(), true); ensure("abs() x", is_approx_equal(vec2.mV[VX], 2.f)); ensure("abs() y", is_approx_equal(vec2.mV[VY], 3.f)); - ensure("isNull():Fail ", FALSE == vec2.isNull()); //Returns TRUE if vector has a _very_small_ length + ensure("isNull():Fail ", false == vec2.isNull()); //Returns true if vector has a _very_small_ length x =.00000001f, y = .000001001f; vec2.setVec(x, y); - ensure("isNull(): Fail ", TRUE == vec2.isNull()); + ensure("isNull(): Fail ", true == vec2.isNull()); } template<> template<> @@ -111,12 +111,12 @@ namespace tut LLVector2 vec2(x, y), vec3; vec3 = vec3.scaleVec(vec2); ensure("scaleVec: Fail ", vec3.mV[VX] == 0. && vec3.mV[VY] == 0.); - ensure("isExactlyZero(): Fail", TRUE == vec3.isExactlyZero()); + ensure("isExactlyZero(): Fail", true == vec3.isExactlyZero()); vec3.setVec(2.f, 1.f); vec3 = vec3.scaleVec(vec2); ensure("scaleVec: Fail ", (2.f == vec3.mV[VX]) && (2.f == vec3.mV[VY])); - ensure("isExactlyZero():Fail", FALSE == vec3.isExactlyZero()); + ensure("isExactlyZero():Fail", false == vec3.isExactlyZero()); } template<> template<> @@ -254,7 +254,7 @@ namespace tut vec3.clearVec(); vec2.setVec(x1, y1); vec3.setVec(vec2); - ensure("2:operator!= failed", (FALSE == (vec2 != vec3))); + ensure("2:operator!= failed", (false == (vec2 != vec3))); } template<> template<> void v2math_object::test<13>() @@ -373,7 +373,7 @@ namespace tut x1 = 1.0f, y1 = 2.0f, x2 = 1.0f, y2 = 3.2234f; vec2.setVec(x1, y1); vec3.setVec(x2, y2); - ensure("2:operator < failed", (FALSE == (vec3 < vec2))); + ensure("2:operator < failed", (false == (vec3 < vec2))); } template<> template<> diff --git a/indra/llmath/tests/v3color_test.cpp b/indra/llmath/tests/v3color_test.cpp index 29d1c483ab..0fb52394a5 100644 --- a/indra/llmath/tests/v3color_test.cpp +++ b/indra/llmath/tests/v3color_test.cpp @@ -209,7 +209,7 @@ namespace tut ensure("1:operator!= failed",(llcolor3 != llcolor3a)); llcolor3.setToBlack(); llcolor3a.setVec(llcolor3); - ensure("2:operator!= failed", ( FALSE == (llcolor3a != llcolor3))); + ensure("2:operator!= failed", ( false == (llcolor3a != llcolor3))); } template<> template<> diff --git a/indra/llmath/tests/v3dmath_test.cpp b/indra/llmath/tests/v3dmath_test.cpp index c4744e1b25..0c8c01a77a 100644 --- a/indra/llmath/tests/v3dmath_test.cpp +++ b/indra/llmath/tests/v3dmath_test.cpp @@ -128,15 +128,15 @@ namespace tut LLVector3d vec3D(x,y,z); vec3D.abs(); ensure("1:abs:Fail ", ((-x == vec3D.mdV[VX]) && (y == vec3D.mdV[VY]) && (-z == vec3D.mdV[VZ]))); - ensure("2:isNull():Fail ", (FALSE == vec3D.isNull())); + ensure("2:isNull():Fail ", (false == vec3D.isNull())); vec3D.clearVec(); x =.00000001, y = .000001001, z = .000001001; vec3D.setVec(x,y,z); - ensure("3:isNull():Fail ", (TRUE == vec3D.isNull())); - ensure("4:isExactlyZero():Fail ", (FALSE == vec3D.isExactlyZero())); + ensure("3:isNull():Fail ", (true == vec3D.isNull())); + ensure("4:isExactlyZero():Fail ", (false == vec3D.isExactlyZero())); x =.0000000, y = .00000000, z = .00000000; vec3D.setVec(x,y,z); - ensure("5:isExactlyZero():Fail ", (TRUE == vec3D.isExactlyZero())); + ensure("5:isExactlyZero():Fail ", (true == vec3D.isExactlyZero())); } template<> template<> @@ -353,7 +353,7 @@ namespace tut { F64 x1 = 1., y1 = 2., z1 = -1.1; LLVector3d vec3D(x1,y1,z1), vec3Da; - ensure("1:operator!= failed",(TRUE == (vec3D !=vec3Da))); + ensure("1:operator!= failed",(true == (vec3D !=vec3Da))); vec3Da = vec3D; ensure("2:operator== failed",(vec3D ==vec3Da)); vec3D.clearVec(); @@ -362,7 +362,7 @@ namespace tut vec3D.setVec(x1,y1,z1); vec3Da.setVec(x1,y1,z1); ensure("3:operator== failed",(vec3D ==vec3Da)); - ensure("4:operator!= failed",(FALSE == (vec3D !=vec3Da))); + ensure("4:operator!= failed",(false == (vec3D !=vec3Da))); } template<> template<> @@ -482,10 +482,10 @@ namespace tut F64 x = 2.32, y = 1.212, z = -.12; F64 min = 0.0001, max = 3.0; LLVector3d vec3d(x,y,z); - ensure("1:clamp:Fail ", (TRUE == (vec3d.clamp(min, max)))); + ensure("1:clamp:Fail ", (true == (vec3d.clamp(min, max)))); x = 0.000001f, z = 5.3f; vec3d.setVec(x,y,z); - ensure("2:clamp:Fail ", (TRUE == (vec3d.clamp(min, max)))); + ensure("2:clamp:Fail ", (true == (vec3d.clamp(min, max)))); } template<> template<> @@ -494,11 +494,11 @@ namespace tut F64 x = 10., y = 20., z = -15.; F64 epsilon = .23425; LLVector3d vec3Da(x,y,z), vec3Db(x,y,z); - ensure("1:are_parallel: Fail ", (TRUE == are_parallel(vec3Da,vec3Db,epsilon))); + ensure("1:are_parallel: Fail ", (true == are_parallel(vec3Da,vec3Db,epsilon))); F64 x1 = -12., y1 = -20., z1 = -100.; vec3Db.clearVec(); vec3Db.setVec(x1,y1,z1); - ensure("2:are_parallel: Fail ", (FALSE == are_parallel(vec3Da,vec3Db,epsilon))); + ensure("2:are_parallel: Fail ", (false == are_parallel(vec3Da,vec3Db,epsilon))); } template<> template<> diff --git a/indra/llmath/tests/v3math_test.cpp b/indra/llmath/tests/v3math_test.cpp index e4ae1c10ef..b1831af1cc 100644 --- a/indra/llmath/tests/v3math_test.cpp +++ b/indra/llmath/tests/v3math_test.cpp @@ -99,7 +99,7 @@ namespace tut { F32 x = 2.32f, y = 1.212f, z = -.12f; LLVector3 vec3(x,y,z); - ensure("1:isFinite= Fail to initialize ", (TRUE == vec3.isFinite()));//need more test cases: + ensure("1:isFinite= Fail to initialize ", (true == vec3.isFinite()));//need more test cases: vec3.clearVec(); ensure("2:clearVec:Fail to set values ", ((0.f == vec3.mV[VX]) && (0.f == vec3.mV[VY]) && (0.f == vec3.mV[VZ]))); vec3.setVec(x,y,z); @@ -137,10 +137,10 @@ namespace tut F32 x = 2.32f, y = 3.212f, z = -.12f; F32 min = 0.0001f, max = 3.0f; LLVector3 vec3(x,y,z); - ensure("1:clamp:Fail ", TRUE == vec3.clamp(min, max) && x == vec3.mV[VX] && max == vec3.mV[VY] && min == vec3.mV[VZ]); + ensure("1:clamp:Fail ", true == vec3.clamp(min, max) && x == vec3.mV[VX] && max == vec3.mV[VY] && min == vec3.mV[VZ]); x = 1.f, y = 2.2f, z = 2.8f; vec3.setVec(x,y,z); - ensure("2:clamp:Fail ", FALSE == vec3.clamp(min, max)); + ensure("2:clamp:Fail ", false == vec3.clamp(min, max)); } template<> template<> @@ -157,11 +157,11 @@ namespace tut { F32 x =-2.0f, y = -3.0f, z = 1.23f ; LLVector3 vec3(x,y,z); - ensure("1:abs():Fail ", (TRUE == vec3.abs())); - ensure("2:isNull():Fail", (FALSE == vec3.isNull())); //Returns TRUE if vector has a _very_small_ length + ensure("1:abs():Fail ", (true == vec3.abs())); + ensure("2:isNull():Fail", (false == vec3.isNull())); //Returns TRUE if vector has a _very_small_ length x =.00000001f, y = .000001001f, z = .000001001f; vec3.setVec(x,y,z); - ensure("3:isNull(): Fail ", (TRUE == vec3.isNull())); + ensure("3:isNull(): Fail ", (true == vec3.isNull())); } template<> template<> @@ -169,13 +169,13 @@ namespace tut { F32 x =-2.0f, y = -3.0f, z = 1.f ; LLVector3 vec3(x,y,z),vec3a; - ensure("1:isExactlyZero():Fail ", (TRUE == vec3a.isExactlyZero())); + ensure("1:isExactlyZero():Fail ", (true == vec3a.isExactlyZero())); vec3a = vec3a.scaleVec(vec3); ensure("2:scaleVec: Fail ", vec3a.mV[VX] == 0.f && vec3a.mV[VY] == 0.f && vec3a.mV[VZ] == 0.f); vec3a.setVec(x,y,z); vec3a = vec3a.scaleVec(vec3); ensure("3:scaleVec: Fail ", ((4 == vec3a.mV[VX]) && (9 == vec3a.mV[VY]) &&(1 == vec3a.mV[VZ]))); - ensure("4:isExactlyZero():Fail ", (FALSE == vec3.isExactlyZero())); + ensure("4:isExactlyZero():Fail ", (false == vec3.isExactlyZero())); } template<> template<> @@ -356,7 +356,7 @@ namespace tut vec3.clearVec(); vec3.clearVec(); vec3a.setVec(vec3); - ensure("2:operator!= failed", ( FALSE == (vec3a != vec3))); + ensure("2:operator!= failed", ( false == (vec3a != vec3))); } template<> template<> @@ -454,15 +454,15 @@ namespace tut { F32 x1 =-2.3f, y1 = 2.f,z1 = 1.2f, x2 = 1.3f, y2 = 1.11f, z2 = 1234.234f; LLVector3 vec3(x1,y1,z1), vec3a(x2,y2,z2); - ensure("1:operator< failed", (TRUE == (vec3 < vec3a))); + ensure("1:operator< failed", (true == (vec3 < vec3a))); x1 =-2.3f, y1 = 2.f,z1 = 1.2f, x2 = 1.3f, y2 = 2.f, z2 = 1234.234f; vec3.setVec(x1,y1,z1); vec3a.setVec(x2,y2,z2); - ensure("2:operator< failed ", (TRUE == (vec3 < vec3a))); + ensure("2:operator< failed ", (true == (vec3 < vec3a))); x1 =2.3f, y1 = 2.f,z1 = 1.2f, x2 = 1.3f, vec3.setVec(x1,y1,z1); vec3a.setVec(x2,y2,z2); - ensure("3:operator< failed ", (FALSE == (vec3 < vec3a))); + ensure("3:operator< failed ", (false == (vec3 < vec3a))); } template<> template<> diff --git a/indra/llmath/tests/v4coloru_test.cpp b/indra/llmath/tests/v4coloru_test.cpp index 12e607a820..1d3aa4c63d 100644 --- a/indra/llmath/tests/v4coloru_test.cpp +++ b/indra/llmath/tests/v4coloru_test.cpp @@ -287,10 +287,10 @@ namespace tut ensure("parseColor4U() failed to parse the color value ", ((12 == llcolor4u1.mV[VX]) && (23 == llcolor4u1.mV[VY]) && (132 == llcolor4u1.mV[VZ])&& (50 == llcolor4u1.mV[VW]))); color = "12, 23, 132"; - ensure("2:parseColor4U() failed to parse the color value ", (FALSE == LLColor4U::parseColor4U(color, &llcolor4u1))); + ensure("2:parseColor4U() failed to parse the color value ", (false == LLColor4U::parseColor4U(color, &llcolor4u1))); color = "12"; - ensure("2:parseColor4U() failed to parse the color value ", (FALSE == LLColor4U::parseColor4U(color, &llcolor4u1))); + ensure("2:parseColor4U() failed to parse the color value ", (false == LLColor4U::parseColor4U(color, &llcolor4u1))); } template<> template<> diff --git a/indra/llmath/tests/v4math_test.cpp b/indra/llmath/tests/v4math_test.cpp index 9779dfded3..5308e7efd4 100644 --- a/indra/llmath/tests/v4math_test.cpp +++ b/indra/llmath/tests/v4math_test.cpp @@ -123,9 +123,9 @@ namespace tut vec4.abs(); ensure("abs:Fail " ,((x == vec4.mV[VX]) && (-y == vec4.mV[VY]) && (-z == vec4.mV[VZ])&& (-w == vec4.mV[VW]))); vec4.clearVec(); - ensure("isExactlyClear:Fail " ,(TRUE == vec4.isExactlyClear())); + ensure("isExactlyClear:Fail " ,(true == vec4.isExactlyClear())); vec4.zeroVec(); - ensure("isExactlyZero:Fail " ,(TRUE == vec4.isExactlyZero())); + ensure("isExactlyZero:Fail " ,(true == vec4.isExactlyZero())); } template<> template<> @@ -303,11 +303,11 @@ namespace tut { F32 x = 1.f, y = 2.f, z = -1.1f,epsilon = .23425f; LLVector4 vec4(x,y,z), vec4a(x,y,z); - ensure("1:are_parallel: Fail " ,(TRUE == are_parallel(vec4a,vec4,epsilon))); + ensure("1:are_parallel: Fail " ,(true == are_parallel(vec4a,vec4,epsilon))); x = 21.f, y = 12.f, z = -123.1f; vec4a.clearVec(); vec4a.setVec(x,y,z); - ensure("2:are_parallel: Fail " ,(FALSE == are_parallel(vec4a,vec4,epsilon))); + ensure("2:are_parallel: Fail " ,(false == are_parallel(vec4a,vec4,epsilon))); } template<> template<> diff --git a/indra/llmath/tests/xform_test.cpp b/indra/llmath/tests/xform_test.cpp index 50e24c9d4f..6348b3225c 100644 --- a/indra/llmath/tests/xform_test.cpp +++ b/indra/llmath/tests/xform_test.cpp @@ -91,7 +91,7 @@ namespace tut xform_obj.setPositionZ(z); ensure("setPositionX/Y/Z failed: ", xform_obj.getPosition() == vec); - xform_obj.setScaleChildOffset(TRUE); + xform_obj.setScaleChildOffset(true); ensure("setScaleChildOffset failed: ", xform_obj.getScaleChildOffset()); vec.setVec(x, y, z); @@ -216,7 +216,7 @@ namespace tut parent.setPosition(llvecpospar); LLVector3 llvecparentscale(1.0, 2.0, 0); - parent.setScaleChildOffset(TRUE); + parent.setScaleChildOffset(true); parent.setScale(llvecparentscale); LLQuaternion quat(1, 2, 3, 4); diff --git a/indra/llui/fsregistrarutils.h b/indra/llui/fsregistrarutils.h index 18f33593eb..52639ddfeb 100644 --- a/indra/llui/fsregistrarutils.h +++ b/indra/llui/fsregistrarutils.h @@ -28,6 +28,8 @@ #ifndef FS_REGISTRARUTILS_H #define FS_REGISTRARUTILS_H +#include + enum class EFSRegistrarFunctionActionType { FS_RGSTR_ACT_ADD_FRIEND, diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index b81e75f12a..855809e1d3 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -220,7 +220,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica bool show_notification = true; if (p.ignore.control.isProvided()) { - mIgnoreSetting = ui_inst->mSettingGroups["config"]->getControl(p.ignore.control); + mIgnoreSetting = ui_inst->mSettingGroups["config"]->getControl(p.ignore.control()); mInvertSetting = p.ignore.invert_control; } else if (mIgnore > IGNORE_NO) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index b54cbb4026..e70a0dfaf6 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -94,7 +94,7 @@ const UINT WM_DUMMY_(WM_USER + 0x0017); const UINT WM_POST_FUNCTION_(WM_USER + 0x0018); extern bool gDebugWindowProc; -extern BOOL gDisconnected; // [FIRE-32453][BUG-232971] Improve shutdown behaviour. +extern bool gDisconnected; // [FIRE-32453][BUG-232971] Improve shutdown behaviour. static std::thread::id sWindowThreadId; static std::thread::id sMainThreadId; diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 07b2c3cb41..bd2f5f874c 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -77,19 +77,19 @@ template <> LLSD convert_to_llsd(const LLColor4& in); template <> LLSD convert_to_llsd(const LLColor3& in); template <> LLSD convert_to_llsd(const LLColor4U& in); -template <> bool convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> S32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> U32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> F32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> std::string convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> LLWString convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> LLRect convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> LLColor4 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> LLColor4U convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> LLColor3 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template <> LLSD convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); +template <> bool convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> S32 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> U32 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> F32 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> std::string convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> LLWString convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> LLRect convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> LLColor4 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> LLColor4U convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> LLColor3 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template <> LLSD convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); //this defines the current version of the settings file const S32 CURRENT_VERSION = 101; @@ -229,12 +229,12 @@ void LLControlVariable::setValue(const LLSD& new_value, bool saved_value) LLSD storable_value = getComparableValue(new_value); LLSD original_value = getValue(); - bool value_changed = llsd_compare(original_value, storable_value) == FALSE; + bool value_changed = llsd_compare(original_value, storable_value) == false; if(saved_value) { // If we're going to save this value, return to default but don't fire resetToDefault(false); - if (llsd_compare(mValues.back(), storable_value) == FALSE) + if (llsd_compare(mValues.back(), storable_value) == false) { mValues.push_back(storable_value); } @@ -244,7 +244,7 @@ void LLControlVariable::setValue(const LLSD& new_value, bool saved_value) // This is an unsaved value. Its needs to reside at // mValues[2] (or greater). It must not affect // the result of getSaveValue() - if (llsd_compare(mValues.back(), storable_value) == FALSE) + if (llsd_compare(mValues.back(), storable_value) == false) { while(mValues.size() > 2) { @@ -279,7 +279,7 @@ void LLControlVariable::setDefaultValue(const LLSD& value) LLSD comparable_value = getComparableValue(value); LLSD original_value = getValue(); - bool value_changed = (llsd_compare(original_value, comparable_value) == FALSE); + bool value_changed = (llsd_compare(original_value, comparable_value) == false); resetToDefault(false); mValues[0] = comparable_value; if(value_changed) @@ -412,14 +412,14 @@ LLSD LLControlVariable::getSaveValue() const return mValues[0]; } -LLPointer LLControlGroup::getControl(const std::string& name) +LLPointer LLControlGroup::getControl(std::string_view name) { if (mSettingsProfile) { incrCount(name); } - ctrl_name_table_t::iterator iter = mNameTable.find(name); + ctrl_name_table_t::iterator iter = mNameTable.find(name.data()); return iter == mNameTable.end() ? LLPointer() : iter->second; } @@ -653,46 +653,46 @@ LLControlVariable* LLControlGroup::declareLLSD(const std::string& name, const LL return declareControl(name, TYPE_LLSD, initial_val, comment, SANITY_TYPE_NONE, LLSD(), std::string(""), persist); } -void LLControlGroup::incrCount(const std::string& name) +void LLControlGroup::incrCount(std::string_view name) { if (0.0 == start_time) { start_time = LLTimer::getTotalSeconds(); } - getCount[name] = getCount[name].asInteger() + 1; + getCount[name.data()] = getCount[name.data()].asInteger() + 1; } -bool LLControlGroup::getBOOL(const std::string& name) +bool LLControlGroup::getBOOL(std::string_view name) { return get(name); } -S32 LLControlGroup::getS32(const std::string& name) +S32 LLControlGroup::getS32(std::string_view name) { return get(name); } -U32 LLControlGroup::getU32(const std::string& name) +U32 LLControlGroup::getU32(std::string_view name) { return get(name); } -F32 LLControlGroup::getF32(const std::string& name) +F32 LLControlGroup::getF32(std::string_view name) { return get(name); } -std::string LLControlGroup::getString(const std::string& name) +std::string LLControlGroup::getString(std::string_view name) { return get(name); } -LLWString LLControlGroup::getWString(const std::string& name) +LLWString LLControlGroup::getWString(std::string_view name) { return get(name); } -std::string LLControlGroup::getText(const std::string& name) +std::string LLControlGroup::getText(std::string_view name) { std::string utf8_string = getString(name); LLStringUtil::replaceChar(utf8_string, '^', '\n'); @@ -700,43 +700,43 @@ std::string LLControlGroup::getText(const std::string& name) return (utf8_string); } -LLVector3 LLControlGroup::getVector3(const std::string& name) +LLVector3 LLControlGroup::getVector3(std::string_view name) { return get(name); } -LLVector3d LLControlGroup::getVector3d(const std::string& name) +LLVector3d LLControlGroup::getVector3d(std::string_view name) { return get(name); } -LLQuaternion LLControlGroup::getQuaternion(const std::string& name) +LLQuaternion LLControlGroup::getQuaternion(std::string_view name) { return get(name); } -LLRect LLControlGroup::getRect(const std::string& name) +LLRect LLControlGroup::getRect(std::string_view name) { return get(name); } -LLColor4 LLControlGroup::getColor(const std::string& name) +LLColor4 LLControlGroup::getColor(std::string_view name) { return get(name); } -LLColor4 LLControlGroup::getColor4(const std::string& name) +LLColor4 LLControlGroup::getColor4(std::string_view name) { return get(name); } -LLColor3 LLControlGroup::getColor3(const std::string& name) +LLColor3 LLControlGroup::getColor3(std::string_view name) { return get(name); } -LLSD LLControlGroup::getLLSD(const std::string& name) +LLSD LLControlGroup::getLLSD(std::string_view name) { return get(name); } @@ -770,67 +770,67 @@ bool LLControlGroup::controlExists(const std::string& name) // Set functions //------------------------------------------------------------------- -void LLControlGroup::setBOOL(const std::string& name, bool val) +void LLControlGroup::setBOOL(std::string_view name, bool val) { set(name, val); } -void LLControlGroup::setS32(const std::string& name, S32 val) +void LLControlGroup::setS32(std::string_view name, S32 val) { set(name, val); } -void LLControlGroup::setF32(const std::string& name, F32 val) +void LLControlGroup::setF32(std::string_view name, F32 val) { set(name, val); } -void LLControlGroup::setU32(const std::string& name, U32 val) +void LLControlGroup::setU32(std::string_view name, U32 val) { set(name, val); } -void LLControlGroup::setString(const std::string& name, const std::string &val) +void LLControlGroup::setString(std::string_view name, const std::string &val) { set(name, val); } -void LLControlGroup::setVector3(const std::string& name, const LLVector3 &val) +void LLControlGroup::setVector3(std::string_view name, const LLVector3 &val) { set(name, val); } -void LLControlGroup::setVector3d(const std::string& name, const LLVector3d &val) +void LLControlGroup::setVector3d(std::string_view name, const LLVector3d &val) { set(name, val); } -void LLControlGroup::setQuaternion(const std::string& name, const LLQuaternion &val) +void LLControlGroup::setQuaternion(std::string_view name, const LLQuaternion &val) { set(name, val); } -void LLControlGroup::setRect(const std::string& name, const LLRect &val) +void LLControlGroup::setRect(std::string_view name, const LLRect &val) { set(name, val); } -void LLControlGroup::setColor4(const std::string& name, const LLColor4 &val) +void LLControlGroup::setColor4(std::string_view name, const LLColor4 &val) { set(name, val); } -void LLControlGroup::setLLSD(const std::string& name, const LLSD& val) +void LLControlGroup::setLLSD(std::string_view name, const LLSD& val) { set(name, val); } -void LLControlGroup::setUntypedValue(const std::string& name, const LLSD& val) +void LLControlGroup::setUntypedValue(std::string_view name, const LLSD& val) { if (name.empty()) { @@ -1421,19 +1421,19 @@ template <> LLSD convert_to_llsd(const LLColor4U& in) template<> -bool convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +bool convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_BOOLEAN) return sd.asBoolean(); else { CONTROL_ERRS << "Invalid BOOL value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; - return FALSE; + return false; } } template<> -S32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +S32 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_S32) return sd.asInteger(); @@ -1445,7 +1445,7 @@ S32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& } template<> -U32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +U32 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_U32) return sd.asInteger(); @@ -1457,7 +1457,7 @@ U32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& } template<> -F32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +F32 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_F32) return (F32) sd.asReal(); @@ -1469,7 +1469,7 @@ F32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& } template<> -std::string convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +std::string convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_STRING) return sd.asString(); @@ -1481,13 +1481,13 @@ std::string convert_from_llsd(const LLSD& sd, eControlType type, co } template<> -LLWString convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +LLWString convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { return utf8str_to_wstring(convert_from_llsd(sd, type, control_name)); } template<> -LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_VEC3) return (LLVector3)sd; @@ -1499,7 +1499,7 @@ LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, const } template<> -LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_VEC3D) return (LLVector3d)sd; @@ -1511,7 +1511,7 @@ LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, cons } template<> -LLQuaternion convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +LLQuaternion convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_QUAT) return (LLQuaternion)sd; @@ -1523,7 +1523,7 @@ LLQuaternion convert_from_llsd(const LLSD& sd, eControlType type, } template<> -LLRect convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +LLRect convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_RECT) return LLRect(sd); @@ -1536,7 +1536,7 @@ LLRect convert_from_llsd(const LLSD& sd, eControlType type, const std::s template<> -LLColor4 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +LLColor4 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_COL4) { @@ -1568,7 +1568,7 @@ LLColor4 convert_from_llsd(const LLSD& sd, eControlType type, const st } template<> -LLColor3 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +LLColor3 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { if (type == TYPE_COL3) return sd; @@ -1580,7 +1580,7 @@ LLColor3 convert_from_llsd(const LLSD& sd, eControlType type, const st } template<> -LLSD convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +LLSD convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { return sd; } diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index e00c400c8a..768c45e9f2 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -180,7 +180,7 @@ public: LLSD getSaveValue() const; void set(const LLSD& val) { setValue(val); } - void setValue(const LLSD& value, bool saved_value = TRUE); + void setValue(const LLSD& value, bool saved_value = true); void setDefaultValue(const LLSD& value); void setPersist(ePersist); void setBackupable(bool state); // Backup Settings @@ -214,7 +214,7 @@ LLSD convert_to_llsd(const T& in) } template -T convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name) +T convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name) { // needs specialization return T(sd); @@ -241,7 +241,7 @@ public: ~LLControlGroup(); void cleanup(); - LLControlVariablePtr getControl(const std::string& name); + LLControlVariablePtr getControl(std::string_view name); struct ApplyFunctor { @@ -268,28 +268,28 @@ public: LLControlVariable* declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); LLControlVariable* declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT); - std::string getString(const std::string& name); - std::string getText(const std::string& name); - bool getBOOL(const std::string& name); - S32 getS32(const std::string& name); - F32 getF32(const std::string& name); - U32 getU32(const std::string& name); + std::string getString(std::string_view name); + std::string getText(std::string_view name); + bool getBOOL(std::string_view name); + S32 getS32(std::string_view name); + F32 getF32(std::string_view name); + U32 getU32(std::string_view name); - LLWString getWString(const std::string& name); - LLVector3 getVector3(const std::string& name); - LLVector3d getVector3d(const std::string& name); - LLRect getRect(const std::string& name); - LLSD getLLSD(const std::string& name); - LLQuaternion getQuaternion(const std::string& name); + LLWString getWString(std::string_view name); + LLVector3 getVector3(std::string_view name); + LLVector3d getVector3d(std::string_view name); + LLRect getRect(std::string_view name); + LLSD getLLSD(std::string_view name); + LLQuaternion getQuaternion(std::string_view name); - LLColor4 getColor(const std::string& name); - LLColor4 getColor4(const std::string& name); - LLColor3 getColor3(const std::string& name); + LLColor4 getColor(std::string_view name); + LLColor4 getColor4(std::string_view name); + LLColor3 getColor3(std::string_view name); LLSD asLLSD(bool diffs_only); // generic getter - template T get(const std::string& name) + template T get(std::string_view name) { LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD; LLControlVariable* control = getControl(name); @@ -309,23 +309,23 @@ public: return convert_from_llsd(value, type, name); } - void setBOOL(const std::string& name, bool val); - void setS32(const std::string& name, S32 val); - void setF32(const std::string& name, F32 val); - void setU32(const std::string& name, U32 val); - void setString(const std::string& name, const std::string& val); - void setVector3(const std::string& name, const LLVector3 &val); - void setVector3d(const std::string& name, const LLVector3d &val); - void setQuaternion(const std::string& name, const LLQuaternion &val); - void setRect(const std::string& name, const LLRect &val); - void setColor4(const std::string& name, const LLColor4 &val); - void setLLSD(const std::string& name, const LLSD& val); + void setBOOL(std::string_view name, bool val); + void setS32(std::string_view name, S32 val); + void setF32(std::string_view name, F32 val); + void setU32(std::string_view name, U32 val); + void setString(std::string_view name, const std::string& val); + void setVector3(std::string_view name, const LLVector3 &val); + void setVector3d(std::string_view name, const LLVector3d &val); + void setQuaternion(std::string_view name, const LLQuaternion &val); + void setRect(std::string_view name, const LLRect &val); + void setColor4(std::string_view name, const LLColor4 &val); + void setLLSD(std::string_view name, const LLSD& val); // type agnostic setter that takes LLSD - void setUntypedValue(const std::string& name, const LLSD& val); + void setUntypedValue(std::string_view name, const LLSD& val); // generic setter - template void set(const std::string& name, const T& val) + template void set(std::string_view name, const T& val) { LLControlVariable* control = getControl(name); @@ -348,7 +348,7 @@ public: U32 saveToFile(const std::string& filename, bool nondefault_only); U32 loadFromFile(const std::string& filename, bool default_values = false, bool save_values = true); void resetToDefaults(); - void incrCount(const std::string& name); + void incrCount(std::string_view name); bool mSettingsProfile; }; @@ -499,19 +499,19 @@ template <> LLSD convert_to_llsd(const LLRect& in); template <> LLSD convert_to_llsd(const LLColor4& in); template <> LLSD convert_to_llsd(const LLColor3& in); -template<> std::string convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> LLWString convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> LLQuaternion convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> LLRect convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> bool convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> S32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> F32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> U32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> LLColor3 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> LLColor4 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); -template<> LLSD convert_from_llsd(const LLSD& sd, eControlType type, const std::string& control_name); +template<> std::string convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> LLWString convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> LLQuaternion convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> LLRect convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> bool convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> S32 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> F32 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> U32 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> LLColor3 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> LLColor4 convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); +template<> LLSD convert_from_llsd(const LLSD& sd, eControlType type, std::string_view control_name); //#define TEST_CACHED_CONTROL 1 #ifdef TEST_CACHED_CONTROL diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp index 0d8ab76a07..85dd3733c7 100644 --- a/indra/llxml/llxmltree.cpp +++ b/indra/llxml/llxmltree.cpp @@ -553,14 +553,14 @@ bool LLXmlTreeParser::parseFile(const std::string &path, LLXmlTreeNode** root, b return success; } -BOOL LLXmlTreeParser::parseString(const std::string &string, LLXmlTreeNode** root, BOOL keep_contents) +bool LLXmlTreeParser::parseString(const std::string &string, LLXmlTreeNode** root, bool keep_contents) { llassert( !mRoot ); llassert( !mCurrent ); mKeepContents = keep_contents; - BOOL success = LLXmlParser::parse(string.c_str(), string.length(), true); + bool success = LLXmlParser::parse(string.c_str(), string.length(), true); *root = mRoot; mRoot = NULL; diff --git a/indra/llxml/llxmltree.h b/indra/llxml/llxmltree.h index 14b748928a..554332da45 100644 --- a/indra/llxml/llxmltree.h +++ b/indra/llxml/llxmltree.h @@ -201,7 +201,7 @@ public: virtual ~LLXmlTreeParser(); bool parseFile(const std::string &path, LLXmlTreeNode** root, bool keep_contents ); - BOOL parseString(const std::string &string, LLXmlTreeNode** root, BOOL keep_contents); + bool parseString(const std::string &string, LLXmlTreeNode** root, bool keep_contents); protected: const std::string& tabs(); diff --git a/indra/newview/NACLantispam.cpp b/indra/newview/NACLantispam.cpp index 9b5e709f10..cd8705e826 100644 --- a/indra/newview/NACLantispam.cpp +++ b/indra/newview/NACLantispam.cpp @@ -337,7 +337,7 @@ void NACLAntiSpamRegistry::blockGlobalEntry(const LLUUID& source) } bool NACLAntiSpamRegistry::checkQueue(EAntispamQueue queue, const LLUUID& source, EAntispamSource sourcetype, U32 multiplier) -// returns TRUE if blocked, FALSE otherwise +// returns true if blocked, false otherwise { // skip all checks if we're we've been administratively turned off static LLCachedControl useAntiSpam(gSavedSettings, "UseAntiSpam"); diff --git a/indra/newview/NACLfloaterexploresounds.cpp b/indra/newview/NACLfloaterexploresounds.cpp index a09e6eaa04..88a1dd112b 100644 --- a/indra/newview/NACLfloaterexploresounds.cpp +++ b/indra/newview/NACLfloaterexploresounds.cpp @@ -400,9 +400,9 @@ void NACLFloaterExploreSounds::handleLookAt() cam += pos_global; cam += LLVector3d(0.0, 0.0, 3.0); - gAgentCamera.setFocusOnAvatar(FALSE, FALSE); + gAgentCamera.setFocusOnAvatar(false, false); gAgentCamera.setCameraPosAndFocusGlobal(cam, pos_global, item.mSourceID); - gAgentCamera.setCameraAnimating(FALSE); + gAgentCamera.setCameraAnimating(false); } void NACLFloaterExploreSounds::handleStop() diff --git a/indra/newview/animationexplorer.cpp b/indra/newview/animationexplorer.cpp index f0271aad47..6d87690d2d 100644 --- a/indra/newview/animationexplorer.cpp +++ b/indra/newview/animationexplorer.cpp @@ -541,7 +541,7 @@ bool AnimationExplorer::handleMouseDown(S32 x, S32 y, MASK mask) // Copied from llfloaterbvhpreview.cpp bool AnimationExplorer::handleMouseUp(S32 x, S32 y, MASK mask) { - gFocusMgr.setMouseCapture(FALSE); + gFocusMgr.setMouseCapture(nullptr); gViewerWindow->showCursor(); return LLFloater::handleMouseUp(x, y, mask); } diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index 13d3e57a09..af598bae9e 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -100,7 +100,7 @@ void FloaterAO::updateAnimationList() if (!mSelectedSet) { - mStateSelector->setEnabled(FALSE); + mStateSelector->setEnabled(false); mStateSelector->add(getString("ao_no_animations_loaded")); return; } @@ -109,7 +109,7 @@ void FloaterAO::updateAnimationList() { const std::string& stateName = mSelectedSet->mStateNames[index]; AOSet::AOState* state = mSelectedSet->getStateByName(stateName); - mStateSelector->add(stateName, state, ADD_BOTTOM, TRUE); + mStateSelector->add(stateName, state, ADD_BOTTOM, true); } enableStateControls(true); @@ -128,7 +128,7 @@ void FloaterAO::updateAnimationList() void FloaterAO::updateList() { - mReloadButton->setEnabled(TRUE); + mReloadButton->setEnabled(true); mImportRunning = false; // Lambda provides simple Alpha sorting, note this is case sensitive. @@ -159,7 +159,7 @@ void FloaterAO::updateList() mSetSelectorSmall->add(getString("ao_no_sets_loaded")); mSetSelector->selectNthItem(0); mSetSelectorSmall->selectNthItem(0); - enableSetControls(FALSE); + enableSetControls(false); return; } @@ -182,8 +182,8 @@ void FloaterAO::updateList() for (auto index = 0; index < mSetList.size(); ++index) { std::string setName = mSetList[index]->getName(); - mSetSelector->add(setName, &mSetList[index], ADD_BOTTOM, TRUE); - mSetSelectorSmall->add(setName, &mSetList[index], ADD_BOTTOM, TRUE); + mSetSelector->add(setName, &mSetList[index], ADD_BOTTOM, true); + mSetSelectorSmall->add(setName, &mSetList[index], ADD_BOTTOM, true); if (setName.compare(currentSetName) == 0) { selected_index = index; @@ -196,7 +196,7 @@ void FloaterAO::updateList() mSetSelector->selectNthItem(selected_index); mSetSelectorSmall->selectNthItem(selected_index); - enableSetControls(TRUE); + enableSetControls(true); if (mSetSelector->getSelectedItemLabel().empty()) { onClickReload(); @@ -250,7 +250,7 @@ bool FloaterAO::postBuild() mSmartCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckSmart, this)); mDisableMouselookCheckBox->setCommitCallback(boost::bind(&FloaterAO::onCheckDisableStands, this)); - mAnimationList->setCommitOnSelectionChange(TRUE); + mAnimationList->setCommitOnSelectionChange(true); mStateSelector->setCommitCallback(boost::bind(&FloaterAO::onSelectState, this)); mAnimationList->setCommitCallback(boost::bind(&FloaterAO::onChangeAnimationSelection, this)); @@ -404,7 +404,7 @@ void FloaterAO::onRenameSet() { if (AOEngine::instance().renameSet(mSelectedSet, name)) { - reloading(TRUE); + reloading(true); return; } } @@ -446,7 +446,7 @@ void FloaterAO::onSelectState() mAnimationList->deleteAllItems(); mCurrentBoldItem = nullptr; mAnimationList->setCommentText(getString("ao_no_animations_loaded")); - mAnimationList->setEnabled(FALSE); + mAnimationList->setEnabled(false); onChangeAnimationSelection(); @@ -483,7 +483,7 @@ void FloaterAO::onSelectState() } mAnimationList->setCommentText(""); - mAnimationList->setEnabled(TRUE); + mAnimationList->setEnabled(true); } mCycleCheckBox->setValue(mSelectedState->mCycle); @@ -627,8 +627,8 @@ void FloaterAO::onChangeAnimationSelection() std::vector list = mAnimationList->getAllSelected(); LL_DEBUGS("AOEngine") << "Selection count: " << list.size() << LL_ENDL; - BOOL resortEnable = FALSE; - BOOL trashEnable = FALSE; + bool resortEnable = false; + bool trashEnable = false; // Linden Lab bug: scroll lists still select the first item when you click on them, even when they are disabled. // The control does not memorize it's enabled/disabled state, so mAnimationList->mEnabled() doesn't seem to work. @@ -642,9 +642,9 @@ void FloaterAO::onChangeAnimationSelection() { if (list.size() == 1) { - resortEnable = TRUE; + resortEnable = true; } - trashEnable = TRUE; + trashEnable = true; } mMoveDownButton->setEnabled(resortEnable); @@ -726,7 +726,7 @@ void FloaterAO::onClickTrash() void FloaterAO::updateCycleParameters() { - BOOL enabled = mCycleCheckBox->getValue().asBoolean(); + bool enabled = mCycleCheckBox->getValue().asBoolean(); mRandomizeCheckBox->setEnabled(enabled); mCycleTimeTextLabel->setEnabled(enabled); mCycleTimeSpinner->setEnabled(enabled); @@ -784,11 +784,11 @@ void FloaterAO::onClickMore() mMore = true; - mSmallInterfacePanel->setVisible(FALSE); - mMainInterfacePanel->setVisible(TRUE); - setCanResize(TRUE); + mSmallInterfacePanel->setVisible(false); + mMainInterfacePanel->setVisible(true); + setCanResize(true); - gSavedPerAccountSettings.setBOOL("UseFullAOInterface", TRUE); + gSavedPerAccountSettings.setBOOL("UseFullAOInterface", true); reshape(getRect().getWidth(), fullSize.getHeight()); } @@ -803,11 +803,11 @@ void FloaterAO::onClickLess() mMore = false; - mSmallInterfacePanel->setVisible(TRUE); - mMainInterfacePanel->setVisible(FALSE); - setCanResize(FALSE); + mSmallInterfacePanel->setVisible(true); + mMainInterfacePanel->setVisible(false); + setCanResize(false); - gSavedPerAccountSettings.setBOOL("UseFullAOInterface", FALSE); + gSavedPerAccountSettings.setBOOL("UseFullAOInterface", false); reshape(getRect().getWidth(), smallSize.getHeight()); diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index 3064d45798..5114ebffe0 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -78,8 +78,8 @@ AOEngine::~AOEngine() void AOEngine::init() { - BOOL do_enable = gSavedPerAccountSettings.getBOOL("UseAO"); - BOOL do_enable_stands = gSavedPerAccountSettings.getBOOL("UseAOStands"); + bool do_enable = gSavedPerAccountSettings.getBOOL("UseAO"); + bool do_enable_stands = gSavedPerAccountSettings.getBOOL("UseAOStands"); if (do_enable) { // enable_stands() calls enable(), but we need to set the @@ -107,7 +107,7 @@ void AOEngine::onToggleAOControl() if (mEnabled) { // Enabling the AO always enables stands to start with - gSavedPerAccountSettings.setBOOL("UseAOStands", TRUE); + gSavedPerAccountSettings.setBOOL("UseAOStands", true); } } @@ -237,7 +237,7 @@ bool AOEngine::foreignAnimations() // get the source's root prim LLViewerObject* sourceRoot = dynamic_cast(source->getRoot()); - // if the root prim is the same as the animation source, report back as TRUE + // if the root prim is the same as the animation source, report back as true if (sourceRoot && sourceRoot->getID() == seat) { LL_DEBUGS("AOEngine") << "foreign animation " << animation_id << " found on seat." << LL_ENDL; @@ -985,8 +985,8 @@ void AOEngine::updateSortOrder(AOSet::AOState* state) LLPointer newItem = new LLViewerInventoryItem(item); newItem->setDescription(numStr.str()); - newItem->setComplete(TRUE); - newItem->updateServer(FALSE); + newItem->setComplete(true); + newItem->updateServer(false); gInventory.updateItem(newItem); } @@ -1002,8 +1002,8 @@ void AOEngine::addSet(const std::string& name, inventory_func_type callback, boo return; } - BOOL wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); - gSavedPerAccountSettings.setBOOL("LockAOFolders", FALSE); + bool wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); + gSavedPerAccountSettings.setBOOL("LockAOFolders", false); LL_DEBUGS("AOEngine") << "adding set folder " << name << LL_ENDL; gInventory.createNewCategory(mAOFolder, LLFolderType::FT_NONE, name, [callback, wasProtected](const LLUUID &new_cat_id) { @@ -1047,8 +1047,8 @@ void AOEngine::addAnimation(const AOSet* set, AOSet::AOState* state, const LLInv anim.mSortOrder = state->mAnimations.size() + 1; state->mAnimations.emplace_back(std::move(anim)); - BOOL wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); - gSavedPerAccountSettings.setBOOL("LockAOFolders", FALSE); + bool wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); + gSavedPerAccountSettings.setBOOL("LockAOFolders", false); bool success = createAnimationLink(state, item); gSavedPerAccountSettings.setBOOL("LockAOFolders", wasProtected); @@ -1073,7 +1073,7 @@ void AOEngine::addAnimation(const AOSet* set, AOSet::AOState* state, const LLInv gInventory.createNewCategory(set->getInventoryUUID(), LLFolderType::FT_NONE, state->mName, [this, state, reload, wasProtected](const LLUUID &new_cat_id) { state->mInventoryUUID = new_cat_id; - gSavedPerAccountSettings.setBOOL("LockAOFolders", FALSE); + gSavedPerAccountSettings.setBOOL("LockAOFolders", false); // add all queued animations to this state's folder and then clear the queue for (const auto item : state->mAddQueue) @@ -1113,8 +1113,8 @@ bool AOEngine::findForeignItems(const LLUUID& uuid) const } // count backwards in case we have to remove items - BOOL wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); - gSavedPerAccountSettings.setBOOL("LockAOFolders", FALSE); + bool wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); + gSavedPerAccountSettings.setBOOL("LockAOFolders", false); if (items) { @@ -1159,8 +1159,8 @@ bool AOEngine::findForeignItems(const LLUUID& uuid) const void AOEngine::purgeFolder(const LLUUID& uuid) const { // unprotect it - BOOL wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); - gSavedPerAccountSettings.setBOOL("LockAOFolders", FALSE); + bool wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); + gSavedPerAccountSettings.setBOOL("LockAOFolders", false); // move everything that's not an animation link to "lost and found" if (findForeignItems(uuid)) @@ -1691,12 +1691,12 @@ void AOEngine::saveSet(const AOSet* set) LLViewerInventoryCategory* cat=gInventory.getCategory(set->getInventoryUUID()); LL_WARNS("AOEngine") << cat << LL_ENDL; cat->rename(setParams); - cat->updateServer(FALSE); + cat->updateServer(false); gInventory.addChangedMask(LLInventoryObserver::LABEL, cat->getUUID()); gInventory.notifyObservers(); */ - BOOL wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); - gSavedPerAccountSettings.setBOOL("LockAOFolders", FALSE); + bool wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); + gSavedPerAccountSettings.setBOOL("LockAOFolders", false); rename_category(&gInventory, set->getInventoryUUID(), setParams); gSavedPerAccountSettings.setBOOL("LockAOFolders", wasProtected); @@ -1735,8 +1735,8 @@ void AOEngine::saveState(const AOSet::AOState* state) stateParams += ":RN"; } - BOOL wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); - gSavedPerAccountSettings.setBOOL("LockAOFolders", FALSE); + bool wasProtected = gSavedPerAccountSettings.getBOOL("LockAOFolders"); + gSavedPerAccountSettings.setBOOL("LockAOFolders", false); rename_category(&gInventory, state->mInventoryUUID, stateParams); gSavedPerAccountSettings.setBOOL("LockAOFolders", wasProtected); } @@ -2021,7 +2021,7 @@ bool AOEngine::importNotecard(const LLInventoryItem* item) item->getType(), &onNotecardLoadComplete, (void*) newUUID, - TRUE + true ); return true; @@ -2050,7 +2050,7 @@ void AOEngine::onNotecardLoadComplete(const LLUUID& assetUUID, LLAssetType::ETyp char* buffer = new char[notecardSize + 1]; buffer[notecardSize] = 0; - BOOL ret = file.read((U8*)buffer, notecardSize); + bool ret = file.read((U8*)buffer, notecardSize); if (ret) { AOEngine::instance().parseNotecard(buffer); @@ -2426,7 +2426,7 @@ bool AOTimerCollection::tick() AOEngine::instance().processImport(true); } - // always return FALSE or the LLEventTimer will be deleted -> crash + // always return false or the LLEventTimer will be deleted -> crash return false; } diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index 1c9ffa39e9..2d0c685f9b 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -77,7 +77,7 @@ LLViewerInventoryItem::item_array_t findInventoryInFolder(std::string_view ifold LLUUID folder = gInventory.findCategoryByName(static_cast(ifolder)); LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; - gInventory.collectDescendents(folder, cats, items, FALSE); + gInventory.collectDescendents(folder, cats, items, false); return items; } @@ -529,7 +529,7 @@ static void invrepair() { LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; - gInventory.collectDescendents(gInventory.getRootFolderID(), cats, items, FALSE); + gInventory.collectDescendents(gInventory.getRootFolderID(), cats, items, false); } static void key_to_name_callback(const LLUUID& id, const LLAvatarName& av_name) @@ -598,7 +598,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest if (from_gesture) { report_to_nearby_chat(LLTrans::getString("DrawDistanceSteppingGestureObsolete")); - gSavedSettings.setBOOL("FSRenderFarClipStepping", TRUE); + gSavedSettings.setBOOL("FSRenderFarClipStepping", true); return false; } F32 drawDist; @@ -683,7 +683,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest if (status == "on") { - gSavedPerAccountSettings.setBOOL("UseAO", TRUE); + gSavedPerAccountSettings.setBOOL("UseAO", true); // send appropriate enable/disable messages to nearby chat - FIRE-24160 if (!aoWasEnabled) @@ -693,7 +693,7 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest } else if (status == "off") { - gSavedPerAccountSettings.setBOOL("UseAO", FALSE); + gSavedPerAccountSettings.setBOOL("UseAO", false); // send appropriate enable/disable messages to nearby chat - FIRE-24160 if (aoWasEnabled) @@ -709,11 +709,11 @@ bool cmd_line_chat(std::string_view revised_text, EChatType type, bool from_gest { if (status == "off") { - AOEngine::instance().setOverrideSits(tmp, TRUE); + AOEngine::instance().setOverrideSits(tmp, true); } else if (status == "on") { - AOEngine::instance().setOverrideSits(tmp, FALSE); + AOEngine::instance().setOverrideSits(tmp, false); } } else @@ -1815,7 +1815,7 @@ void cmdline_rezplat(bool use_saved_value, F32 visual_radius) //cmdline_rezplat( msg->addVector3Fast(_PREHASH_RayStart, rezpos); msg->addVector3Fast(_PREHASH_RayEnd, rezpos); msg->addU8Fast(_PREHASH_BypassRaycast, (U8)1); - msg->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)FALSE); + msg->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)0); msg->addU8Fast(_PREHASH_State, 0); msg->addUUIDFast(_PREHASH_RayTargetID, LLUUID::null); msg->sendReliable(gAgent.getRegionHost()); diff --git a/indra/newview/daeexport.cpp b/indra/newview/daeexport.cpp index 5a71d9554b..80d086e484 100644 --- a/indra/newview/daeexport.cpp +++ b/indra/newview/daeexport.cpp @@ -377,7 +377,7 @@ ColladaExportFloater::CacheReadResponder::CacheReadResponder(const LLUUID& id, L setImage(image); } -void ColladaExportFloater::CacheReadResponder::setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal) +void ColladaExportFloater::CacheReadResponder::setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal) { if (imageformat == IMG_CODEC_TGA && mFormattedImage->getCodec() == IMG_CODEC_J2C) { diff --git a/indra/newview/daeexport.h b/indra/newview/daeexport.h index 7659516424..e6e5a0c615 100644 --- a/indra/newview/daeexport.h +++ b/indra/newview/daeexport.h @@ -164,7 +164,7 @@ private: public: CacheReadResponder(const LLUUID& id, LLImageFormatted* image, std::string name, S32 img_type); - void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal); + void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal); virtual void completed(bool success); static void saveTexturesWorker(void* data); }; diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp index b913170b9f..47d9abfe22 100644 --- a/indra/newview/fsareasearch.cpp +++ b/indra/newview/fsareasearch.cpp @@ -773,7 +773,7 @@ void FSAreaSearch::processObjectProperties(LLMessageSystem* msg) details.permissions.init(details.creator_id, details.owner_id, details.last_owner_id, details.group_id); details.permissions.initMasks(details.base_mask, details.owner_mask, details.everyone_mask, details.group_mask, details.next_owner_mask); - // Sets the group owned BOOL and real owner id, group or owner depending if object is group owned. + // Sets the group owned bool and real owner id, group or owner depending if object is group owned. details.permissions.getOwnership(details.ownership_id, details.group_owned); LL_DEBUGS("FSAreaSearch_spammy") << "Got properties for object: " << object_id << LL_ENDL; @@ -1520,7 +1520,7 @@ void FSPanelAreaSearchList::updateResultListColumns() U32 column_config = gSavedSettings.getU32("FSAreaSearchColumnConfig"); std::vector column_params = mResultList->getColumnInitParams(); std::string current_sort_col = mResultList->getSortColumnName(); - BOOL current_sort_asc = mResultList->getSortAscending(); + bool current_sort_asc = mResultList->getSortAscending(); mResultList->clearColumns(); mResultList->updateLayout(); @@ -1667,13 +1667,13 @@ bool FSPanelAreaSearchList::onContextMenuItemClick(const LLSD& userdata) if (action == "select_all") { std::vector result_items = mResultList->getAllData(); - std::for_each(result_items.begin(), result_items.end(), [](LLScrollListItem* item) { item->setSelected(TRUE); }); + std::for_each(result_items.begin(), result_items.end(), [](LLScrollListItem* item) { item->setSelected(true); }); return true; } if (action == "clear_selection") { std::vector selected_items = mResultList->getAllSelected(); - std::for_each(selected_items.begin(), selected_items.end(), [](LLScrollListItem* item) { item->setSelected(FALSE); }); + std::for_each(selected_items.begin(), selected_items.end(), [](LLScrollListItem* item) { item->setSelected(false); }); return true; } if (action == "filter_my_objects") @@ -1785,7 +1785,7 @@ bool FSPanelAreaSearchList::onContextMenuItemClick(const LLSD& userdata) LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); // Fixes an edge case where if the user has JUST disabled flycam themselves, the camera gets stuck waiting for input. - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setLookAt(LOOKAT_TARGET_SELECT, objectp); @@ -1921,7 +1921,7 @@ bool FSPanelAreaSearchList::onContextMenuItemClick(const LLSD& userdata) } FSObjectProperties& details = mFSAreaSearch->mObjectDetails[object_id]; - node->mValid = TRUE; + node->mValid = true; node->mPermissions->init(details.creator_id, details.owner_id, details.last_owner_id, details.group_id); node->mPermissions->initMasks(details.base_mask, details.owner_mask, details.everyone_mask, details.group_mask, details.next_owner_mask); node->mAggregatePerm = details.ag_perms; @@ -1977,7 +1977,7 @@ void FSPanelAreaSearchList::buyObject(FSObjectProperties& details, LLViewerObjec if (node) { - node->mValid = TRUE; + node->mValid = true; node->mPermissions->init(details.creator_id, details.owner_id, details.last_owner_id, details.group_id); node->mPermissions->initMasks(details.base_mask, details.owner_mask, details.everyone_mask, details.group_mask, details.next_owner_mask); node->mSaleInfo = details.sale_info; @@ -2188,13 +2188,13 @@ void FSPanelAreaSearchFilter::onCommitCheckbox() if (mCheckboxExcludePhysics->get()) { mFSAreaSearch->setFilterPhysical(false); - mCheckboxPhysical->set(FALSE); - mCheckboxPhysical->setEnabled(FALSE); + mCheckboxPhysical->set(false); + mCheckboxPhysical->setEnabled(false); mFSAreaSearch->setExcludePhysics(true); } else { - mCheckboxPhysical->setEnabled(TRUE); + mCheckboxPhysical->setEnabled(true); mFSAreaSearch->setExcludePhysics(false); } mFSAreaSearch->setFilterPhysical(mCheckboxPhysical->get()); @@ -2202,13 +2202,13 @@ void FSPanelAreaSearchFilter::onCommitCheckbox() if (mCheckboxExcludetemporary->get()) { mFSAreaSearch->setFilterTemporary(false); - mCheckboxTemporary->set(FALSE); - mCheckboxTemporary->setEnabled(FALSE); + mCheckboxTemporary->set(false); + mCheckboxTemporary->setEnabled(false); mFSAreaSearch->setExcludetemporary(true); } else { - mCheckboxTemporary->setEnabled(TRUE); + mCheckboxTemporary->setEnabled(true); mFSAreaSearch->setExcludetemporary(false); } mFSAreaSearch->setFilterTemporary(mCheckboxTemporary->get()); @@ -2216,13 +2216,13 @@ void FSPanelAreaSearchFilter::onCommitCheckbox() if (mCheckboxExcludeAttachment->get()) { mFSAreaSearch->setFilterAttachment(false); - mCheckboxAttachment->set(FALSE); - mCheckboxAttachment->setEnabled(FALSE); + mCheckboxAttachment->set(false); + mCheckboxAttachment->setEnabled(false); mFSAreaSearch->setExcludeAttachment(true); } else { - mCheckboxAttachment->setEnabled(TRUE); + mCheckboxAttachment->setEnabled(true); mFSAreaSearch->setExcludeAttachment(false); } mFSAreaSearch->setFilterAttachment(mCheckboxAttachment->get()); diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index 0a389f6e0e..8cbd6d3943 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -104,7 +104,7 @@ public: } LLUUID object_id; - if (!object_id.set(params[0], FALSE)) + if (!object_id.set(params[0], false)) { return false; } @@ -651,7 +651,7 @@ public: if (mInfoCtrl) { mInfoCtrl->setCommitCallback(boost::bind(&FSChatHistoryHeader::onClickInfoCtrl, mInfoCtrl)); - mInfoCtrl->setVisible(FALSE); + mInfoCtrl->setVisible(false); } else { @@ -777,7 +777,7 @@ public: updateMinUserNameWidth(); LLColor4 sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor"); setTransparentColor(sep_color); - mTimeBoxTextBox->setVisible(FALSE); + mTimeBoxTextBox->setVisible(false); } else if (chat.mFromName.empty() //|| mSourceType == CHAT_SOURCE_SYSTEM @@ -960,7 +960,7 @@ public: mUserNameTextBox->reshape(user_name_rect.getWidth(), user_name_rect.getHeight()); mUserNameTextBox->setRect(user_name_rect); - mTimeBoxTextBox->setVisible(TRUE); + mTimeBoxTextBox->setVisible(true); } LLPanel::draw(); @@ -1142,7 +1142,7 @@ protected: void hideInfoCtrl() { - mInfoCtrl->setVisible(FALSE); + mInfoCtrl->setVisible(false); } private: @@ -1290,7 +1290,7 @@ void FSChatHistory::updateChatInputLine() } #if LL_SDL2 -void FSChatHistory::setFocus(BOOL b) +void FSChatHistory::setFocus(bool b) { LLTextEditor::setFocus(b); diff --git a/indra/newview/fschathistory.h b/indra/newview/fschathistory.h index c2b97151b4..68e2ab8c60 100644 --- a/indra/newview/fschathistory.h +++ b/indra/newview/fschathistory.h @@ -104,7 +104,7 @@ class FSChatHistory : public LLTextEditor // FIRE-8600: TAB out of chat #if LL_SDL2 // IME - International input compositing, i.e. for Japanese / Chinese text input - /* virtual */ void setFocus(BOOL b); + /* virtual */ void setFocus(bool b); #endif LLSD getValue() const; diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp index 4a35c0def6..0c6778079c 100644 --- a/indra/newview/fscommon.cpp +++ b/indra/newview/fscommon.cpp @@ -224,7 +224,7 @@ void FSCommon::applyDefaultBuildPreferences(LLViewerObject* object) { if (item->getType() == LLAssetType::AT_LSL_TEXT) { - LLToolDragAndDrop::dropScript(object, item, TRUE, + LLToolDragAndDrop::dropScript(object, item, true, LLToolDragAndDrop::SOURCE_AGENT, gAgentID); } @@ -251,7 +251,7 @@ void FSCommon::applyDefaultBuildPreferences(LLViewerObject* object) gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID); gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); gMessageSystem->nextBlockFast(_PREHASH_HeaderData); - gMessageSystem->addBOOLFast(_PREHASH_Override, FALSE); + gMessageSystem->addBOOLFast(_PREHASH_Override, false); gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object_local_id); gMessageSystem->addU8Fast(_PREHASH_Field, PERM_NEXT_OWNER); @@ -278,7 +278,7 @@ void FSCommon::applyDefaultBuildPreferences(LLViewerObject* object) gMessageSystem->addBOOLFast(_PREHASH_UsePhysics, gSavedSettings.getBOOL("FSBuildPrefs_Physical")); gMessageSystem->addBOOL(_PREHASH_IsTemporary, gSavedSettings.getBOOL("FSBuildPrefs_Temporary")); gMessageSystem->addBOOL(_PREHASH_IsPhantom, gSavedSettings.getBOOL("FSBuildPrefs_Phantom")); - gMessageSystem->addBOOL("CastsShadows", FALSE); + gMessageSystem->addBOOL("CastsShadows", false); gMessageSystem->sendReliable(object->getRegion()->getHost()); } diff --git a/indra/newview/fsdata.cpp b/indra/newview/fsdata.cpp index ba78bafaf2..cd13fc516b 100644 --- a/indra/newview/fsdata.cpp +++ b/indra/newview/fsdata.cpp @@ -943,7 +943,7 @@ void FSData::sendInfo(const LLUUID& destination, const LLUUID& sessionid, const pack_instant_message( gMessageSystem, gAgentID, - FALSE, + false, gAgentSessionID, destination, my_name, @@ -956,7 +956,7 @@ void FSData::sendInfo(const LLUUID& destination, const LLUUID& sessionid, const pack_instant_message( gMessageSystem, gAgentID, - FALSE, + false, gAgentSessionID, destination, my_name, @@ -992,7 +992,7 @@ void FSData::callbackReqInfo(const LLSD ¬ification, const LLSD &response) pack_instant_message( gMessageSystem, gAgentID, - FALSE, + false, gAgentSessionID, from_id, my_name, diff --git a/indra/newview/fsfloateravatarrendersettings.cpp b/indra/newview/fsfloateravatarrendersettings.cpp index ff39e8639f..2737390c99 100644 --- a/indra/newview/fsfloateravatarrendersettings.cpp +++ b/indra/newview/fsfloateravatarrendersettings.cpp @@ -170,10 +170,10 @@ void FSFloaterAvatarRenderSettings::onClickAdd(const LLSD& userdata) render_setting = LLVOAvatar::AV_ALWAYS_RENDER; } - LLView* button = findChild("plus_btn", TRUE); + LLView* button = findChild("plus_btn", true); LLFloater* root_floater = gFloaterView->getParentFloater(this); LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&FSFloaterAvatarRenderSettings::callbackAvatarPicked, this, _1, render_setting), - TRUE, TRUE, TRUE, root_floater->getName(), button); + true, true, true, root_floater->getName(), button); if (root_floater) { diff --git a/indra/newview/fsfloatercontacts.cpp b/indra/newview/fsfloatercontacts.cpp index 124e899a68..2a5fab8813 100644 --- a/indra/newview/fsfloatercontacts.cpp +++ b/indra/newview/fsfloatercontacts.cpp @@ -208,7 +208,7 @@ bool FSFloaterContacts::handleKeyHere(KEY key, MASK mask) } else if (getActiveTabName() == GROUP_TAB_NAME) { - mGroupFilter->setFocus(TRUE); + mGroupFilter->setFocus(true); return true; } } @@ -390,7 +390,7 @@ void FSFloaterContacts::onAvatarPicked(const uuid_vec_t& ids, const std::vector< void FSFloaterContacts::onAddFriendWizButtonClicked(LLUICtrl* ctrl) { // Show add friend wizard. - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&FSFloaterContacts::onAvatarPicked, _1, _2), FALSE, TRUE, TRUE, "", ctrl); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&FSFloaterContacts::onAvatarPicked, _1, _2), false, true, true, "", ctrl); // Need to disable 'ok' button when friend occurs in selection if (picker) { @@ -531,16 +531,16 @@ void FSFloaterContacts::sortFriendList() mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mName; mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mName; mFriendsList->getColumn(LIST_FRIEND_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mName; - mFriendsList->sortByColumn(std::string("display_name"), TRUE); + mFriendsList->sortByColumn(std::string("display_name"), true); } else { mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mName; mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mName; mFriendsList->getColumn(LIST_FRIEND_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mName; - mFriendsList->sortByColumn(std::string("user_name"), TRUE); + mFriendsList->sortByColumn(std::string("user_name"), true); } - mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); + mFriendsList->sortByColumn(std::string("icon_online_status"), false); } @@ -778,7 +778,7 @@ void FSFloaterContacts::updateFriendItem(const LLUUID& agent_id, const LLRelatio itemp->getColumn(LIST_FRIEND_UPDATE_GEN)->setValue(change_generation); // enable this item, in case it was disabled after user input - itemp->setEnabled(TRUE); + itemp->setEnabled(true); } void FSFloaterContacts::updateFriendItem(const LLUUID& agent_id, const LLRelationship* relationship, const LLUUID& request_id) @@ -1007,7 +1007,7 @@ void FSFloaterContacts::applyRightsToFriends() rights &= ~LLRelationship::GRANT_ONLINE_STATUS; rights &= ~LLRelationship::GRANT_MAP_LOCATION; // propagate rights constraint to UI - (*itr)->getColumn(LIST_VISIBLE_MAP)->setValue(FALSE); + (*itr)->getColumn(LIST_VISIBLE_MAP)->setValue(false); } } if (buddy_relationship->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION) != show_map_location) @@ -1018,7 +1018,7 @@ void FSFloaterContacts::applyRightsToFriends() // ONLINE_STATUS necessary for MAP_LOCATION rights |= LLRelationship::GRANT_MAP_LOCATION; rights |= LLRelationship::GRANT_ONLINE_STATUS; - (*itr)->getColumn(LIST_VISIBLE_ONLINE)->setValue(TRUE); + (*itr)->getColumn(LIST_VISIBLE_ONLINE)->setValue(false); } else { @@ -1049,7 +1049,7 @@ void FSFloaterContacts::applyRightsToFriends() rights_updates.insert(std::make_pair(id, rights)); // disable these ui elements until response from server // to avoid race conditions - (*itr)->setEnabled(FALSE); + (*itr)->setEnabled(false); } } @@ -1235,16 +1235,16 @@ void FSFloaterContacts::onColumnDisplayModeChanged(const std::string& settings_n mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mName; mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mName; mFriendsList->getColumn(LIST_FRIEND_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mName; - mFriendsList->sortByColumn(std::string("display_name"), TRUE); + mFriendsList->sortByColumn(std::string("display_name"), true); } else { mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mName; mFriendsList->getColumn(LIST_FRIEND_DISPLAY_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mName; mFriendsList->getColumn(LIST_FRIEND_NAME)->mSortingColumn = mFriendsList->getColumn(LIST_FRIEND_USER_NAME)->mName; - mFriendsList->sortByColumn(std::string("user_name"), TRUE); + mFriendsList->sortByColumn(std::string("user_name"), true); } - mFriendsList->sortByColumn(std::string("icon_online_status"), FALSE); + mFriendsList->sortByColumn(std::string("icon_online_status"), false); mFriendsList->setSearchColumn(mFriendsList->getColumn("full_name")->mIndex); } @@ -1309,7 +1309,7 @@ void FSFloaterContacts::disconnectAvatarNameCacheConnection(const LLUUID& reques } } -BOOL FSFloaterContacts::handleFriendsListDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, +bool FSFloaterContacts::handleFriendsListDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1342,7 +1342,7 @@ BOOL FSFloaterContacts::handleFriendsListDragAndDrop(S32 x, S32 y, MASK mask, BO } } - return TRUE; + return true; } void FSFloaterContacts::onFriendFilterEdit(const std::string& search_string) diff --git a/indra/newview/fsfloatercontacts.h b/indra/newview/fsfloatercontacts.h index 39806b9b71..1d73528596 100644 --- a/indra/newview/fsfloatercontacts.h +++ b/indra/newview/fsfloatercontacts.h @@ -114,7 +114,7 @@ private: // misc callbacks static void onAvatarPicked(const uuid_vec_t& ids, const std::vector names); void onColumnDisplayModeChanged(const std::string& settings_name = ""); - BOOL handleFriendsListDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, + bool handleFriendsListDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/fsfloatercontactsetconfiguration.cpp b/indra/newview/fsfloatercontactsetconfiguration.cpp index 839a1c48dc..ca49d8e0bc 100644 --- a/indra/newview/fsfloatercontactsetconfiguration.cpp +++ b/indra/newview/fsfloatercontactsetconfiguration.cpp @@ -82,8 +82,8 @@ void FSFloaterContactSetConfiguration::draw() void FSFloaterContactSetConfiguration::onOpen(const LLSD& target_set) { - mSetSwatch->set(LGGContactSets::getInstance()->getSetColor(mContactSet), TRUE); - mGlobalSwatch->set(LGGContactSets::getInstance()->getDefaultColor(), TRUE); + mSetSwatch->set(LGGContactSets::getInstance()->getSetColor(mContactSet), true); + mGlobalSwatch->set(LGGContactSets::getInstance()->getDefaultColor(), true); mNotificationCheckBox->set(LGGContactSets::getInstance()->getNotifyForSet(mContactSet)); } diff --git a/indra/newview/fsfloaterdiscord.cpp b/indra/newview/fsfloaterdiscord.cpp index 488e68a1e6..9411a390d3 100644 --- a/indra/newview/fsfloaterdiscord.cpp +++ b/indra/newview/fsfloaterdiscord.cpp @@ -118,8 +118,8 @@ void FSFloaterDiscord::showConnectButton() { if (!mConnectButton->getVisible()) { - mConnectButton->setVisible(TRUE); - mDisconnectButton->setVisible(FALSE); + mConnectButton->setVisible(true); + mDisconnectButton->setVisible(false); } } @@ -127,8 +127,8 @@ void FSFloaterDiscord::hideConnectButton() { if (mConnectButton->getVisible()) { - mConnectButton->setVisible(FALSE); - mDisconnectButton->setVisible(TRUE); + mConnectButton->setVisible(false); + mDisconnectButton->setVisible(true); } } diff --git a/indra/newview/fsfloaterexport.cpp b/indra/newview/fsfloaterexport.cpp index c64a1afd23..51e4f3b032 100644 --- a/indra/newview/fsfloaterexport.cpp +++ b/indra/newview/fsfloaterexport.cpp @@ -187,7 +187,7 @@ void FSFloaterObjectExport::onIdle() LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(texture_id, FTT_DEFAULT, MIPMAP_TRUE); image->setBoostLevel(LLViewerTexture::BOOST_MAX_LEVEL); image->forceToSaveRawImage(0); - image->setLoadedCallback(FSFloaterObjectExport::onImageLoaded, 0, TRUE, FALSE, this, &mCallbackTextureList); + image->setLoadedCallback(FSFloaterObjectExport::onImageLoaded, 0, true, false, this, &mCallbackTextureList); LL_DEBUGS("export") << "re-requested texture " << texture_id.asString() << LL_ENDL; } @@ -669,13 +669,13 @@ bool FSFloaterObjectExport::exportTexture(const LLUUID& texture_id) LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(texture_id, FTT_DEFAULT, MIPMAP_TRUE); image->setBoostLevel(LLViewerTexture::BOOST_MAX_LEVEL); image->forceToSaveRawImage(0); - image->setLoadedCallback(FSFloaterObjectExport::onImageLoaded, 0, TRUE, FALSE, this, &mCallbackTextureList); + image->setLoadedCallback(FSFloaterObjectExport::onImageLoaded, 0, true, false, this, &mCallbackTextureList); return true; } // static -void FSFloaterObjectExport::onImageLoaded(BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +void FSFloaterObjectExport::onImageLoaded(bool success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata) { if(final && success) { @@ -822,7 +822,7 @@ void FSFloaterObjectExport::inventoryChanged(LLViewerObject* object, LLInventory item->getType(), onLoadComplete, data, - TRUE); + true); } else { @@ -830,7 +830,7 @@ void FSFloaterObjectExport::inventoryChanged(LLViewerObject* object, LLInventory item->getType(), onLoadComplete, data, - TRUE); + true); } } } @@ -936,7 +936,7 @@ void FSFloaterObjectExport::onLoadComplete(const LLUUID& asset_uuid, LLAssetType LLAssetType::AT_ANIMATION, onLoadComplete, anim_data, - TRUE); + true); } break; case STEP_SOUND: @@ -959,7 +959,7 @@ void FSFloaterObjectExport::onLoadComplete(const LLUUID& asset_uuid, LLAssetType LLAssetType::AT_SOUND, onLoadComplete, sound_data, - TRUE); + true); } break; default: @@ -1245,7 +1245,7 @@ mParent(parent) setImage(image); } -void FSFloaterObjectExport::FSExportCacheReadResponder::setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal) +void FSFloaterObjectExport::FSExportCacheReadResponder::setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal) { if (imageformat != IMG_CODEC_J2C) { diff --git a/indra/newview/fsfloaterexport.h b/indra/newview/fsfloaterexport.h index 2e1de3958c..9d87cbe91b 100644 --- a/indra/newview/fsfloaterexport.h +++ b/indra/newview/fsfloaterexport.h @@ -56,12 +56,12 @@ public: bool postBuild(); void updateSelection(); - static void onImageLoaded(BOOL success, + static void onImageLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata); void fetchTextureFromCache(LLViewerFetchedTexture* src_vi); void saveFormattedImage(LLPointer mFormattedImage, LLUUID id); @@ -143,7 +143,7 @@ private: public: FSExportCacheReadResponder(const LLUUID& id, LLImageFormatted* image, FSFloaterObjectExport* parent); - void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal); + void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal); virtual void completed(bool success); private: diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index 7719cfc27f..69d5ee77af 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -145,13 +145,13 @@ FSFloaterIM::FSFloaterIM(const LLUUID& session_id) mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelAdHocControl, this); break; case IM_SESSION_GROUP_START: - setCanSnooze(TRUE); + setCanSnooze(true); mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelGroupControl, this); break; case IM_SESSION_INVITE: if (gAgent.isInGroup(mSessionID)) { - setCanSnooze(TRUE); + setCanSnooze(true); mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelGroupControl, this); } else @@ -538,7 +538,7 @@ void FSFloaterIM::sendMsg(const std::string& msg) } LLSpeakerMgr::speaker_list_t speakers; - pIMSession->mSpeakers->getSpeakerList(&speakers, TRUE); + pIMSession->mSpeakers->getSpeakerList(&speakers, true); for (const auto& pSpeaker : speakers) { if ( (gAgent.getID() != pSpeaker->mID) && (!RlvActions::canSendIM(pSpeaker->mID)) ) @@ -659,7 +659,7 @@ void FSFloaterIM::doToSelected(const LLSD& userdata) { if (gSavedSettings.getBOOL("FSUseBuiltInHistory")) { - LLFloaterReg::showInstance("preview_conversation", mSessionID, TRUE); + LLFloaterReg::showInstance("preview_conversation", mSessionID, true); } else { @@ -714,7 +714,7 @@ void FSFloaterIM::onSysinfoButtonClicked() LLNotificationsUtil::add("SendSysinfoToIM",args,LLSD(),boost::bind(&FSFloaterIM::onSendSysinfo,this,_1,_2)); } -BOOL FSFloaterIM::onSendSysinfo(const LLSD& notification, const LLSD& response) +bool FSFloaterIM::onSendSysinfo(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification,response); @@ -733,9 +733,9 @@ BOOL FSFloaterIM::onSendSysinfo(const LLSD& notification, const LLSD& response) mQueuedMsgsForInit.append(part1); mQueuedMsgsForInit.append(part2); } - return TRUE; + return true; } - return FALSE; + return false; } void FSFloaterIM::onSysinfoButtonVisibilityChanged(const LLSD& yes) @@ -762,14 +762,14 @@ void FSFloaterIM::updateCallButton() if (!session) { - getChild("call_btn")->setEnabled(FALSE); + getChild("call_btn")->setEnabled(false); return; } bool session_initialized = session->mSessionInitialized; bool callback_enabled = session->mCallBackEnabled; - BOOL enable_connect = session_initialized + bool enable_connect = session_initialized && voice_enabled && callback_enabled; @@ -794,15 +794,15 @@ void FSFloaterIM::changed(U32 mask) bool is_online = LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID); getChild("teleport_btn")->setEnabled(is_online); getChild("call_btn")->setEnabled(is_online); - getChild("add_friend_btn")->setEnabled(FALSE); + getChild("add_friend_btn")->setEnabled(false); } else { // If friendship dissolved, enable buttons by default because we don't // know about their online status anymore - getChild("teleport_btn")->setEnabled(TRUE); - getChild("call_btn")->setEnabled(TRUE); - getChild("add_friend_btn")->setEnabled(TRUE); + getChild("teleport_btn")->setEnabled(true); + getChild("call_btn")->setEnabled(true); + getChild("add_friend_btn")->setEnabled(true); } } @@ -987,7 +987,7 @@ bool FSFloaterIM::postBuild() LLIMModel::instance().findIMSession(mSessionID); if (im_session && !im_session->mTextIMPossible) { - mInputEditor->setEnabled(FALSE); + mInputEditor->setEnabled(false); mInputEditor->setLabel(LLTrans::getString("IM_unavailable_text_label")); } @@ -1097,7 +1097,7 @@ void FSFloaterIM::timedUpdate() if (mMeTypingTimer.getElapsedTimeF32() > ME_TYPING_TIMEOUT && false == mShouldSendTypingState && mDialog == IM_NOTHING_SPECIAL) { LL_DEBUGS("TypingMsgs") << "Send additional Start Typing packet" << LL_ENDL; - LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE); + LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, true); mMeTypingTimer.reset(); } @@ -1209,14 +1209,14 @@ FSFloaterIM* FSFloaterIM::show(const LLUUID& session_id) if (floater_container) { - floater_container->addFloater(floater, TRUE, i_pt); + floater_container->addFloater(floater, true, i_pt); } } floater->mApplyRect = false; floater->openFloater(floater->getKey()); floater->mApplyRect = true; - floater->setFocus(TRUE); + floater->setFocus(true); } else { @@ -1256,7 +1256,7 @@ FSFloaterIM* FSFloaterIM::show(const LLUUID& session_id) } // window is positioned, now we can show it. - floater->setVisible(TRUE); + floater->setVisible(true); } return floater; @@ -1356,7 +1356,7 @@ bool FSFloaterIM::getVisible() return LLTransientDockableFloater::getVisible(); } - // getVisible() returns TRUE when Tabbed IM window is minimized. + // getVisible() returns true when Tabbed IM window is minimized. return is_active && !im_container->isMinimized() && im_container->getVisible(); } else @@ -1380,8 +1380,8 @@ bool FSFloaterIM::toggle(const LLUUID& session_id) } else if (floater && (!floater->isDocked() || (floater->getVisible() && !floater->hasFocus()))) { - floater->setVisible(TRUE); - floater->setFocus(TRUE); + floater->setVisible(true); + floater->setFocus(true); return true; } } @@ -1630,7 +1630,7 @@ void FSFloaterIM::setTyping(bool typing) if ( mTypingTimer.getElapsedTimeF32() > 1.f ) { // Still typing, send 'start typing' notification - LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE); + LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, true); mShouldSendTypingState = false; mMeTypingTimer.reset(); } @@ -1638,17 +1638,17 @@ void FSFloaterIM::setTyping(bool typing) else { // Send 'stop typing' notification immediately - LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, FALSE); + LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, false); mShouldSendTypingState = false; } } LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); if (speaker_mgr) - speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE); + speaker_mgr->setSpeakerTyping(gAgent.getID(), false); } -void FSFloaterIM::processIMTyping(const LLUUID& from_id, BOOL typing) +void FSFloaterIM::processIMTyping(const LLUUID& from_id, bool typing) { if (typing) { @@ -1690,7 +1690,7 @@ void FSFloaterIM::processAgentListUpdates(const LLSD& body) // process the moderator mutes if (agent_id == gAgentID && agent_data.has("info") && agent_data["info"].has("mutes")) { - BOOL moderator_muted_text = agent_data["info"]["mutes"]["text"].asBoolean(); + bool moderator_muted_text = agent_data["info"]["mutes"]["text"].asBoolean(); mInputEditor->setEnabled(!moderator_muted_text); std::string label; if (moderator_muted_text) @@ -1966,14 +1966,14 @@ bool FSFloaterIM::handleKeyHere( KEY key, MASK mask ) return handled; } -BOOL FSFloaterIM::isInviteAllowed() const +bool FSFloaterIM::isInviteAllowed() const { return ( (IM_SESSION_CONFERENCE_START == mDialog) || (IM_SESSION_INVITE == mDialog && !gAgent.isInGroup(mSessionID)) || mIsP2PChat); } -BOOL FSFloaterIM::inviteToSession(const uuid_vec_t& ids) +bool FSFloaterIM::inviteToSession(const uuid_vec_t& ids) { LLViewerRegion* region = gAgent.getRegion(); bool is_region_exist = region != NULL; @@ -2027,7 +2027,7 @@ void FSFloaterIM::addTypingIndicator(const LLUUID& from_id) LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); if ( speaker_mgr ) { - speaker_mgr->setSpeakerTyping(from_id, TRUE); + speaker_mgr->setSpeakerTyping(from_id, true); } } } @@ -2047,7 +2047,7 @@ void FSFloaterIM::removeTypingIndicator(const LLUUID& from_id) LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); if ( speaker_mgr ) { - speaker_mgr->setSpeakerTyping(from_id, FALSE); + speaker_mgr->setSpeakerTyping(from_id, false); } } // Ansariel: Transplant of STORM-1975; Typing notifications are only sent in P2P sessions, @@ -2059,7 +2059,7 @@ void FSFloaterIM::removeTypingIndicator(const LLUUID& from_id) LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); if ( speaker_mgr ) { - speaker_mgr->setSpeakerTyping(mOtherParticipantUUID, FALSE); + speaker_mgr->setSpeakerTyping(mOtherParticipantUUID, false); } } } @@ -2194,14 +2194,14 @@ void FSFloaterIM::onClickCloseBtn(bool app_quitting) } // Viewer version popup -BOOL FSFloaterIM::enableViewerVersionCallback(const LLSD& notification,const LLSD& response) +bool FSFloaterIM::enableViewerVersionCallback(const LLSD& notification,const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification,response); - BOOL result = FALSE; + bool result = false; if (option == 0) // "yes" { - result = TRUE; + result = true; } gSavedSettings.setBOOL("FSSupportGroupChatPrefix3", result); @@ -2250,7 +2250,7 @@ void FSFloaterIM::initIMSession(const LLUUID& session_id) void FSFloaterIM::reshapeChatLayoutPanel() { - mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, FALSE); + mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, false); } boost::signals2::connection FSFloaterIM::setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb) @@ -2262,12 +2262,12 @@ void FSFloaterIM::updateUnreadMessageNotification(S32 unread_messages) { if (unread_messages == 0 || !gSavedSettings.getBOOL("FSNotifyUnreadIMMessages")) { - mUnreadMessagesNotificationPanel->setVisible(FALSE); + mUnreadMessagesNotificationPanel->setVisible(false); } else { mUnreadMessagesNotificationTextBox->setTextArg("[NUM]", llformat("%d", unread_messages)); - mUnreadMessagesNotificationPanel->setVisible(TRUE); + mUnreadMessagesNotificationPanel->setVisible(true); } } @@ -2275,7 +2275,7 @@ void FSFloaterIM::onAddButtonClicked() { LLView* button = findChild("add_participant_btn"); LLFloater* root_floater = this; - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&FSFloaterIM::addSessionParticipants, this, _1), TRUE, TRUE, FALSE, root_floater->getName(), button); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&FSFloaterIM::addSessionParticipants, this, _1), true, true, false, root_floater->getName(), button); if (!picker) { return; diff --git a/indra/newview/fsfloaterim.h b/indra/newview/fsfloaterim.h index d04902f967..a8750b4fac 100644 --- a/indra/newview/fsfloaterim.h +++ b/indra/newview/fsfloaterim.h @@ -111,7 +111,7 @@ public: bool focusFirstItem(bool prefer_text_fields = false, bool focus_flash = true ); void onVisibilityChange(bool new_visibility); - void processIMTyping(const LLUUID& from_id, BOOL typing); + void processIMTyping(const LLUUID& from_id, bool typing); void processAgentListUpdates(const LLSD& body); void updateChatHistoryStyle(); @@ -171,7 +171,7 @@ protected: LLButton* mSysinfoButton; // support sysinfo button -Zi - BOOL enableViewerVersionCallback(const LLSD& notification,const LLSD& response); // Viewer version popup + bool enableViewerVersionCallback(const LLSD& notification,const LLSD& response); // Viewer version popup void reshapeChatLayoutPanel(); private: // process focus events to set a currently active session @@ -189,8 +189,8 @@ private: bool dropCategory(LLInventoryCategory* category, bool drop); bool dropPerson(LLUUID* person_id, bool drop); - BOOL isInviteAllowed() const; - BOOL inviteToSession(const uuid_vec_t& agent_ids); + bool isInviteAllowed() const; + bool inviteToSession(const uuid_vec_t& agent_ids); void onInputEditorFocusReceived(); void onInputEditorFocusLost(); @@ -201,7 +201,7 @@ private: // support sysinfo button -Zi void onSysinfoButtonClicked(); - BOOL onSendSysinfo(const LLSD& notification,const LLSD& response); + bool onSendSysinfo(const LLSD& notification,const LLSD& response); // support sysinfo button -Zi // connection to voice channel state change signal diff --git a/indra/newview/fsfloaterimcontainer.cpp b/indra/newview/fsfloaterimcontainer.cpp index 0eff3eee0b..6b7239bac2 100644 --- a/indra/newview/fsfloaterimcontainer.cpp +++ b/indra/newview/fsfloaterimcontainer.cpp @@ -52,7 +52,7 @@ FSFloaterIMContainer::FSFloaterIMContainer(const LLSD& seed) mForceVoiceStateUpdate(false), mIsAddingNewSession(false) { - mAutoResize = FALSE; + mAutoResize = false; LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); // Firstly add our self to IMSession observers, so we catch session events @@ -163,7 +163,7 @@ void FSFloaterIMContainer::onOpen(const LLSD& key) LLFloater* active_floater = getActiveFloater(); if (active_floater && !active_floater->hasFocus()) { - mTabContainer->setFocus(TRUE); + mTabContainer->setFocus(true); } } @@ -312,8 +312,8 @@ void FSFloaterIMContainer::removeFloater(LLFloater* floaterp) { mTabContainer->unlockTabs(); } - gSavedSettings.setBOOL(setting_name, TRUE); - floaterp->setCanClose(TRUE); + gSavedSettings.setBOOL(setting_name, true); + floaterp->setCanClose(true); } LLMultiFloater::removeFloater(floaterp); } @@ -336,11 +336,11 @@ void FSFloaterIMContainer::onCloseFloater(LLUUID& id) mSessions.erase(id); if (isShown()) { - setFocus(TRUE); + setFocus(true); } else if (isMinimized()) { - setMinimized(TRUE); // Make sure console output that needs to be shown is still doing so + setMinimized(true); // Make sure console output that needs to be shown is still doing so } } @@ -356,9 +356,9 @@ void FSFloaterIMContainer::onNewMessageReceived(const LLSD& data) { if (LLMultiFloater::isFloaterFlashing(floaterp)) { - LLMultiFloater::setFloaterFlashing(floaterp, FALSE); + LLMultiFloater::setFloaterFlashing(floaterp, false); } - LLMultiFloater::setFloaterFlashing(floaterp, TRUE); + LLMultiFloater::setFloaterFlashing(floaterp, true); } } @@ -401,7 +401,7 @@ void FSFloaterIMContainer::setMinimized(bool b) } //virtual -void FSFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) +void FSFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) { LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); if (!session) diff --git a/indra/newview/fsfloaterimcontainer.h b/indra/newview/fsfloaterimcontainer.h index 0ac656a77b..e1d81b6e7c 100644 --- a/indra/newview/fsfloaterimcontainer.h +++ b/indra/newview/fsfloaterimcontainer.h @@ -65,7 +65,7 @@ public: void onNewMessageReceived(const LLSD& data); // public so nearbychat can call it directly. TODO: handle via callback. -AO - virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg); + virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg); virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}; virtual void sessionVoiceOrIMStarted(const LLUUID& session_id) {}; virtual void sessionRemoved(const LLUUID& session_id); diff --git a/indra/newview/fsfloaterimport.cpp b/indra/newview/fsfloaterimport.cpp index dc4e385a47..cba69da7ea 100644 --- a/indra/newview/fsfloaterimport.cpp +++ b/indra/newview/fsfloaterimport.cpp @@ -193,7 +193,7 @@ void FSFloaterImport::onIdle() LL_DEBUGS("import") << "Dropping " << item_queue.item->getName() << " " << item_queue.item->getUUID() << " into " << item_queue.prim_name << " " << item_queue.object->getID() << LL_ENDL; if (item_queue.item->getType() == LLAssetType::AT_LSL_TEXT) { - LLToolDragAndDrop::dropScript(item_queue.object, item_queue.item, TRUE, + LLToolDragAndDrop::dropScript(item_queue.object, item_queue.item, true, LLToolDragAndDrop::SOURCE_AGENT, gAgentID); } @@ -298,17 +298,17 @@ void FSFloaterImport::loadFile() LL_DEBUGS("import") << "Linkset size is " << mLinksetSize << LL_ENDL; if (mLinksetSize != 0) { - getChild("import_btn")->setEnabled(TRUE); - getChild("do_not_attach")->setEnabled(TRUE); - getChild("region_position")->setEnabled(TRUE); - getChild("upload_asset")->setEnabled(TRUE); + getChild("import_btn")->setEnabled(true); + getChild("do_not_attach")->setEnabled(true); + getChild("region_position")->setEnabled(true); + getChild("upload_asset")->setEnabled(true); } else { - getChild("import_btn")->setEnabled(FALSE); - getChild("do_not_attach")->setEnabled(FALSE); - getChild("region_position")->setEnabled(FALSE); - getChild("upload_asset")->setEnabled(FALSE); + getChild("import_btn")->setEnabled(false); + getChild("do_not_attach")->setEnabled(false); + getChild("region_position")->setEnabled(false); + getChild("upload_asset")->setEnabled(false); } } @@ -506,11 +506,11 @@ void FSFloaterImport::onClickBtnImport() LL_DEBUGS("import") << "mStartPosition is " << mStartPosition << LL_ENDL; // don't allow change during a long upload/import - getChild("import_btn")->setEnabled(FALSE); - getChild("do_not_attach")->setEnabled(FALSE); - getChild("region_position")->setEnabled(FALSE); - getChild("upload_asset")->setEnabled(FALSE); - getChild("temp_asset")->setEnabled(FALSE); + getChild("import_btn")->setEnabled(false); + getChild("do_not_attach")->setEnabled(false); + getChild("region_position")->setEnabled(false); + getChild("upload_asset")->setEnabled(false); + getChild("temp_asset")->setEnabled(false); if (((mTexturesTotal + mSoundsTotal + mAnimsTotal + mAssetsTotal) != 0) && getChild("upload_asset")->get()) { @@ -527,10 +527,10 @@ void FSFloaterImport::onClickBtnImport() LLBuyCurrencyHTML::openCurrencyFloater(LLTrans::getString("UploadingCosts", args), expected_upload_cost); // re-enable the controls - getChild("import_btn")->setEnabled(TRUE); - getChild("do_not_attach")->setEnabled(TRUE); - getChild("region_position")->setEnabled(TRUE); - getChild("upload_asset")->setEnabled(TRUE); + getChild("import_btn")->setEnabled(true); + getChild("do_not_attach")->setEnabled(true); + getChild("region_position")->setEnabled(true); + getChild("upload_asset")->setEnabled(true); getChild("temp_asset")->setEnabled(getChild("upload_asset")->get()); return; } @@ -587,15 +587,15 @@ void FSFloaterImport::onClickCheckBoxUploadAsset() { if (getChild("upload_asset")->get()) { - getChild("temp_asset")->setEnabled(TRUE); + getChild("temp_asset")->setEnabled(true); LLUIString stats = getString("upload_cost"); stats.setArg("[COST]", llformat("%u", (mTexturesTotal * LLAgentBenefitsMgr::current().getTextureUploadCost() + mSoundsTotal * LLAgentBenefitsMgr::current().getSoundUploadCost() + mAnimsTotal * LLAgentBenefitsMgr::current().getAnimationUploadCost()))); getChild("file_status_text")->setText(stats.getString()); } else { - getChild("temp_asset")->set(FALSE); - getChild("temp_asset")->setEnabled(FALSE); + getChild("temp_asset")->set(false); + getChild("temp_asset")->setEnabled(false); std::string text; getChild("file_status_text")->setText(text); } @@ -712,8 +712,8 @@ void FSFloaterImport::createPrim() gMessageSystem->addVector3Fast(_PREHASH_RayStart, position); gMessageSystem->addVector3Fast(_PREHASH_RayEnd, position); - gMessageSystem->addU8Fast(_PREHASH_BypassRaycast, (U8)TRUE); - gMessageSystem->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)FALSE); + gMessageSystem->addU8Fast(_PREHASH_BypassRaycast, (U8)1); + gMessageSystem->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)0); gMessageSystem->addU8Fast(_PREHASH_State, (U8)0); gMessageSystem->addUUIDFast(_PREHASH_RayTargetID, LLUUID::null); gMessageSystem->sendReliable(gAgent.getRegion()->getHost()); @@ -727,7 +727,7 @@ bool FSFloaterImport::processPrimCreated(LLViewerObject* object) return false; } - LLSelectMgr::getInstance()->selectObjectAndFamily(object, TRUE); + LLSelectMgr::getInstance()->selectObjectAndFamily(object, true); LLUUID prim_uuid = mManifest["linkset"][mLinkset][mObject].asUUID(); LLSD& prim = mManifest["prim"][prim_uuid.asString()]; @@ -890,7 +890,7 @@ bool FSFloaterImport::processPrimCreated(LLViewerObject* object) gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID); gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); gMessageSystem->nextBlockFast(_PREHASH_HeaderData); - gMessageSystem->addBOOLFast(_PREHASH_Override, (BOOL)FALSE); + gMessageSystem->addBOOLFast(_PREHASH_Override, false); if (prim.has("group_mask")) { @@ -899,7 +899,7 @@ bool FSFloaterImport::processPrimCreated(LLViewerObject* object) gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object_local_id); gMessageSystem->addU8Fast(_PREHASH_Field, PERM_GROUP); - gMessageSystem->addBOOLFast(_PREHASH_Set, (BOOL)(group_mask & PERM_MODIFY) ? TRUE : FALSE); + gMessageSystem->addBOOLFast(_PREHASH_Set, (bool)(group_mask & PERM_MODIFY) ? true : false); gMessageSystem->addU32Fast(_PREHASH_Mask, PERM_MODIFY | PERM_MOVE | PERM_COPY); } if (prim.has("everyone_mask")) @@ -909,12 +909,12 @@ bool FSFloaterImport::processPrimCreated(LLViewerObject* object) gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object_local_id); gMessageSystem->addU8Fast(_PREHASH_Field, PERM_EVERYONE); - gMessageSystem->addBOOLFast(_PREHASH_Set, (BOOL)(everyone_mask & PERM_MOVE) ? TRUE : FALSE); + gMessageSystem->addBOOLFast(_PREHASH_Set, (bool)(everyone_mask & PERM_MOVE) ? true : false); gMessageSystem->addU32Fast(_PREHASH_Mask, PERM_MOVE); gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object_local_id); gMessageSystem->addU8Fast(_PREHASH_Field, PERM_EVERYONE); - gMessageSystem->addBOOLFast(_PREHASH_Set, (BOOL)(everyone_mask & PERM_COPY) ? TRUE : FALSE); + gMessageSystem->addBOOLFast(_PREHASH_Set, (bool)(everyone_mask & PERM_COPY) ? true : false); gMessageSystem->addU32Fast(_PREHASH_Mask, PERM_COPY); } if (prim.has("next_owner_mask")) @@ -924,17 +924,17 @@ bool FSFloaterImport::processPrimCreated(LLViewerObject* object) gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object_local_id); gMessageSystem->addU8Fast(_PREHASH_Field, PERM_NEXT_OWNER); - gMessageSystem->addBOOLFast(_PREHASH_Set, (BOOL)(next_owner_mask & PERM_MODIFY) ? TRUE : FALSE); + gMessageSystem->addBOOLFast(_PREHASH_Set, (bool)(next_owner_mask & PERM_MODIFY) ? true : false); gMessageSystem->addU32Fast(_PREHASH_Mask, PERM_MODIFY); gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object_local_id); gMessageSystem->addU8Fast(_PREHASH_Field, PERM_NEXT_OWNER); - gMessageSystem->addBOOLFast(_PREHASH_Set, (BOOL)(next_owner_mask & PERM_COPY) ? TRUE : FALSE); + gMessageSystem->addBOOLFast(_PREHASH_Set, (bool)(next_owner_mask & PERM_COPY) ? true : false); gMessageSystem->addU32Fast(_PREHASH_Mask, PERM_COPY); gMessageSystem->nextBlockFast(_PREHASH_ObjectData); gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, object_local_id); gMessageSystem->addU8Fast(_PREHASH_Field, PERM_NEXT_OWNER); - gMessageSystem->addBOOLFast(_PREHASH_Set, (BOOL)(next_owner_mask & PERM_TRANSFER) ? TRUE : FALSE); + gMessageSystem->addBOOLFast(_PREHASH_Set, (bool)(next_owner_mask & PERM_TRANSFER) ? true : false); gMessageSystem->addU32Fast(_PREHASH_Mask, PERM_TRANSFER); } @@ -982,7 +982,7 @@ bool FSFloaterImport::processPrimCreated(LLViewerObject* object) object->setPhysicsFriction(friction); object->setPhysicsDensity(density); object->setPhysicsRestitution(restitution); - object->updateFlags(TRUE); + object->updateFlags(true); } } @@ -1636,7 +1636,7 @@ void FSFloaterImport::onAssetUploadComplete(const LLUUID& uuid, void* userdata, new_item->setDescription(data->mAssetInfo.getDescription()); new_item->setTransactionID(data->mAssetInfo.mTransactionID); new_item->setAssetUUID(asset_id); - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); LL_DEBUGS("import") << "Asset " << asset_id << " saved into " << "inventory item " << item->getName() << LL_ENDL; diff --git a/indra/newview/fsfloaterimport.h b/indra/newview/fsfloaterimport.h index be5b263f3f..4149864904 100644 --- a/indra/newview/fsfloaterimport.h +++ b/indra/newview/fsfloaterimport.h @@ -125,7 +125,7 @@ private: uuid_vec_t mAssetQueue; U32 mAssetsTotal; std::map mAssetMap; - BOOL mSavedSettingShowNewInventory; + bool mSavedSettingShowNewInventory; boost::signals2::connection mObjectCreatedCallback; struct FSInventoryQueue diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp index 17125bc01e..2bcd931d20 100644 --- a/indra/newview/fsfloaternearbychat.cpp +++ b/indra/newview/fsfloaternearbychat.cpp @@ -111,11 +111,11 @@ void FSFloaterNearbyChat::updateFSUseNearbyChatConsole(const LLSD &data) if (FSUseNearbyChatConsole) { removeScreenChat(); - gConsole->setVisible(TRUE); + gConsole->setVisible(true); } else { - gConsole->setVisible(FALSE); + gConsole->setVisible(false); } } @@ -191,7 +191,7 @@ void FSFloaterNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD LLChat& tmp_chat = const_cast(chat); bool use_plain_text_chat_history = gSavedSettings.getBOOL("PlainTextChatHistory"); bool show_timestamps_nearby_chat = gSavedSettings.getBOOL("FSShowTimestampsNearbyChat"); - // [FIRE-1641 : SJ]: Option to hide timestamps in nearby chat - add Timestamp when show_timestamps_nearby_chat is TRUE + // [FIRE-1641 : SJ]: Option to hide timestamps in nearby chat - add Timestamp when show_timestamps_nearby_chat is true if (show_timestamps_nearby_chat) { if (tmp_chat.mTimeStr.empty()) @@ -232,7 +232,7 @@ void FSFloaterNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD // KC: Don't flash tab on system messages if (!isInVisibleChain() && hostp && (chat.mSourceType == CHAT_SOURCE_AGENT || chat.mSourceType == CHAT_SOURCE_OBJECT)) { - hostp->setFloaterFlashing(this, TRUE); + hostp->setFloaterFlashing(this, true); } } @@ -360,7 +360,7 @@ void FSFloaterNearbyChat::openFloater(const LLSD& key) { floater_container->showFloater(this, LLTabContainer::START); } - setVisible(TRUE); + setVisible(true); LLFloater::openFloater(key); } } @@ -447,7 +447,7 @@ void FSFloaterNearbyChat::onOpen(const LLSD& key ) floater_container->setVisible(true); floater_container->showFloater(this, LLTabContainer::START); } - setVisible(TRUE); + setVisible(true); } LLFloater::onOpen(key); @@ -658,7 +658,7 @@ bool FSFloaterNearbyChat::getVisible() return LLFloater::getVisible(); } - // getVisible() returns TRUE when Tabbed IM window is minimized. + // getVisible() returns true when Tabbed IM window is minimized. return is_active && !im_container->isMinimized() && im_container->getVisible(); } @@ -750,7 +750,7 @@ void FSFloaterNearbyChat::onChatBoxFocusReceived() void FSFloaterNearbyChat::reshapeChatLayoutPanel() { - mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, FALSE); + mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, false); } void FSFloaterNearbyChat::sendChat( EChatType type ) @@ -864,7 +864,7 @@ void FSFloaterNearbyChat::onChatTypeChanged() mSendChatButton->setLabel(mChatTypeCombo->getSelectedItemLabel()); } -void FSFloaterNearbyChat::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) +void FSFloaterNearbyChat::sendChatFromViewer(const std::string &utf8text, EChatType type, bool animate) { LLWString wtext = utf8string_to_wstring(utf8text); S32 channel = 0; @@ -888,14 +888,14 @@ void FSFloaterNearbyChat::stopChat() FSFloaterNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("fs_nearby_chat"); if (nearby_chat) { - nearby_chat->mInputEditor->setFocus(FALSE); + nearby_chat->mInputEditor->setFocus(false); gAgent.stopTyping(); } } void FSFloaterNearbyChat::updateUnreadMessageNotification(S32 unread_messages, bool muted_history) { - BOOL show_muted_history = gSavedSettings.getBOOL("FSShowMutedChatHistory"); + bool show_muted_history = gSavedSettings.getBOOL("FSShowMutedChatHistory"); if (muted_history) { @@ -916,12 +916,12 @@ void FSFloaterNearbyChat::updateUnreadMessageNotification(S32 unread_messages, b if (unread_messages == 0 || !gSavedSettings.getBOOL("FSNotifyUnreadChatMessages")) { - mUnreadMessagesNotificationPanel->setVisible(FALSE); + mUnreadMessagesNotificationPanel->setVisible(false); } else { mUnreadMessagesNotificationTextBox->setTextArg("[NUM]", llformat("%d", unread_messages)); - mUnreadMessagesNotificationPanel->setVisible(TRUE); + mUnreadMessagesNotificationPanel->setVisible(true); } } diff --git a/indra/newview/fsfloaternearbychat.h b/indra/newview/fsfloaternearbychat.h index d0ede2bc29..f8c4ab8cea 100644 --- a/indra/newview/fsfloaternearbychat.h +++ b/indra/newview/fsfloaternearbychat.h @@ -107,7 +107,7 @@ protected: void onChatBoxFocusReceived(); void sendChat( EChatType type ); - void sendChatFromViewer(const std::string& utf8text, EChatType type, BOOL animate); + void sendChatFromViewer(const std::string& utf8text, EChatType type, bool animate); void onChatBoxCommit(); void onChatTypeChanged(); @@ -144,7 +144,7 @@ private: std::vector mMessageArchive; - BOOL FSUseNearbyChatConsole; + bool FSUseNearbyChatConsole; }; #endif // FS_FLOATERNEARBYCHAT_H diff --git a/indra/newview/fsfloaterperformance.cpp b/indra/newview/fsfloaterperformance.cpp index 719e175ac2..4d87aae4ce 100644 --- a/indra/newview/fsfloaterperformance.cpp +++ b/indra/newview/fsfloaterperformance.cpp @@ -211,8 +211,8 @@ void FSFloaterPerformance::setHardwareDefaults() void FSFloaterPerformance::showSelectedPanel(LLPanel* selected_panel) { hidePanels(); - mMainPanel->setVisible(FALSE); - selected_panel->setVisible(TRUE); + mMainPanel->setVisible(false); + selected_panel->setVisible(true); if (mHUDsPanel == selected_panel) { @@ -436,16 +436,16 @@ void FSFloaterPerformance::draw() void FSFloaterPerformance::showMainPanel() { hidePanels(); - mMainPanel->setVisible(TRUE); + mMainPanel->setVisible(true); } void FSFloaterPerformance::hidePanels() { - mNearbyPanel->setVisible(FALSE); - mComplexityPanel->setVisible(FALSE); - mHUDsPanel->setVisible(FALSE); - mSettingsPanel->setVisible(FALSE); - mAutoTunePanel->setVisible(FALSE); + mNearbyPanel->setVisible(false); + mComplexityPanel->setVisible(false); + mHUDsPanel->setVisible(false); + mSettingsPanel->setVisible(false); + mAutoTunePanel->setVisible(false); } void FSFloaterPerformance::initBackBtn(LLPanel* panel) @@ -561,7 +561,7 @@ void FSFloaterPerformance::populateHUDList() } } - mHUDList->sortByColumnIndex(1, FALSE); + mHUDList->sortByColumnIndex(1, false); mHUDList->setScrollPos(prev_pos); mHUDList->selectItemBySpecialId(prev_selected_id); } @@ -572,7 +572,7 @@ void FSFloaterPerformance::populateObjectList() auto prev_selected_id = mObjectList->getSelectedSpecialId(); std::string current_sort_col = mObjectList->getSortColumnName(); - BOOL current_sort_asc = mObjectList->getSortAscending(); + bool current_sort_asc = mObjectList->getSortAscending(); mObjectList->clearRows(); mObjectList->updateColumns(true); @@ -696,7 +696,7 @@ void FSFloaterPerformance::populateNearbyList() S32 prev_pos = mNearbyList->getScrollPos(); LLUUID prev_selected_id = mNearbyList->getStringUUIDSelectedItem(); std::string current_sort_col = mNearbyList->getSortColumnName(); - BOOL current_sort_asc = mNearbyList->getSortAscending(); + bool current_sort_asc = mNearbyList->getSortAscending(); if (current_sort_col == "art_visual") { @@ -1088,7 +1088,7 @@ void FSFloaterPerformance::onExtendedAction(const LLSD& userdata, const LLUUID& LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); // Fixes an edge case where if the user has JUST disabled flycam themselves, the camera gets stuck waiting for input. - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setLookAt(LOOKAT_TARGET_SELECT, objectp); diff --git a/indra/newview/fsfloaterplacedetails.cpp b/indra/newview/fsfloaterplacedetails.cpp index 96e0854d36..81ca308ba3 100644 --- a/indra/newview/fsfloaterplacedetails.cpp +++ b/indra/newview/fsfloaterplacedetails.cpp @@ -293,10 +293,10 @@ void FSFloaterPlaceDetails::onOpen(const LLSD& key) mPanelLandmarkInfo->resetLocation(); mPanelLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); - mPanelLandmarkInfo->setHeaderVisible(FALSE); + mPanelLandmarkInfo->setHeaderVisible(false); - mPanelPlaceInfo->setVisible(FALSE); - mPanelLandmarkInfo->setVisible(TRUE); + mPanelPlaceInfo->setVisible(false); + mPanelLandmarkInfo->setVisible(true); setItem(item); } @@ -319,11 +319,11 @@ void FSFloaterPlaceDetails::onOpen(const LLSD& key) LLUUID dest_folder = key["dest_folder"]; mPanelLandmarkInfo->resetLocation(); mPanelLandmarkInfo->setInfoAndCreateLandmark(dest_folder); - mPanelLandmarkInfo->setHeaderVisible(FALSE); + mPanelLandmarkInfo->setHeaderVisible(false); mPanelLandmarkInfo->displayParcelInfo(LLUUID(), mGlobalPos); - mPanelPlaceInfo->setVisible(FALSE); - mPanelLandmarkInfo->setVisible(TRUE); + mPanelPlaceInfo->setVisible(false); + mPanelLandmarkInfo->setVisible(true); mIsInCreateMode = true; updateVerbs(); @@ -335,9 +335,9 @@ void FSFloaterPlaceDetails::onOpen(const LLSD& key) mPanelPlaceInfo->resetLocation(); mPanelPlaceInfo->setInfoType(LLPanelPlaceInfo::PLACE); - mPanelPlaceInfo->setHeaderVisible(FALSE); - mPanelPlaceInfo->setVisible(TRUE); - mPanelLandmarkInfo->setVisible(FALSE); + mPanelPlaceInfo->setHeaderVisible(false); + mPanelPlaceInfo->setVisible(true); + mPanelLandmarkInfo->setVisible(false); if (key.has("id")) { @@ -387,9 +387,9 @@ void FSFloaterPlaceDetails::onOpen(const LLSD& key) mPanelPlaceInfo->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); mPanelPlaceInfo->displayParcelInfo(LLUUID(), mGlobalPos); - mPanelPlaceInfo->setHeaderVisible(FALSE); - mPanelPlaceInfo->setVisible(TRUE); - mPanelLandmarkInfo->setVisible(FALSE); + mPanelPlaceInfo->setHeaderVisible(false); + mPanelPlaceInfo->setVisible(true); + mPanelLandmarkInfo->setVisible(false); updateVerbs(); } @@ -401,9 +401,9 @@ void FSFloaterPlaceDetails::onOpen(const LLSD& key) mPanelPlaceInfo->resetLocation(); mPanelPlaceInfo->setInfoType(LLPanelPlaceInfo::AGENT); - mPanelPlaceInfo->setHeaderVisible(FALSE); - mPanelPlaceInfo->setVisible(TRUE); - mPanelLandmarkInfo->setVisible(FALSE); + mPanelPlaceInfo->setHeaderVisible(false); + mPanelPlaceInfo->setVisible(true); + mPanelLandmarkInfo->setVisible(false); LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); if (!parcel_mgr) @@ -450,23 +450,23 @@ void FSFloaterPlaceDetails::updateVerbs() } else if (mDisplayInfo == REMOTE_PLACE || mDisplayInfo == TELEPORT_HISTORY_ITEM) { - getChildView("teleport_btn")->setVisible(TRUE); + getChildView("teleport_btn")->setVisible(true); getChildView("teleport_btn")->setEnabled(RlvActions::canTeleportToLocation()); - getChildView("map_btn")->setVisible(TRUE); - getChildView("edit_btn")->setVisible(FALSE); - getChildView("save_btn")->setVisible(FALSE); - getChildView("cancel_btn")->setVisible(FALSE); - getChildView("close_btn")->setVisible(FALSE); + getChildView("map_btn")->setVisible(true); + getChildView("edit_btn")->setVisible(false); + getChildView("save_btn")->setVisible(false); + getChildView("cancel_btn")->setVisible(false); + getChildView("close_btn")->setVisible(false); } else if (mDisplayInfo == AGENT) { - getChildView("teleport_btn")->setVisible(TRUE); + getChildView("teleport_btn")->setVisible(true); getChildView("teleport_btn")->setEnabled(have_position && !LLViewerParcelMgr::getInstance()->inAgentParcel(mGlobalPos)); - getChildView("map_btn")->setVisible(TRUE); - getChildView("edit_btn")->setVisible(FALSE); - getChildView("save_btn")->setVisible(FALSE); - getChildView("cancel_btn")->setVisible(FALSE); - getChildView("close_btn")->setVisible(FALSE); + getChildView("map_btn")->setVisible(true); + getChildView("edit_btn")->setVisible(false); + getChildView("save_btn")->setVisible(false); + getChildView("cancel_btn")->setVisible(false); + getChildView("close_btn")->setVisible(false); } } @@ -534,7 +534,7 @@ void FSFloaterPlaceDetails::setItem(LLInventoryItem* item) } // Check if item is in agent's inventory and he has the permission to modify it. - BOOL is_landmark_editable = gInventory.isObjectDescendentOf(mItem->getUUID(), gInventory.getRootFolderID()) && + bool is_landmark_editable = gInventory.isObjectDescendentOf(mItem->getUUID(), gInventory.getRootFolderID()) && mItem->getPermissions().allowModifyBy(gAgent.getID()); getChildView("edit_btn")->setEnabled(is_landmark_editable); @@ -641,7 +641,7 @@ void FSFloaterPlaceDetails::onShowOnMapButtonClicked() void FSFloaterPlaceDetails::onEditButtonClicked() { - mPanelLandmarkInfo->toggleLandmarkEditMode(TRUE); + mPanelLandmarkInfo->toggleLandmarkEditMode(true); mIsInEditMode = true; mIsInCreateMode = false; updateVerbs(); @@ -649,7 +649,7 @@ void FSFloaterPlaceDetails::onEditButtonClicked() void FSFloaterPlaceDetails::onCancelButtonClicked() { - mPanelLandmarkInfo->toggleLandmarkEditMode(FALSE); + mPanelLandmarkInfo->toggleLandmarkEditMode(false); mIsInEditMode = false; updateVerbs(); @@ -683,7 +683,7 @@ void FSFloaterPlaceDetails::onSaveButtonClicked() { new_item->rename(current_title_value); new_item->setDescription(current_notes_value); - new_item->updateServer(FALSE); + new_item->updateServer(false); } if(folder_id != mItem->getParentUUID()) @@ -696,7 +696,7 @@ void FSFloaterPlaceDetails::onSaveButtonClicked() gInventory.accountForUpdate(update); new_item->setParent(folder_id); - new_item->updateParentOnServer(FALSE); + new_item->updateParentOnServer(false); } gInventory.updateItem(new_item); @@ -729,7 +729,7 @@ void FSFloaterPlaceDetails::onOverflowButtonClicked() { menu = mLandmarkMenu; - BOOL is_landmark_removable = FALSE; + bool is_landmark_removable = false; if (mItem.notNull()) { const LLUUID& item_id = mItem->getUUID(); @@ -746,7 +746,7 @@ void FSFloaterPlaceDetails::onOverflowButtonClicked() } // TODO: What to do with the create pick stuff? Disabled for now... - menu->getChild("pick")->setVisible(FALSE); + menu->getChild("pick")->setVisible(false); mOverflowBtn->setMenu(menu, LLMenuButton::MP_TOP_RIGHT); } diff --git a/indra/newview/fsfloaterposestand.cpp b/indra/newview/fsfloaterposestand.cpp index 9e94da2b6e..ffba126e47 100644 --- a/indra/newview/fsfloaterposestand.cpp +++ b/indra/newview/fsfloaterposestand.cpp @@ -87,7 +87,7 @@ void FSFloaterPoseStand::onClose(bool app_quitting) setLock(false); gAgent.standUp(); } - gAgent.setCustomAnim(FALSE); + gAgent.setCustomAnim(false); FSPose::getInstance()->stopPose(); gAgent.stopCurrentAnimations(true); if (mAOPaused && !gSavedPerAccountSettings.getBOOL("UseAO")) diff --git a/indra/newview/fsfloatersearch.cpp b/indra/newview/fsfloatersearch.cpp index abfa90ff12..1ff5a0ec89 100644 --- a/indra/newview/fsfloatersearch.cpp +++ b/indra/newview/fsfloatersearch.cpp @@ -351,14 +351,14 @@ void FSFloaterSearch::onTabChange() if (active_panel == mPanelPeople || active_panel == mPanelGroups) { - mDetailSnapshotParcel->setVisible(FALSE); - mDetailSnapshot->setVisible(TRUE); + mDetailSnapshotParcel->setVisible(false); + mDetailSnapshot->setVisible(true); } else if (active_panel == mPanelPlaces || active_panel == mPanelLand || active_panel == mPanelEvents || active_panel == mPanelClassifieds) { - mDetailSnapshot->setVisible(FALSE); - mDetailSnapshotParcel->setVisible(TRUE); + mDetailSnapshot->setVisible(false); + mDetailSnapshotParcel->setVisible(true); } } @@ -724,7 +724,7 @@ void FSFloaterSearch::onBtnTeleport() } else if (teleport_action == 2) { - setMinimized(TRUE); + setMinimized(true); } } } @@ -778,7 +778,7 @@ bool FSPanelSearchPeople::postBuild() if (mSearchResults) { mSearchResults->setCommitCallback(boost::bind(&FSPanelSearchPeople::onSelectItem, this)); - mSearchResults->setEnabled(FALSE); + mSearchResults->setEnabled(false); mSearchResults->setCommentText(LLTrans::getString("no_results")); mSearchResults->setContextMenu(&gFSAvatarSearchMenu); } @@ -871,7 +871,7 @@ void FSPanelSearchPeople::onBtnFind() void FSPanelSearchPeople::onBtnNext() { mStartSearch += RESULT_PAGE_SIZE; - getChildView("people_back")->setEnabled(TRUE); + getChildView("people_back")->setEnabled(true); find(); } @@ -887,8 +887,8 @@ void FSPanelSearchPeople::onBtnBack() void FSPanelSearchPeople::resetSearch() { mStartSearch = 0; - getChildView("people_back")->setEnabled(FALSE); - getChildView("people_next")->setEnabled(FALSE); + getChildView("people_back")->setEnabled(false); + getChildView("people_next")->setEnabled(false); } S32 FSPanelSearchPeople::showNextButton(S32 rows) @@ -957,25 +957,25 @@ void FSPanelSearchPeople::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("people_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); return; } else if (status & STATUS_SEARCH_PLACES_SHORTSTRING) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_short")); return; } else if (status & STATUS_SEARCH_PLACES_BANNEDWORD) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_banned")); return; } else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_disabled")); return; } @@ -987,7 +987,7 @@ void FSPanelSearchPeople::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("people_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } @@ -1006,13 +1006,13 @@ void FSPanelSearchPeople::processSearchReply(LLMessageSystem* msg, void**) LL_INFOS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL; LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("people_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } else { LL_DEBUGS("Search") << "Got: " << first_name << " " << last_name << " AgentID: " << agent_id << LL_ENDL; - search_results->setEnabled(TRUE); + search_results->setEnabled(true); found_one = true; std::string avatar_name; @@ -1039,7 +1039,7 @@ void FSPanelSearchPeople::processSearchReply(LLMessageSystem* msg, void**) if (found_one) { search_results->selectFirstItem(); - search_results->setFocus(TRUE); + search_results->setFocus(true); self->onSelectItem(); } } @@ -1074,16 +1074,16 @@ void FSPanelSearchPeople::onAvatarNameCallback(const LLUUID& id, const LLAvatarN mResultsReceived = 1; mNumResultsReturned = 1; - search_results->setEnabled(TRUE); + search_results->setEnabled(true); search_results->selectFirstItem(); - search_results->setFocus(TRUE); + search_results->setFocus(true); onSelectItem(); } else { LLStringUtil::format_map_t map; map["[TEXT]"] = getChild("people_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } } @@ -1218,7 +1218,7 @@ void FSPanelSearchGroups::onBtnFind() void FSPanelSearchGroups::onBtnNext() { mStartSearch += RESULT_PAGE_SIZE; - getChildView("groups_back")->setEnabled(TRUE); + getChildView("groups_back")->setEnabled(true); find(); } @@ -1234,8 +1234,8 @@ void FSPanelSearchGroups::onBtnBack() void FSPanelSearchGroups::resetSearch() { mStartSearch = 0; - getChildView("groups_back")->setEnabled(FALSE); - getChildView("groups_next")->setEnabled(FALSE); + getChildView("groups_back")->setEnabled(false); + getChildView("groups_next")->setEnabled(false); } S32 FSPanelSearchGroups::showNextButton(S32 rows) @@ -1307,25 +1307,25 @@ void FSPanelSearchGroups::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("groups_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); return; } else if(status & STATUS_SEARCH_PLACES_SHORTSTRING) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_short")); return; } else if (status & STATUS_SEARCH_PLACES_BANNEDWORD) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_banned")); return; } else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_disabled")); return; } @@ -1337,7 +1337,7 @@ void FSPanelSearchGroups::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("groups_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } @@ -1355,13 +1355,13 @@ void FSPanelSearchGroups::processSearchReply(LLMessageSystem* msg, void**) LL_DEBUGS("Search") << "No results returned for QueryID: " << query_id << LL_ENDL; LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("groups_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } else { LL_DEBUGS("Search") << "Got: " << group_name << " GroupID: " << group_id << LL_ENDL; - search_results->setEnabled(TRUE); + search_results->setEnabled(true); found_one = true; LLSD content; @@ -1391,7 +1391,7 @@ void FSPanelSearchGroups::processSearchReply(LLMessageSystem* msg, void**) if (found_one) { search_results->selectFirstItem(); - search_results->setFocus(TRUE); + search_results->setFocus(true); self->onSelectItem(); } } @@ -1550,7 +1550,7 @@ void FSPanelSearchPlaces::onBtnFind() void FSPanelSearchPlaces::onBtnNext() { mStartSearch += RESULT_PAGE_SIZE; - getChildView("places_back")->setEnabled(TRUE); + getChildView("places_back")->setEnabled(true); find(); } @@ -1566,8 +1566,8 @@ void FSPanelSearchPlaces::onBtnBack() void FSPanelSearchPlaces::resetSearch() { mStartSearch = 0; - getChildView("places_back")->setEnabled(FALSE); - getChildView("places_next")->setEnabled(FALSE); + getChildView("places_back")->setEnabled(false); + getChildView("places_next")->setEnabled(false); } S32 FSPanelSearchPlaces::showNextButton(S32 rows) @@ -1640,31 +1640,31 @@ void FSPanelSearchPlaces::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("places_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); return; } else if(status & STATUS_SEARCH_PLACES_SHORTSTRING) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_short")); return; } else if (status & STATUS_SEARCH_PLACES_BANNEDWORD) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_banned")); return; } else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_disabled")); return; } else if (status & STATUS_SEARCH_PLACES_ESTATEEMPTY) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_disabled")); return; } @@ -1676,7 +1676,7 @@ void FSPanelSearchPlaces::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("places_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } @@ -1695,13 +1695,13 @@ void FSPanelSearchPlaces::processSearchReply(LLMessageSystem* msg, void**) LL_DEBUGS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL; LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("places_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } else { LL_DEBUGS("Search") << "Got: " << name << " ParcelID: " << parcel_id << LL_ENDL; - search_results->setEnabled(TRUE); + search_results->setEnabled(true); found_one = true; LLSD content; @@ -1744,7 +1744,7 @@ void FSPanelSearchPlaces::processSearchReply(LLMessageSystem* msg, void**) if (found_one) { search_results->selectFirstItem(); - search_results->setFocus(TRUE); + search_results->setFocus(true); self->onSelectItem(); } } @@ -1929,7 +1929,7 @@ void FSPanelSearchLand::onBtnFind() void FSPanelSearchLand::onBtnNext() { mStartSearch += RESULT_PAGE_SIZE; - getChildView("land_back")->setEnabled(TRUE); + getChildView("land_back")->setEnabled(true); find(); } @@ -1945,8 +1945,8 @@ void FSPanelSearchLand::onBtnBack() void FSPanelSearchLand::resetSearch() { mStartSearch = 0; - getChildView("land_back")->setEnabled(FALSE); - getChildView("land_next")->setEnabled(FALSE); + getChildView("land_back")->setEnabled(false); + getChildView("land_next")->setEnabled(false); } S32 FSPanelSearchLand::showNextButton(S32 rows) @@ -2023,7 +2023,7 @@ void FSPanelSearchLand::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("events_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } self->mResultsReceived += num_new_rows; @@ -2040,13 +2040,13 @@ void FSPanelSearchLand::processSearchReply(LLMessageSystem* msg, void**) if (parcel_id.isNull()) { LL_DEBUGS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL; - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("no_results")); } else { LL_DEBUGS("Search") << "Got: " << name << " ClassifiedID: " << parcel_id << LL_ENDL; - search_results->setEnabled(TRUE); + search_results->setEnabled(true); found_one = true; if (msg->getSizeFast(_PREHASH_QueryReplies, i, _PREHASH_ProductSKU) > 0) { @@ -2143,7 +2143,7 @@ void FSPanelSearchLand::processSearchReply(LLMessageSystem* msg, void**) if (found_one) { search_results->selectFirstItem(); - search_results->setFocus(TRUE); + search_results->setFocus(true); self->onSelectItem(); } } @@ -2228,7 +2228,7 @@ void FSPanelSearchClassifieds::find() return; } U32 category = mClassifiedsCategory->getValue().asInteger(); - BOOL auto_renew = FALSE; + bool auto_renew = false; U32 flags = pack_classified_flags_request(auto_renew, inc_pg, inc_mature, inc_adult); mResultsReceived = 0; @@ -2277,7 +2277,7 @@ void FSPanelSearchClassifieds::onBtnFind() void FSPanelSearchClassifieds::onBtnNext() { mStartSearch += RESULT_PAGE_SIZE; - getChildView("classifieds_back")->setEnabled(TRUE); + getChildView("classifieds_back")->setEnabled(true); find(); } @@ -2293,8 +2293,8 @@ void FSPanelSearchClassifieds::onBtnBack() void FSPanelSearchClassifieds::resetSearch() { mStartSearch = 0; - getChildView("classifieds_back")->setEnabled(FALSE); - getChildView("classifieds_next")->setEnabled(FALSE); + getChildView("classifieds_back")->setEnabled(false); + getChildView("classifieds_next")->setEnabled(false); } S32 FSPanelSearchClassifieds::showNextButton(S32 rows) @@ -2377,25 +2377,25 @@ void FSPanelSearchClassifieds::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("classifieds_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); return; } else if(status & STATUS_SEARCH_PLACES_SHORTSTRING) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_short")); return; } else if (status & STATUS_SEARCH_CLASSIFIEDS_BANNEDWORD) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_banned")); return; } else if (status & STATUS_SEARCH_PLACES_SEARCHDISABLED) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_disabled")); return; } @@ -2407,7 +2407,7 @@ void FSPanelSearchClassifieds::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("classifieds_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } self->mResultsReceived += num_new_rows; @@ -2425,13 +2425,13 @@ void FSPanelSearchClassifieds::processSearchReply(LLMessageSystem* msg, void**) LL_DEBUGS("Search") << "Null result returned for QueryID: " << query_id << LL_ENDL; LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("classifieds_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } else { LL_DEBUGS("Search") << "Got: " << name << " ClassifiedID: " << classified_id << LL_ENDL; - search_results->setEnabled(TRUE); + search_results->setEnabled(true); found_one = true; LLSD content; @@ -2458,7 +2458,7 @@ void FSPanelSearchClassifieds::processSearchReply(LLMessageSystem* msg, void**) if (found_one) { search_results->selectFirstItem(); - search_results->setFocus(TRUE); + search_results->setFocus(true); self->onSelectItem(); } } @@ -2618,7 +2618,7 @@ void FSPanelSearchEvents::onBtnFind() void FSPanelSearchEvents::onBtnNext() { mStartSearch += RESULT_PAGE_SIZE; - getChildView("events_back")->setEnabled(TRUE); + getChildView("events_back")->setEnabled(true); find(); } @@ -2658,23 +2658,23 @@ void FSPanelSearchEvents::onBtnToday() void FSPanelSearchEvents::resetSearch() { mStartSearch = 0; - getChildView("events_back")->setEnabled(FALSE); - getChildView("events_next")->setEnabled(FALSE); + getChildView("events_back")->setEnabled(false); + getChildView("events_next")->setEnabled(false); } void FSPanelSearchEvents::onSearchModeChanged() { if (mEventsMode->getValue().asString() == "current") { - getChildView("events_yesterday")->setEnabled(FALSE); - getChildView("events_tomorrow")->setEnabled(FALSE); - getChildView("events_today")->setEnabled(FALSE); + getChildView("events_yesterday")->setEnabled(false); + getChildView("events_tomorrow")->setEnabled(false); + getChildView("events_today")->setEnabled(false); } else { - getChildView("events_yesterday")->setEnabled(TRUE); - getChildView("events_tomorrow")->setEnabled(TRUE); - getChildView("events_today")->setEnabled(TRUE); + getChildView("events_yesterday")->setEnabled(true); + getChildView("events_tomorrow")->setEnabled(true); + getChildView("events_today")->setEnabled(true); } } @@ -2758,43 +2758,43 @@ void FSPanelSearchEvents::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("events_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); return; } else if(status & STATUS_SEARCH_EVENTS_SHORTSTRING) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_short")); return; } else if (status & STATUS_SEARCH_EVENTS_BANNEDWORD) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_banned")); return; } else if (status & STATUS_SEARCH_EVENTS_SEARCHDISABLED) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_disabled")); return; } else if (status & STATUS_SEARCH_EVENTS_NODATEOFFSET) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_no_date_offset")); return; } else if (status & STATUS_SEARCH_EVENTS_NOCATEGORY) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_no_events_category")); return; } else if (status & STATUS_SEARCH_EVENTS_NOQUERY) { - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("search_no_query")); return; } @@ -2805,7 +2805,7 @@ void FSPanelSearchEvents::processSearchReply(LLMessageSystem* msg, void**) { LLStringUtil::format_map_t map; map["[TEXT]"] = self->getChild("events_edit")->getValue().asString(); - search_results->setEnabled(FALSE); + search_results->setEnabled(false); search_results->setCommentText(LLTrans::getString("not_found", map)); } @@ -2851,7 +2851,7 @@ void FSPanelSearchEvents::processSearchReply(LLMessageSystem* msg, void**) LL_INFOS("Search") << "Skipped " << event_id << " because it was out of scope" << LL_ENDL; continue; } - search_results->setEnabled(TRUE); + search_results->setEnabled(true); found_one = true; LLSD content; @@ -2896,7 +2896,7 @@ void FSPanelSearchEvents::processSearchReply(LLMessageSystem* msg, void**) if (found_one) { search_results->selectFirstItem(); - search_results->setFocus(TRUE); + search_results->setFocus(true); self->onSelectItem(); } } @@ -3057,7 +3057,7 @@ void FSPanelSearchWeb::loadURL(const SearchQuery &p) void FSPanelSearchWeb::focusDefaultElement() { - mWebBrowser->setFocus(TRUE); + mWebBrowser->setFocus(true); } void FSPanelSearchWeb::draw() diff --git a/indra/newview/fsfloatervoicecontrols.cpp b/indra/newview/fsfloatervoicecontrols.cpp index a6889ccac8..8d00b4484f 100644 --- a/indra/newview/fsfloatervoicecontrols.cpp +++ b/indra/newview/fsfloatervoicecontrols.cpp @@ -336,8 +336,8 @@ void FSFloaterVoiceControls::onParticipantSelected() uuid_vec_t participants; mAvatarList->getSelectedUUIDs(participants); - mVolumeSlider->setEnabled(FALSE); - mMuteButton->setEnabled(FALSE); + mVolumeSlider->setEnabled(false); + mMuteButton->setEnabled(false); mSelectedParticipant=LLUUID::null; @@ -352,8 +352,8 @@ void FSFloaterVoiceControls::onParticipantSelected() if(!LLVoiceClient::instance().getVoiceEnabled(mSelectedParticipant)) return; - mVolumeSlider->setEnabled(TRUE); - mMuteButton->setEnabled(TRUE); + mVolumeSlider->setEnabled(true); + mMuteButton->setEnabled(true); mMuteButton->setToggleState(LLVoiceClient::instance().getOnMuteList(mSelectedParticipant)); mVolumeSlider->setValue(LLVoiceClient::instance().getUserVolume(mSelectedParticipant)); @@ -607,7 +607,7 @@ void FSFloaterVoiceControls::updateParticipantsVoiceState() LLPointer speaker = mSpeakerManager->findSpeaker(participant_id); if (speaker.isNull()) continue; - speaker->mHasLeftCurrentCall = FALSE; + speaker->mHasLeftCurrentCall = false; speakers_uuids.erase(speakers_iter); found = true; @@ -637,7 +637,7 @@ void FSFloaterVoiceControls::updateNotInVoiceParticipantState(LLAvatarListItem* LLPointer speaker = mSpeakerManager->findSpeaker(participant_id); if (speaker.notNull()) { - speaker->mHasLeftCurrentCall = TRUE; + speaker->mHasLeftCurrentCall = true; } } break; @@ -825,7 +825,7 @@ void FSFloaterVoiceControls::reset(const LLVoiceChannel::EState& new_state) } // Ansariel: Changed for RLVa @shownearby - //mAvatarList->setVisible(TRUE); + //mAvatarList->setVisible(true); updateListVisibility(); mSpeakerManager = NULL; @@ -841,13 +841,13 @@ void FSFloaterVoiceControls::updateListVisibility() { if (mIsRlvShowNearbyRestricted && mVoiceType == VC_LOCAL_CHAT) { - mAvatarList->setVisible(FALSE); - mRlvRestrictedText->setVisible(TRUE); + mAvatarList->setVisible(false); + mRlvRestrictedText->setVisible(true); } else { - mAvatarList->setVisible(TRUE); - mRlvRestrictedText->setVisible(FALSE); + mAvatarList->setVisible(true); + mRlvRestrictedText->setVisible(false); } } //EOF diff --git a/indra/newview/fsgridhandler.cpp b/indra/newview/fsgridhandler.cpp index 539acc2b63..1ae12cbc55 100644 --- a/indra/newview/fsgridhandler.cpp +++ b/indra/newview/fsgridhandler.cpp @@ -884,7 +884,7 @@ void LLGridManager::addSystemGrid(const std::string& label, if (name == std::string(MAINGRID)) { grid_entry->grid[GRID_SLURL_BASE] = MAIN_GRID_SLURL_BASE; - grid_entry->grid[GRID_IS_FAVORITE_VALUE] = TRUE; + grid_entry->grid[GRID_IS_FAVORITE_VALUE] = true; } else { diff --git a/indra/newview/fskeywords.cpp b/indra/newview/fskeywords.cpp index b015ef39a4..cb7f76f7fd 100644 --- a/indra/newview/fskeywords.cpp +++ b/indra/newview/fskeywords.cpp @@ -52,7 +52,7 @@ FSKeywords::~FSKeywords() void FSKeywords::updateKeywords() { - BOOL match_whole_words = gSavedPerAccountSettings.getBOOL("FSKeywordMatchWholeWords"); + bool match_whole_words = gSavedPerAccountSettings.getBOOL("FSKeywordMatchWholeWords"); std::string s = gSavedPerAccountSettings.getString("FSKeywords"); if (!gSavedPerAccountSettings.getBOOL("FSKeywordCaseSensitive")) { diff --git a/indra/newview/fslslbridge.cpp b/indra/newview/fslslbridge.cpp index 28bf4abdbe..89e10fa996 100644 --- a/indra/newview/fslslbridge.cpp +++ b/indra/newview/fslslbridge.cpp @@ -126,7 +126,7 @@ void FSLSLBridge::onIdle(void* userdata) LLViewerInventoryItem* inv_object = gInventory.getItem(instance->mReattachBridgeUUID); if (inv_object && instance->getBridge() && instance->getBridge()->getUUID() == inv_object->getUUID()) { - LLAttachmentsMgr::instance().addAttachmentRequest(inv_object->getUUID(), FS_BRIDGE_POINT, TRUE, TRUE); + LLAttachmentsMgr::instance().addAttachmentRequest(inv_object->getUUID(), FS_BRIDGE_POINT, true, true); } instance->mReattachBridgeUUID.setNull(); instance->setTimerResult(NO_TIMER); @@ -328,7 +328,6 @@ bool FSLSLBridge::lslToViewer(std::string_view message, const LLUUID& fromID, co if (valuepos != std::string::npos) { // send appropriate enable/disable messages to nearby chat - FIRE-24160 - // use BOOL to satisfy windows compiler bool aoWasPaused = gSavedPerAccountSettings.getBOOL("PauseAO"); bool aoStandsWasEnabled = gSavedPerAccountSettings.getBOOL("UseAOStands"); // @@ -336,21 +335,21 @@ bool FSLSLBridge::lslToViewer(std::string_view message, const LLUUID& fromID, co if (message.substr(valuepos + FS_STATE_ATTRIBUTE.size(), 2) == "on") { // Pause AO via bridge instead of switch AO on or off - FIRE-9305 - gSavedPerAccountSettings.setBOOL("PauseAO", FALSE); - gSavedPerAccountSettings.setBOOL("UseAOStands", TRUE); + gSavedPerAccountSettings.setBOOL("PauseAO", false); + gSavedPerAccountSettings.setBOOL("UseAOStands", true); } else if (message.substr(valuepos + FS_STATE_ATTRIBUTE.size(), 3) == "off") { // Pause AO via bridge instead of switch AO on or off - FIRE-9305 - gSavedPerAccountSettings.setBOOL("PauseAO", TRUE); + gSavedPerAccountSettings.setBOOL("PauseAO", true); } else if (message.substr(valuepos + FS_STATE_ATTRIBUTE.size(), 7) == "standon") { - gSavedPerAccountSettings.setBOOL("UseAOStands", TRUE); + gSavedPerAccountSettings.setBOOL("UseAOStands", true); } else if (message.substr(valuepos + FS_STATE_ATTRIBUTE.size(), 8) == "standoff") { - gSavedPerAccountSettings.setBOOL("UseAOStands", FALSE); + gSavedPerAccountSettings.setBOOL("UseAOStands", false); } else { @@ -665,7 +664,7 @@ void FSLSLBridge::cleanUpPreCreation() LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; NameCollectFunctor namefunctor(mCurrentFullName); - gInventory.collectDescendentsIf(getBridgeFolder(), cats, items, FALSE, namefunctor); + gInventory.collectDescendentsIf(getBridgeFolder(), cats, items, false, namefunctor); mAllowedDetachables.clear(); for (const auto& item : items) @@ -701,7 +700,7 @@ void FSLSLBridge::finishCleanUpPreCreation() LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; NameCollectFunctor namefunctor(mCurrentFullName); - gInventory.collectDescendentsIf(getBridgeFolder(), cats, items, FALSE, namefunctor); + gInventory.collectDescendentsIf(getBridgeFolder(), cats, items, false, namefunctor); for (const auto& item : items) { @@ -825,7 +824,7 @@ void FSLSLBridge::startCreation() LL_INFOS("FSLSLBridge") << "Bridge not attached but found in inventory, reattaching..." << LL_ENDL; //Is this a valid bridge - wear it. - LLAttachmentsMgr::instance().addAttachmentRequest(mpBridge->getUUID(), FS_BRIDGE_POINT, TRUE, TRUE); + LLAttachmentsMgr::instance().addAttachmentRequest(mpBridge->getUUID(), FS_BRIDGE_POINT, true, true); //from here, the attach should report to ProcessAttach and make sure bridge is valid. } else @@ -1081,7 +1080,7 @@ void FSLSLBridge::processDetach(LLViewerObject* object, const LLViewerJointAttac LLViewerInventoryItem* inv_object = gInventory.getItem(object->getAttachmentItemID()); if (inv_object && FSLSLBridge::instance().mpBridge && FSLSLBridge::instance().mpBridge->getUUID() == inv_object->getUUID()) { - LLAttachmentsMgr::instance().addAttachmentRequest(inv_object->getUUID(), FS_BRIDGE_POINT, TRUE, TRUE); + LLAttachmentsMgr::instance().addAttachmentRequest(inv_object->getUUID(), FS_BRIDGE_POINT, true, true); } return; @@ -1248,8 +1247,8 @@ void FSLSLBridgeRezCallback::fire(const LLUUID& inv_item) LLViewerInventoryItem* item = gInventory.getItem(inv_item); item->setDescription(item->getName()); - item->setComplete(TRUE); - item->updateServer(FALSE); + item->setComplete(true); + item->updateServer(false); gInventory.updateItem(item); gInventory.notifyObservers(); @@ -1258,7 +1257,7 @@ void FSLSLBridgeRezCallback::fire(const LLUUID& inv_item) FSLSLBridge::instance().setBridge(item); LL_INFOS("FSLSLBridge") << "Attaching bridge to the 'bridge' attachment point..." << LL_ENDL; - LLAttachmentsMgr::instance().addAttachmentRequest(inv_item, FS_BRIDGE_POINT, TRUE, TRUE); + LLAttachmentsMgr::instance().addAttachmentRequest(inv_item, FS_BRIDGE_POINT, true, true); } @@ -1433,7 +1432,7 @@ void FSLSLBridge::checkBridgeScriptName() } LL_INFOS("FSLSLBridge") << "Saving script " << mScriptItemID.asString() << " in object" << LL_ENDL; - obj->saveScript(gInventory.getItem(mScriptItemID), TRUE, true); + obj->saveScript(gInventory.getItem(mScriptItemID), true, true); new FSLSLBridgeCleanupTimer(); } @@ -1618,7 +1617,7 @@ LLViewerInventoryItem* FSLSLBridge::findInvObject(const std::string& obj_name, c LLUUID itemID; NameCollectFunctor namefunctor(obj_name); - gInventory.collectDescendentsIf(catID, cats, items, FALSE, namefunctor); + gInventory.collectDescendentsIf(catID, cats, items, false, namefunctor); for (const auto& item : items) { @@ -1654,7 +1653,7 @@ void FSLSLBridge::cleanUpBridgeFolder(const std::string& nameToCleanUp) //find all bridge and script duplicates and delete them //NameCollectFunctor namefunctor(mCurrentFullName); NameCollectFunctor namefunctor(nameToCleanUp); - gInventory.collectDescendentsIf(catID, cats, items, FALSE, namefunctor); + gInventory.collectDescendentsIf(catID, cats, items, false, namefunctor); for (const auto& item : items) { @@ -1706,7 +1705,7 @@ void FSLSLBridge::detachOtherBridges() LLViewerInventoryItem* fsBridge = findInvObject(mCurrentFullName, catID); //detach everything except current valid bridge - if any - gInventory.collectDescendents(catID, cats, items, FALSE); + gInventory.collectDescendents(catID, cats, items, false); for (const auto& item : items) { diff --git a/indra/newview/fslslpreproc.cpp b/indra/newview/fslslpreproc.cpp index a398b52e24..2b99b8cf8c 100644 --- a/indra/newview/fslslpreproc.cpp +++ b/indra/newview/fslslpreproc.cpp @@ -75,7 +75,7 @@ std::optional FSLSLPreprocessor::findInventoryByName(std::string_view na LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; ScriptMatches namematches(name); - gInventory.collectDescendentsIf(gInventory.getRootFolderID(), cats, items, FALSE, namematches); + gInventory.collectDescendentsIf(gInventory.getRootFolderID(), cats, items, false, namematches); if (!items.empty()) { @@ -600,7 +600,7 @@ public: item->getType(), &FSLSLPreprocessor::FSProcCacheCallback, info, - TRUE); + true); return true; } } @@ -773,7 +773,7 @@ void FSLSLPreprocessor::FSProcCacheCallback(const LLUUID& iuuid, LLAssetType::ET } } -void FSLSLPreprocessor::preprocess_script(BOOL close, bool sync, bool defcache) +void FSLSLPreprocessor::preprocess_script(bool close, bool sync, bool defcache) { mClose = close; mSync = sync; @@ -1568,7 +1568,7 @@ void FSLSLPreprocessor::start_process() outfield->setText(LLStringExplicit(output)); } mCore->mPostScript = output; - mCore->enableSave(TRUE); // The preprocessor run forces a change. (For FIRE-10173) -Sei + mCore->enableSave(true); // The preprocessor run forces a change. (For FIRE-10173) -Sei mCore->doSaveComplete((void*)mCore, mClose, mSync); } } diff --git a/indra/newview/fslslpreproc.h b/indra/newview/fslslpreproc.h index 9959dc1133..69d8deccf6 100644 --- a/indra/newview/fslslpreproc.h +++ b/indra/newview/fslslpreproc.h @@ -45,11 +45,11 @@ class FSLSLPreprocessor public: FSLSLPreprocessor(LLScriptEdCore* corep) - : mCore(corep), mWaving(false), mClose(FALSE), mSync(false), mStandalone(false) + : mCore(corep), mWaving(false), mClose(false), mSync(false), mStandalone(false) {} FSLSLPreprocessor() - : mWaving(false), mClose(FALSE), mSync(false), mStandalone(true) + : mWaving(false), mClose(false), mSync(false), mStandalone(true) {} static bool mono_directive(std::string_view text, bool agent_inv = true); @@ -62,7 +62,7 @@ public: static std::optional findInventoryByName(std::string_view name); static void FSProcCacheCallback(const LLUUID& uuid, LLAssetType::EType type, void *userdata, S32 result, LLExtStat extstat); - void preprocess_script(BOOL close = FALSE, bool sync = false, bool defcache = false); + void preprocess_script(bool close = false, bool sync = false, bool defcache = false); void preprocess_script(const LLUUID& asset_id, LLScriptQueueData* data, LLAssetType::EType type, const std::string& script_data); void start_process(); void display_message(std::string_view msg); @@ -86,7 +86,7 @@ public: LLScriptEdCore* mCore; bool mWaving; - BOOL mClose; + bool mClose; bool mSync; std::string mMainScriptName; diff --git a/indra/newview/fsnearbychatbarlistener.cpp b/indra/newview/fsnearbychatbarlistener.cpp index a14b09867a..530a4c8d4a 100644 --- a/indra/newview/fsnearbychatbarlistener.cpp +++ b/indra/newview/fsnearbychatbarlistener.cpp @@ -105,6 +105,6 @@ void FSNearbyChatBarListener::sendChat(LLSD const & chat_data) const } // Send it as if it was typed in - FSNearbyChat::instance().sendChatFromViewer(chat_to_send, type_o_chat, ((BOOL)(channel == 0)) && gSavedSettings.getBOOL("PlayChatAnim")); + FSNearbyChat::instance().sendChatFromViewer(chat_to_send, type_o_chat, (channel == 0) && gSavedSettings.getBOOL("PlayChatAnim")); } diff --git a/indra/newview/fsnearbychathub.cpp b/indra/newview/fsnearbychathub.cpp index e607f503d5..342c6c62b6 100644 --- a/indra/newview/fsnearbychathub.cpp +++ b/indra/newview/fsnearbychathub.cpp @@ -298,12 +298,12 @@ void FSNearbyChat::sendChat(LLWString text, EChatType type) gAgent.stopTyping(); } -void FSNearbyChat::sendChatFromViewer(const std::string& utf8text, EChatType type, BOOL animate) +void FSNearbyChat::sendChatFromViewer(const std::string& utf8text, EChatType type, bool animate) { sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate); } -void FSNearbyChat::sendChatFromViewer(const LLWString& wtext, EChatType type, BOOL animate) +void FSNearbyChat::sendChatFromViewer(const LLWString& wtext, EChatType type, bool animate) { // Look for "/20 foo" channel chats. S32 channel = 0; @@ -322,7 +322,7 @@ void FSNearbyChat::registerChatBar(FSNearbyChatControl* chatBar) } // unhide the default nearby chat bar on request (pressing Enter or a letter key) -void FSNearbyChat::showDefaultChatBar(BOOL visible, const char* text) const +void FSNearbyChat::showDefaultChatBar(bool visible, const char* text) const { if (!mDefaultChatBar) { @@ -360,7 +360,7 @@ void FSNearbyChat::showDefaultChatBar(BOOL visible, const char* text) const } // We want to know which nearby chat editor (if any) currently has focus -void FSNearbyChat::setFocusedInputEditor(FSNearbyChatControl* inputEditor, BOOL focus) +void FSNearbyChat::setFocusedInputEditor(FSNearbyChatControl* inputEditor, bool focus) { if (focus) { @@ -376,7 +376,7 @@ void FSNearbyChat::setFocusedInputEditor(FSNearbyChatControl* inputEditor, BOOL // for the "arrow key moves avatar when chat is empty" hack in llviewerwindow.cpp // and the hide chat bar feature in mouselook in llagent.cpp -BOOL FSNearbyChat::defaultChatBarIsIdle() const +bool FSNearbyChat::defaultChatBarIsIdle() const { if (mFocusedInputEditor && mFocusedInputEditor->isDefault()) { @@ -384,18 +384,18 @@ BOOL FSNearbyChat::defaultChatBarIsIdle() const } // if any other chat bar has focus, report "idle", because they're not the default - return TRUE; + return true; } // for the "arrow key moves avatar when chat is empty" hack in llviewerwindow.cpp -BOOL FSNearbyChat::defaultChatBarHasFocus() const +bool FSNearbyChat::defaultChatBarHasFocus() const { if (mFocusedInputEditor && mFocusedInputEditor->isDefault()) { - return TRUE; + return true; } - return FALSE; + return false; } void FSNearbyChat::onDefaultChatBarButtonClicked() @@ -407,7 +407,7 @@ void FSNearbyChat::onDefaultChatBarButtonClicked() ////////////////////////////////////////////////////////////////////////////// // General chat handling methods -void FSNearbyChat::sendChatFromViewer(const LLWString& wtext, const LLWString& out_text, EChatType type, BOOL animate, S32 channel) +void FSNearbyChat::sendChatFromViewer(const LLWString& wtext, const LLWString& out_text, EChatType type, bool animate, S32 channel) { std::string utf8_out_text = wstring_to_utf8str(out_text); std::string utf8_text = wstring_to_utf8str(wtext); @@ -627,7 +627,7 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 * } KEY key = gKeyboard->currentKey(); - MASK mask = gKeyboard->currentMask(FALSE); + MASK mask = gKeyboard->currentMask(false); // Ignore "special" keys, like backspace, arrows, etc. if (length > 1 diff --git a/indra/newview/fsnearbychathub.h b/indra/newview/fsnearbychathub.h index 9c59cdd334..2d21629385 100644 --- a/indra/newview/fsnearbychathub.h +++ b/indra/newview/fsnearbychathub.h @@ -50,19 +50,19 @@ public: void registerChatBar(FSNearbyChatControl* chatBar); // set the contents of the chat bar to "text" if it was empty, otherwise just show it - void showDefaultChatBar(BOOL visible, const char* text = NULL) const; + void showDefaultChatBar(bool visible, const char* text = NULL) const; void sendChat(LLWString text, EChatType type); static LLWString stripChannelNumber(const LLWString &mesg, S32* channel, S32* last_channel, bool* is_set); static EChatType processChatTypeTriggers(EChatType type, std::string &str); - void sendChatFromViewer(const std::string& utf8text, EChatType type, BOOL animate); - void sendChatFromViewer(const LLWString& wtext, EChatType type, BOOL animate); - static void sendChatFromViewer(const LLWString& wtext, const LLWString& out_text, EChatType type, BOOL animate, S32 channel); + void sendChatFromViewer(const std::string& utf8text, EChatType type, bool animate); + void sendChatFromViewer(const LLWString& wtext, EChatType type, bool animate); + static void sendChatFromViewer(const LLWString& wtext, const LLWString& out_text, EChatType type, bool animate, S32 channel); - void setFocusedInputEditor(FSNearbyChatControl* inputEditor, BOOL focus); + void setFocusedInputEditor(FSNearbyChatControl* inputEditor, bool focus); - BOOL defaultChatBarIsIdle() const; - BOOL defaultChatBarHasFocus() const; + bool defaultChatBarIsIdle() const; + bool defaultChatBarHasFocus() const; static void handleChatBarKeystroke(LLUICtrl* source, S32 channel = 0); diff --git a/indra/newview/fsnearbychatvoicemonitor.cpp b/indra/newview/fsnearbychatvoicemonitor.cpp index 2d0779f53c..6cf67ba132 100644 --- a/indra/newview/fsnearbychatvoicemonitor.cpp +++ b/indra/newview/fsnearbychatvoicemonitor.cpp @@ -66,12 +66,12 @@ void FSNearbyChatVoiceControl::draw() if (mVoiceMonitorVisible) { setTextPadding(mOriginalTextpadLeft, mOriginalTextpadRight + mVoiceMonitor->getRect().getWidth() + mVoiceMonitorPadding); - mVoiceMonitor->setVisible(TRUE); + mVoiceMonitor->setVisible(true); } else { setTextPadding(mOriginalTextpadLeft, mOriginalTextpadRight); - mVoiceMonitor->setVisible(FALSE); + mVoiceMonitor->setVisible(false); } } FSNearbyChatControl::draw(); diff --git a/indra/newview/fspanelblocklist.cpp b/indra/newview/fspanelblocklist.cpp index b268180627..507a825cc6 100644 --- a/indra/newview/fspanelblocklist.cpp +++ b/indra/newview/fspanelblocklist.cpp @@ -244,22 +244,22 @@ void FSPanelBlockList::onCustomAction(const LLSD& userdata) } else if ("sort_by_name" == command_name) { - mBlockedList->sortByColumn("item_name", TRUE); + mBlockedList->sortByColumn("item_name", true); gSavedSettings.setU32("BlockPeopleSortOrder", E_SORT_BY_NAME_ASC); } else if ("sort_by_type" == command_name) { - mBlockedList->sortByColumn("item_type", TRUE); + mBlockedList->sortByColumn("item_type", true); gSavedSettings.setU32("BlockPeopleSortOrder", E_SORT_BY_TYPE_ASC); } else if ("sort_by_name_desc" == command_name) { - mBlockedList->sortByColumn("item_name", FALSE); + mBlockedList->sortByColumn("item_name", false); gSavedSettings.setU32("BlockPeopleSortOrder", E_SORT_BY_NAME_DESC); } else if ("sort_by_type_desc" == command_name) { - mBlockedList->sortByColumn("item_type", FALSE); + mBlockedList->sortByColumn("item_type", false); gSavedSettings.setU32("BlockPeopleSortOrder", E_SORT_BY_TYPE_DESC); } else if ("unblock_item" == command_name) @@ -396,8 +396,8 @@ void FSPanelBlockList::toggleMute(U32 flags) void FSPanelBlockList::blockResidentByName() { - const BOOL allow_multiple = FALSE; - const BOOL close_on_select = TRUE; + const bool allow_multiple = false; + const bool close_on_select = true; LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&FSPanelBlockList::callbackBlockPicked, this, _1, _2), allow_multiple, close_on_select); LLFloater* parent = dynamic_cast(getParent()); @@ -446,7 +446,7 @@ void FSPanelBlockList::callbackBlockByName(const std::string& text) if (text.empty()) return; LLMute mute(LLUUID::null, text, LLMute::BY_NAME); - BOOL success = LLMuteList::getInstance()->add(mute); + bool success = LLMuteList::getInstance()->add(mute); if (!success) { LLNotificationsUtil::add("MuteByNameFailed"); @@ -479,7 +479,7 @@ void FSPanelBlockList::onFilterEdit(std::string search_string) void FSPanelBlockList::onSortChanged() { - BOOL ascending = mBlockedList->getSortAscending(); + bool ascending = mBlockedList->getSortAscending(); std::string column = mBlockedList->getSortColumnName(); if (column == "item_name") diff --git a/indra/newview/fspanelcontactsets.cpp b/indra/newview/fspanelcontactsets.cpp index 6a2db8ffd8..bd0f04086d 100644 --- a/indra/newview/fspanelcontactsets.cpp +++ b/indra/newview/fspanelcontactsets.cpp @@ -222,7 +222,7 @@ void FSPanelContactSets::onClickAddAvatar(LLUICtrl* ctrl) { LLFloater* root_floater = gFloaterView->getParentFloater(this); LLFloater* avatar_picker = LLFloaterAvatarPicker::show(boost::bind(&FSPanelContactSets::handlePickerCallback, this, _1, mContactSetCombo->getValue().asString()), - TRUE, TRUE, TRUE, root_floater->getName(), ctrl); + true, true, true, root_floater->getName(), ctrl); if (root_floater && avatar_picker) { root_floater->addDependentFloater(avatar_picker); diff --git a/indra/newview/fspanellogin.cpp b/indra/newview/fspanellogin.cpp index e251f5fd96..7b5b824db1 100644 --- a/indra/newview/fspanellogin.cpp +++ b/indra/newview/fspanellogin.cpp @@ -81,8 +81,8 @@ const S32 MAX_PASSWORD_SL = 16; const S32 MAX_PASSWORD_OPENSIM = 255; FSPanelLogin *FSPanelLogin::sInstance = NULL; -BOOL FSPanelLogin::sCapslockDidNotification = FALSE; -BOOL FSPanelLogin::sCredentialSet = FALSE; +bool FSPanelLogin::sCapslockDidNotification = false; +bool FSPanelLogin::sCredentialSet = false; std::string FSPanelLogin::sPassword = ""; std::string FSPanelLogin::sPendingNewGridURI{}; @@ -187,10 +187,10 @@ FSPanelLogin::FSPanelLogin(const LLRect &rect, mInitialized(false), mGridListChangedCallbackConnection() { - setBackgroundVisible(FALSE); - setBackgroundOpaque(TRUE); + setBackgroundVisible(false); + setBackgroundOpaque(true); - mPasswordModified = FALSE; + mPasswordModified = false; sInstance = this; @@ -233,7 +233,7 @@ FSPanelLogin::FSPanelLogin(const LLRect &rect, server_choice_combo->setToolTip(getString("ServerComboTooltip")); #endif #ifdef SINGLEGRID - server_choice_combo->setEnabled(FALSE); + server_choice_combo->setEnabled(false); #endif std::string current_grid = LLGridManager::getInstance()->getGrid(); @@ -425,8 +425,8 @@ void FSPanelLogin::giveFocus() std::string username = sInstance->getChild("username_combo")->getValue().asString(); std::string pass = sInstance->getChild("password_edit")->getValue().asString(); - BOOL have_username = !username.empty(); - BOOL have_pass = !pass.empty(); + bool have_username = !username.empty(); + bool have_pass = !pass.empty(); LLLineEditor* edit = NULL; LLComboBox* combo = NULL; @@ -469,7 +469,7 @@ void FSPanelLogin::showLoginWidgets() std::string splash_screen_url = LLGridManager::getInstance()->getLoginPage(); web_browser->navigateTo( splash_screen_url, HTTP_CONTENT_TEXT_HTML ); LLUICtrl* username_combo = sInstance->getChild("username_combo"); - username_combo->setFocus(TRUE); + username_combo->setFocus(true); } } @@ -486,7 +486,7 @@ void FSPanelLogin::show(const LLRect &rect, if( !gFocusMgr.getKeyboardFocus() ) { // Grab focus and move cursor to first enabled control - sInstance->setFocus(TRUE); + sInstance->setFocus(true); } // Make sure that focus always goes here (and use the latest sInstance that was just created) @@ -513,7 +513,7 @@ void FSPanelLogin::setFields(LLPointer credential, bool from_start } if (sInstance->mInitialized) { - sCredentialSet = TRUE; + sCredentialSet = true; } LL_INFOS("Credentials") << "Setting login fields to " << *credential << LL_ENDL; @@ -537,8 +537,8 @@ void FSPanelLogin::setFields(LLPointer credential, bool from_start if (!username_combo->selectByValue(cred_name)) { username_combo->setTextEntry(login_id); - sInstance->mPasswordModified = TRUE; - sInstance->getChild("remove_user_btn")->setEnabled(FALSE); + sInstance->mPasswordModified = true; + sInstance->getChild("remove_user_btn")->setEnabled(false); } sInstance->mPreviousUsername = username_combo->getValue().asString(); sInstance->addFavoritesToStartLocation(); @@ -578,7 +578,7 @@ void FSPanelLogin::setFields(LLPointer credential, bool from_start sInstance->getChild("password_edit")->setText(sPassword); sInstance->mPasswordLength = sPassword.length(); sInstance->updateLoginButtons(); - sInstance->mPasswordModified = TRUE; + sInstance->mPasswordModified = true; } } } @@ -705,7 +705,7 @@ void FSPanelLogin::getFields(LLPointer& credential, // static -BOOL FSPanelLogin::areCredentialFieldsDirty() +bool FSPanelLogin::areCredentialFieldsDirty() { if (!sInstance) { @@ -733,10 +733,10 @@ void FSPanelLogin::updateLocationSelectorsVisibility() { if (sInstance) { - BOOL show_start = gSavedSettings.getBOOL("ShowStartLocation"); + bool show_start = gSavedSettings.getBOOL("ShowStartLocation"); sInstance->getChild("start_location_panel")->setVisible(show_start); - BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid"); + bool show_server = gSavedSettings.getBOOL("ForceShowGrid"); sInstance->getChild("grid_panel")->setVisible(show_server); sInstance->addUsersToCombo(show_server); } @@ -940,7 +940,7 @@ void FSPanelLogin::onClickConnect(void *) if (sInstance && sInstance->mCallback) { // JC - Make sure the fields all get committed. - sInstance->setFocus(FALSE); + sInstance->setFocus(false); LLComboBox* combo = sInstance->getChild("server_combo"); LLSD combo_val = combo->getSelectedValue(); @@ -976,7 +976,7 @@ void FSPanelLogin::onClickConnect(void *) } else { - sCredentialSet = FALSE; + sCredentialSet = false; LLPointer cred; bool remember; getFields(cred, remember); @@ -1066,11 +1066,11 @@ void FSPanelLogin::onClickHelp(void*) void FSPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { FSPanelLogin *self = (FSPanelLogin *)user_data; - self->mPasswordModified = TRUE; - if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE) + self->mPasswordModified = true; + if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == false) { // *TODO: use another way to notify user about enabled caps lock, see EXT-6858 - sCapslockDidNotification = TRUE; + sCapslockDidNotification = true; } LLLineEditor* password_edit(self->getChild("password_edit")); @@ -1229,7 +1229,7 @@ std::string canonicalize_username(const std::string& name) return first + ' ' + last; } -void FSPanelLogin::addUsersToCombo(BOOL show_server) +void FSPanelLogin::addUsersToCombo(bool show_server) { LLComboBox* combo = getChild("username_combo"); if (!combo) return; @@ -1385,7 +1385,7 @@ void FSPanelLogin::onSelectUser() sInstance->mPreviousUsername = combo->getValue().asString(); sInstance->mUsernameLength = combo->getValue().asString().length(); sInstance->updateLoginButtons(); - sInstance->getChild("remove_user_btn")->setEnabled(FALSE); + sInstance->getChild("remove_user_btn")->setEnabled(false); return; } @@ -1394,8 +1394,8 @@ void FSPanelLogin::onSelectUser() LLPointer credential = gSecAPIHandler->loadCredential(cred_name); sInstance->setFields(credential); - sInstance->mPasswordModified = FALSE; - sInstance->getChild("remove_user_btn")->setEnabled(TRUE); + sInstance->mPasswordModified = false; + sInstance->getChild("remove_user_btn")->setEnabled(true); size_t arobase = cred_name.find("@"); if (arobase != std::string::npos && arobase + 1 < cred_name.length()) @@ -1523,7 +1523,7 @@ void FSPanelLogin::onModeChange(const LLSD& original_value, const LLSD& new_valu if (gSavedSettings.getBOOL("FSToolbarsResetOnModeChange")) { LL_INFOS() << "Clearing toolbar settings." << LL_ENDL; - gSavedSettings.setBOOL("ResetToolbarSettings", TRUE); + gSavedSettings.setBOOL("ResetToolbarSettings", true); } if (original_value.asString() != new_value.asString()) diff --git a/indra/newview/fspanellogin.h b/indra/newview/fspanellogin.h index 18ad439037..3e0c7bea57 100644 --- a/indra/newview/fspanellogin.h +++ b/indra/newview/fspanellogin.h @@ -59,9 +59,9 @@ public: static void getFields(LLPointer& credential, bool& remember); - static BOOL isCredentialSet() { return sCredentialSet; } + static bool isCredentialSet() { return sCredentialSet; } - static BOOL areCredentialFieldsDirty(); + static bool areCredentialFieldsDirty(); static void setLocation(const LLSLURL& slurl); static void autologinToLocation(const LLSLURL& slurl); @@ -91,7 +91,7 @@ public: void gridListChanged(bool success); private: void addFavoritesToStartLocation(); - void addUsersToCombo(BOOL show_server); + void addUsersToCombo(bool show_server); void onSelectUser(); void onModeChange(const LLSD& original_value, const LLSD& new_value); void onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response); @@ -119,13 +119,13 @@ private: void (*mCallback)(S32 option, void *userdata); void* mCallbackData; - BOOL mPasswordModified; + bool mPasswordModified; bool mShowFavorites; static FSPanelLogin* sInstance; - static BOOL sCapslockDidNotification; + static bool sCapslockDidNotification; - static BOOL sCredentialSet; + static bool sCredentialSet; unsigned int mUsernameLength; unsigned int mPasswordLength; diff --git a/indra/newview/fspanelradar.cpp b/indra/newview/fspanelradar.cpp index c64b2fdbbc..5dd323c243 100644 --- a/indra/newview/fspanelradar.cpp +++ b/indra/newview/fspanelradar.cpp @@ -484,7 +484,7 @@ void FSPanelRadar::onColumnDisplayModeChanged() parent_floater->getResizeLimits(&min_width, &min_height); std::string current_sort_col = mRadarList->getSortColumnName(); - BOOL current_sort_asc = mRadarList->getSortAscending(); + bool current_sort_asc = mRadarList->getSortAscending(); mRadarList->clearRows(); mRadarList->clearColumns(); @@ -529,7 +529,7 @@ void FSPanelRadar::onColumnDisplayModeChanged() (current_sort_col == "seen_sort" && mRadarList->getColumn("seen")->getWidth() == -1)) { current_sort_col = "range"; - current_sort_asc = TRUE; + current_sort_asc = true; } mRadarList->sortByColumn(current_sort_col, current_sort_asc); mRadarList->setFilterColumn(0); diff --git a/indra/newview/fsparticipantlist.cpp b/indra/newview/fsparticipantlist.cpp index e6f88648a6..6d075a940a 100644 --- a/indra/newview/fsparticipantlist.cpp +++ b/indra/newview/fsparticipantlist.cpp @@ -174,7 +174,7 @@ FSParticipantList::~FSParticipantList() mAvatarList->setComparator(NULL); } -void FSParticipantList::setSpeakingIndicatorsVisible(BOOL visible) +void FSParticipantList::setSpeakingIndicatorsVisible(bool visible) { mAvatarList->setSpeakingIndicatorsVisible(visible); }; @@ -263,10 +263,10 @@ void FSParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) // update voice mute state of all items. See EXT-7235 LLSpeakerMgr::speaker_list_t speaker_list; - // Use also participants which are not in voice session now (the second arg is TRUE). + // Use also participants which are not in voice session now (the second arg is true). // They can already have mModeratorMutedVoice set from the previous voice session // and LLSpeakerVoiceModerationEvent will not be sent when speaker manager is updated next time. - mSpeakerMgr->getSpeakerList(&speaker_list, TRUE); + mSpeakerMgr->getSpeakerList(&speaker_list, true); for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) { const LLPointer& speakerp = *it; @@ -555,7 +555,7 @@ void FSParticipantList::FSParticipantListMenu::show(LLView* spawning_view, const LLListContextMenu::show(spawning_view, uuids, x, y); const LLUUID& speaker_id = mUUIDs.front(); - BOOL is_muted = isMuted(speaker_id); + bool is_muted = isMuted(speaker_id); if (is_muted) { @@ -593,7 +593,7 @@ void FSParticipantList::FSParticipantListMenu::allowTextChat(const LLSD& userdat void FSParticipantList::FSParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags) { const LLUUID speaker_id = mUUIDs.front(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, flags); + bool is_muted = LLMuteList::getInstance()->isMuted(speaker_id, flags); std::string name; //fill in name using voice client's copy of name cache diff --git a/indra/newview/fsparticipantlist.h b/indra/newview/fsparticipantlist.h index 6d78907cbf..20e9530532 100644 --- a/indra/newview/fsparticipantlist.h +++ b/indra/newview/fsparticipantlist.h @@ -60,7 +60,7 @@ public: bool exclude_agent = true, bool can_toggle_icons = true); ~FSParticipantList(); - void setSpeakingIndicatorsVisible(BOOL visible); + void setSpeakingIndicatorsVisible(bool visible); enum EParticipantSortOrder { diff --git a/indra/newview/fsradar.cpp b/indra/newview/fsradar.cpp index adad667210..bec96357b9 100644 --- a/indra/newview/fsradar.cpp +++ b/indra/newview/fsradar.cpp @@ -142,7 +142,7 @@ void FSRadar::radarAlertMsg(const LLUUID& agent_id, const LLAvatarName& av_name, args["MESSAGE"] = static_cast(postMsg); LLNotificationsUtil::add("RadarAlert", args, - payload.with("respond_on_mousedown", TRUE), + payload.with("respond_on_mousedown", true), boost::bind(&LLAvatarActions::zoomIn, agent_id)); } else @@ -266,7 +266,7 @@ void FSRadar::updateRadarList() mEntryList.emplace(avid, std::make_shared(avid)); } - speakermgr->update(TRUE); + speakermgr->update(true); //STEP 2: Transform detected model list data into more flexible multimap data structure; //TS: Count avatars in chat range and in the same region @@ -934,11 +934,11 @@ void FSRadar::onRadarReportToClicked(const LLSD& userdata) const std::string chosen_item = userdata.asString(); if (chosen_item == "radar_toasts") { - gSavedSettings.setBOOL("FSMilkshakeRadarToasts", TRUE); + gSavedSettings.setBOOL("FSMilkshakeRadarToasts", true); } else if (chosen_item == "radar_nearby_chat") { - gSavedSettings.setBOOL("FSMilkshakeRadarToasts", FALSE); + gSavedSettings.setBOOL("FSMilkshakeRadarToasts", false); } } diff --git a/indra/newview/fsscrolllistctrl.cpp b/indra/newview/fsscrolllistctrl.cpp index 95769bea54..1a67d9d241 100644 --- a/indra/newview/fsscrolllistctrl.cpp +++ b/indra/newview/fsscrolllistctrl.cpp @@ -177,7 +177,7 @@ bool FSScrollListCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, return mHandleDaDCallback(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } - return FALSE; + return false; } diff --git a/indra/newview/fsscrolllistctrl.h b/indra/newview/fsscrolllistctrl.h index 49266c16b0..2d8e7e1112 100644 --- a/indra/newview/fsscrolllistctrl.h +++ b/indra/newview/fsscrolllistctrl.h @@ -80,7 +80,7 @@ public: void refreshLineHeight(); - typedef boost::function handle_dad_callback_signal_t; + typedef boost::function handle_dad_callback_signal_t; void setHandleDaDCallback(const handle_dad_callback_signal_t& func) { mHandleDaDCallback = func; diff --git a/indra/newview/fsslurlcommand.cpp b/indra/newview/fsslurlcommand.cpp index ae246662cb..d2a6ce18c1 100644 --- a/indra/newview/fsslurlcommand.cpp +++ b/indra/newview/fsslurlcommand.cpp @@ -54,7 +54,7 @@ public: } LLUUID target_id; - if (!target_id.set(params[0], FALSE)) + if (!target_id.set(params[0], false)) { return false; } diff --git a/indra/newview/lggbeamcolormapfloater.cpp b/indra/newview/lggbeamcolormapfloater.cpp index 38e73b173c..ffc31b4031 100644 --- a/indra/newview/lggbeamcolormapfloater.cpp +++ b/indra/newview/lggbeamcolormapfloater.cpp @@ -76,7 +76,7 @@ void lggBeamColorMapFloater::draw() //set the color of the preview thing LLColor4 bColor = LLColor4(lggBeamMaps::beamColorFromData(mData)); - mBeamColorPreview->set(bColor, TRUE); + mBeamColorPreview->set(bColor, true); static LLCachedControl max_opacity(gSavedSettings, "PickerContextOpacity", 0.4f); drawConeToOwner(mContextConeOpacity, max_opacity, mFSPanel->getChild("BeamColor_new"), mContextConeFadeTime, mContextConeInAlpha, mContextConeOutAlpha); diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index b7b33f0a3e..80577494ec 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -206,7 +206,7 @@ private: class LLTeleportRequestViaLure : public LLTeleportRequestViaLandmark { public: - LLTeleportRequestViaLure(const LLUUID &pLureId, BOOL pIsLureGodLike); + LLTeleportRequestViaLure(const LLUUID &pLureId, bool pIsLureGodLike); virtual ~LLTeleportRequestViaLure(); virtual void toOstream(std::ostream& os) const; @@ -216,10 +216,10 @@ public: virtual void startTeleport(); protected: - inline BOOL isLureGodLike() const {return mIsLureGodLike;}; + inline bool isLureGodLike() const {return mIsLureGodLike;}; private: - BOOL mIsLureGodLike; + bool mIsLureGodLike; }; class LLTeleportRequestViaLocation : public LLTeleportRequest @@ -463,16 +463,16 @@ LLAgent::LLAgent() : mFrameAgent(), mIsDoNotDisturb(false), - mIsAutorespond(FALSE), - mIsAutorespondNonFriends(FALSE), - mIsRejectTeleportOffers(FALSE), // FIRE-1245: Option to block/reject teleport offers - mIsRejectFriendshipRequests(FALSE), // FIRE-15233: Automatic friendship request refusal - mIsRejectAllGroupInvites(FALSE), // Option to block/reject all group invites + mIsAutorespond(false), + mIsAutorespondNonFriends(false), + mIsRejectTeleportOffers(false), // FIRE-1245: Option to block/reject teleport offers + mIsRejectFriendshipRequests(false), // FIRE-15233: Automatic friendship request refusal + mIsRejectAllGroupInvites(false), // Option to block/reject all group invites mAfkSitting(false), // FIRE-1568: Fix sit on AFK issues (standing up when sitting before) // Ignore prejump and always fly - mIgnorePrejump(FALSE), - mAlwaysFly(FALSE), + mIgnorePrejump(false), + mAlwaysFly(false), // mControlFlags(0x00000000), @@ -513,7 +513,7 @@ LLAgent::LLAgent() : mMouselookModeInSignal(NULL), mMouselookModeOutSignal(NULL), - mPhantom(FALSE), + mPhantom(false), restoreToWorld(false) { for (U32 i = 0; i < TOTAL_CONTROLS; i++) @@ -544,7 +544,7 @@ void LLAgent::updateFSAlwaysFly(const LLSD &data) if (gSavedSettings.getBOOL("FirstUseFlyOverride")) { LLNotificationsUtil::add("FirstUseFlyOverride"); - gSavedSettings.setBOOL("FirstUseFlyOverride", FALSE); + gSavedSettings.setBOOL("FirstUseFlyOverride", false); } } } @@ -781,7 +781,7 @@ void LLAgent::moveAt(S32 direction, bool reset) { // FIRE-8798: Option to prevent camera reset on movement //gAgentCamera.resetView(); - gAgentCamera.resetView(TRUE, FALSE, TRUE); + gAgentCamera.resetView(true, false, true); // } } @@ -810,7 +810,7 @@ void LLAgent::moveAtNudge(S32 direction) // FIRE-8798: Option to prevent camera reset on movement //gAgentCamera.resetView(); - gAgentCamera.resetView(TRUE, FALSE, TRUE); + gAgentCamera.resetView(true, false, true); // } @@ -838,7 +838,7 @@ void LLAgent::moveLeft(S32 direction) // FIRE-8798: Option to prevent camera reset on movement //gAgentCamera.resetView(); - gAgentCamera.resetView(TRUE, FALSE, TRUE); + gAgentCamera.resetView(true, false, true); // } @@ -866,7 +866,7 @@ void LLAgent::moveLeftNudge(S32 direction) // FIRE-8798: Option to prevent camera reset on movement //gAgentCamera.resetView(); - gAgentCamera.resetView(TRUE, FALSE, TRUE); + gAgentCamera.resetView(true, false, true); // } @@ -894,7 +894,7 @@ void LLAgent::moveUp(S32 direction) { setControlFlags(AGENT_CONTROL_UP_POS | AGENT_CONTROL_FAST_UP); // Chalice Yao's crouch toggle - gAgentCamera.resetView(TRUE, FALSE, TRUE); + gAgentCamera.resetView(true, false, true); // } else if (direction < 0) @@ -903,7 +903,7 @@ void LLAgent::moveUp(S32 direction) // Chalice Yao's crouch toggle if (!gSavedPerAccountSettings.getBOOL("FSCrouchToggleStatus") || !gSavedPerAccountSettings.getBOOL("FSCrouchToggle")) { - gAgentCamera.resetView(TRUE, FALSE, TRUE); + gAgentCamera.resetView(true, false, true); } // } @@ -942,7 +942,7 @@ void LLAgent::moveYaw(F32 mag, bool reset_view) { // FIRE-8798: Option to prevent camera reset on movement //gAgentCamera.resetView(); - gAgentCamera.resetView(TRUE, FALSE, TRUE); + gAgentCamera.resetView(true, false, true); // } } @@ -997,7 +997,7 @@ bool LLAgent::canFly() return parcel->getAllowFly(); } -BOOL LLAgent::getFlying() const +bool LLAgent::getFlying() const { return mControlFlags & AGENT_CONTROL_FLY; } @@ -1005,7 +1005,7 @@ BOOL LLAgent::getFlying() const //----------------------------------------------------------------------------- // setFlying() //----------------------------------------------------------------------------- -void LLAgent::setFlying(BOOL fly, BOOL fail_sound) +void LLAgent::setFlying(bool fly, bool fail_sound) { if (isAgentAvatarValid()) { @@ -1035,7 +1035,7 @@ void LLAgent::setFlying(BOOL fly, BOOL fail_sound) } // [/RLVa:KB] - BOOL was_flying = getFlying(); + bool was_flying = getFlying(); if (!canFly() && !was_flying) { // parcel doesn't let you start fly @@ -1062,7 +1062,7 @@ void LLAgent::setFlying(BOOL fly, BOOL fail_sound) // Update Movement Controls according to Fly mode LLFloaterMove::setFlyingMode(fly); - mbFlagsDirty = TRUE; + mbFlagsDirty = true; } @@ -1081,11 +1081,11 @@ void LLAgent::toggleFlying() // Chalice Yao's crouch toggle if (gSavedPerAccountSettings.getBOOL("FSCrouchToggleStatus")) { - gSavedPerAccountSettings.setBOOL("FSCrouchToggleStatus", FALSE); + gSavedPerAccountSettings.setBOOL("FSCrouchToggleStatus", false); } // - BOOL fly = !gAgent.getFlying(); + bool fly = !gAgent.getFlying(); gAgent.mMoveTimer.reset(); LLFirstUse::notMoving(false); @@ -1093,7 +1093,7 @@ void LLAgent::toggleFlying() gAgent.setFlying( fly ); // FIRE-8798: Option to prevent camera reset on movement //gAgentCamera.resetView(); - gAgentCamera.resetView(TRUE, FALSE, TRUE); + gAgentCamera.resetView(true, false, true); // } @@ -1349,7 +1349,7 @@ void LLAgent::removeRegionChangedCallback(boost::signals2::connection callback) //----------------------------------------------------------------------------- // inPrelude() //----------------------------------------------------------------------------- -BOOL LLAgent::inPrelude() +bool LLAgent::inPrelude() { return mRegionp && mRegionp->isPrelude(); } @@ -1368,7 +1368,7 @@ std::string LLAgent::getRegionCapability(const std::string &name) // canManageEstate() //----------------------------------------------------------------------------- -BOOL LLAgent::canManageEstate() const +bool LLAgent::canManageEstate() const { return mRegionp && mRegionp->canManageEstate(); } @@ -1756,7 +1756,7 @@ U32 LLAgent::getControlFlags() void LLAgent::setControlFlags(U32 mask) { mControlFlags |= mask; - mbFlagsDirty = TRUE; + mbFlagsDirty = true; } @@ -1769,14 +1769,14 @@ void LLAgent::clearControlFlags(U32 mask) mControlFlags &= ~mask; if (old_flags != mControlFlags) { - mbFlagsDirty = TRUE; + mbFlagsDirty = true; } } //----------------------------------------------------------------------------- // controlFlagsDirty() //----------------------------------------------------------------------------- -BOOL LLAgent::controlFlagsDirty() const +bool LLAgent::controlFlagsDirty() const { return mbFlagsDirty; } @@ -1786,7 +1786,7 @@ BOOL LLAgent::controlFlagsDirty() const //----------------------------------------------------------------------------- void LLAgent::enableControlFlagReset() { - mbFlagsNeedReset = TRUE; + mbFlagsNeedReset = true; } //----------------------------------------------------------------------------- @@ -1796,8 +1796,8 @@ void LLAgent::resetControlFlags() { if (mbFlagsNeedReset) { - mbFlagsNeedReset = FALSE; - mbFlagsDirty = FALSE; + mbFlagsNeedReset = false; + mbFlagsDirty = false; // reset all of the ephemeral flags // some flags are managed elsewhere mControlFlags &= AGENT_CONTROL_AWAY | AGENT_CONTROL_FLY | AGENT_CONTROL_MOUSELOOK; @@ -1868,7 +1868,7 @@ void LLAgent::clearAFK() //----------------------------------------------------------------------------- // getAFK() //----------------------------------------------------------------------------- -BOOL LLAgent::getAFK() const +bool LLAgent::getAFK() const { return (mControlFlags & AGENT_CONTROL_AWAY) != 0; } @@ -1902,7 +1902,7 @@ bool LLAgent::isDoNotDisturb() const //----------------------------------------------------------------------------- void LLAgent::setAutorespond() { - selectAutorespond(TRUE); + selectAutorespond(true); } //----------------------------------------------------------------------------- @@ -1910,13 +1910,13 @@ void LLAgent::setAutorespond() //----------------------------------------------------------------------------- void LLAgent::clearAutorespond() { - selectAutorespond(FALSE); + selectAutorespond(false); } //----------------------------------------------------------------------------- // selectAutorespond() //----------------------------------------------------------------------------- -void LLAgent::selectAutorespond(BOOL selected) +void LLAgent::selectAutorespond(bool selected) { LL_INFOS() << "Setting autorespond mode to " << selected << LL_ENDL; mIsAutorespond = selected; @@ -1938,7 +1938,7 @@ void LLAgent::selectAutorespond(BOOL selected) //----------------------------------------------------------------------------- // getAutorespond() //----------------------------------------------------------------------------- -BOOL LLAgent::getAutorespond() const +bool LLAgent::getAutorespond() const { return mIsAutorespond; } @@ -1948,7 +1948,7 @@ BOOL LLAgent::getAutorespond() const //----------------------------------------------------------------------------- void LLAgent::setAutorespondNonFriends() { - selectAutorespondNonFriends(TRUE); + selectAutorespondNonFriends(true); } //----------------------------------------------------------------------------- @@ -1956,13 +1956,13 @@ void LLAgent::setAutorespondNonFriends() //----------------------------------------------------------------------------- void LLAgent::clearAutorespondNonFriends() { - selectAutorespondNonFriends(FALSE); + selectAutorespondNonFriends(false); } //----------------------------------------------------------------------------- // selectAutorespondNonFriends() //----------------------------------------------------------------------------- -void LLAgent::selectAutorespondNonFriends(BOOL selected) +void LLAgent::selectAutorespondNonFriends(bool selected) { LL_INFOS() << "Setting autorespond non-friends mode to " << selected << LL_ENDL; mIsAutorespondNonFriends = selected; @@ -1984,7 +1984,7 @@ void LLAgent::selectAutorespondNonFriends(BOOL selected) //----------------------------------------------------------------------------- // getAutorespondNonFriends() //----------------------------------------------------------------------------- -BOOL LLAgent::getAutorespondNonFriends() const +bool LLAgent::getAutorespondNonFriends() const { return mIsAutorespondNonFriends; } @@ -1996,7 +1996,7 @@ BOOL LLAgent::getAutorespondNonFriends() const //----------------------------------------------------------------------------- void LLAgent::setRejectTeleportOffers() { - selectRejectTeleportOffers(TRUE); + selectRejectTeleportOffers(true); } //----------------------------------------------------------------------------- @@ -2004,13 +2004,13 @@ void LLAgent::setRejectTeleportOffers() //----------------------------------------------------------------------------- void LLAgent::clearRejectTeleportOffers() { - selectRejectTeleportOffers(FALSE); + selectRejectTeleportOffers(false); } //----------------------------------------------------------------------------- // selectRejectTeleportOffers() //----------------------------------------------------------------------------- -void LLAgent::selectRejectTeleportOffers(BOOL selected) +void LLAgent::selectRejectTeleportOffers(bool selected) { LL_INFOS() << "Setting rejecting teleport offers mode to " << selected << LL_ENDL; mIsRejectTeleportOffers = selected; @@ -2020,7 +2020,7 @@ void LLAgent::selectRejectTeleportOffers(BOOL selected) //----------------------------------------------------------------------------- // getRejectTeleportOffers() //----------------------------------------------------------------------------- -BOOL LLAgent::getRejectTeleportOffers() const +bool LLAgent::getRejectTeleportOffers() const { return mIsRejectTeleportOffers; } @@ -2034,7 +2034,7 @@ BOOL LLAgent::getRejectTeleportOffers() const //----------------------------------------------------------------------------- void LLAgent::setRejectFriendshipRequests() { - selectRejectFriendshipRequests(TRUE); + selectRejectFriendshipRequests(true); } //----------------------------------------------------------------------------- @@ -2042,13 +2042,13 @@ void LLAgent::setRejectFriendshipRequests() //----------------------------------------------------------------------------- void LLAgent::clearRejectFriendshipRequests() { - selectRejectFriendshipRequests(FALSE); + selectRejectFriendshipRequests(false); } //----------------------------------------------------------------------------- // selectRejectFriendshipRequests() //----------------------------------------------------------------------------- -void LLAgent::selectRejectFriendshipRequests(BOOL selected) +void LLAgent::selectRejectFriendshipRequests(bool selected) { LL_INFOS() << "Setting rejecting friendship requests mode to " << selected << LL_ENDL; mIsRejectFriendshipRequests = selected; @@ -2058,7 +2058,7 @@ void LLAgent::selectRejectFriendshipRequests(BOOL selected) //----------------------------------------------------------------------------- // getRejectFriendshipRequests() //----------------------------------------------------------------------------- -BOOL LLAgent::getRejectFriendshipRequests() const +bool LLAgent::getRejectFriendshipRequests() const { return mIsRejectFriendshipRequests; } @@ -2072,7 +2072,7 @@ BOOL LLAgent::getRejectFriendshipRequests() const //----------------------------------------------------------------------------- void LLAgent::setRejectAllGroupInvites() { - selectRejectAllGroupInvites(TRUE); + selectRejectAllGroupInvites(true); } //----------------------------------------------------------------------------- @@ -2080,13 +2080,13 @@ void LLAgent::setRejectAllGroupInvites() //----------------------------------------------------------------------------- void LLAgent::clearRejectAllGroupInvites() { - selectRejectAllGroupInvites(FALSE); + selectRejectAllGroupInvites(false); } //----------------------------------------------------------------------------- // selectRejectAllGroupInvites() //----------------------------------------------------------------------------- -void LLAgent::selectRejectAllGroupInvites(BOOL selected) +void LLAgent::selectRejectAllGroupInvites(bool selected) { LL_INFOS() << "Setting rejecting group invites mode to " << selected << LL_ENDL; mIsRejectAllGroupInvites = selected; @@ -2096,7 +2096,7 @@ void LLAgent::selectRejectAllGroupInvites(BOOL selected) //----------------------------------------------------------------------------- // getRejectAllGroupInvites() //----------------------------------------------------------------------------- -BOOL LLAgent::getRejectAllGroupInvites() const +bool LLAgent::getRejectAllGroupInvites() const { return mIsRejectAllGroupInvites; } @@ -2110,11 +2110,11 @@ void LLAgent::startAutoPilotGlobal( const LLVector3d &target_global, const std::string& behavior_name, const LLQuaternion *target_rotation, - void (*finish_callback)(BOOL, void *), + void (*finish_callback)(bool, void *), void *callback_data, F32 stop_distance, F32 rot_threshold, - BOOL allow_flying) + bool allow_flying) { if (!isAgentAvatarValid()) { @@ -2171,38 +2171,38 @@ void LLAgent::startAutoPilotGlobal( } else { - mAutoPilotFlyOnStop = FALSE; + mAutoPilotFlyOnStop = false; } if (distance > 30.0 && mAutoPilotAllowFlying) { - setFlying(TRUE); + setFlying(true); } if ( distance > 1.f && mAutoPilotAllowFlying && heightDelta > (sqrtf(mAutoPilotStopDistance) + 1.f)) { - setFlying(TRUE); + setFlying(true); // Do not force flying for "Sit" behavior to prevent flying after pressing "Stand" // from an object. See EXT-1655. if ("Sit" != mAutoPilotBehaviorName) - mAutoPilotFlyOnStop = TRUE; + mAutoPilotFlyOnStop = true; } - mAutoPilot = TRUE; + mAutoPilot = true; setAutoPilotTargetGlobal(target_global); if (target_rotation) { - mAutoPilotUseRotation = TRUE; + mAutoPilotUseRotation = true; mAutoPilotTargetFacing = LLVector3::x_axis * *target_rotation; mAutoPilotTargetFacing.mV[VZ] = 0.f; mAutoPilotTargetFacing.normalize(); } else { - mAutoPilotUseRotation = FALSE; + mAutoPilotUseRotation = false; } mAutoPilotNoProgressFrameCount = 0; @@ -2240,7 +2240,7 @@ void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global) //----------------------------------------------------------------------------- // startFollowPilot() //----------------------------------------------------------------------------- -void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 stop_distance) +void LLAgent::startFollowPilot(const LLUUID &leader_id, bool allow_flying, F32 stop_distance) { mLeaderID = leader_id; if ( mLeaderID.isNull() ) return; @@ -2266,11 +2266,11 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 s //----------------------------------------------------------------------------- // stopAutoPilot() //----------------------------------------------------------------------------- -void LLAgent::stopAutoPilot(BOOL user_cancel) +void LLAgent::stopAutoPilot(bool user_cancel) { if (mAutoPilot) { - mAutoPilot = FALSE; + mAutoPilot = false; if (mAutoPilotUseRotation && !user_cancel) { resetAxes(mAutoPilotTargetFacing); @@ -2328,7 +2328,7 @@ void LLAgent::autoPilot(F32 *delta_yaw) if (gAgentAvatarp->mInAir && mAutoPilotAllowFlying) { - setFlying(TRUE); + setFlying(true); } LLVector3 at; @@ -2523,7 +2523,7 @@ void LLAgent::propagate(const F32 dt) // handle auto-land behavior if (isAgentAvatarValid()) { - BOOL in_air = gAgentAvatarp->mInAir; + bool in_air = gAgentAvatarp->mInAir; LLVector3 land_vel = getVelocity(); land_vel.mV[VZ] = 0.f; @@ -2533,7 +2533,7 @@ void LLAgent::propagate(const F32 dt) && gSavedSettings.getBOOL("AutomaticFly")) { // land automatically - setFlying(FALSE); + setFlying(false); } } @@ -2597,26 +2597,26 @@ std::ostream& operator<<(std::ostream &s, const LLAgent &agent) return s; } -// TRUE if your own avatar needs to be rendered. Usually only +// true if your own avatar needs to be rendered. Usually only // in third person and build. //----------------------------------------------------------------------------- // needsRenderAvatar() //----------------------------------------------------------------------------- -BOOL LLAgent::needsRenderAvatar() +bool LLAgent::needsRenderAvatar() { // if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson) // [RLVa:KB] - Checked: RLVa-2.0.2 if ( (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson) || (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELF)) ) // [/RLVa:KB] { - return FALSE; + return false; } return mShowAvatar && mOutfitChosen; } -// TRUE if we need to render your own avatar's head. -BOOL LLAgent::needsRenderHead() +// true if we need to render your own avatar's head. +bool LLAgent::needsRenderHead() { // [RLVa:KB] - Checked: RLVa-2.0.2 return ((LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELFHEAD)); @@ -2660,8 +2660,8 @@ void LLAgent::startTyping() } // [FS Communication UI] //(LLFloaterReg::getTypedInstance("nearby_chat"))-> - // sendChatFromViewer("", CHAT_TYPE_START, FALSE); - FSNearbyChat::instance().sendChatFromViewer("", CHAT_TYPE_START, FALSE); + // sendChatFromViewer("", CHAT_TYPE_START, false); + FSNearbyChat::instance().sendChatFromViewer("", CHAT_TYPE_START, false); // [FS Communication UI] } @@ -2676,8 +2676,8 @@ void LLAgent::stopTyping() sendAnimationRequest(ANIM_AGENT_TYPE, ANIM_REQUEST_STOP); // [FS Communication UI] //(LLFloaterReg::getTypedInstance("nearby_chat"))-> - // sendChatFromViewer("", CHAT_TYPE_STOP, FALSE); - FSNearbyChat::instance().sendChatFromViewer("", CHAT_TYPE_STOP, FALSE); + // sendChatFromViewer("", CHAT_TYPE_STOP, false); + FSNearbyChat::instance().sendChatFromViewer("", CHAT_TYPE_STOP, false); // [FS Communication UI] } } @@ -2750,31 +2750,31 @@ void LLAgent::endAnimationUpdateUI() if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_MOUSELOOK ) { // Unhide chat bar, unless autohide is enabled - gSavedSettings.setBOOL("MouseLookEnabled",FALSE); + gSavedSettings.setBOOL("MouseLookEnabled", false); if(!gSavedSettings.getBOOL("AutohideChatBar")) - FSNearbyChat::instance().showDefaultChatBar(TRUE); + FSNearbyChat::instance().showDefaultChatBar(true); // gToolBarView->setToolBarsVisible(true); // show mouse cursor gViewerWindow->showCursor(); // show menus - gMenuBarView->setVisible(TRUE); + gMenuBarView->setVisible(true); // Separate navigation and favorites panel - LLNavigationBar::instance().getView()->setVisible(TRUE); + LLNavigationBar::instance().getView()->setVisible(true); gStatusBar->setVisibleForMouselook(true); // We don't use the mini location panel in Firestorm // static LLCachedControl show_mini_location_panel(gSavedSettings, "ShowMiniLocationPanel"); // if (show_mini_location_panel) // { - // LLPanelTopInfoBar::getInstance()->setVisible(TRUE); + // LLPanelTopInfoBar::getInstance()->setVisible(true); // } // - LLChicletBar::getInstance()->setVisible(TRUE); + LLChicletBar::getInstance()->setVisible(true); - LLPanelStandStopFlying::getInstance()->setVisible(TRUE); + LLPanelStandStopFlying::getInstance()->setVisible(true); LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); @@ -2786,7 +2786,7 @@ void LLAgent::endAnimationUpdateUI() } // Only pop if we have pushed... - if (TRUE == mViewsPushed) + if (true == mViewsPushed) { #if 0 // Use this once all floaters are registered LLFloaterReg::restoreVisibleInstances(); @@ -2835,7 +2835,7 @@ void LLAgent::endAnimationUpdateUI() gFloaterView->popVisibleAll(skip_list); #endif - mViewsPushed = FALSE; + mViewsPushed = false; gFocusMgr.setKeyboardFocus(NULL); // make sure no floater has focus after restoring them } // FIRE-11312: Exiting Mouselook puts keyboard focus on Nearby Chat bar @@ -2849,7 +2849,7 @@ void LLAgent::endAnimationUpdateUI() gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); if( gMorphView ) { - gMorphView->setVisible( FALSE ); + gMorphView->setVisible( false ); } // Disable mouselook-specific animations @@ -2888,7 +2888,7 @@ void LLAgent::endAnimationUpdateUI() if( gMorphView ) { - gMorphView->setVisible( FALSE ); + gMorphView->setVisible( false ); } if (isAgentAvatarValid()) @@ -2898,7 +2898,7 @@ void LLAgent::endAnimationUpdateUI() sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_CUSTOMIZE_DONE, ANIM_REQUEST_START); - mCustomAnim = FALSE ; + mCustomAnim = false ; } } @@ -2920,26 +2920,26 @@ void LLAgent::endAnimationUpdateUI() // clean up UI // first show anything hidden by UI toggle - gViewerWindow->setUIVisibility(TRUE); + gViewerWindow->setUIVisibility(true); // then hide stuff we want hidden for mouselook gToolBarView->setToolBarsVisible(false); - gMenuBarView->setVisible(FALSE); + gMenuBarView->setVisible(false); // Separate navigation and favorites panel - LLNavigationBar::instance().getView()->setVisible(FALSE); + LLNavigationBar::instance().getView()->setVisible(false); gStatusBar->setVisibleForMouselook(false); // We don't use the mini location panel in Firestorm - // LLPanelTopInfoBar::getInstance()->setVisible(FALSE); + // LLPanelTopInfoBar::getInstance()->setVisible(false); - LLChicletBar::getInstance()->setVisible(FALSE); + LLChicletBar::getInstance()->setVisible(false); - LLPanelStandStopFlying::getInstance()->setVisible(FALSE); + LLPanelStandStopFlying::getInstance()->setVisible(false); // Hide chat bar in mouselook mode, unless there is text in it - gSavedSettings.setBOOL("MouseLookEnabled",TRUE); + gSavedSettings.setBOOL("MouseLookEnabled",true); if(FSNearbyChat::instance().defaultChatBarIsIdle()) - FSNearbyChat::instance().showDefaultChatBar(FALSE); + FSNearbyChat::instance().showDefaultChatBar(false); // // clear out camera lag effect @@ -2952,7 +2952,7 @@ void LLAgent::endAnimationUpdateUI() LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset); - mViewsPushed = TRUE; + mViewsPushed = true; // Commented out and moved lower for FIRE-8868: Show UI in mouselook // if (mMouselookModeInSignal) @@ -2994,11 +2994,11 @@ void LLAgent::endAnimationUpdateUI() skip_list.insert(LLFloaterReg::findInstance("fs_im_container")); } // - gFloaterView->pushVisibleAll(FALSE, skip_list); + gFloaterView->pushVisibleAll(false, skip_list); #endif // FIRE-8868: Show UI in mouselook - gConsole->setVisible( TRUE ); + gConsole->setVisible( true ); } // Check ends here, anything below will be executed regardless of its state @@ -3012,11 +3012,11 @@ void LLAgent::endAnimationUpdateUI() if( gMorphView ) { - gMorphView->setVisible(FALSE); + gMorphView->setVisible(false); } // Commented out and moved few lines higher for FIRE-8868: Show UI in mouselook - // gConsole->setVisible( TRUE ); + // gConsole->setVisible( true ); if (isAgentAvatarValid()) { @@ -3065,7 +3065,7 @@ void LLAgent::endAnimationUpdateUI() if( gMorphView ) { - gMorphView->setVisible( TRUE ); + gMorphView->setVisible( true ); } // freeze avatar @@ -3649,7 +3649,7 @@ bool LLAgent::requestGetCapability(const std::string &capName, httpCallback_t cb return false; } -BOOL LLAgent::getAdminOverride() const +bool LLAgent::getAdminOverride() const { return mAgentAccess->getAdminOverride(); } @@ -3659,7 +3659,7 @@ void LLAgent::setMaturity(char text) mAgentAccess->setMaturity(text); } -void LLAgent::setAdminOverride(BOOL b) +void LLAgent::setAdminOverride(bool b) { mAgentAccess->setAdminOverride(b); } @@ -3719,7 +3719,7 @@ void LLAgent::buildFullnameAndTitle(std::string& name) const } } -BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */) const +bool LLAgent::isInGroup(const LLUUID& group_id, bool ignore_god_mode /* false */) const { if (!ignore_god_mode && isGodlike()) return true; @@ -3729,33 +3729,33 @@ BOOL LLAgent::isInGroup(const LLUUID& group_id, BOOL ignore_god_mode /* FALSE */ { if(mGroups[i].mID == group_id) { - return TRUE; + return true; } } - return FALSE; + return false; } // This implementation should mirror LLAgentInfo::hasPowerInGroup -BOOL LLAgent::hasPowerInGroup(const LLUUID& group_id, U64 power) const +bool LLAgent::hasPowerInGroup(const LLUUID& group_id, U64 power) const { if (isGodlikeWithoutAdminMenuFakery()) return true; // GP_NO_POWERS can also mean no power is enough to grant an ability. - if (GP_NO_POWERS == power) return FALSE; + if (GP_NO_POWERS == power) return false; U32 count = mGroups.size(); for(U32 i = 0; i < count; ++i) { if(mGroups[i].mID == group_id) { - return (BOOL)((mGroups[i].mPowers & power) > 0); + return (bool)((mGroups[i].mPowers & power) > 0); } } - return FALSE; + return false; } -BOOL LLAgent::hasPowerInActiveGroup(U64 power) const +bool LLAgent::hasPowerInActiveGroup(U64 power) const { return (mGroupID.notNull() && (hasPowerInGroup(mGroupID, power))); } @@ -3777,7 +3777,7 @@ U64 LLAgent::getPowerInGroup(const LLUUID& group_id) const return GP_NO_POWERS; } -BOOL LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const +bool LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const { S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) @@ -3785,10 +3785,10 @@ BOOL LLAgent::getGroupData(const LLUUID& group_id, LLGroupData& data) const if(mGroups[i].mID == group_id) { data = mGroups[i]; - return TRUE; + return true; } } - return FALSE; + return false; } S32 LLAgent::getGroupContribution(const LLUUID& group_id) const @@ -3805,7 +3805,7 @@ S32 LLAgent::getGroupContribution(const LLUUID& group_id) const return 0; } -BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) +bool LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) { S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) @@ -3822,13 +3822,13 @@ BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution) msg->addUUID("GroupID", group_id); msg->addS32("Contribution", contribution); sendReliableMessage(); - return TRUE; + return true; } } - return FALSE; + return false; } -BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile) +bool LLAgent::setUserGroupFlags(const LLUUID& group_id, bool accept_notices, bool list_in_profile) { S32 count = mGroups.size(); for(S32 i = 0; i < count; ++i) @@ -3852,13 +3852,13 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO // Mark groups hidden in profile gAgent.fireEvent(new LLOldEvents::LLValueChangedEvent(&gAgent, LLSD().with("group_id", group_id).with("visible", list_in_profile)), ""); - return TRUE; + return true; } } - return FALSE; + return false; } -BOOL LLAgent::canJoinGroups() const +bool LLAgent::canJoinGroups() const { // FIRE-12229 //return (S32)mGroups.size() < LLAgentBenefitsMgr::current().getGroupMembershipLimit(); @@ -3922,7 +3922,7 @@ void LLAgent::sendAnimationRequests(const std::vector &anim_ids, EAnimRe } msg->nextBlockFast(_PREHASH_AnimationList); msg->addUUIDFast(_PREHASH_AnimID, (anim_ids[i]) ); - msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? TRUE : FALSE); + msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? true : false); num_valid_anims++; } @@ -3955,7 +3955,7 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request) msg->nextBlockFast(_PREHASH_AnimationList); msg->addUUIDFast(_PREHASH_AnimID, (anim_id) ); - msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? TRUE : FALSE); + msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? true : false); msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList); msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0); @@ -3979,7 +3979,7 @@ void LLAgent::sendAnimationStateReset() msg->nextBlockFast(_PREHASH_AnimationList); msg->addUUIDFast(_PREHASH_AnimID, LLUUID::null ); - msg->addBOOLFast(_PREHASH_StartAnim, FALSE); + msg->addBOOLFast(_PREHASH_StartAnim, false); msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList); msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0); @@ -4049,9 +4049,9 @@ void LLAgent::sendWalkRun() msgsys->nextBlockFast(_PREHASH_AgentData); msgsys->addUUIDFast(_PREHASH_AgentID, getID()); msgsys->addUUIDFast(_PREHASH_SessionID, getSessionID()); -// msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(running) ); +// msgsys->addBOOLFast(_PREHASH_AlwaysRun, bool(running) ); // [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i - msgsys->addBOOLFast(_PREHASH_AlwaysRun, BOOL(getRunning()) ); + msgsys->addBOOLFast(_PREHASH_AlwaysRun, bool(getRunning()) ); // [/RLVa:KB] sendReliableMessage(); } @@ -4064,20 +4064,20 @@ void LLAgent::friendsChanged() mProxyForAgents = collector.mProxy; } -BOOL LLAgent::isGrantedProxy(const LLPermissions& perm) +bool LLAgent::isGrantedProxy(const LLPermissions& perm) { return (mProxyForAgents.count(perm.getOwner()) > 0); } -BOOL LLAgent::allowOperation(PermissionBit op, +bool LLAgent::allowOperation(PermissionBit op, const LLPermissions& perm, U64 group_proxy_power, U8 god_minimum) { // Check god level. - if (getGodLevel() >= god_minimum) return TRUE; + if (getGodLevel() >= god_minimum) return true; - if (!perm.isOwned()) return FALSE; + if (!perm.isOwned()) return false; // A group member with group_proxy_power can act as owner. bool is_group_owned; @@ -4136,37 +4136,37 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global) mAgentOriginGlobal = origin_global; } -BOOL LLAgent::leftButtonGrabbed() const +bool LLAgent::leftButtonGrabbed() const { - const BOOL camera_mouse_look = gAgentCamera.cameraMouselook(); + const bool camera_mouse_look = gAgentCamera.cameraMouselook(); return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) || (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0) || (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) || (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0); } -BOOL LLAgent::rotateGrabbed() const +bool LLAgent::rotateGrabbed() const { return (mControlsTakenCount[CONTROL_YAW_POS_INDEX] > 0) || (mControlsTakenCount[CONTROL_YAW_NEG_INDEX] > 0); } -BOOL LLAgent::forwardGrabbed() const +bool LLAgent::forwardGrabbed() const { return (mControlsTakenCount[CONTROL_AT_POS_INDEX] > 0); } -BOOL LLAgent::backwardGrabbed() const +bool LLAgent::backwardGrabbed() const { return (mControlsTakenCount[CONTROL_AT_NEG_INDEX] > 0); } -BOOL LLAgent::upGrabbed() const +bool LLAgent::upGrabbed() const { return (mControlsTakenCount[CONTROL_UP_POS_INDEX] > 0); } -BOOL LLAgent::downGrabbed() const +bool LLAgent::downGrabbed() const { return (mControlsTakenCount[CONTROL_UP_NEG_INDEX] > 0); } @@ -4679,19 +4679,19 @@ void LLAgent::processControlRelease(LLMessageSystem *msg, void **) } */ -BOOL LLAgent::anyControlGrabbed() const +bool LLAgent::anyControlGrabbed() const { for (U32 i = 0; i < TOTAL_CONTROLS; i++) { if (gAgent.mControlsTakenCount[i] > 0) - return TRUE; + return true; if (gAgent.mControlsTakenPassedOnCount[i] > 0) - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLAgent::isControlGrabbed(S32 control_index) const +bool LLAgent::isControlGrabbed(S32 control_index) const { return mControlsTakenCount[control_index] > 0; } @@ -4707,22 +4707,22 @@ void LLAgent::forceReleaseControls() void LLAgent::setHomePosRegion( const U64& region_handle, const LLVector3& pos_region) { - mHaveHomePosition = TRUE; + mHaveHomePosition = true; mHomeRegionHandle = region_handle; mHomePosRegion = pos_region; } -BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global ) +bool LLAgent::getHomePosGlobal( LLVector3d* pos_global ) { if(!mHaveHomePosition) { - return FALSE; + return false; } F32 x = 0; F32 y = 0; from_region_handle( mHomeRegionHandle, &x, &y); pos_global->setVec( x + mHomePosRegion.mV[VX], y + mHomePosRegion.mV[VY], mHomePosRegion.mV[VZ] ); - return TRUE; + return true; } bool LLAgent::isInHomeRegion() @@ -4846,7 +4846,7 @@ bool LLAgent::teleportCore(bool is_local) // Close all pie menus, deselect land, etc. // Don't change the camera until we know teleport succeeded. JC - gAgentCamera.resetView(FALSE); + gAgentCamera.resetView(false); // local logic add(LLStatViewer::TELEPORT, 1); @@ -4857,7 +4857,7 @@ bool LLAgent::teleportCore(bool is_local) } else { - gTeleportDisplay = TRUE; + gTeleportDisplay = true; LL_INFOS("Teleport") << "Non-local, setting teleport state to TELEPORT_START" << LL_ENDL; gAgent.setTeleportState( LLAgent::TELEPORT_START ); @@ -4907,7 +4907,7 @@ void LLAgent::clearTeleportRequest() { if(LLVoiceClient::instanceExists()) { - LLVoiceClient::getInstance()->setHidden(FALSE); + LLVoiceClient::getInstance()->setHidden(false); } mTeleportRequest.reset(); mTPNeedsNeabyChatSeparator = false; @@ -4937,7 +4937,7 @@ void LLAgent::startTeleportRequest() LL_INFOS("Teleport") << "Agent handling start teleport request." << LL_ENDL; // fix mistyped tag if(LLVoiceClient::instanceExists()) { - LLVoiceClient::getInstance()->setHidden(TRUE); + LLVoiceClient::getInstance()->setHidden(true); } if (hasPendingTeleportRequest()) { @@ -4945,7 +4945,7 @@ void LLAgent::startTeleportRequest() mTeleportCanceled.reset(); if (!isMaturityPreferenceSyncedWithServer()) { - gTeleportDisplay = TRUE; + gTeleportDisplay = true; LL_INFOS("Teleport") << "Maturity preference not synced yet, setting teleport state to TELEPORT_PENDING" << LL_ENDL; setTeleportState(TELEPORT_PENDING); } @@ -5020,13 +5020,13 @@ void LLAgent::handleTeleportFailed() LL_WARNS("Teleport") << "Agent handling teleport failure!" << LL_ENDL; if(LLVoiceClient::instanceExists()) { - LLVoiceClient::getInstance()->setHidden(FALSE); + LLVoiceClient::getInstance()->setHidden(false); } setTeleportState(LLAgent::TELEPORT_NONE); // Unlock the UI if the progress bar has been shown. -// gViewerWindow->setShowProgress(FALSE); -// gTeleportDisplay = FALSE; +// gViewerWindow->setShowProgress(false); +// gTeleportDisplay = false; if (mTeleportRequest) { @@ -5075,14 +5075,14 @@ void LLAgent::addTPNearbyChatSeparator() LLChat chat; chat.mFromName = location_name; - chat.mMuted = FALSE; + chat.mMuted = false; chat.mFromID = LLUUID::null; chat.mSourceType = CHAT_SOURCE_TELEPORT; chat.mChatStyle = CHAT_STYLE_TELEPORT_SEP; chat.mText = ""; LLSD args; - args["do_not_log"] = TRUE; + args["do_not_log"] = true; nearby_chat->addMessage(chat, true, args); } } @@ -5192,13 +5192,13 @@ void LLAgent::doTeleportViaLandmark(const LLUUID& landmark_asset_id) } } -void LLAgent::teleportViaLure(const LLUUID& lure_id, BOOL godlike) +void LLAgent::teleportViaLure(const LLUUID& lure_id, bool godlike) { mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLure(lure_id, godlike)); startTeleportRequest(); } -void LLAgent::doTeleportViaLure(const LLUUID& lure_id, BOOL godlike) +void LLAgent::doTeleportViaLure(const LLUUID& lure_id, bool godlike) { LLViewerRegion* regionp = getRegion(); if(regionp && teleportCore()) @@ -5265,7 +5265,7 @@ void LLAgent::restoreCanceledTeleportRequest() gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED ); mTeleportRequest = mTeleportCanceled; mTeleportCanceled.reset(); - gTeleportDisplay = TRUE; + gTeleportDisplay = true; gTeleportDisplayTimer.reset(); } } @@ -5461,7 +5461,7 @@ void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global, const LLVe // if(!gAgentCamera.isfollowCamLocked()) // { -// gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction +// gAgentCamera.setFocusOnAvatar(false, ANIMATE); // detach camera form avatar, so it keeps direction // } // U64 region_handle = to_region_handle(pos_global); @@ -5491,7 +5491,7 @@ void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global, const LL if(!gAgentCamera.isfollowCamLocked()) { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction + gAgentCamera.setFocusOnAvatar(false, ANIMATE); // detach camera form avatar, so it keeps direction } U64 region_handle{}; @@ -5534,7 +5534,7 @@ LLAgent::ETeleportState LLAgent::getTeleportState() const // // if(!gAgentCamera.isfollowCamLocked()) // { -// gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction +// gAgentCamera.setFocusOnAvatar(false, ANIMATE); // detach camera form avatar, so it keeps direction // } // // U64 region_handle = to_region_handle(pos_global); @@ -5634,7 +5634,7 @@ void LLAgent::stopCurrentAnimations(bool force_keep_script_perms /*= false*/) else { // stop this animation locally - gAgentAvatarp->stopMotion(anim_it->first, TRUE); + gAgentAvatarp->stopMotion(anim_it->first, true); // ...and tell the server to tell everyone. anim_ids.push_back(anim_it->first); } @@ -5748,7 +5748,7 @@ void LLAgent::requestEnterGodMode() msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_RequestBlock); - msg->addBOOLFast(_PREHASH_Godlike, TRUE); + msg->addBOOLFast(_PREHASH_Godlike, true); msg->addUUIDFast(_PREHASH_Token, LLUUID::null); // simulators need to know about your request @@ -5763,7 +5763,7 @@ void LLAgent::requestLeaveGodMode() msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_RequestBlock); - msg->addBOOLFast(_PREHASH_Godlike, FALSE); + msg->addBOOLFast(_PREHASH_Godlike, false); msg->addUUIDFast(_PREHASH_Token, LLUUID::null); // simulator needs to know about your request @@ -5982,7 +5982,7 @@ const std::string& LLAgent::getTeleportStateName() const void LLAgent::parseTeleportMessages(const std::string& xml_filename) { LLXMLNodePtr root; - BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); + bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); if (!success || !root || !root->hasName( "teleport_messages" )) { @@ -6210,7 +6210,7 @@ void LLTeleportRequestViaLandmark::restartTeleport() // LLTeleportRequestViaLure //----------------------------------------------------------------------------- -LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID &pLureId, BOOL pIsLureGodLike) +LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID &pLureId, bool pIsLureGodLike) : LLTeleportRequestViaLandmark(pLureId), mIsLureGodLike(pIsLureGodLike) { @@ -6424,7 +6424,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * else { // no cache of this bake. request upload. - gAgentAvatarp->invalidateComposite(gAgentAvatarp->getLayerSet(baked_index),TRUE); + gAgentAvatarp->invalidateComposite(gAgentAvatarp->getLayerSet(baked_index),true); } } } @@ -6438,7 +6438,7 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * if (gAgentQueryManager.mNumPendingQueries == 0) { // RN: not sure why composites are disabled at this point - gAgentAvatarp->setCompositeUpdatesEnabled(TRUE); + gAgentAvatarp->setCompositeUpdatesEnabled(true); gAgent.sendAgentSetAppearance(); } } @@ -6501,7 +6501,7 @@ void LLAgent::sendAgentSetAppearance() // At this point we have a complete appearance to send and are in a non-baking region. // DRANO FIXME - //gAgentAvatarp->setIsUsingServerBakes(FALSE); + //gAgentAvatarp->setIsUsingServerBakes(false); S32 sb_count, host_count, both_count, neither_count; gAgentAvatarp->bakedTextureOriginCounts(sb_count, host_count, both_count, neither_count); if (both_count != 0 || neither_count != 0) @@ -6558,7 +6558,7 @@ void LLAgent::sendAgentSetAppearance() // is texture data current relative to wearables? // KLW - TAT this will probably need to check the local queue. - BOOL textures_current = gAgentAvatarp->areTexturesCurrent(); + bool textures_current = gAgentAvatarp->areTexturesCurrent(); // BOM fallback legacy opensim (extended for FIRE-29903 contrib from Ubit Umarov) // for(U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++ ) // { @@ -6574,7 +6574,7 @@ void LLAgent::sendAgentSetAppearance() // if (!gAgentAvatarp->isTextureDefined(texture_index, 0)) // { // LL_DEBUGS("Avatar") << "texture not current for baked " << (S32)baked_index << " local " << (S32)texture_index << LL_ENDL; - // textures_current = FALSE; + // textures_current = false; // break; // } // } @@ -6598,7 +6598,7 @@ void LLAgent::sendAgentSetAppearance() if (!gAgentAvatarp->isTextureDefined(texture_index, 0)) { LL_DEBUGS("Avatar") << "texture not current for baked " << (S32)baked_index << " local " << (S32)texture_index << LL_ENDL; - textures_current = FALSE; + textures_current = false; break; } } diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 3964e4dd84..6fee3d8d92 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -82,7 +82,7 @@ struct LLGroupData LLUUID mInsigniaID; U64 mPowers; bool mAcceptNotices; - BOOL mListInProfile; + bool mListInProfile; S32 mContribution; std::string mName; }; @@ -121,7 +121,7 @@ private: public: void onAppFocusGained(); void setFirstLogin(bool b); - // Return TRUE if the database reported this login as the first for this particular user. + // Return true if the database reported this login as the first for this particular user. bool isFirstLogin() const { return mFirstLogin; } bool isInitialized() const { return mInitialized; } @@ -173,10 +173,10 @@ public: // On the very first login, outfit needs to be chosen by some // mechanism, usually by loading the requested initial outfit. We // don't render the avatar until the choice is made. - BOOL isOutfitChosen() const { return mOutfitChosen; } - void setOutfitChosen(BOOL b) { mOutfitChosen = b; } + bool isOutfitChosen() const { return mOutfitChosen; } + void setOutfitChosen(bool b) { mOutfitChosen = b; } private: - BOOL mOutfitChosen; + bool mOutfitChosen; /** Identity ** ** @@ -242,13 +242,13 @@ private: public: void setStartPosition(U32 location_id); // Marks current location as start, sends information to servers void setHomePosRegion(const U64& region_handle, const LLVector3& pos_region); - BOOL getHomePosGlobal(LLVector3d* pos_global); + bool getHomePosGlobal(LLVector3d* pos_global); bool isInHomeRegion(); private: void setStartPositionSuccess(const LLSD &result); - BOOL mHaveHomePosition; + bool mHaveHomePosition; U64 mHomeRegionHandle; LLVector3 mHomePosRegion; @@ -275,7 +275,7 @@ public: void setRegion(LLViewerRegion *regionp); LLViewerRegion *getRegion() const; LLHost getRegionHost() const; - BOOL inPrelude(); + bool inPrelude(); // Capability std::string getRegionCapability(const std::string &name); // short hand for if (getRegion()) { getRegion()->getCapability(name) } @@ -374,8 +374,8 @@ private: // Fly //-------------------------------------------------------------------- public: - BOOL getFlying() const; - void setFlying(BOOL fly, BOOL fail_sound = FALSE); + bool getFlying() const; + void setFlying(bool fly, bool fail_sound = false); static void toggleFlying(); static bool enableFlying(); bool canFly(); // Does this parcel allow you to fly? @@ -431,7 +431,7 @@ private: public: void setAFK(); void clearAFK(); - BOOL getAFK() const; + bool getAFK() const; static const F32 MIN_AFK_TIME; //-------------------------------------------------------------------- @@ -504,59 +504,59 @@ private: public: void setAutorespond(); void clearAutorespond(); - void selectAutorespond(BOOL); - BOOL getAutorespond() const; + void selectAutorespond(bool); + bool getAutorespond() const; private: - BOOL mIsAutorespond; + bool mIsAutorespond; public: void setAutorespondNonFriends(); void clearAutorespondNonFriends(); - void selectAutorespondNonFriends(BOOL); - BOOL getAutorespondNonFriends() const; + void selectAutorespondNonFriends(bool); + bool getAutorespondNonFriends() const; private: - BOOL mIsAutorespondNonFriends; + bool mIsAutorespondNonFriends; // FIRE-1245: Option to block/reject teleport offers public: void setRejectTeleportOffers(); void clearRejectTeleportOffers(); - void selectRejectTeleportOffers(BOOL); - BOOL getRejectTeleportOffers() const; + void selectRejectTeleportOffers(bool); + bool getRejectTeleportOffers() const; private: - BOOL mIsRejectTeleportOffers; + bool mIsRejectTeleportOffers; // FIRE-1245: Option to block/reject teleport offers // FIRE-15233: Automatic friendship request refusal public: void setRejectFriendshipRequests(); void clearRejectFriendshipRequests(); - void selectRejectFriendshipRequests(BOOL); - BOOL getRejectFriendshipRequests() const; + void selectRejectFriendshipRequests(bool); + bool getRejectFriendshipRequests() const; private: - BOOL mIsRejectFriendshipRequests; + bool mIsRejectFriendshipRequests; // FIRE-15233: Automatic friendship request refusal // Option to block/reject all group invites public: void setRejectAllGroupInvites(); void clearRejectAllGroupInvites(); - void selectRejectAllGroupInvites(BOOL); - BOOL getRejectAllGroupInvites() const; + void selectRejectAllGroupInvites(bool); + bool getRejectAllGroupInvites() const; private: - BOOL mIsRejectAllGroupInvites; + bool mIsRejectAllGroupInvites; // Option to block/reject all group invites //-------------------------------------------------------------------- // Grab //-------------------------------------------------------------------- public: - BOOL leftButtonGrabbed() const; - BOOL rotateGrabbed() const; - BOOL forwardGrabbed() const; - BOOL backwardGrabbed() const; - BOOL upGrabbed() const; - BOOL downGrabbed() const; + bool leftButtonGrabbed() const; + bool rotateGrabbed() const; + bool forwardGrabbed() const; + bool backwardGrabbed() const; + bool upGrabbed() const; + bool downGrabbed() const; //-------------------------------------------------------------------- // Controls @@ -565,26 +565,26 @@ public: U32 getControlFlags(); void setControlFlags(U32 mask); // Performs bitwise mControlFlags |= mask void clearControlFlags(U32 mask); // Performs bitwise mControlFlags &= ~mask - BOOL controlFlagsDirty() const; + bool controlFlagsDirty() const; void enableControlFlagReset(); void resetControlFlags(); - BOOL anyControlGrabbed() const; // True iff a script has taken over a control - BOOL isControlGrabbed(S32 control_index) const; + bool anyControlGrabbed() const; // True iff a script has taken over a control + bool isControlGrabbed(S32 control_index) const; // Send message to simulator to force grabbed controls to be // released, in case of a poorly written script. void forceReleaseControls(); - void setFlagsDirty() { mbFlagsDirty = TRUE; } + void setFlagsDirty() { mbFlagsDirty = true; } private: S32 mControlsTakenCount[TOTAL_CONTROLS]; S32 mControlsTakenPassedOnCount[TOTAL_CONTROLS]; U32 mControlFlags; // Replacement for the mFooKey's - BOOL mbFlagsDirty; - BOOL mbFlagsNeedReset; // ! HACK ! For preventing incorrect flags sent when crossing region boundaries + bool mbFlagsDirty; + bool mbFlagsNeedReset; // ! HACK ! For preventing incorrect flags sent when crossing region boundaries // Ignore prejump and always fly - BOOL mIgnorePrejump; - BOOL mAlwaysFly; + bool mIgnorePrejump; + bool mAlwaysFly; void updateIgnorePrejump(const LLSD &data); void updateFSAlwaysFly(const LLSD &data); // Ignore prejump and always fly @@ -606,8 +606,8 @@ public: void endAnimationUpdateUI(); void unpauseAnimation() { mPauseRequest = NULL; } - BOOL getCustomAnim() const { return mCustomAnim; } - void setCustomAnim(BOOL anim) { mCustomAnim = anim; } + bool getCustomAnim() const { return mCustomAnim; } + void setCustomAnim(bool anim) { mCustomAnim = anim; } typedef boost::signals2::signal camera_signal_t; boost::signals2::connection setMouselookModeInCallback( const camera_signal_t::slot_type& cb ); @@ -616,9 +616,9 @@ public: private: camera_signal_t* mMouselookModeInSignal; camera_signal_t* mMouselookModeOutSignal; - BOOL mCustomAnim; // Current animation is ANIM_AGENT_CUSTOMIZE ? + bool mCustomAnim; // Current animation is ANIM_AGENT_CUSTOMIZE ? LLPointer mPauseRequest; - BOOL mViewsPushed; // Keep track of whether or not we have pushed views + bool mViewsPushed; // Keep track of whether or not we have pushed views /** Animation ** ** @@ -644,8 +644,8 @@ public: void moveYaw(F32 mag, bool reset_view = true); void movePitch(F32 mag); - BOOL isMovementLocked() const { return mMovementKeysLocked; } - void setMovementLocked(BOOL set_locked) { mMovementKeysLocked = set_locked; } + bool isMovementLocked() const { return mMovementKeysLocked; } + void setMovementLocked(bool set_locked) { mMovementKeysLocked = set_locked; } //-------------------------------------------------------------------- // Move the avatar's frame @@ -664,12 +664,12 @@ public: // Autopilot //-------------------------------------------------------------------- public: - BOOL getAutoPilot() const { return mAutoPilot; } + bool getAutoPilot() const { return mAutoPilot; } LLVector3d getAutoPilotTargetGlobal() const { return mAutoPilotTargetGlobal; } LLUUID getAutoPilotLeaderID() const { return mLeaderID; } F32 getAutoPilotStopDistance() const { return mAutoPilotStopDistance; } F32 getAutoPilotTargetDist() const { return mAutoPilotTargetDist; } - BOOL getAutoPilotUseRotation() const { return mAutoPilotUseRotation; } + bool getAutoPilotUseRotation() const { return mAutoPilotUseRotation; } LLVector3 getAutoPilotTargetFacing() const { return mAutoPilotTargetFacing; } F32 getAutoPilotRotationThreshold() const { return mAutoPilotRotationThreshold; } std::string getAutoPilotBehaviorName() const { return mAutoPilotBehaviorName; } @@ -677,30 +677,30 @@ public: void startAutoPilotGlobal(const LLVector3d &pos_global, const std::string& behavior_name = std::string(), const LLQuaternion *target_rotation = NULL, - void (*finish_callback)(BOOL, void *) = NULL, void *callback_data = NULL, + void (*finish_callback)(bool, void *) = NULL, void *callback_data = NULL, F32 stop_distance = 0.f, F32 rotation_threshold = 0.03f, - BOOL allow_flying = TRUE); - void startFollowPilot(const LLUUID &leader_id, BOOL allow_flying = TRUE, F32 stop_distance = 0.5f); - void stopAutoPilot(BOOL user_cancel = FALSE); + bool allow_flying = true); + void startFollowPilot(const LLUUID &leader_id, bool allow_flying = true, F32 stop_distance = 0.5f); + void stopAutoPilot(bool user_cancel = false); void setAutoPilotTargetGlobal(const LLVector3d &target_global); void autoPilot(F32 *delta_yaw); // Autopilot walking action, angles in radians void renderAutoPilotTarget(); private: - BOOL mAutoPilot; - BOOL mAutoPilotFlyOnStop; - BOOL mAutoPilotAllowFlying; + bool mAutoPilot; + bool mAutoPilotFlyOnStop; + bool mAutoPilotAllowFlying; LLVector3d mAutoPilotTargetGlobal; F32 mAutoPilotStopDistance; - BOOL mAutoPilotUseRotation; + bool mAutoPilotUseRotation; LLVector3 mAutoPilotTargetFacing; F32 mAutoPilotTargetDist; S32 mAutoPilotNoProgressFrameCount; F32 mAutoPilotRotationThreshold; std::string mAutoPilotBehaviorName; - void (*mAutoPilotFinishedCallback)(BOOL, void *); + void (*mAutoPilotFinishedCallback)(bool, void *); void* mAutoPilotCallbackData; LLUUID mLeaderID; - BOOL mMovementKeysLocked; + bool mMovementKeysLocked; /** Movement ** ** @@ -744,7 +744,7 @@ private: public: void teleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark void teleportHome() { teleportViaLandmark(LLUUID::null); } // Go home - void teleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location + void teleportViaLure(const LLUUID& lure_id, bool godlike); // To an invited location void teleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated // [RLVa:KB] - Checked: RLVa-2.0.0 void teleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at = LLVector3::zero);// To a global location, preserving camera rotation @@ -803,7 +803,7 @@ private: // const LLVector3& pos_local, // Go to a named location home // bool look_at_from_camera = false); void doTeleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark - void doTeleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location + void doTeleportViaLure(const LLUUID& lure_id, bool godlike); // To an invited location void doTeleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated // [RLVa:KB] - Checked: RLVa-2.0.0 void doTeleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at);// To a global location, preserving camera rotation @@ -854,14 +854,14 @@ private: public: // Checks if agent can modify an object based on the permissions and the agent's proxy status. - BOOL isGrantedProxy(const LLPermissions& perm); - BOOL allowOperation(PermissionBit op, + bool isGrantedProxy(const LLPermissions& perm); + bool allowOperation(PermissionBit op, const LLPermissions& perm, U64 group_proxy_power = 0, U8 god_minimum = GOD_MAINTENANCE); const LLAgentAccess& getAgentAccess(); - BOOL canManageEstate() const; - BOOL getAdminOverride() const; + bool canManageEstate() const; + bool getAdminOverride() const; private: LLAgentAccess * mAgentAccess; @@ -872,7 +872,7 @@ public: bool isGodlike() const; bool isGodlikeWithoutAdminMenuFakery() const; U8 getGodLevel() const; - void setAdminOverride(BOOL b); + void setAdminOverride(bool b); void setGodLevel(U8 god_level); void requestEnterGodMode(); void requestLeaveGodMode(); @@ -943,13 +943,13 @@ private: public: LLQuaternion getHeadRotation(); - BOOL needsRenderAvatar(); // TRUE when camera mode is such that your own avatar should draw - BOOL needsRenderHead(); - void setShowAvatar(BOOL show) { mShowAvatar = show; } - BOOL getShowAvatar() const { return mShowAvatar; } + bool needsRenderAvatar(); // true when camera mode is such that your own avatar should draw + bool needsRenderHead(); + void setShowAvatar(bool show) { mShowAvatar = show; } + bool getShowAvatar() const { return mShowAvatar; } private: - BOOL mShowAvatar; // Should we render the avatar? + bool mShowAvatar; // Should we render the avatar? // [Legacy Bake] U32 mAppearanceSerialNum; @@ -983,15 +983,15 @@ private: public: const LLUUID &getGroupID() const { return mGroupID; } - // Get group information by group_id, or FALSE if not in group. - BOOL getGroupData(const LLUUID& group_id, LLGroupData& data) const; + // Get group information by group_id, or false if not in group. + bool getGroupData(const LLUUID& group_id, LLGroupData& data) const; // Get just the agent's contribution to the given group. S32 getGroupContribution(const LLUUID& group_id) const; // Update internal datastructures and update the server. - BOOL setGroupContribution(const LLUUID& group_id, S32 contribution); - BOOL setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOOL list_in_profile); + bool setGroupContribution(const LLUUID& group_id, S32 contribution); + bool setUserGroupFlags(const LLUUID& group_id, bool accept_notices, bool list_in_profile); const std::string &getGroupName() const { return mGroupName; } - BOOL canJoinGroups() const; + bool canJoinGroups() const; private: std::string mGroupName; LLUUID mGroupID; @@ -1001,10 +1001,10 @@ private: //-------------------------------------------------------------------- public: // Checks against all groups in the entire agent group list. - BOOL isInGroup(const LLUUID& group_id, BOOL ingnore_God_mod = FALSE) const; + bool isInGroup(const LLUUID& group_id, bool ingnore_God_mod = false) const; protected: // Only used for building titles. - BOOL isGroupMember() const { return !mGroupID.isNull(); } + bool isGroupMember() const { return !mGroupID.isNull(); } public: std::vector mGroups; @@ -1012,18 +1012,18 @@ public: // Group Title //-------------------------------------------------------------------- public: - void setHideGroupTitle(BOOL hide) { mHideGroupTitle = hide; } - BOOL isGroupTitleHidden() const { return mHideGroupTitle; } + void setHideGroupTitle(bool hide) { mHideGroupTitle = hide; } + bool isGroupTitleHidden() const { return mHideGroupTitle; } private: std::string mGroupTitle; // Honorific, like "Sir" - BOOL mHideGroupTitle; + bool mHideGroupTitle; //-------------------------------------------------------------------- // Group Powers //-------------------------------------------------------------------- public: - BOOL hasPowerInGroup(const LLUUID& group_id, U64 power) const; - BOOL hasPowerInActiveGroup(const U64 power) const; + bool hasPowerInGroup(const LLUUID& group_id, U64 power) const; + bool hasPowerInActiveGroup(const U64 power) const; U64 getPowerInGroup(const LLUUID& group_id) const; U64 mGroupPowers; @@ -1131,7 +1131,7 @@ public: void togglePhantom(); bool getPhantom() const; private: - BOOL mPhantom; + bool mPhantom; /** Firestorm ** ** diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 2e9ca60fa3..2a35282851 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -130,14 +130,14 @@ LLAgentCamera::LLAgentCamera() : mHUDTargetZoom(1.f), mHUDCurZoom(1.f), - mForceMouselook(FALSE), + mForceMouselook(false), mCameraMode( CAMERA_MODE_THIRD_PERSON ), mLastCameraMode( CAMERA_MODE_THIRD_PERSON ), mCameraPreset(CAMERA_PRESET_REAR_VIEW), - mCameraAnimating( FALSE ), + mCameraAnimating( false ), mAnimationCameraStartGlobal(), mAnimationFocusStartGlobal(), mAnimationTimer(), @@ -153,15 +153,15 @@ LLAgentCamera::LLAgentCamera() : mTargetCameraDistance(2.f), mCameraZoomFraction(1.f), // deprecated mThirdPersonHeadOffset(0.f, 0.f, 1.f), - mSitCameraEnabled(FALSE), + mSitCameraEnabled(false), mCameraSmoothingLastPositionGlobal(), mCameraSmoothingLastPositionAgent(), mCameraSmoothingStop(false), mCameraUpVector(LLVector3::z_axis), // default is straight up - mFocusOnAvatar(TRUE), - mAllowChangeToFollow(FALSE), + mFocusOnAvatar(true), + mAllowChangeToFollow(false), mFocusGlobal(), mFocusTargetGlobal(), mFocusObject(NULL), @@ -301,8 +301,8 @@ LLAgentCamera::~LLAgentCamera() // resetView() //----------------------------------------------------------------------------- // FIRE-8798: Option to prevent camera reset on movement -//void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera) -void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera, BOOL movement) +//void LLAgentCamera::resetView(bool reset_camera, bool change_camera) +void LLAgentCamera::resetView(bool reset_camera, bool change_camera, bool movement) // { if (gDisconnected) @@ -312,7 +312,7 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera, BOOL moveme if (gAgent.getAutoPilot()) { - gAgent.stopAutoPilot(TRUE); + gAgent.stopAutoPilot(true); } LLSelectMgr::getInstance()->unhighlightAll(); @@ -335,7 +335,7 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera, BOOL moveme // FIRE-8798: Option to prevent camera reset on movement static LLCachedControl sResetCameraOnMovement(gSavedSettings, "FSResetCameraOnMovement"); - if (sResetCameraOnMovement || movement == FALSE) + if (sResetCameraOnMovement || movement == false) { // @@ -378,7 +378,7 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera, BOOL moveme gAgent.resetAxes(lerp(gAgent.getAtAxis(), agent_at_axis, LLSmoothInterpolation::getInterpolant(0.3f))); } - setFocusOnAvatar(TRUE, ANIMATE); + setFocusOnAvatar(true, ANIMATE); mCameraFOVZoomFactor = 0.f; } @@ -414,7 +414,7 @@ void LLAgentCamera::unlockView() { setFocusGlobal(LLVector3d::zero, gAgentAvatarp->mID); } - setFocusOnAvatar(FALSE, FALSE); // no animation + setFocusOnAvatar(false, false); // no animation } } @@ -605,16 +605,16 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi //----------------------------------------------------------------------------- // calcCameraMinDistance() //----------------------------------------------------------------------------- -BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) +bool LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) { - BOOL soft_limit = FALSE; // is the bounding box to be treated literally (volumes) or as an approximation (avatars) + bool soft_limit = false; // is the bounding box to be treated literally (volumes) or as an approximation (avatars) if (!mFocusObject || mFocusObject->isDead() || mFocusObject->isMesh() || isDisableCameraConstraints()) { obj_min_distance = 0.f; - return TRUE; + return true; } if (mFocusObject->mDrawable.isNull()) @@ -626,7 +626,7 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) LL_ERRS() << "Focus object with no drawable!" << LL_ENDL; #endif obj_min_distance = 0.f; - return TRUE; + return true; } LLQuaternion inv_object_rot = ~mFocusObject->getRenderRotation(); @@ -645,20 +645,20 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) object_extents.mV[VX] *= AVATAR_ZOOM_MIN_X_FACTOR; object_extents.mV[VY] *= AVATAR_ZOOM_MIN_Y_FACTOR; object_extents.mV[VZ] *= AVATAR_ZOOM_MIN_Z_FACTOR; - soft_limit = TRUE; + soft_limit = true; } LLVector3 abs_target_offset = target_offset_origin; abs_target_offset.abs(); LLVector3 target_offset_dir = target_offset_origin; - BOOL target_outside_object_extents = FALSE; + bool target_outside_object_extents = false; for (U32 i = VX; i <= VZ; i++) { if (abs_target_offset.mV[i] * 2.f > object_extents.mV[i] + OBJECT_EXTENTS_PADDING) { - target_outside_object_extents = TRUE; + target_outside_object_extents = true; } if (camera_offset_target.mV[i] > 0.f) { @@ -755,11 +755,11 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) { if (camera_offset_clip > 0.f && target_offset_clip > 0.f) { - return FALSE; + return false; } else if (camera_offset_clip < 0.f && target_offset_clip < 0.f) { - return FALSE; + return false; } } @@ -768,7 +768,7 @@ BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) obj_min_distance += LLViewerCamera::getInstance()->getNear() + (soft_limit ? 0.1f : 0.2f); - return TRUE; + return true; } F32 LLAgentCamera::getCameraZoomFraction(bool get_third_person) @@ -1040,7 +1040,7 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters) if (!gSavedSettings.getBOOL("FreezeTime") && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f) { // No need to animate, camera is already there. - changeCameraToMouselook(FALSE); + changeCameraToMouselook(false); } if (!isDisableCameraConstraints()) @@ -1248,7 +1248,7 @@ void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y) static LLTrace::BlockTimerStatHandle FTM_UPDATE_CAMERA("Camera"); -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; //----------------------------------------------------------------------------- // updateCamera() @@ -1269,7 +1269,7 @@ void LLAgentCamera::updateCamera() // Set focus back on our avie if something changed it if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_UNLOCK)) && ((cameraThirdPerson()) || (cameraFollow())) && (!getFocusOnAvatar()) ) { - setFocusOnAvatar(TRUE, FALSE); + setFocusOnAvatar(true, false); } // [/RLVa:KB] @@ -1287,8 +1287,8 @@ void LLAgentCamera::updateCamera() if (cameraThirdPerson() && (mFocusOnAvatar || mAllowChangeToFollow) && LLFollowCamMgr::getInstance()->getActiveFollowCamParams()) { - mAllowChangeToFollow = FALSE; - mFocusOnAvatar = TRUE; + mAllowChangeToFollow = false; + mFocusOnAvatar = true; changeCameraToFollow(); } @@ -1427,12 +1427,12 @@ void LLAgentCamera::updateCamera() } else { - changeCameraToThirdPerson(TRUE); + changeCameraToThirdPerson(true); } } } - BOOL hit_limit; + bool hit_limit; LLVector3d camera_pos_global; LLVector3d camera_target_global = calcCameraPositionTargetGlobal(&hit_limit); mCameraVirtualPositionAgent = gAgent.getPosAgentFromGlobal(camera_target_global); @@ -1442,7 +1442,7 @@ void LLAgentCamera::updateCamera() mCameraFOVZoomFactor = calcCameraFOVZoomFactor(); camera_target_global = focus_target_global + (camera_target_global - focus_target_global) * (1.f + mCameraFOVZoomFactor); - gAgent.setShowAvatar(TRUE); // can see avatar by default + gAgent.setShowAvatar(true); // can see avatar by default // Adjust position for animation if (mCameraAnimating) @@ -1455,8 +1455,8 @@ void LLAgentCamera::updateCamera() // linear interpolation F32 fraction_of_animation = time / mAnimationDuration; - BOOL isfirstPerson = mCameraMode == CAMERA_MODE_MOUSELOOK; - BOOL wasfirstPerson = mLastCameraMode == CAMERA_MODE_MOUSELOOK; + bool isfirstPerson = mCameraMode == CAMERA_MODE_MOUSELOOK; + bool wasfirstPerson = mLastCameraMode == CAMERA_MODE_MOUSELOOK; F32 fraction_animation_to_skip; if (mAnimationCameraStartGlobal == camera_target_global) @@ -1475,7 +1475,7 @@ void LLAgentCamera::updateCamera() { if (fraction_of_animation < animation_start_fraction || fraction_of_animation > animation_finish_fraction ) { - gAgent.setShowAvatar(FALSE); + gAgent.setShowAvatar(false); } // ...adjust position for animation @@ -1486,13 +1486,13 @@ void LLAgentCamera::updateCamera() else { // ...animation complete - mCameraAnimating = FALSE; + mCameraAnimating = false; camera_pos_global = camera_target_global; mFocusGlobal = focus_target_global; gAgent.endAnimationUpdateUI(); - gAgent.setShowAvatar(TRUE); + gAgent.setShowAvatar(true); } if (isAgentAvatarValid() && (mCameraMode != CAMERA_MODE_MOUSELOOK)) @@ -1504,11 +1504,11 @@ void LLAgentCamera::updateCamera() { camera_pos_global = camera_target_global; mFocusGlobal = focus_target_global; - gAgent.setShowAvatar(TRUE); + gAgent.setShowAvatar(true); } // smoothing - if (TRUE) + if (true) { LLVector3d agent_pos = gAgent.getPositionGlobal(); LLVector3d camera_pos_agent = camera_pos_global - agent_pos; @@ -1521,7 +1521,7 @@ void LLAgentCamera::updateCamera() { const F32 SMOOTHING_HALF_LIFE = 0.02f; - F32 smoothing = LLSmoothInterpolation::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, FALSE); + F32 smoothing = LLSmoothInterpolation::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, false); if (mFocusOnAvatar && !mFocusObject) // we differentiate on avatar mode { @@ -1851,7 +1851,7 @@ F32 LLAgentCamera::calcCameraFOVZoomFactor() //----------------------------------------------------------------------------- // calcCameraPositionTargetGlobal() //----------------------------------------------------------------------------- -LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) +LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit) { // Compute base camera position and look-at points. F32 camera_land_height; @@ -1859,7 +1859,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) gAgent.getPositionGlobal() : gAgent.getPosGlobalFromAgent(getAvatarRootPosition()); - BOOL isConstrained = FALSE; + bool isConstrained = false; LLVector3d head_offset; head_offset.setVec(mThirdPersonHeadOffset); @@ -2088,7 +2088,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) if(camera_distance > max_dist) { camera_position_global = gAgent.getPositionGlobal() + (max_dist/camera_distance)*camera_offset; - isConstrained = TRUE; + isConstrained = true; } } @@ -2099,7 +2099,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) // { // camera_position_global = last_position_global; // -// isConstrained = TRUE; +// isConstrained = true; // } } @@ -2131,7 +2131,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) const LLVector3d offsetCamera(gAgent.getFrameAgent().rotateToAbsolute(offsetCameraLocal)); const LLVector3d posFocusCam = frame_center_global + head_offset + offsetCamera; if (clampCameraPosition(camera_position_global, posFocusCam, nCamOriginDistLimitMin, nCamOriginDistLimitMax)) - isConstrained = TRUE; + isConstrained = true; } // Check avatar distance limits @@ -2139,7 +2139,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) { const LLVector3d posAvatarCam = gAgent.getPosGlobalFromAgent( (isAgentAvatarValid()) ? gAgentAvatarp->mHeadp->getWorldPosition() : gAgent.getPositionAgent() ); if (clampCameraPosition(camera_position_global, posAvatarCam, nCamAvDistLimitMin, nCamAvDistLimitMax)) - isConstrained = TRUE; + isConstrained = true; } } // [/RLVa:KB] @@ -2151,7 +2151,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) if (camera_position_global.mdV[VZ] < minZ) { camera_position_global.mdV[VZ] = minZ; - isConstrained = TRUE; + isConstrained = true; } if (hit_limit) @@ -2306,7 +2306,7 @@ void LLAgentCamera::handleScrollWheel(S32 clicks) mFollowCam.zoom(clicks); if (mFollowCam.isZoomedToMinimumDistance()) { - changeCameraToMouselook(FALSE); + changeCameraToMouselook(false); } } } @@ -2335,7 +2335,7 @@ void LLAgentCamera::handleScrollWheel(S32 clicks) else if (mFocusOnAvatar && (mCameraMode == CAMERA_MODE_THIRD_PERSON)) { // Camera focus and offset with CTRL/SHIFT + Scroll wheel - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); if (mask & MASK_SHIFT) { LLVector3d offset = gSavedSettings.getVector3d("FocusOffsetRearView"); @@ -2412,7 +2412,7 @@ void LLAgentCamera::resetCamera() //----------------------------------------------------------------------------- // changeCameraToMouselook() //----------------------------------------------------------------------------- -void LLAgentCamera::changeCameraToMouselook(BOOL animate) +void LLAgentCamera::changeCameraToMouselook(bool animate) { if (!gSavedSettings.getBOOL("EnableMouselook") // [RLVa:KB] - Checked: RLVa-2.0.0 @@ -2454,7 +2454,7 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate) updateLastCamera(); mCameraMode = CAMERA_MODE_MOUSELOOK; // Animation Overrider - AOEngine::getInstance()->inMouselook(TRUE); + AOEngine::getInstance()->inMouselook(true); const U32 old_flags = gAgent.getControlFlags(); gAgent.setControlFlags(AGENT_CONTROL_MOUSELOOK); if (old_flags != gAgent.getControlFlags()) @@ -2468,7 +2468,7 @@ void LLAgentCamera::changeCameraToMouselook(BOOL animate) } else { - mCameraAnimating = FALSE; + mCameraAnimating = false; gAgent.endAnimationUpdateUI(); } } @@ -2504,7 +2504,7 @@ void LLAgentCamera::changeCameraToDefault() //----------------------------------------------------------------------------- // changeCameraToFollow() //----------------------------------------------------------------------------- -void LLAgentCamera::changeCameraToFollow(BOOL animate) +void LLAgentCamera::changeCameraToFollow(bool animate) { if (LLViewerJoystick::getInstance()->getOverrideCamera()) { @@ -2515,14 +2515,14 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate) { if (mCameraMode == CAMERA_MODE_MOUSELOOK) { - animate = FALSE; + animate = false; } startCameraAnimation(); updateLastCamera(); mCameraMode = CAMERA_MODE_FOLLOW; // Animation Overrider - AOEngine::getInstance()->inMouselook(FALSE); + AOEngine::getInstance()->inMouselook(false); // bang-in the current focus, position, and up vector of the follow cam mFollowCam.reset(mCameraPositionAgent, LLViewerCamera::getInstance()->getPointOfInterest(), LLVector3::z_axis); @@ -2551,7 +2551,7 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate) } else { - mCameraAnimating = FALSE; + mCameraAnimating = false; gAgent.endAnimationUpdateUI(); } } @@ -2560,7 +2560,7 @@ void LLAgentCamera::changeCameraToFollow(BOOL animate) //----------------------------------------------------------------------------- // changeCameraToThirdPerson() //----------------------------------------------------------------------------- -void LLAgentCamera::changeCameraToThirdPerson(BOOL animate) +void LLAgentCamera::changeCameraToThirdPerson(bool animate) { if (LLViewerJoystick::getInstance()->getOverrideCamera()) { @@ -2599,12 +2599,12 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate) { mCurrentCameraDistance = MIN_CAMERA_DISTANCE; mTargetCameraDistance = MIN_CAMERA_DISTANCE; - animate = FALSE; + animate = false; } updateLastCamera(); mCameraMode = CAMERA_MODE_THIRD_PERSON; // Animation Overrider - AOEngine::getInstance()->inMouselook(FALSE); + AOEngine::getInstance()->inMouselook(false); gAgent.clearControlFlags(AGENT_CONTROL_MOUSELOOK); } @@ -2624,7 +2624,7 @@ void LLAgentCamera::changeCameraToThirdPerson(BOOL animate) } else { - mCameraAnimating = FALSE; + mCameraAnimating = false; gAgent.endAnimationUpdateUI(); } } @@ -2671,7 +2671,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar() gFocusMgr.setMouseCapture( NULL ); if( gMorphView ) { - gMorphView->setVisible( TRUE ); + gMorphView->setVisible( true ); } // Remove any pitch or rotation from the avatar LLVector3 at = gAgent.getAtAxis(); @@ -2680,7 +2680,7 @@ void LLAgentCamera::changeCameraToCustomizeAvatar() gAgent.resetAxes(at); gAgent.sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START); - gAgent.setCustomAnim(TRUE); + gAgent.setCustomAnim(true); gAgentAvatarp->startMotion(ANIM_AGENT_CUSTOMIZE); LLMotion* turn_motion = gAgentAvatarp->findMotion(ANIM_AGENT_CUSTOMIZE); @@ -2741,7 +2741,7 @@ void LLAgentCamera::switchCameraPreset(ECameraPreset preset) mCameraZoomFraction = 1.f; //focusing on avatar in that case means following him on movements - mFocusOnAvatar = TRUE; + mFocusOnAvatar = true; mCameraPreset = preset; @@ -2779,7 +2779,7 @@ void LLAgentCamera::startCameraAnimation() mAnimationFocusStartGlobal = mFocusGlobal; setAnimationDuration(gSavedSettings.getF32("ZoomTime")); mAnimationTimer.reset(); - mCameraAnimating = TRUE; + mCameraAnimating = true; } //----------------------------------------------------------------------------- @@ -2787,7 +2787,7 @@ void LLAgentCamera::startCameraAnimation() //----------------------------------------------------------------------------- void LLAgentCamera::stopCameraAnimation() { - mCameraAnimating = FALSE; + mCameraAnimating = false; } void LLAgentCamera::clearFocusObject() @@ -2968,7 +2968,7 @@ void LLAgentCamera::setCameraPosAndFocusGlobal(const LLVector3d& camera_pos, con //----------------------------------------------------------------------------- void LLAgentCamera::setSitCamera(const LLUUID &object_id, const LLVector3 &camera_pos, const LLVector3 &camera_focus) { - BOOL camera_enabled = !object_id.isNull(); + bool camera_enabled = !object_id.isNull(); if (camera_enabled) { @@ -2979,7 +2979,7 @@ void LLAgentCamera::setSitCamera(const LLUUID &object_id, const LLVector3 &camer mSitCameraPos = camera_pos; mSitCameraFocus = camera_focus; mSitCameraReferenceObject = reference_object; - mSitCameraEnabled = TRUE; + mSitCameraEnabled = true; } } else @@ -2987,14 +2987,14 @@ void LLAgentCamera::setSitCamera(const LLUUID &object_id, const LLVector3 &camer mSitCameraPos.clearVec(); mSitCameraFocus.clearVec(); mSitCameraReferenceObject = NULL; - mSitCameraEnabled = FALSE; + mSitCameraEnabled = false; } } //----------------------------------------------------------------------------- // setFocusOnAvatar() //----------------------------------------------------------------------------- -void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate, BOOL reset_axes) +void LLAgentCamera::setFocusOnAvatar(bool focus_on_avatar, bool animate, bool reset_axes) { if (focus_on_avatar != mFocusOnAvatar) { @@ -3041,14 +3041,14 @@ void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate, BOOL re { // keep camera focus point consistent, even though it is now unlocked setFocusGlobal(gAgent.getPositionGlobal() + calcThirdPersonFocusOffset(), gAgent.getID()); - mAllowChangeToFollow = FALSE; + mAllowChangeToFollow = false; } mFocusOnAvatar = focus_on_avatar; } -BOOL LLAgentCamera::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position) +bool LLAgentCamera::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position) { static LLCachedControl isLocalPrivate(gSavedSettings, "PrivateLocalLookAtTarget", false); @@ -3128,7 +3128,7 @@ void LLAgentCamera::lookAtLastChat() new_camera_pos += left * 0.3f; new_camera_pos += up * 0.2f; - setFocusOnAvatar(FALSE, FALSE); + setFocusOnAvatar(false, false); if (chatter_av->mHeadp) { @@ -3159,7 +3159,7 @@ void LLAgentCamera::lookAtLastChat() new_camera_pos += left * 0.3f; new_camera_pos += up * 0.2f; - setFocusOnAvatar(FALSE, FALSE); + setFocusOnAvatar(false, false); setFocusGlobal(chatter->getPositionGlobal(), gAgent.getLastChatter()); mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); @@ -3171,7 +3171,7 @@ bool LLAgentCamera::isfollowCamLocked() return mFollowCam.getPositionLocked(); } -BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position) +bool LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position) { // Remember the current object point pointed at - we might need it later mPointAtObject = object; @@ -3186,7 +3186,7 @@ BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, mPointAt->markDead(); } - return FALSE; + return false; } // @@ -3194,7 +3194,7 @@ BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, //this is the editing arm motion if (object && (object->isAttachment() || object->isAvatar())) { - return FALSE; + return false; } if (!mPointAt || mPointAt->isDead()) { diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h index a4dc4a7b11..e43d84a41d 100644 --- a/indra/newview/llagentcamera.h +++ b/indra/newview/llagentcamera.h @@ -99,14 +99,14 @@ private: //-------------------------------------------------------------------- public: void changeCameraToDefault(); - void changeCameraToMouselook(BOOL animate = TRUE); - void changeCameraToThirdPerson(BOOL animate = TRUE); + void changeCameraToMouselook(bool animate = true); + void changeCameraToThirdPerson(bool animate = true); void changeCameraToCustomizeAvatar(); // Trigger transition animation - void changeCameraToFollow(BOOL animate = TRUE); // Ventrella - BOOL cameraThirdPerson() const { return (mCameraMode == CAMERA_MODE_THIRD_PERSON && mLastCameraMode == CAMERA_MODE_THIRD_PERSON); } - BOOL cameraMouselook() const { return (mCameraMode == CAMERA_MODE_MOUSELOOK && mLastCameraMode == CAMERA_MODE_MOUSELOOK); } - BOOL cameraCustomizeAvatar() const { return (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR /*&& !mCameraAnimating*/); } - BOOL cameraFollow() const { return (mCameraMode == CAMERA_MODE_FOLLOW && mLastCameraMode == CAMERA_MODE_FOLLOW); } + void changeCameraToFollow(bool animate = true); // Ventrella + bool cameraThirdPerson() const { return (mCameraMode == CAMERA_MODE_THIRD_PERSON && mLastCameraMode == CAMERA_MODE_THIRD_PERSON); } + bool cameraMouselook() const { return (mCameraMode == CAMERA_MODE_MOUSELOOK && mLastCameraMode == CAMERA_MODE_MOUSELOOK); } + bool cameraCustomizeAvatar() const { return (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR /*&& !mCameraAnimating*/); } + bool cameraFollow() const { return (mCameraMode == CAMERA_MODE_FOLLOW && mLastCameraMode == CAMERA_MODE_FOLLOW); } ECameraMode getCameraMode() const { return mCameraMode; } ECameraMode getLastCameraMode() const { return mLastCameraMode; } void updateCamera(); // Call once per frame to update camera location/orientation @@ -173,10 +173,10 @@ private: public: LLVector3d getCameraPositionGlobal() const; const LLVector3 &getCameraPositionAgent() const; - LLVector3d calcCameraPositionTargetGlobal(BOOL *hit_limit = NULL); // Calculate the camera position target + LLVector3d calcCameraPositionTargetGlobal(bool *hit_limit = NULL); // Calculate the camera position target F32 getCameraMinOffGround(); // Minimum height off ground for this mode, meters void setCameraCollidePlane(const LLVector4 &plane) { mCameraCollidePlane = plane; } - BOOL calcCameraMinDistance(F32 &obj_min_distance); + bool calcCameraMinDistance(F32 &obj_min_distance); F32 getCurrentCameraBuildOffset() { return (F32)mCameraFocusOffset.length(); } void clearCameraLag() { mCameraLag.clearVec(); } private: @@ -209,12 +209,12 @@ private: //-------------------------------------------------------------------- public: void setupSitCamera(); - BOOL sitCameraEnabled() { return mSitCameraEnabled; } + bool sitCameraEnabled() { return mSitCameraEnabled; } void setSitCamera(const LLUUID &object_id, const LLVector3 &camera_pos = LLVector3::zero, const LLVector3 &camera_focus = LLVector3::zero); private: LLPointer mSitCameraReferenceObject; // Object to which camera is related when sitting - BOOL mSitCameraEnabled; // Use provided camera information when sitting? + bool mSitCameraEnabled; // Use provided camera information when sitting? LLVector3 mSitCameraPos; // Root relative camera pos when sitting LLVector3 mSitCameraFocus; // Root relative camera target when sitting @@ -222,15 +222,15 @@ private: // Animation //-------------------------------------------------------------------- public: - void setCameraAnimating(BOOL b) { mCameraAnimating = b; } - BOOL getCameraAnimating() { return mCameraAnimating; } + void setCameraAnimating(bool b) { mCameraAnimating = b; } + bool getCameraAnimating() { return mCameraAnimating; } void setAnimationDuration(F32 seconds); void startCameraAnimation(); void stopCameraAnimation(); private: LLFrameTimer mAnimationTimer; // Seconds that transition animation has been active F32 mAnimationDuration; // In seconds - BOOL mCameraAnimating; // Camera is transitioning from one mode to another + bool mCameraAnimating; // Camera is transitioning from one mode to another LLVector3d mAnimationCameraStartGlobal; // Camera start position, global coords LLVector3d mAnimationFocusStartGlobal; // Camera focus point, global coords @@ -240,26 +240,26 @@ private: public: LLVector3d calcFocusPositionTargetGlobal(); LLVector3 calcFocusOffset(LLViewerObject *object, LLVector3 pos_agent, S32 x, S32 y); - BOOL getFocusOnAvatar() const { return mFocusOnAvatar; } + bool getFocusOnAvatar() const { return mFocusOnAvatar; } LLPointer& getFocusObject() { return mFocusObject; } F32 getFocusObjectDist() const { return mFocusObjectDist; } void updateFocusOffset(); void validateFocusObject(); void setFocusGlobal(const LLPickInfo& pick); void setFocusGlobal(const LLVector3d &focus, const LLUUID &object_id = LLUUID::null); - void setFocusOnAvatar(BOOL focus, BOOL animate, BOOL reset_axes = TRUE); + void setFocusOnAvatar(bool focus, bool animate, bool reset_axes = true); void setCameraPosAndFocusGlobal(const LLVector3d& pos, const LLVector3d& focus, const LLUUID &object_id); void clearFocusObject(); void setFocusObject(LLViewerObject* object); - void setAllowChangeToFollow(BOOL focus) { mAllowChangeToFollow = focus; } - void setObjectTracking(BOOL track) { mTrackFocusObject = track; } + void setAllowChangeToFollow(bool focus) { mAllowChangeToFollow = focus; } + void setObjectTracking(bool track) { mTrackFocusObject = track; } const LLVector3d &getFocusGlobal() const { return mFocusGlobal; } const LLVector3d &getFocusTargetGlobal() const { return mFocusTargetGlobal; } private: LLVector3d mCameraFocusOffset; // Offset from focus point in build mode LLVector3d mCameraFocusOffsetTarget; // Target towards which we are lerping the camera's focus offset - BOOL mFocusOnAvatar; - BOOL mAllowChangeToFollow; + bool mFocusOnAvatar; + bool mAllowChangeToFollow; LLVector3d mFocusGlobal; LLVector3d mFocusTargetGlobal; LLPointer mFocusObject; @@ -272,11 +272,11 @@ private: //-------------------------------------------------------------------- public: void updateLookAt(const S32 mouse_x, const S32 mouse_y); - BOOL setLookAt(ELookAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero); + bool setLookAt(ELookAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero); ELookAtType getLookAtType(); void lookAtLastChat(); void slamLookAt(const LLVector3 &look_at); // Set the physics data - BOOL setPointAt(EPointAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero); + bool setPointAt(EPointAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero); EPointAtType getPointAtType(); public: LLPointer mLookAt; @@ -331,8 +331,8 @@ public: public: // Called whenever the agent moves. Puts camera back in default position, deselects items, etc. // FIRE-8798: Option to prevent camera reset on movement - //void resetView(BOOL reset_camera = TRUE, BOOL change_camera = FALSE); - void resetView(BOOL reset_camera = TRUE, BOOL change_camera = FALSE, BOOL movement = FALSE); + //void resetView(bool reset_camera = true, bool change_camera = false); + void resetView(bool reset_camera = true, bool change_camera = false, bool movement = false); // // Called on camera movement. Unlocks camera from the default position behind the avatar. void unlockView(); @@ -343,10 +343,10 @@ public: // Mouselook //-------------------------------------------------------------------- public: - BOOL getForceMouselook() const { return mForceMouselook; } - void setForceMouselook(BOOL mouselook) { mForceMouselook = mouselook; } + bool getForceMouselook() const { return mForceMouselook; } + void setForceMouselook(bool mouselook) { mForceMouselook = mouselook; } private: - BOOL mForceMouselook; + bool mForceMouselook; //-------------------------------------------------------------------- // HUD diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp index 20c5d75bdf..a52f87c8f6 100644 --- a/indra/newview/llagentlistener.cpp +++ b/indra/newview/llagentlistener.cpp @@ -380,10 +380,10 @@ void LLAgentListener::startAutoPilot(LLSD const & event_data) rotation_threshold = event_data["rotation_threshold"].asReal(); } - BOOL allow_flying = TRUE; + bool allow_flying = true; if (event_data.has("allow_flying")) { - allow_flying = (BOOL) event_data["allow_flying"].asBoolean(); + allow_flying = (bool) event_data["allow_flying"].asBoolean(); mAgent.setFlying(allow_flying); } @@ -444,10 +444,10 @@ void LLAgentListener::startFollowPilot(LLSD const & event_data) { LLUUID target_id; - BOOL allow_flying = TRUE; + bool allow_flying = true; if (event_data.has("allow_flying")) { - allow_flying = (BOOL) event_data["allow_flying"].asBoolean(); + allow_flying = (bool) event_data["allow_flying"].asBoolean(); } if (event_data.has("leader_id")) @@ -502,7 +502,7 @@ void LLAgentListener::setAutoPilotTarget(LLSD const & event_data) const void LLAgentListener::stopAutoPilot(LLSD const & event_data) const { - BOOL user_cancel = FALSE; + bool user_cancel = false; if (event_data.has("user_cancel")) { user_cancel = event_data["user_cancel"].asBoolean(); diff --git a/indra/newview/llagentpicksinfo.h b/indra/newview/llagentpicksinfo.h index 21df036cb7..8f9bf99d07 100644 --- a/indra/newview/llagentpicksinfo.h +++ b/indra/newview/llagentpicksinfo.h @@ -60,7 +60,7 @@ public: S32 getMaxNumberOfPicks() { return mMaxNumberOfPicks; } /** - * Returns TRUE if Agent has maximum allowed number of Picks. + * Returns true if Agent has maximum allowed number of Picks. */ bool isPickLimitReached(); diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp index cfc445f998..c62431db91 100644 --- a/indra/newview/llagentpilot.cpp +++ b/indra/newview/llagentpilot.cpp @@ -42,15 +42,15 @@ LLAgentPilot gAgentPilot; LLAgentPilot::LLAgentPilot() : mNumRuns(-1), - mQuitAfterRuns(FALSE), - mRecording(FALSE), + mQuitAfterRuns(false), + mRecording(false), mLastRecordTime(0.f), - mStarted(FALSE), - mPlaying(FALSE), + mStarted(false), + mPlaying(false), mCurrentAction(0), - mOverrideCamera(FALSE), - mLoop(TRUE), - mReplaySession(FALSE) + mOverrideCamera(false), + mLoop(true), + mReplaySession(false) { } @@ -221,14 +221,14 @@ void LLAgentPilot::startRecord() mActions.clear(); mTimer.reset(); addAction(STRAIGHT); - mRecording = TRUE; + mRecording = true; } void LLAgentPilot::stopRecord() { gAgentPilot.addAction(STRAIGHT); gAgentPilot.save(); - mRecording = FALSE; + mRecording = false; } void LLAgentPilot::addAction(enum EActionType action_type) @@ -252,7 +252,7 @@ void LLAgentPilot::startPlayback() { if (!mPlaying) { - mPlaying = TRUE; + mPlaying = true; mCurrentAction = 0; mTimer.reset(); @@ -261,12 +261,12 @@ void LLAgentPilot::startPlayback() LL_INFOS() << "Starting playback, moving to waypoint 0" << LL_ENDL; gAgent.startAutoPilotGlobal(mActions[0].mTarget); moveCamera(); - mStarted = FALSE; + mStarted = false; } else { LL_INFOS() << "No autopilot data, cancelling!" << LL_ENDL; - mPlaying = FALSE; + mPlaying = false; } } } @@ -275,7 +275,7 @@ void LLAgentPilot::stopPlayback() { if (mPlaying) { - mPlaying = FALSE; + mPlaying = false; mCurrentAction = 0; mTimer.reset(); gAgent.stopAutoPilot(); @@ -347,7 +347,7 @@ void LLAgentPilot::updateTarget() { LL_INFOS() << "At start, beginning playback" << LL_ENDL; mTimer.reset(); - mStarted = TRUE; + mStarted = true; } } } diff --git a/indra/newview/llagentpilot.h b/indra/newview/llagentpilot.h index f6b6376086..fcfb051dd9 100644 --- a/indra/newview/llagentpilot.h +++ b/indra/newview/llagentpilot.h @@ -68,35 +68,35 @@ public: void addWaypoint(); void moveCamera(); - void setReplaySession(BOOL new_val) { mReplaySession = new_val; } - BOOL getReplaySession() { return mReplaySession; } + void setReplaySession(bool new_val) { mReplaySession = new_val; } + bool getReplaySession() { return mReplaySession; } - void setLoop(BOOL new_val) { mLoop = new_val; } - BOOL getLoop() { return mLoop; } + void setLoop(bool new_val) { mLoop = new_val; } + bool getLoop() { return mLoop; } - void setQuitAfterRuns(BOOL quit_val) { mQuitAfterRuns = quit_val; } + void setQuitAfterRuns(bool quit_val) { mQuitAfterRuns = quit_val; } void setNumRuns(S32 num_runs) { mNumRuns = num_runs; } private: - BOOL mLoop; - BOOL mReplaySession; + bool mLoop; + bool mReplaySession; S32 mNumRuns; - BOOL mQuitAfterRuns; + bool mQuitAfterRuns; void setAutopilotTarget(const S32 id); - BOOL mRecording; + bool mRecording; F32 mLastRecordTime; - BOOL mStarted; - BOOL mPlaying; + bool mStarted; + bool mPlaying; S32 mCurrentAction; - BOOL mOverrideCamera; + bool mOverrideCamera; class Action { diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 3fdaff64a4..0509396f41 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -90,19 +90,19 @@ void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/) } //static -BOOL LLAgentUI::checkAgentDistance(const LLVector3& pole, F32 radius) +bool LLAgentUI::checkAgentDistance(const LLVector3& pole, F32 radius) { F32 delta_x = gAgent.getPositionAgent().mV[VX] - pole.mV[VX]; F32 delta_y = gAgent.getPositionAgent().mV[VY] - pole.mV[VY]; return sqrt( delta_x* delta_x + delta_y* delta_y ) < radius; } -BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region) +bool LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region) { LLViewerRegion* region = gAgent.getRegion(); LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - if (!region || !parcel) return FALSE; + if (!region || !parcel) return false; S32 pos_x = S32(agent_pos_region.mV[VX] + 0.5f); S32 pos_y = S32(agent_pos_region.mV[VY] + 0.5f); @@ -324,9 +324,9 @@ BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const } } str = buffer; - return TRUE; + return true; } -BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt) +bool LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt) { return buildLocationString(str,fmt, gAgent.getPositionAgent()); } diff --git a/indra/newview/llagentui.h b/indra/newview/llagentui.h index 08c39738e3..dfc30dacf9 100644 --- a/indra/newview/llagentui.h +++ b/indra/newview/llagentui.h @@ -48,14 +48,14 @@ public: static void buildSLURL(LLSLURL& slurl, const bool escaped = true); //build location string using the current position of gAgent. - static BOOL buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK); + static bool buildLocationString(std::string& str, ELocationFormat fmt = LOCATION_FORMAT_LANDMARK); //build location string using a region position of the avatar. - static BOOL buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region); + static bool buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region); /** * @brief Check whether the agent is in neighborhood of the pole Within same region * @return true if the agent is in neighborhood. */ - static BOOL checkAgentDistance(const LLVector3& local_pole, F32 radius); + static bool checkAgentDistance(const LLVector3& local_pole, F32 radius); }; #endif //LLAGENTUI_H diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 1d1bc4c0bc..7f5565f803 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2063,7 +2063,7 @@ void LLAgentWearables::recoverMissingWearable(const LLWearableType::EType type, LLViewerWearable* new_wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp); setWearable(type,index,new_wearable); - //new_wearable->writeToAvatar(TRUE); + //new_wearable->writeToAvatar(true); // Add a new one in the lost and found folder. // (We used to overwrite the "not found" one, but that could potentially diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index d98e00dbc9..ffdb30cfa7 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -307,7 +307,7 @@ void LLLibraryOutfitsFetch::doneIdle() break; default: LL_WARNS() << "Got invalid state for outfit fetch: " << mCurrFetchStep << LL_ENDL; - mOutfitsPopulated = TRUE; + mOutfitsPopulated = true; break; } diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 84d61121c5..ca0d9752f9 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -1257,7 +1257,7 @@ void AISUpdate::parseItem(const LLSD& item_map) // Default to current values where not provided. new_item->copyViewerItem(curr_item); } - BOOL rv = new_item->unpackMessage(item_map); + bool rv = new_item->unpackMessage(item_map); if (rv) { if (mFetch) @@ -1302,7 +1302,7 @@ void AISUpdate::parseLink(const LLSD& link_map, S32 depth) // Default to current values where not provided. new_link->copyViewerItem(curr_link); } - BOOL rv = new_link->unpackMessage(link_map); + bool rv = new_link->unpackMessage(link_map); if (rv) { const LLUUID& parent_id = new_link->getParentUUID(); @@ -1408,7 +1408,7 @@ void AISUpdate::parseCategory(const LLSD& category_map, S32 depth) new_cat = new LLViewerInventoryCategory(LLUUID::null); } } - BOOL rv = new_cat->unpackMessage(category_map); + bool rv = new_cat->unpackMessage(category_map); // *NOTE: unpackMessage does not unpack version or descendent count. if (rv) { diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index cbd2bc4a5f..bc36e36047 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -145,7 +145,7 @@ public: void stop() { mEventTimer.stop(); } void start() { mEventTimer.start(); } void reset() { mEventTimer.reset(); } - BOOL getStarted() { return mEventTimer.getStarted(); } + bool getStarted() { return mEventTimer.getStarted(); } LLTimer& getEventTimer() { return mEventTimer;} }; @@ -1788,7 +1788,7 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id) LLInventoryModel::item_array_t items; LLFindWearablesEx collector(/*is_worn=*/ true, /*include_body_parts=*/ false); - gInventory.collectDescendentsIf(cat_id, cats, items, FALSE, collector); + gInventory.collectDescendentsIf(cat_id, cats, items, false, collector); // Client LSL Bridge if (FSLSLBridge::instance().canUseBridge()) @@ -2002,7 +2002,7 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL } } -BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) +bool LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) { // These are the wearable items that are required for considering this // folder as containing a complete outfit. @@ -2029,7 +2029,7 @@ BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) } } - // If the folder contains the required wearables, return TRUE. + // If the folder contains the required wearables, return true. return ((required_wearables & folder_wearables) == required_wearables); } @@ -3277,7 +3277,7 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "edit_outfit")); } - LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append); + LLAppearanceMgr::changeOutfit(true, category->getUUID(), append); } // FIXME do we really want to search entire inventory for matching name? @@ -4960,31 +4960,31 @@ void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) mAttachmentsChangeSignal(item_id); } -BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const +bool LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const { const LLUUID& cof = getCOF(); if (obj_id == cof) - return TRUE; + return true; const LLInventoryObject* obj = gInventory.getObject(obj_id); if (obj && obj->getParentUUID() == cof) - return TRUE; - return FALSE; + return true; + return false; } -BOOL LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const +bool LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const { - if (!getIsInCOF(obj_id)) return FALSE; + if (!getIsInCOF(obj_id)) return false; // If a non-link somehow ended up in COF, allow deletion. const LLInventoryObject *obj = gInventory.getObject(obj_id); if (obj && !obj->getIsLinkType()) { - return FALSE; + return false; } // For now, don't allow direct deletion from the COF. Instead, force users // to choose "Detach" or "Take Off". - return TRUE; + return true; } class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver @@ -5295,7 +5295,7 @@ public: LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false); // *TODOw: This may not be necessary if initial outfit is chosen already -- josh - gAgent.setOutfitChosen(TRUE); + gAgent.setOutfitChosen(true); } } diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index b4ece6a3cb..5d9e780a35 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -92,7 +92,7 @@ public: LLPointer cb); // Return whether this folder contains minimal contents suitable for making a full outfit. - BOOL getCanMakeFolderIntoOutfit(const LLUUID& folder_id); + bool getCanMakeFolderIntoOutfit(const LLUUID& folder_id); // Determine whether a given outfit can be removed. bool getCanRemoveOutfit(const LLUUID& outfit_cat_id); @@ -318,9 +318,9 @@ private: // Item-specific convenience functions public: // Is this in the COF? - BOOL getIsInCOF(const LLUUID& obj_id) const; + bool getIsInCOF(const LLUUID& obj_id) const; // Is this in the COF and can the user delete it from the COF? - BOOL getIsProtectedCOFItem(const LLUUID& obj_id) const; + bool getIsProtectedCOFItem(const LLUUID& obj_id) const; // Outfits will prioritize textures with such name to use for preview in gallery static const std::string sExpectedTextureName; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6d1339949b..18a84860a0 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -314,8 +314,8 @@ static LLAppViewerListener sAppViewerListener(LLAppViewer::instance); extern void init_apple_menu(const char* product); #endif // LL_DARWIN -extern BOOL gRandomizeFramerate; -extern BOOL gPeriodicSlowFrame; +extern bool gRandomizeFramerate; +extern bool gPeriodicSlowFrame; extern bool gDebugGL; #if LL_DARWIN @@ -328,8 +328,8 @@ extern bool gHiDPISupport; F32 gSimLastTime; // Used in LLAppViewer::init and send_viewer_stats() F32 gSimFrames; -BOOL gShowObjectUpdates = FALSE; -BOOL gUseQuickTime = TRUE; +bool gShowObjectUpdates = false; +bool gUseQuickTime = true; eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL; S32 gLastExecDuration = -1; // (<0 indicates unknown) @@ -369,12 +369,12 @@ F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME; S32 gPendingMetricsUploads = 0; -BOOL gDisconnected = FALSE; +bool gDisconnected = false; // used to restore texture state after a mode switch LLFrameTimer gRestoreGLTimer; -BOOL gRestoreGL = FALSE; -bool gUseWireframe = FALSE; +bool gRestoreGL = false; +bool gUseWireframe = false; LLMemoryInfo gSysMemory; U64Bytes gMemoryAllocated(0); // updated in display_stats() in llviewerdisplay.cpp @@ -386,16 +386,16 @@ LLVector3 gRelativeWindVec(0.0, 0.0, 0.0); U32 gPacketsIn = 0; -BOOL gPrintMessagesThisFrame = FALSE; +bool gPrintMessagesThisFrame = false; -BOOL gRandomizeFramerate = FALSE; -BOOL gPeriodicSlowFrame = FALSE; +bool gRandomizeFramerate = false; +bool gPeriodicSlowFrame = false; -BOOL gCrashOnStartup = FALSE; -BOOL gLLErrorActivated = FALSE; -BOOL gLogoutInProgress = FALSE; +bool gCrashOnStartup = false; +bool gLLErrorActivated = false; +bool gLogoutInProgress = false; -BOOL gSimulateMemLeak = FALSE; +bool gSimulateMemLeak = false; // We don't want anyone, especially threads working on the graphics pipeline, // to have to block due to this WorkQueue being full. @@ -433,9 +433,9 @@ const std::string ERROR_MARKER_FILE_NAME(SAFE_FILE_NAME_PREFIX + ".error_marker" const std::string LLERROR_MARKER_FILE_NAME(SAFE_FILE_NAME_PREFIX + ".llerror_marker"); //FS orig modified LL const std::string LOGOUT_MARKER_FILE_NAME(SAFE_FILE_NAME_PREFIX + ".logout_marker"); //FS orig modified LL -//static BOOL gDoDisconnect = FALSE; +//static bool gDoDisconnect = false; // [RLVa:KB] - Checked: RLVa-2.3 -BOOL gDoDisconnect = FALSE; +bool gDoDisconnect = false; // [/RLVa:KB] static std::string gLaunchFileOnQuit; @@ -564,7 +564,7 @@ bool create_text_segment_icon_from_url_match(LLUrlMatch* match,LLTextBase* base) LLIconCtrl* icon; if( match->getMenuName() == "menu_url_group.xml" // See LLUrlEntryGroup constructor - || gAgent.isInGroup(match_id, TRUE)) //This check seems unfiting, urls are either /agent or /group + || gAgent.isInGroup(match_id, true)) //This check seems unfiting, urls are either /agent or /group { LLGroupIconCtrl::Params icon_params; icon_params.group_id = match_id; @@ -647,7 +647,7 @@ static void settings_to_globals() static void settings_modify() { LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater"); - LLPipeline::sRenderDeferred = TRUE; // FALSE is deprecated + LLPipeline::sRenderDeferred = true; // false is deprecated LLRenderTarget::sUseFBO = LLPipeline::sRenderDeferred; LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] @@ -730,8 +730,8 @@ LLAppViewer::LLAppViewer() mLastAgentForceUpdate(0), mMainloopTimeout(NULL), mAgentRegionLastAlive(false), - mRandomizeFramerate(LLCachedControl(gSavedSettings,"Randomize Framerate", FALSE)), - mPeriodicSlowFrame(LLCachedControl(gSavedSettings,"Periodic Slow Frame", FALSE)), + mRandomizeFramerate(LLCachedControl(gSavedSettings,"Randomize Framerate", false)), + mPeriodicSlowFrame(LLCachedControl(gSavedSettings,"Periodic Slow Frame", false)), mFastTimerLogThread(NULL), mSettingsLocationList(NULL), mIsFirstRun(false), @@ -1539,7 +1539,7 @@ bool LLAppViewer::frame() } catch (std::bad_alloc&) { - LLMemory::logMemoryInfo(TRUE); + LLMemory::logMemoryInfo(true); LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::findTypedInstance("mem_leaking"); if (mem_leak_instance) { @@ -2018,7 +2018,7 @@ bool LLAppViewer::cleanup() //flag all elements as needing to be destroyed immediately // to ensure shutdown order - LLMortician::setZealous(TRUE); + LLMortician::setZealous(true); // Give any remaining SLPlugin instances a chance to exit cleanly. LLPluginProcessParent::shutdown(); @@ -2060,11 +2060,11 @@ bool LLAppViewer::cleanup() } else { - gSavedPerAccountSettings.saveToFile(per_account_settings_file, TRUE); + gSavedPerAccountSettings.saveToFile(per_account_settings_file, true); LL_INFOS() << "First time: Saved per-account settings to " << per_account_settings_file << LL_ENDL; } - gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); + gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), true); // /FIRE-4871 // Backup Settings } @@ -2277,7 +2277,7 @@ bool LLAppViewer::cleanup() // save their rects on delete. if(mSaveSettingsOnExit) // Backup Settings { - gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); + gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), true); LLUIColorTable::instance().saveUserSettings(); @@ -2316,7 +2316,7 @@ bool LLAppViewer::cleanup() } else { - gSavedPerAccountSettings.saveToFile(per_account_settings_file, TRUE); + gSavedPerAccountSettings.saveToFile(per_account_settings_file, true); LL_INFOS() << "Second time: Saved per-account settings to " << per_account_settings_file << LL_ENDL; @@ -2334,12 +2334,12 @@ bool LLAppViewer::cleanup() // // We need to save all crash settings, even if they're defaults [see LLCrashLogger::loadCrashBehaviorSetting()] - gCrashSettings.saveToFile(gSavedSettings.getString("CrashSettingsFile"),FALSE); + gCrashSettings.saveToFile(gSavedSettings.getString("CrashSettingsFile"), false); //std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Warnings")); std::string warnings_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("User", "Warnings")); if(mSaveSettingsOnExit) // Backup Settings - gWarningSettings.saveToFile(warnings_settings_filename, TRUE); + gWarningSettings.saveToFile(warnings_settings_filename, true); // Save URL history file if(mSaveSettingsOnExit) // Backup Settings @@ -2794,7 +2794,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, && gSavedSettings.controlExists(file.file_name_setting)) { // try to find filename stored in file_name_setting control - full_settings_path = gSavedSettings.getString(file.file_name_setting); + full_settings_path = gSavedSettings.getString(file.file_name_setting()); if (full_settings_path.empty()) { continue; @@ -2913,7 +2913,7 @@ bool LLAppViewer::initConfiguration() //Load settings files list std::string settings_file_list = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_files.xml"); LLXMLNodePtr root; - BOOL success = LLXMLNode::parseFile(settings_file_list, root, NULL); + bool success = LLXMLNode::parseFile(settings_file_list, root, NULL); if (!success) { LL_WARNS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL; @@ -3079,7 +3079,7 @@ bool LLAppViewer::initConfiguration() gSavedSettings.setBOOL("FirstRunThisInstall", false); } -// FIRE-29819 Set ForceShowGrid to TRUE always, unless expressly disabled +// FIRE-29819 Set ForceShowGrid to true always, unless expressly disabled // FSOpenSimAlwaysForcesShowGrid is added to allow closed grids to soft disable the default behaviour #if OPENSIM && !SINGLEGRID if (!gSavedSettings.getBOOL("ForceShowGrid") && gSavedSettings.getBOOL("FSOpenSimAlwaysForceShowGrid")) @@ -3303,10 +3303,10 @@ bool LLAppViewer::initConfiguration() if (gNonInteractive) { - tempSetControl("AllowMultipleViewers", "TRUE"); - tempSetControl("SLURLPassToOtherInstance", "FALSE"); - tempSetControl("RenderWater", "FALSE"); - tempSetControl("FlyingAtExit", "FALSE"); + tempSetControl("AllowMultipleViewers", "true"); + tempSetControl("SLURLPassToOtherInstance", "false"); + tempSetControl("RenderWater", "false"); + tempSetControl("FlyingAtExit", "false"); tempSetControl("WindowWidth", "1024"); tempSetControl("WindowHeight", "200"); LLError::setEnabledLogTypesMask(0); @@ -3399,7 +3399,7 @@ bool LLAppViewer::initConfiguration() // Option to not save password if using login cmdline switch if (clp.hasOption("logindontsavepassword") && clp.hasOption("login")) { - gSavedSettings.setBOOL("FSLoginDontSavePassword", TRUE); + gSavedSettings.setBOOL("FSLoginDontSavePassword", true); } // @@ -3479,8 +3479,8 @@ bool LLAppViewer::initConfiguration() if(disable_voice && !gSavedSettings.getBOOL("VoiceMultiInstance")) // { - const BOOL DO_NOT_PERSIST = FALSE; - disable_voice->setValue(LLSD(TRUE), DO_NOT_PERSIST); + const bool DO_NOT_PERSIST = false; + disable_voice->setValue(LLSD(true), DO_NOT_PERSIST); } } @@ -3615,7 +3615,7 @@ bool LLAppViewer::initWindow() gHeadlessClient = gSavedSettings.getBOOL("HeadlessClient"); // always start windowed - BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); + bool ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); LLViewerWindow::Params window_params; window_params @@ -4251,7 +4251,7 @@ void LLAppViewer::cleanupSavedSettings() // as we don't track it in callbacks if(NULL != gViewerWindow) { - BOOL maximized = gViewerWindow->getWindow()->getMaximized(); + bool maximized = gViewerWindow->getWindow()->getMaximized(); if (!maximized) { LLCoordScreen window_pos; @@ -4557,7 +4557,7 @@ void LLAppViewer::processMarkerFiles() initLoggingAndGetLastDuration(); // Create the marker file for this execution & lock it; it will be deleted on a clean exit apr_status_t s; - s = mMarkerFile.open(mMarkerFileName, LL_APR_WB, TRUE); + s = mMarkerFile.open(mMarkerFileName, LL_APR_WB, true); if (s == APR_SUCCESS && mMarkerFile.getFileHandle()) { @@ -4754,7 +4754,7 @@ void LLAppViewer::requestQuit() gAgentAvatarp->updateAvatarRezMetrics(true); // force a last packet to be sent. } - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true); effectp->setPositionGlobal(gAgent.getPositionGlobal()); effectp->setColor(LLColor4U(gAgent.getEffectColor())); LLHUDManager::getInstance()->sendEffects(); @@ -4815,7 +4815,7 @@ static bool finish_early_exit(const LLSD& notification, const LLSD& response) void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions) { LL_WARNS() << "app_early_exit: " << name << LL_ENDL; - gDoDisconnect = TRUE; + gDoDisconnect = true; LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit); } @@ -4823,7 +4823,7 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions) void LLAppViewer::earlyExitNoNotify() { LL_WARNS() << "app_early_exit with no notification: " << LL_ENDL; - gDoDisconnect = TRUE; + gDoDisconnect = true; finish_early_exit( LLSD(), LLSD() ); } @@ -4938,7 +4938,7 @@ U32 LLAppViewer::getObjectCacheVersion() bool LLAppViewer::initCache() { mPurgeCache = false; - BOOL read_only = mSecondInstance ? TRUE : FALSE; + bool read_only = mSecondInstance ? true : false; LLAppViewer::getTextureCache()->setReadOnly(read_only) ; LLVOCache::initParamSingleton(read_only); @@ -5093,7 +5093,7 @@ bool LLAppViewer::initCache() { gDirUtilp->deleteDirAndContents(browser_cache); } - gSavedSettings.setBOOL("FSStartupClearBrowserCache", FALSE); + gSavedSettings.setBOOL("FSStartupClearBrowserCache", false); } // @@ -5223,7 +5223,7 @@ void LLAppViewer::forceDisconnect(const std::string& mesg) } LLSD args; - gDoDisconnect = TRUE; + gDoDisconnect = true; if (LLStartUp::getStartupState() < STATE_STARTED) { @@ -5246,7 +5246,7 @@ void LLAppViewer::badNetworkHandler() // Flush all of our caches on exit in the case of disconnect due to // invalid packets. - mPurgeCacheOnExit = TRUE; + mPurgeCacheOnExit = true; std::ostringstream message; message << @@ -5274,7 +5274,7 @@ void LLAppViewer::saveFinalSnapshot() gSavedSettings.setVector3d("FocusPosOnLogout", gAgentCamera.calcFocusPositionTargetGlobal()); gSavedSettings.setVector3d("CameraPosOnLogout", gAgentCamera.calcCameraPositionTargetGlobal()); gViewerWindow->setCursor(UI_CURSOR_WAIT); - gAgentCamera.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch + gAgentCamera.changeCameraToThirdPerson( false ); // don't animate, need immediate switch gSavedSettings.setBOOL("ShowParcelOwners", false); idle(); @@ -5285,12 +5285,12 @@ void LLAppViewer::saveFinalSnapshot() gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), - FALSE, + false, gSavedSettings.getBOOL("RenderHUDInSnapshot"), - TRUE, + true, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG); - mSavedFinalSnapshot = TRUE; + mSavedFinalSnapshot = true; if (gAgent.isInHomeRegion()) { @@ -5532,7 +5532,7 @@ void LLAppViewer::idle() // When appropriate, update agent location to the simulator. F32 agent_update_time = agent_update_timer.getElapsedTimeF32(); F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time; - BOOL force_update = gAgent.controlFlagsDirty() + bool force_update = gAgent.controlFlagsDirty() || (mLastAgentControlFlags != gAgent.getControlFlags()) || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND)); if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND))) @@ -5949,7 +5949,7 @@ void LLAppViewer::sendLogoutRequest() if(!mLogoutRequestSent && gMessageSystem) { //Set internal status variables and marker files before actually starting the logout process - gLogoutInProgress = TRUE; + gLogoutInProgress = true; if (!mSecondInstance) { mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME); @@ -5979,7 +5979,7 @@ void LLAppViewer::sendLogoutRequest() gLogoutTimer.reset(); gLogoutMaxTime = LOGOUT_REQUEST_TIME; - mLogoutRequestSent = TRUE; + mLogoutRequestSent = true; if(LLVoiceClient::instanceExists()) { @@ -6166,7 +6166,7 @@ void LLAppViewer::idleNetwork() if (gPrintMessagesThisFrame) { LL_INFOS() << "Decoded " << total_decoded << " msgs this frame!" << LL_ENDL; - gPrintMessagesThisFrame = FALSE; + gPrintMessagesThisFrame = false; } } add(LLStatViewer::NUM_NEW_OBJECTS, gObjectList.mNumNewObjects); @@ -6282,7 +6282,7 @@ void LLAppViewer::disconnectViewer() LLDestroyClassList::instance().fireCallbacks(); cleanup_xfer_manager(); - gDisconnected = TRUE; + gDisconnected = true; // Pass the connection state to LLUrlEntryParcel not to attempt // parcel info requests while disconnected. diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 1aeee9a9bd..a59bf8c9fd 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -374,7 +374,7 @@ const S32 AGENT_FORCE_UPDATES_PER_SECOND = 1; // "// llstartup" indicates that llstartup is the only client for this global. extern LLSD gDebugInfo; -extern BOOL gShowObjectUpdates; +extern bool gShowObjectUpdates; typedef enum { @@ -415,10 +415,10 @@ extern S32 gPendingMetricsUploads; extern F32 gSimLastTime; extern F32 gSimFrames; -extern BOOL gDisconnected; +extern bool gDisconnected; extern LLFrameTimer gRestoreGLTimer; -extern BOOL gRestoreGL; +extern bool gRestoreGL; extern bool gUseWireframe; extern LLMemoryInfo gSysMemory; @@ -429,13 +429,13 @@ extern std::string gLastVersionChannel; extern LLVector3 gWindVec; extern LLVector3 gRelativeWindVec; extern U32 gPacketsIn; -extern BOOL gPrintMessagesThisFrame; +extern bool gPrintMessagesThisFrame; extern LLUUID gBlackSquareID; -extern BOOL gRandomizeFramerate; -extern BOOL gPeriodicSlowFrame; +extern bool gRandomizeFramerate; +extern bool gPeriodicSlowFrame; -extern BOOL gSimulateMemLeak; +extern bool gSimulateMemLeak; #endif // LL_LLAPPVIEWER_H diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 7828e19725..451af3bafc 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -969,19 +969,19 @@ bool LLAppViewerWin32::initHardwareTest() // Do driver verification and initialization based on DirectX // hardware polling and driver versions // - if (/*TRUE == gSavedSettings.getBOOL("ProbeHardwareOnStartup") &&*/ FALSE == gSavedSettings.getBOOL("NoHardwareProbe")) // FIRE-20378 / FIRE-20382: Breaks memory detection an 4K monitor workaround + if (/*true == gSavedSettings.getBOOL("ProbeHardwareOnStartup") &&*/ false == gSavedSettings.getBOOL("NoHardwareProbe")) // FIRE-20378 / FIRE-20382: Breaks memory detection an 4K monitor workaround { // per DEV-11631 - disable hardware probing for everything // but vram. - BOOL vram_only = TRUE; + bool vram_only = true; LLSplashScreen::update(LLTrans::getString("StartupDetectingHardware")); LL_DEBUGS("AppInit") << "Attempting to poll DirectX for hardware info" << LL_ENDL; gDXHardware.setWriteDebugFunc(write_debug_dx); // FIRE-15891: Add option to disable WMI check in case of problems - //BOOL probe_ok = gDXHardware.getInfo(vram_only); - BOOL probe_ok = gDXHardware.getInfo(vram_only, gSavedSettings.getBOOL("FSDisableWMIProbing")); + //bool probe_ok = gDXHardware.getInfo(vram_only); + bool probe_ok = gDXHardware.getInfo(vram_only, gSavedSettings.getBOOL("FSDisableWMIProbing")); // if (!probe_ok diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 9777a91dcf..039ca94456 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -80,11 +80,11 @@ LLAttachmentsMgr::~LLAttachmentsMgr() //void LLAttachmentsMgr::addAttachmentRequest(const LLUUID& item_id, // const U8 attachment_pt, -// const BOOL add) +// const bool add) // [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1) void LLAttachmentsMgr::addAttachmentRequest(const LLUUID& item_id, const U8 attachment_pt, - const BOOL add, const BOOL fRlvForce /*=FALSE*/) + const bool add, const bool fRlvForce /*=false*/) // [/RLVa:KB] { LLViewerInventoryItem *item = gInventory.getItem(item_id); @@ -420,18 +420,18 @@ void LLAttachmentsMgr::LLItemRequestTimes::removeTime(const LLUUID& inv_item_id) } } -BOOL LLAttachmentsMgr::LLItemRequestTimes::getTime(const LLUUID& inv_item_id, LLTimer& timer) const +bool LLAttachmentsMgr::LLItemRequestTimes::getTime(const LLUUID& inv_item_id, LLTimer& timer) const { std::map::const_iterator it = (*this).find(inv_item_id); if (it != (*this).end()) { timer = it->second; - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLAttachmentsMgr::LLItemRequestTimes::wasRequestedRecently(const LLUUID& inv_item_id) const +bool LLAttachmentsMgr::LLItemRequestTimes::wasRequestedRecently(const LLUUID& inv_item_id) const { LLTimer request_time; if (getTime(inv_item_id, request_time)) @@ -441,7 +441,7 @@ BOOL LLAttachmentsMgr::LLItemRequestTimes::wasRequestedRecently(const LLUUID& in } else { - return FALSE; + return false; } } diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h index 7455b06070..91bfdefba9 100644 --- a/indra/newview/llattachmentsmgr.h +++ b/indra/newview/llattachmentsmgr.h @@ -69,18 +69,18 @@ public: { LLUUID mItemID; U8 mAttachmentPt; - BOOL mAdd; + bool mAdd; }; typedef std::deque attachments_vec_t; // [RLVa:KB] - Checked: 2010-09-13 (RLVa-1.2.1) void addAttachmentRequest(const LLUUID& item_id, const U8 attachment_pt, - const BOOL add, const BOOL fRlvForce = FALSE); + const bool add, const bool fRlvForce = false); // [/RLVa:KB] // void addAttachmentRequest(const LLUUID& item_id, // const U8 attachment_pt, -// const BOOL add); +// const bool add); void onAttachmentRequested(const LLUUID& item_id); void requestAttachments(attachments_vec_t& attachment_requests); static void onIdle(void *); @@ -110,8 +110,8 @@ private: LLItemRequestTimes(const std::string& op_name, F32 timeout); void addTime(const LLUUID& inv_item_id); void removeTime(const LLUUID& inv_item_id); - BOOL wasRequestedRecently(const LLUUID& item_id) const; - BOOL getTime(const LLUUID& inv_item_id, LLTimer& timer) const; + bool wasRequestedRecently(const LLUUID& item_id) const; + bool getTime(const LLUUID& inv_item_id, LLTimer& timer) const; private: F32 mTimeout; diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 61289c4e5d..b1493340fc 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -680,7 +680,7 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_MessageBlock); - msg->addBOOLFast(_PREHASH_FromGroup, FALSE); + msg->addBOOLFast(_PREHASH_FromGroup, false); msg->addUUIDFast(_PREHASH_ToAgentID, notification["substitutions"]["uuid"] ); msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); msg->addU8Fast(_PREHASH_Dialog, IM_TELEPORT_REQUEST); @@ -927,7 +927,7 @@ namespace action_give_inventory */ static LLInventoryPanel* get_active_inventory_panel() { - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false); LLFloater* floater_appearance = LLFloaterReg::findInstance("appearance"); if (!active_panel || (floater_appearance && floater_appearance->hasFocus())) { @@ -1302,8 +1302,8 @@ void LLAvatarActions::shareWithAvatars(LLView * panel) LLInventoryPanel* inv_panel = dynamic_cast(panel); LLFloaterAvatarPicker* picker = // FIRE-32377: Don't include own avatar when sharing items - //LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2, inv_panel), TRUE, FALSE, FALSE, root_floater->getName()); - LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2, inv_panel), TRUE, FALSE, TRUE, root_floater->getName()); + //LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2, inv_panel), true, false, false, root_floater->getName()); + LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2, inv_panel), true, false, true, root_floater->getName()); if (!picker) { return; @@ -1325,7 +1325,7 @@ void LLAvatarActions::shareWithAvatars(const uuid_set_t inventory_selected_uuids using namespace action_give_inventory; LLFloaterAvatarPicker* picker = - LLFloaterAvatarPicker::show(boost::bind(give_inventory_ids, _1, _2, inventory_selected_uuids), TRUE, FALSE, FALSE, root_floater->getName()); + LLFloaterAvatarPicker::show(boost::bind(give_inventory_ids, _1, _2, inventory_selected_uuids), true, false, false, root_floater->getName()); if (!picker) { return; @@ -1548,7 +1548,7 @@ void LLAvatarActions::viewChatHistory(const LLUUID& id) //LLFloaterReg::showInstance("preview_conversation", iter->getSessionID(), true); if (gSavedSettings.getBOOL("FSUseBuiltInHistory")) { - LLFloaterReg::showInstance("preview_conversation", iter->getSessionID(), TRUE); + LLFloaterReg::showInstance("preview_conversation", iter->getSessionID(), true); } else { @@ -1581,7 +1581,7 @@ void LLAvatarActions::viewChatHistory(const LLUUID& id) if (gSavedSettings.getBOOL("FSUseBuiltInHistory")) { - LLFloaterReg::showInstance("preview_conversation", extended_id, TRUE); + LLFloaterReg::showInstance("preview_conversation", extended_id, true); } else { @@ -1621,7 +1621,7 @@ void LLAvatarActions::viewChatHistoryExternally(const LLUUID& id) //static void LLAvatarActions::addToContactSet(const LLUUID& agent_id) { - LLFloaterReg::showInstance("fs_add_contact", agent_id, TRUE); + LLFloaterReg::showInstance("fs_add_contact", agent_id, true); } void LLAvatarActions::addToContactSet(const uuid_vec_t& agent_ids) @@ -1637,7 +1637,7 @@ void LLAvatarActions::addToContactSet(const uuid_vec_t& agent_ids) { data.append(*it); } - LLFloaterReg::showInstance("fs_add_contact", data, TRUE); + LLFloaterReg::showInstance("fs_add_contact", data, true); } } // [/FS:CR] Add to contact set @@ -1661,7 +1661,7 @@ bool LLAvatarActions::handleRemove(const LLSD& notification, const LLSD& respons case 0: // YES if( ip->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS)) { - LLAvatarTracker::instance().empower(id, FALSE); + LLAvatarTracker::instance().empower(id, false); LLAvatarTracker::instance().notifyObservers(); } LLAvatarTracker::instance().terminateBuddy(id); diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 0db6d28808..a7471fd58b 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -363,7 +363,7 @@ void LLAvatarList::setDirty(bool val /*= true*/, bool force_refresh /*= false*/) ////////////////////////////////////////////////////////////////////////// void LLAvatarList::refresh() { - bool have_names = TRUE; + bool have_names = true; bool add_limit_exceeded = false; bool modified = false; bool have_filter = !mNameFilter.empty(); @@ -567,7 +567,7 @@ S32 LLAvatarList::notifyParent(const LLSD& info) return LLFlatListViewEx::notifyParent(info); } -void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) +void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, bool is_online, EAddPosition pos) { LLAvatarListItem* item = new LLAvatarListItem(); item->setShowCompleteName(mShowCompleteName); diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 2bf4828b98..bab9201324 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -129,7 +129,7 @@ public: protected: void refresh(); - void addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos = ADD_BOTTOM); + void addNewItem(const LLUUID& id, const std::string& name, bool is_online, EAddPosition pos = ADD_BOTTOM); void computeDifference( const uuid_vec_t& vnew, uuid_vec_t& vadded, diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index e419f6061a..7c78056724 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -151,11 +151,11 @@ bool LLAvatarListItem::postBuild() mBtnPermissionEditMine->setClickedCallback(boost::bind(&LLAvatarListItem::onPermissionEditMineClick, this)); mBtnPermissionOnline->setVisible(false); - mBtnPermissionOnline->setIsChrome(TRUE); + mBtnPermissionOnline->setIsChrome(true); mBtnPermissionMap->setVisible(false); - mBtnPermissionMap->setIsChrome(TRUE); + mBtnPermissionMap->setIsChrome(true); mBtnPermissionEditMine->setVisible(false); - mBtnPermissionEditMine->setIsChrome(TRUE); + mBtnPermissionEditMine->setIsChrome(true); mIconPermissionEditTheirs->setVisible(false); mSpeakingIndicator = getChild("speaking_indicator"); @@ -462,7 +462,7 @@ void LLAvatarListItem::setShowProfileBtn(bool show) void LLAvatarListItem::showSpeakingIndicator(bool visible) { // Already done? Then do nothing. - if (mSpeakingIndicator->getVisible() == (BOOL)visible) + if (mSpeakingIndicator->getVisible() == (bool)visible) return; // Disabled to not contradict with SpeakingIndicatorManager functionality. EXT-3976 // probably this method should be totally removed. @@ -473,7 +473,7 @@ void LLAvatarListItem::showSpeakingIndicator(bool visible) void LLAvatarListItem::setAvatarIconVisible(bool visible) { // Already done? Then do nothing. - if (mAvatarIcon->getVisible() == (BOOL)visible) + if (mAvatarIcon->getVisible() == (bool)visible) { return; } @@ -924,7 +924,7 @@ void LLAvatarListItem::onPermissionOnlineClick() mBtnPermissionOnline->setColor(LLUIColorTable::instance().getColor("White_10")); } LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(getAvatarId(),new_rights); - mBtnPermissionOnline->setFocus(FALSE); + mBtnPermissionOnline->setFocus(false); } } @@ -946,7 +946,7 @@ void LLAvatarListItem::onPermissionMapClick() mBtnPermissionMap->setColor(LLUIColorTable::instance().getColor("White_10")); } LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(getAvatarId(),new_rights); - mBtnPermissionMap->setFocus(FALSE); + mBtnPermissionMap->setFocus(false); } } @@ -969,7 +969,7 @@ void LLAvatarListItem::onPermissionEditMineClick() LLAvatarPropertiesProcessor::getInstance()->sendFriendRights(getAvatarId(),new_rights); } - mBtnPermissionEditMine->setFocus(FALSE); + mBtnPermissionEditMine->setFocus(false); } } diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 8750eb9f91..f95d5d0bbd 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -230,7 +230,7 @@ void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData* // This value is required by sendAvatarPropertiesUpdate method. //A profile should never be mature. (From the original code) - BOOL mature = FALSE; + bool mature = false; LLMessageSystem *msg = gMessageSystem; @@ -284,10 +284,10 @@ std::string LLAvatarPropertiesProcessor::paymentInfo(const LLAvatarData* avatar_ const S32 LINDEN_EMPLOYEE_INDEX = 3; if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX) return ""; - BOOL transacted = (avatar_data->flags & AVATAR_TRANSACTED); - BOOL identified = (avatar_data->flags & AVATAR_IDENTIFIED); + bool transacted = (avatar_data->flags & AVATAR_TRANSACTED); + bool identified = (avatar_data->flags & AVATAR_IDENTIFIED); // Not currently getting set in dataserver/lldataavatar.cpp for privacy considerations - //BOOL age_verified = (avatar_data->flags & AVATAR_AGEVERIFIED); + //bool age_verified = (avatar_data->flags & AVATAR_AGEVERIFIED); const char* payment_text; if(transacted) @@ -768,7 +768,7 @@ void LLAvatarPropertiesProcessor::sendPickInfoUpdate(const LLPickData* new_pick) msg->addUUID(_PREHASH_CreatorID, new_pick->creator_id); //legacy var need to be deleted - msg->addBOOL(_PREHASH_TopPick, FALSE); + msg->addBOOL(_PREHASH_TopPick, false); // fills in on simulator if null msg->addUUID(_PREHASH_ParcelID, new_pick->parcel_id); diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 3eb4d3d745..865e1dff47 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -87,7 +87,7 @@ struct LLAvatarData std::string caption_text; std::string customer_type; U32 flags; - BOOL allow_publish; + bool allow_publish; }; struct LLAvatarPicks @@ -135,7 +135,7 @@ struct LLAvatarGroups { LLUUID agent_id; LLUUID avatar_id; //target id - BOOL list_in_profile; + bool list_in_profile; struct LLGroupData; typedef std::list group_list_t; @@ -145,7 +145,7 @@ struct LLAvatarGroups struct LLGroupData { U64 group_powers; - BOOL accept_notices; + bool accept_notices; std::string group_title; LLUUID group_id; std::string group_name; diff --git a/indra/newview/llbuycurrencyhtml.cpp b/indra/newview/llbuycurrencyhtml.cpp index 18fa0cf083..b994848d4a 100644 --- a/indra/newview/llbuycurrencyhtml.cpp +++ b/indra/newview/llbuycurrencyhtml.cpp @@ -148,9 +148,9 @@ void LLBuyCurrencyHTML::showDialog( bool specific_sum_requested, const std::stri buy_currency_floater->navigateToFinalURL(); // make it visible and raise to front - BOOL visible = TRUE; + bool visible = true; buy_currency_floater->setVisible( visible ); - BOOL take_focus = TRUE; + bool take_focus = true; buy_currency_floater->setFrontmost( take_focus ); // spec calls for floater to be centered on client window diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index ad9ae12ced..78a02e7204 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -107,7 +107,7 @@ LLAvatarTracker::LLAvatarTracker() : mTrackingData(NULL), mTrackedAgentValid(false), mModifyMask(0x0), - mIsNotifyObservers(FALSE) + mIsNotifyObservers(false) { } @@ -508,7 +508,7 @@ void LLAvatarTracker::notifyObservers() return; } LL_PROFILE_ZONE_SCOPED - mIsNotifyObservers = TRUE; + mIsNotifyObservers = true; observer_list_t observers(mObservers); observer_list_t::iterator it = observers.begin(); @@ -525,7 +525,7 @@ void LLAvatarTracker::notifyObservers() mModifyMask = LLFriendObserver::NONE; mChangedBuddyIDs.clear(); - mIsNotifyObservers = FALSE; + mIsNotifyObservers = false; } void LLAvatarTracker::addParticularFriendObserver(const LLUUID& buddy_id, LLFriendObserver* observer) @@ -766,9 +766,9 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) S32 count = msg->getNumberOfBlocksFast(_PREHASH_AgentBlock); // Attempt to speed up things a little - // BOOL chat_notify = gSavedSettings.getBOOL("ChatOnlineNotification"); + // bool chat_notify = gSavedSettings.getBOOL("ChatOnlineNotification"); static LLCachedControl ChatOnlineNotification(gSavedSettings, "ChatOnlineNotification"); - BOOL chat_notify = ChatOnlineNotification; + bool chat_notify = ChatOnlineNotification; // LL_DEBUGS() << "Received " << count << " online notifications **** " << LL_ENDL; @@ -847,7 +847,7 @@ static void on_avatar_name_cache_notify(const LLUUID& agent_id, notification = LLNotifications::instance().add("FriendOnlineOffline", args, - payload.with("respond_on_mousedown", TRUE), + payload.with("respond_on_mousedown", true), boost::bind(&LLAvatarActions::startIM, agent_id)); } else diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h index 3ac758561c..e8caaada18 100644 --- a/indra/newview/llcallingcard.h +++ b/indra/newview/llcallingcard.h @@ -217,7 +217,7 @@ private: LLAvatarTracker(const LLAvatarTracker&); bool operator==(const LLAvatarTracker&); - BOOL mIsNotifyObservers; + bool mIsNotifyObservers; public: // don't you dare create or delete this object diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 74b53ea7ca..0d7cfec904 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -183,7 +183,7 @@ void LLChannelManager::onStartUpToastClose() { if(mStartUpChannel) { - mStartUpChannel->setVisible(FALSE); + mStartUpChannel->setVisible(false); mStartUpChannel->closeStartUpToast(); removeChannelByID(LLUUID(gSavedSettings.getString("StartUpChannelUUID"))); mStartUpChannel = NULL; diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index cdc55f0066..3b009ed497 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -90,11 +90,11 @@ LLChatBar::LLChatBar() mInputEditor(NULL), mGestureLabelTimer(), mLastSpecialChatChannel(0), - mIsBuilt(FALSE), + mIsBuilt(false), mGestureCombo(NULL), mObserver(NULL) { - //setIsChrome(TRUE); + //setIsChrome(true); } @@ -119,16 +119,16 @@ bool LLChatBar::postBuild() mInputEditor->setKeystrokeCallback(&onInputEditorKeystroke, this); mInputEditor->setFocusLostCallback(boost::bind(&LLChatBar::onInputEditorFocusLost)); mInputEditor->setFocusReceivedCallback(boost::bind(&LLChatBar::onInputEditorGainFocus)); - mInputEditor->setCommitOnFocusLost( FALSE ); - mInputEditor->setRevertOnEsc( FALSE ); - mInputEditor->setIgnoreTab(TRUE); - mInputEditor->setPassDelete(TRUE); - mInputEditor->setReplaceNewlinesWithSpaces(FALSE); + mInputEditor->setCommitOnFocusLost( false ); + mInputEditor->setRevertOnEsc( false ); + mInputEditor->setIgnoreTab(true); + mInputEditor->setPassDelete(true); + mInputEditor->setReplaceNewlinesWithSpaces(false); mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN); - mInputEditor->setEnableLineHistory(TRUE); + mInputEditor->setEnableLineHistory(true); - mIsBuilt = TRUE; + mIsBuilt = true; return true; } @@ -200,7 +200,7 @@ void LLChatBar::refreshGestures() mGestureCombo->clearRows(); // collect list of unique gestures - std::map unique; + std::map unique; LLGestureMgr::item_map_t::const_iterator it; const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures(); for (it = active_gestures.begin(); it != active_gestures.end(); ++it) @@ -210,13 +210,13 @@ void LLChatBar::refreshGestures() { if (!gesture->mTrigger.empty()) { - unique[gesture->mTrigger] = TRUE; + unique[gesture->mTrigger] = true; } } } // add unique gestures - std::map ::iterator it2; + std::map ::iterator it2; for (it2 = unique.begin(); it2 != unique.end(); ++it2) { mGestureCombo->addSimpleElement((*it2).first); @@ -239,13 +239,13 @@ void LLChatBar::refreshGestures() } // Move the cursor to the correct input field. -void LLChatBar::setKeyboardFocus(BOOL focus) +void LLChatBar::setKeyboardFocus(bool focus) { if (focus) { if (mInputEditor) { - mInputEditor->setFocus(TRUE); + mInputEditor->setFocus(true); mInputEditor->selectAll(); } } @@ -255,13 +255,13 @@ void LLChatBar::setKeyboardFocus(BOOL focus) { mInputEditor->deselect(); } - setFocus(FALSE); + setFocus(false); } } // Ignore arrow keys in chat bar -void LLChatBar::setIgnoreArrowKeys(BOOL b) +void LLChatBar::setIgnoreArrowKeys(bool b) { if (mInputEditor) { @@ -269,7 +269,7 @@ void LLChatBar::setIgnoreArrowKeys(BOOL b) } } -BOOL LLChatBar::inputEditorHasFocus() +bool LLChatBar::inputEditorHasFocus() { return mInputEditor && mInputEditor->hasFocus(); } @@ -410,14 +410,14 @@ void LLChatBar::startChat(const char* line) //TODO* remove DUMMY chat //if(gBottomTray && gBottomTray->getChatBox()) //{ - // gBottomTray->setVisible(TRUE); - // gBottomTray->getChatBox()->setFocus(TRUE); + // gBottomTray->setVisible(true); + // gBottomTray->getChatBox()->setFocus(true); //} // *TODO Vadim: Why was this code commented out? -// gChatBar->setVisible(TRUE); -// gChatBar->setKeyboardFocus(TRUE); +// gChatBar->setVisible(true); +// gChatBar->setKeyboardFocus(true); // gSavedSettings.setBOOL("ChatVisible", true); // // if (line && gChatBar->mInputEditor) @@ -437,13 +437,13 @@ void LLChatBar::stopChat() //TODO* remove DUMMY chat //if(gBottomTray && gBottomTray->getChatBox()) ///{ - // gBottomTray->getChatBox()->setFocus(FALSE); + // gBottomTray->getChatBox()->setFocus(false); //} // *TODO Vadim: Why was this code commented out? // // In simple UI mode, we never release focus from the chat bar -// gChatBar->setKeyboardFocus(FALSE); +// gChatBar->setKeyboardFocus(false); // // // If we typed a movement key and pressed return during the // // same frame, the keyboard handlers will see the key as having @@ -455,7 +455,7 @@ void LLChatBar::stopChat() // gAgent.stopTyping(); // // // hide chat bar so it doesn't grab focus back -// gChatBar->setVisible(FALSE); +// gChatBar->setVisible(false); // gSavedSettings.setBOOL("ChatVisible", false); } @@ -558,12 +558,12 @@ void LLChatBar::onClickSay( LLUICtrl* ctrl ) sendChat(chat_type); } -void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) +void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, bool animate) { sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate); } -void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) +void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, bool animate) { // as soon as we say something, we no longer care about teaching the user // how to chat @@ -642,14 +642,14 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl) if (!revised_text.empty()) { // Don't play nodding animation - sendChatFromViewer(revised_text, CHAT_TYPE_NORMAL, FALSE); + sendChatFromViewer(revised_text, CHAT_TYPE_NORMAL, false); } } mGestureLabelTimer.start(); if (mGestureCombo != NULL) { // free focus back to chat bar - mGestureCombo->setFocus(FALSE); + mGestureCombo->setFocus(false); } } diff --git a/indra/newview/llchatbar.h b/indra/newview/llchatbar.h index 2e9445fe84..fc6683cdf3 100644 --- a/indra/newview/llchatbar.h +++ b/indra/newview/llchatbar.h @@ -57,12 +57,12 @@ public: void refreshGestures(); // Move cursor into chat input field. - void setKeyboardFocus(BOOL b); + void setKeyboardFocus(bool b); // Ignore arrow keys for chat bar - void setIgnoreArrowKeys(BOOL b); + void setIgnoreArrowKeys(bool b); - BOOL inputEditorHasFocus(); + bool inputEditorHasFocus(); std::string getCurrentChat(); // since chat bar logic is reused for chat history @@ -71,8 +71,8 @@ public: // Send a chat (after stripping /20foo channel chats). // "Animate" means the nodding animation for regular text. - void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); - void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); + void sendChatFromViewer(const LLWString &wtext, EChatType type, bool animate); + void sendChatFromViewer(const std::string &utf8text, EChatType type, bool animate); // If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20. // Otherwise returns input and channel 0. @@ -103,7 +103,7 @@ protected: // Which non-zero channel did we last chat on? S32 mLastSpecialChatChannel; - BOOL mIsBuilt; + bool mIsBuilt; LLComboBox* mGestureCombo; LLChatBarGestureObserver* mObserver; diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index e5f63e9487..6ebb1589d4 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -96,7 +96,7 @@ public: } LLUUID object_id; - if (!object_id.set(params[0], FALSE)) + if (!object_id.set(params[0], false)) { return false; } @@ -611,7 +611,7 @@ public: if (mInfoCtrl) { mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl)); - mInfoCtrl->setVisible(FALSE); + mInfoCtrl->setVisible(false); } else { @@ -719,7 +719,7 @@ public: updateMinUserNameWidth(); LLColor4 sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor"); setTransparentColor(sep_color); - mTimeBoxTextBox->setVisible(FALSE); + mTimeBoxTextBox->setVisible(false); } else if (chat.mFromName.empty() || mSourceType == CHAT_SOURCE_SYSTEM) @@ -784,7 +784,7 @@ public: style_params_name.font.name("SansSerifSmall"); style_params_name.font.style("NORMAL"); style_params_name.readonly_color(userNameColor); - user_name->appendText(" - " + username, FALSE, style_params_name); + user_name->appendText(" - " + username, false, style_params_name); } } else @@ -879,7 +879,7 @@ public: user_name->reshape(user_name_rect.getWidth(), user_name_rect.getHeight()); user_name->setRect(user_name_rect); - time_box->setVisible(TRUE); + time_box->setVisible(true); } LLPanel::draw(); @@ -1038,7 +1038,7 @@ protected: void hideInfoCtrl() { - mInfoCtrl->setVisible(FALSE); + mInfoCtrl->setVisible(false); } private: @@ -1098,7 +1098,7 @@ private: style_params_name.font.name("SansSerifSmall"); style_params_name.font.style("NORMAL"); style_params_name.readonly_color(userNameColor); - user_name->appendText(" - " + av_name.getUserName(), FALSE, style_params_name); + user_name->appendText(" - " + av_name.getUserName(), false, style_params_name); } setToolTip( av_name.getUserName() ); // name might have changed, update width @@ -1283,7 +1283,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (mNotifyAboutUnreadMsg && !mEditor->scrolledToEnd() && !from_me && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); - mMoreChatPanel->setVisible(TRUE); + mMoreChatPanel->setVisible(true); std::string chatters; for (unread_chat_source_t::iterator it = mUnreadChatSources.begin(); it != mUnreadChatSources.end();) @@ -1634,7 +1634,7 @@ void LLChatHistory::draw() if (mEditor->scrolledToEnd()) { mUnreadChatSources.clear(); - mMoreChatPanel->setVisible(FALSE); + mMoreChatPanel->setVisible(false); } LLUICtrl::draw(); diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 74ac16c00b..eb42007882 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -70,7 +70,7 @@ public: if (params.size() < 2) return false; LLUUID object_id; - if (!object_id.set(params[0], FALSE)) + if (!object_id.set(params[0], false)) { return false; } @@ -182,7 +182,7 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification) { style_params.font.style = "ITALIC"; } - mMsgText->appendText(messageText, TRUE, style_params); + mMsgText->appendText(messageText, true, style_params); } snapToMessageHeight(); @@ -257,7 +257,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification) } // [/RLVa:KB] - mMsgText->appendText(str_sender, FALSE, style_params_name); + mMsgText->appendText(str_sender, false, style_params_name); } else @@ -316,7 +316,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification) { style_params.font.style = "ITALIC"; } - mMsgText->appendText(messageText, FALSE, style_params); + mMsgText->appendText(messageText, false, style_params); } @@ -369,7 +369,7 @@ bool LLFloaterIMNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask) //if text_box process mouse up (ussually this is click on url) - we didn't show nearby_chat. if (mMsgText->pointInView(local_x, local_y) ) { - if (mMsgText->handleMouseUp(local_x,local_y,mask) == TRUE) + if (mMsgText->handleMouseUp(local_x,local_y,mask) == true) return true; else { diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 3887a846bd..fa5d616a99 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -87,7 +87,7 @@ LLSysWellChiclet::Params::Params() , max_displayed_count("max_displayed_count", 99) { button.name = "button"; - button.tab_stop = FALSE; + button.tab_stop = false; button.label = LLStringUtil::null; } @@ -145,7 +145,7 @@ boost::signals2::connection LLSysWellChiclet::setClickCallback( return mButton->setClickedCallback(cb); } -void LLSysWellChiclet::setToggleState(BOOL toggled) { +void LLSysWellChiclet::setToggleState(bool toggled) { mButton->setToggleState(toggled); } @@ -741,7 +741,7 @@ void LLIMChiclet::hidePopupMenu() auto menu = mPopupMenuHandle.get(); if (menu) { - menu->setVisible(FALSE); + menu->setVisible(false); } } @@ -941,7 +941,7 @@ void LLAdHocChiclet::switchToCurrentSpeaker() LLUUID speaker_id; LLSpeakerMgr::speaker_list_t speaker_list; - LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, FALSE); + LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, false); for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) { LLPointer s = *i; @@ -1052,7 +1052,7 @@ void LLIMGroupChiclet::switchToCurrentSpeaker() LLUUID speaker_id; LLSpeakerMgr::speaker_list_t speaker_list; - LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, FALSE); + LLIMModel::getInstance()->findIMSession(getSessionId())->mSpeakers->getSpeakerList(&speaker_list, false); for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) { LLPointer s = *i; diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index fb671947aa..a795f431ff 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -110,8 +110,8 @@ public: { Params() { - changeDefault(draw_tooltip, FALSE); - changeDefault(mouse_opaque, FALSE); + changeDefault(draw_tooltip, false); + changeDefault(mouse_opaque, false); changeDefault(default_icon_name, "Generic_Person"); }; }; @@ -854,7 +854,7 @@ public: /*virtual*/ ~LLSysWellChiclet(); - void setToggleState(BOOL toggled); + void setToggleState(bool toggled); void setNewMessagesState(bool new_messages); //this method should change a widget according to state of the SysWellWindow @@ -954,7 +954,7 @@ class LLIMWellChiclet : public LLSysWellChiclet, LLIMSessionObserver { friend class LLUICtrlFactory; public: - /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) {} + /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) {} /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {} /*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {}; /*virtual*/ void sessionRemoved(const LLUUID& session_id) { messageCountChanged(LLSD()); } diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index a9c5ee9462..420aaa3297 100644 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -85,7 +85,7 @@ LLIMChiclet* LLChicletBar::createIMChiclet(const LLUUID& session_id) } //virtual -void LLChicletBar::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) +void LLChicletBar::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) { if (!getChicletPanel()) return; diff --git a/indra/newview/llchicletbar.h b/indra/newview/llchicletbar.h index 8b578e3d83..d1070e2fe1 100644 --- a/indra/newview/llchicletbar.h +++ b/indra/newview/llchicletbar.h @@ -49,7 +49,7 @@ public: ~LLChicletBar(); // LLIMSessionObserver observe triggers - /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg); + /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg); /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {} /*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {}; /*virtual*/ void sessionRemoved(const LLUUID& session_id); diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index bc65814e81..c7f0960825 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -70,7 +70,7 @@ protected: // Hide the "Create new " if it's irrelevant. if (w_type == LLWearableType::WT_NONE) { - menu_item->setVisible(FALSE); + menu_item->setVisible(false); return; } diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index c10ef3878b..2b7455c50b 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -61,7 +61,7 @@ LLColorSwatchCtrl::Params::Params() LLColorSwatchCtrl::LLColorSwatchCtrl(const Params& p) : LLUICtrl(p), - mValid( TRUE ), + mValid( true ), mColor(p.color()), mCanApplyImmediately(p.can_apply_immediately), mAlphaGradientImage(p.alpha_background_image), @@ -129,7 +129,7 @@ bool LLColorSwatchCtrl::handleUnicodeCharHere(llwchar uni_char) { if( ' ' == uni_char ) { - showPicker(TRUE); + showPicker(true); } return LLUICtrl::handleUnicodeCharHere(uni_char); } @@ -145,7 +145,7 @@ void LLColorSwatchCtrl::setOriginal(const LLColor4& color) } } -void LLColorSwatchCtrl::set(const LLColor4& color, BOOL update_picker, BOOL from_event) +void LLColorSwatchCtrl::set(const LLColor4& color, bool update_picker, bool from_event) { mColor = color; LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get(); @@ -190,9 +190,9 @@ bool LLColorSwatchCtrl::handleMouseUp(S32 x, S32 y, MASK mask) // Focus the widget now in order to return the focus // after the color picker is closed. - setFocus(TRUE); + setFocus(true); - showPicker(FALSE); + showPicker(false); } } @@ -208,7 +208,7 @@ void LLColorSwatchCtrl::draw() mBorder->setKeyboardFocusHighlight(hasFocus()); // Draw border LLRect border( 0, getRect().getHeight(), getRect().getWidth(), mLabelHeight ); - gl_rect_2d( border, mBorderColor.get(), FALSE ); + gl_rect_2d( border, mBorderColor.get(), false ); LLRect interior = border; interior.stretch( -1 ); @@ -223,7 +223,7 @@ void LLColorSwatchCtrl::draw() } // Draw the color swatch - gl_rect_2d(interior, mColor % alpha, TRUE); + gl_rect_2d(interior, mColor % alpha, true); if (!mColor.isOpaque()) { @@ -250,7 +250,7 @@ void LLColorSwatchCtrl::draw() else { // Draw grey and an X - gl_rect_2d(interior, LLColor4::grey % alpha, TRUE); + gl_rect_2d(interior, LLColor4::grey % alpha, true); gl_draw_x(interior, LLColor4::black % alpha); } @@ -284,7 +284,7 @@ void LLColorSwatchCtrl::setEnabled( bool enabled ) void LLColorSwatchCtrl::setValue(const LLSD& value) { - set(LLColor4(value), TRUE, TRUE); + set(LLColor4(value), true, true); } ////////////////////////////////////////////////////////////////////////////// @@ -328,7 +328,7 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op ) { // both select and cancel close LLFloaterColorPicker // but COLOR_CHANGE does not - subject->setFocus(TRUE); + subject->setFocus(true); } } } @@ -349,7 +349,7 @@ void LLColorSwatchCtrl::closeFloaterColorPicker() mPickerHandle.markDead(); } -void LLColorSwatchCtrl::setValid(BOOL valid ) +void LLColorSwatchCtrl::setValid(bool valid ) { mValid = valid; @@ -360,7 +360,7 @@ void LLColorSwatchCtrl::setValid(BOOL valid ) } } -void LLColorSwatchCtrl::showPicker(BOOL take_focus) +void LLColorSwatchCtrl::showPicker(bool take_focus) { LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get(); if (!pickerp) @@ -382,7 +382,7 @@ void LLColorSwatchCtrl::showPicker(BOOL take_focus) if (take_focus) { - pickerp->setFocus(TRUE); + pickerp->setFocus(true); } } diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index 3ace4093c6..4e40651478 100644 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -80,18 +80,18 @@ public: /*virtual*/ LLSD getValue() const { return mColor.getValue(); } const LLColor4& get() { return mColor; } - void set(const LLColor4& color, BOOL update_picker = FALSE, BOOL from_event = FALSE); + void set(const LLColor4& color, bool update_picker = false, bool from_event = false); void setOriginal(const LLColor4& color); - void setValid(BOOL valid); + void setValid(bool valid); void setLabel(const std::string& label); void setLabelWidth(S32 label_width) {mLabelWidth =label_width;} - void setCanApplyImmediately(BOOL apply) { mCanApplyImmediately = apply; } + void setCanApplyImmediately(bool apply) { mCanApplyImmediately = apply; } void setOnCancelCallback(commit_callback_t cb) { mOnCancelCallback = cb; } void setOnSelectCallback(commit_callback_t cb) { mOnSelectCallback = cb; } void setPreviewCallback(commit_callback_t cb) { mPreviewCallback = cb; } void setFallbackImage(LLPointer image) { mFallbackImage = image; } - void showPicker(BOOL take_focus); + void showPicker(bool take_focus); /*virtual*/ bool handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 196973a895..57d0157db3 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -243,7 +243,7 @@ void LLFloaterScriptQueue::addObject(const LLUUID& id, std::string name) mObjectList.push_back(obj); } -BOOL LLFloaterScriptQueue::start() +bool LLFloaterScriptQueue::start() { LLNotificationsUtil::add("ConfirmScriptModify", LLSD(), LLSD(), boost::bind(&LLFloaterScriptQueue::onScriptModifyConfirmation, this, _1, _2)); return true; @@ -298,7 +298,7 @@ void LLFloaterScriptQueue::addStringMessage(const std::string &message) // Improve log output //getChild("queue output")->addSimpleElement(message, ADD_BOTTOM); LLScrollListCtrl* ctrl = getChild("queue output"); - BOOL is_at_end = ctrl->getScrollbar()->isAtEnd(); + bool is_at_end = ctrl->getScrollbar()->isAtEnd(); ctrl->addSimpleElement(message, ADD_BOTTOM); if (is_at_end) { @@ -308,7 +308,7 @@ void LLFloaterScriptQueue::addStringMessage(const std::string &message) } -BOOL LLFloaterScriptQueue::isDone() const +bool LLFloaterScriptQueue::isDone() const { return (mCurrentObjectID.isNull() && (mObjectList.size() == 0)); } @@ -347,7 +347,7 @@ void LLFloaterCompileQueue::experienceIdsReceived( const LLSD& content ) } } -BOOL LLFloaterCompileQueue::hasExperience( const LLUUID& id ) const +bool LLFloaterCompileQueue::hasExperience( const LLUUID& id ) const { return mExperienceIds.find(id) != mExperienceIds.end(); } @@ -795,7 +795,7 @@ bool LLFloaterRunQueue::runObjectScripts(LLHandle hfloater msg->nextBlockFast(_PREHASH_Script); msg->addUUIDFast(_PREHASH_ObjectID, object->getID()); msg->addUUIDFast(_PREHASH_ItemID, inventory->getUUID()); - msg->addBOOLFast(_PREHASH_Running, TRUE); + msg->addBOOLFast(_PREHASH_Running, true); msg->sendReliable(object->getRegion()->getHost()); return true; @@ -852,7 +852,7 @@ bool LLFloaterNotRunQueue::stopObjectScripts(LLHandle hflo msg->nextBlockFast(_PREHASH_Script); msg->addUUIDFast(_PREHASH_ObjectID, object->getID()); msg->addUUIDFast(_PREHASH_ItemID, inventory->getUUID()); - msg->addBOOLFast(_PREHASH_Running, FALSE); + msg->addBOOLFast(_PREHASH_Running, false); msg->sendReliable(object->getRegion()->getHost()); return true; @@ -1036,7 +1036,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L //floater->addStringMessage("Done"); floater->addStringMessage(floater->getString("Done")); // - floater->getChildView("close")->setEnabled(TRUE); + floater->getChildView("close")->setEnabled(true); } catch (LLCheckedHandleBase::Stale &) { diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index a621a2607f..65c75b365a 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -81,8 +81,8 @@ public: // addObject() accepts an object id. void addObject(const LLUUID& id, std::string name); - // start() returns TRUE if the queue has started, otherwise FALSE. - BOOL start(); + // start() returns true if the queue has started, otherwise false. + bool start(); void addProcessingMessage(const std::string &message, const LLSD &args); void addStringMessage(const std::string &message); @@ -95,7 +95,7 @@ protected: bool onScriptModifyConfirmation(const LLSD& notification, const LLSD& response); // returns true if this is done - BOOL isDone() const; + bool isDone() const; virtual bool startQueue() = 0; @@ -146,7 +146,7 @@ class LLFloaterCompileQueue : public LLFloaterScriptQueue public: void experienceIdsReceived( const LLSD& content ); - BOOL hasExperience(const LLUUID& id)const; + bool hasExperience(const LLUUID& id)const; // [LSL PreProc] static void finishLSLUpload(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, std::string scriptName, LLUUID queueId); diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 1465310af5..4c70d9185b 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -51,7 +51,7 @@ LLControlAvatar::LLControlAvatar(const LLUUID& id, const LLPCode pcode, LLViewer mScaleConstraintFixup(1.0), mRegionChanged(false) { - mIsDummy = TRUE; + mIsDummy = true; mIsControlAvatar = true; mEnableDefaultMotions = false; } @@ -297,7 +297,7 @@ void LLControlAvatar::updateVolumeGeom() return; if (mRootVolp->mDrawable->isActive()) { - mRootVolp->mDrawable->makeStatic(FALSE); + mRootVolp->mDrawable->makeStatic(false); } mRootVolp->mDrawable->makeActive(); gPipeline.markMoved(mRootVolp->mDrawable); @@ -618,9 +618,9 @@ void LLControlAvatar::updateAnimations() // virtual LLViewerObject* LLControlAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end, S32 face, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -697,7 +697,7 @@ bool LLControlAvatar::shouldRenderRigged() const } // virtual -BOOL LLControlAvatar::isImpostor() +bool LLControlAvatar::isImpostor() { // Attached animated objects should match state of their attached av. LLVOAvatar *attached_av = getAttachedAvatar(); diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index dc9e7047a8..eb6840d7be 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -69,9 +69,9 @@ public: virtual LLViewerObject* lineSegmentIntersectRiggedAttachments( const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = TRUE, + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = true, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -84,7 +84,7 @@ public: virtual bool shouldRenderRigged() const; - virtual BOOL isImpostor(); + virtual bool isImpostor(); bool isTooComplex() const; // FIRE-29012: Standalone animesh avatars get affected by complexity limit diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index c953efed72..50bb9d36ed 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -226,7 +226,7 @@ void LLConversationLog::enableLogging(S32 log_mode) notifyObservers(); } -void LLConversationLog::logConversation(const LLUUID& session_id, BOOL has_offline_msg) +void LLConversationLog::logConversation(const LLUUID& session_id, bool has_offline_msg) { const LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id); LLConversation* conversation = findConversation(session); @@ -283,7 +283,7 @@ void LLConversationLog::updateConversationName(const LLIMModel::LLIMSession* ses } } -void LLConversationLog::updateOfflineIMs(const LLIMModel::LLIMSession* session, BOOL new_messages) +void LLConversationLog::updateOfflineIMs(const LLIMModel::LLIMSession* session, bool new_messages) { if (!session) { @@ -365,7 +365,7 @@ void LLConversationLog::removeObserver(LLConversationLogObserver* observer) mObservers.erase(observer); } -void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) +void LLConversationLog::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) { logConversation(session_id, has_offline_msg); } diff --git a/indra/newview/llconversationlog.h b/indra/newview/llconversationlog.h index 820a5db491..8658c93486 100644 --- a/indra/newview/llconversationlog.h +++ b/indra/newview/llconversationlog.h @@ -125,7 +125,7 @@ public: void removeObserver(LLConversationLogObserver* observer); // LLIMSessionObserver triggers - virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg); + virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg); virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {}; // Stub virtual void sessionRemoved(const LLUUID& session_id){} // Stub virtual void sessionVoiceOrIMStarted(const LLUUID& session_id){}; // Stub @@ -179,7 +179,7 @@ private: /** * adds conversation to the conversation list and notifies observers */ - void logConversation(const LLUUID& session_id, BOOL has_offline_msg); + void logConversation(const LLUUID& session_id, bool has_offline_msg); void notifyParticularConversationObservers(const LLUUID& session_id, U32 mask); @@ -191,7 +191,7 @@ private: void createConversation(const LLIMModel::LLIMSession* session); void updateConversationTimestamp(LLConversation* conversation); void updateConversationName(const LLIMModel::LLIMSession* session, const std::string& name); - void updateOfflineIMs(const LLIMModel::LLIMSession* session, BOOL new_messages); + void updateOfflineIMs(const LLIMModel::LLIMSession* session, bool new_messages); diff --git a/indra/newview/llconversationloglist.cpp b/indra/newview/llconversationloglist.cpp index 7f9c0acc6a..eda4f2d37d 100644 --- a/indra/newview/llconversationloglist.cpp +++ b/indra/newview/llconversationloglist.cpp @@ -382,7 +382,7 @@ bool LLConversationLogList::isActionEnabled(const LLSD& userdata) bool is_p2p = LLIMModel::LLIMSession::P2P_SESSION == stype; bool is_group = LLIMModel::LLIMSession::GROUP_SESSION == stype; - bool is_group_member = is_group && gAgent.isInGroup(selected_id, TRUE); + bool is_group_member = is_group && gAgent.isInGroup(selected_id, true); if ("can_im" == command_name) { diff --git a/indra/newview/llconversationloglistitem.cpp b/indra/newview/llconversationloglistitem.cpp index da107df721..ae6e3d2908 100644 --- a/indra/newview/llconversationloglistitem.cpp +++ b/indra/newview/llconversationloglistitem.cpp @@ -93,14 +93,14 @@ void LLConversationLogListItem::initIcons() case LLIMModel::LLIMSession::ADHOC_SESSION: { LLAvatarIconCtrl* avatar_icon = getChild("avatar_icon"); - avatar_icon->setVisible(TRUE); + avatar_icon->setVisible(true); avatar_icon->setValue(mConversation->getParticipantID()); break; } case LLIMModel::LLIMSession::GROUP_SESSION: { LLGroupIconCtrl* group_icon = getChild("group_icon"); - group_icon->setVisible(TRUE); + group_icon->setVisible(true); group_icon->setValue(mConversation->getSessionID()); break; } @@ -110,7 +110,7 @@ void LLConversationLogListItem::initIcons() if (mConversation->hasOfflineMessages()) { - getChild("unread_ims_icon")->setVisible(TRUE); + getChild("unread_ims_icon")->setVisible(true); } } @@ -155,7 +155,7 @@ void LLConversationLogListItem::onIMFloaterShown(const LLUUID& session_id) { if (mConversation->getSessionID() == session_id) { - getChild("unread_ims_icon")->setVisible(FALSE); + getChild("unread_ims_icon")->setVisible(false); } } diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index c8687c4c1c..f7bea7a522 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -122,9 +122,9 @@ public: virtual const bool getDistanceToAgent(F64& distance) const { return false; } // This method will be called to determine if a drop can be - // performed, and will set drop to TRUE if a drop is + // performed, and will set drop to true if a drop is // requested. - // Returns TRUE if a drop is possible/happened, FALSE otherwise. + // Returns true if a drop is possible/happened, false otherwise. virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 874907e2c0..99de388935 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -286,7 +286,7 @@ void LLConversationViewSession::draw() getViewModelItem()->update(); const LLFolderViewItem::Params& default_params = LLUICtrlFactory::getDefaultParams(); - const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE); + const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false); // Indicate that flash can start (moot operation if already started, done or not flashing) startFlashing(); @@ -446,7 +446,7 @@ void LLConversationViewSession::toggleCollapsedMode(bool is_collapsed) mItemPanel->translate(mCollapsedMode ? -h_pad : h_pad, 0); } -void LLConversationViewSession::setVisibleIfDetached(BOOL visible) +void LLConversationViewSession::setVisibleIfDetached(bool visible) { // Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized // Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here @@ -653,7 +653,7 @@ void LLConversationViewParticipant::draw() static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE); static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE); - const BOOL show_context = (getRoot() ? getRoot()->getShowSelectionContext() : FALSE); + const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false); const LLFontGL* font = getLabelFontForStyle(mLabelStyle); F32 right_x = 0; diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index 6280ec6adf..03c73984cc 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -85,7 +85,7 @@ public: void toggleCollapsedMode(bool is_collapsed); - void setVisibleIfDetached(BOOL visible); + void setVisibleIfDetached(bool visible); LLConversationViewParticipant* findParticipant(const LLUUID& participant_id); void showVoiceIndicator(bool visible); diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index b5fb1716da..628ed8ed42 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -422,8 +422,8 @@ void LLCurrencyUIManager::Impl::currencyKey(S32 value) //cannot just simply refresh the whole UI, as the edit field will // get reset and the cursor will change... - mPanel.getChildView("currency_est")->setVisible(FALSE); - mPanel.getChildView("getting_data")->setVisible(TRUE); + mPanel.getChildView("currency_est")->setVisible(false); + mPanel.getChildView("getting_data")->setVisible(true); } mCurrencyChanged = true; @@ -452,13 +452,13 @@ void LLCurrencyUIManager::Impl::updateUI() { if (mHidden) { - mPanel.getChildView("currency_action")->setVisible(FALSE); - mPanel.getChildView("currency_amt")->setVisible(FALSE); - mPanel.getChildView("currency_est")->setVisible(FALSE); + mPanel.getChildView("currency_action")->setVisible(false); + mPanel.getChildView("currency_amt")->setVisible(false); + mPanel.getChildView("currency_est")->setVisible(false); return; } - mPanel.getChildView("currency_action")->setVisible(TRUE); + mPanel.getChildView("currency_action")->setVisible(true); LLLineEditor* lindenAmount = mPanel.getChild("currency_amt"); if (lindenAmount) @@ -492,7 +492,7 @@ void LLCurrencyUIManager::Impl::updateUI() ||mPanel.getChildView("currency_est")->getVisible() || mPanel.getChildView("error_web")->getVisible()) { - mPanel.getChildView("getting_data")->setVisible(FALSE); + mPanel.getChildView("getting_data")->setVisible(false); } } diff --git a/indra/newview/lldebugmessagebox.cpp b/indra/newview/lldebugmessagebox.cpp index c8b9b1ac63..da56934533 100644 --- a/indra/newview/lldebugmessagebox.cpp +++ b/indra/newview/lldebugmessagebox.cpp @@ -45,7 +45,7 @@ std::map LLDebugVarMessageBox::sInstances; LLDebugVarMessageBox::LLDebugVarMessageBox(const std::string& title, EDebugVarType var_type, void *var) : LLFloater(LLSD()), - mVarType(var_type), mVarData(var), mAnimate(FALSE) + mVarType(var_type), mVarData(var), mAnimate(false) { setRect(LLRect(10,160,400,10)); diff --git a/indra/newview/lldebugmessagebox.h b/indra/newview/lldebugmessagebox.h index 87a0910662..0cd01f1e84 100644 --- a/indra/newview/lldebugmessagebox.h +++ b/indra/newview/lldebugmessagebox.h @@ -80,7 +80,7 @@ protected: LLButton* mAnimateButton; LLTextBox* mText; std::string mTitle; - BOOL mAnimate; + bool mAnimate; static std::map sInstances; }; diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp index 670a6d83b9..e6dc202706 100644 --- a/indra/newview/lldebugview.cpp +++ b/indra/newview/lldebugview.cpp @@ -94,14 +94,14 @@ void LLDebugView::init() gSceneView = new LLSceneView(r); gSceneView->setFollowsTop(); gSceneView->setFollowsLeft(); - gSceneView->setVisible(FALSE); + gSceneView->setVisible(false); addChild(gSceneView); gSceneView->setRect(rect); gSceneMonitorView = new LLSceneMonitorView(r); gSceneMonitorView->setFollowsTop(); gSceneMonitorView->setFollowsLeft(); - gSceneMonitorView->setVisible(FALSE); + gSceneMonitorView->setVisible(false); addChild(gSceneMonitorView); gSceneMonitorView->setRect(rect); @@ -119,7 +119,7 @@ void LLDebugView::init() tvp.visible(false); gTextureView = LLUICtrlFactory::create(tvp); addChild(gTextureView); - //gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE); + //gTextureView->reshape(r.getWidth(), r.getHeight(), true); } void LLDebugView::draw() diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h index a6490c876c..ee7150f7c9 100644 --- a/indra/newview/lldebugview.h +++ b/indra/newview/lldebugview.h @@ -57,7 +57,7 @@ public: void init(); void draw(); - void setStatsVisible(BOOL visible); + void setStatsVisible(bool visible); LLFastTimerView* mFastTimerView; LLConsole* mDebugConsolep; diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp index 66f5636312..5b645d5480 100644 --- a/indra/newview/lldirpicker.cpp +++ b/indra/newview/lldirpicker.cpp @@ -94,20 +94,20 @@ void LLDirPicker::reset() } } -BOOL LLDirPicker::getDir(std::string* filename, bool blocking) +bool LLDirPicker::getDir(std::string* filename, bool blocking) { if( mLocked ) { - return FALSE; + return false; } // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } - BOOL success = FALSE; + bool success = false; if (blocking) @@ -152,7 +152,7 @@ BOOL LLDirPicker::getDir(std::string* filename, bool blocking) { mDir = ll_convert_wide_to_string(pwstr); CoTaskMemFree(pwstr); - success = TRUE; + success = true; } psi->Release(); } @@ -202,7 +202,7 @@ void LLDirPicker::reset() //static -BOOL LLDirPicker::getDir(std::string* filename, bool blocking) +bool LLDirPicker::getDir(std::string* filename, bool blocking) { LLFilePicker::ELoadFilter filter=LLFilePicker::FFLOAD_DIRECTORY; @@ -245,13 +245,13 @@ void LLDirPicker::reset() #endif } -BOOL LLDirPicker::getDir(std::string* filename, bool blocking) +bool LLDirPicker::getDir(std::string* filename, bool blocking) { reset(); // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } #ifndef LL_FLTK @@ -272,7 +272,7 @@ BOOL LLDirPicker::getDir(std::string* filename, bool blocking) } #endif // !LL_MESA_HEADLESS - return FALSE; + return false; #else gViewerWindow->getWindow()->beforeDialog(); Fl_Native_File_Chooser flDlg; @@ -327,9 +327,9 @@ void LLDirPicker::reset() { } -BOOL LLDirPicker::getDir(std::string* filename, bool blocking) +bool LLDirPicker::getDir(std::string* filename, bool blocking) { - return FALSE; + return false; } std::string LLDirPicker::getDirName() diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h index 41b5397389..2758e497fc 100644 --- a/indra/newview/lldirpicker.h +++ b/indra/newview/lldirpicker.h @@ -57,7 +57,7 @@ class LLFilePicker; class LLDirPicker { public: - BOOL getDir(std::string* filename, bool blocking = true); + bool getDir(std::string* filename, bool blocking = true); std::string getDirName(); // clear any lists of buffers or whatever, and make sure the dir diff --git a/indra/newview/lldndbutton.h b/indra/newview/lldndbutton.h index 4f77219582..7cded48dc3 100644 --- a/indra/newview/lldndbutton.h +++ b/indra/newview/lldndbutton.h @@ -48,7 +48,7 @@ public: LLDragAndDropButton(const Params& params); typedef boost::functiongetWorldMatrix(); } -BOOL LLDrawable::isLight() const +bool LLDrawable::isLight() const { LLViewerObject* objectp = mVObjp; if ( objectp && (objectp->getPCode() == LL_PCODE_VOLUME) && !isDead()) @@ -248,7 +248,7 @@ BOOL LLDrawable::isLight() const } else { - return FALSE; + return false; } } @@ -557,7 +557,7 @@ void LLDrawable::makeActive() } -void LLDrawable::makeStatic(BOOL warning_enabled) +void LLDrawable::makeStatic(bool warning_enabled) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE @@ -605,11 +605,11 @@ void LLDrawable::makeStatic(BOOL warning_enabled) } // Returns "distance" between target destination and resulting xfrom -F32 LLDrawable::updateXform(BOOL undamped) +F32 LLDrawable::updateXform(bool undamped) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE - BOOL damped = !undamped; + bool damped = !undamped; // Position const LLVector3 old_pos(mXform.getPosition()); @@ -728,7 +728,7 @@ F32 LLDrawable::updateXform(BOOL undamped) if (mSpatialBridge) { - gPipeline.markMoved(mSpatialBridge, FALSE); + gPipeline.markMoved(mSpatialBridge, false); } return dist_squared; } @@ -741,7 +741,7 @@ void LLDrawable::setRadius(F32 radius) } } -void LLDrawable::moveUpdatePipeline(BOOL moved) +void LLDrawable::moveUpdatePipeline(bool moved) { if (moved) { @@ -770,17 +770,17 @@ void LLDrawable::movePartition() } } -BOOL LLDrawable::updateMove() +bool LLDrawable::updateMove() { if (isDead()) { LL_WARNS() << "Update move on dead drawable!" << LL_ENDL; - return TRUE; + return true; } if (mVObjp.isNull()) { - return FALSE; + return false; } makeActive(); @@ -788,21 +788,21 @@ BOOL LLDrawable::updateMove() return isState(MOVE_UNDAMPED) ? updateMoveUndamped() : updateMoveDamped(); } -BOOL LLDrawable::updateMoveUndamped() +bool LLDrawable::updateMoveUndamped() { - F32 dist_squared = updateXform(TRUE); + F32 dist_squared = updateXform(true); mGeneration++; if (!isState(LLDrawable::INVISIBLE)) { - BOOL moved = (dist_squared > 0.001f && dist_squared < 255.99f); + bool moved = (dist_squared > 0.001f && dist_squared < 255.99f); moveUpdatePipeline(moved); mVObjp->updateText(); } mVObjp->clearChanged(LLXform::MOVED); - return TRUE; + return true; } void LLDrawable::updatePartition() @@ -815,7 +815,7 @@ void LLDrawable::updatePartition() } else if (mSpatialBridge) { - gPipeline.markMoved(mSpatialBridge, FALSE); + gPipeline.markMoved(mSpatialBridge, false); } else { @@ -824,22 +824,22 @@ void LLDrawable::updatePartition() } } -BOOL LLDrawable::updateMoveDamped() +bool LLDrawable::updateMoveDamped() { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE - F32 dist_squared = updateXform(FALSE); + F32 dist_squared = updateXform(false); mGeneration++; if (!isState(LLDrawable::INVISIBLE)) { - BOOL moved = (dist_squared > 0.001f && dist_squared < 128.0f); + bool moved = (dist_squared > 0.001f && dist_squared < 128.0f); moveUpdatePipeline(moved); mVObjp->updateText(); } - BOOL done_moving = (dist_squared == 0.0f) ? TRUE : FALSE; + bool done_moving = (dist_squared == 0.0f) ? true : false; if (done_moving) { @@ -955,12 +955,12 @@ void LLDrawable::updateTexture() } } -BOOL LLDrawable::updateGeometry() +bool LLDrawable::updateGeometry() { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE llassert(mVObjp.notNull()); - BOOL res = mVObjp && mVObjp->updateGeometry(this); + bool res = mVObjp && mVObjp->updateGeometry(this); return res; } @@ -1067,7 +1067,7 @@ void LLDrawable::updateBinRadius() } } -void LLDrawable::updateSpecialHoverCursor(BOOL enabled) +void LLDrawable::updateSpecialHoverCursor(bool enabled) { // TODO: maintain a list of objects that have special // hover cursors, then use that list for per-frame @@ -1257,7 +1257,7 @@ LLSpatialPartition* LLDrawable::getSpatialPartition() // Spatial Partition Bridging Drawable //======================================= -LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp) : +LLSpatialBridge::LLSpatialBridge(LLDrawable* root, bool render_by_group, U32 data_mask, LLViewerRegion* regionp) : LLDrawable(root->getVObj(), true), LLSpatialPartition(data_mask, render_by_group, regionp) { @@ -1422,7 +1422,7 @@ void LLSpatialBridge::transformExtents(const LLVector4a* src, LLVector4a* dst) } -void LLDrawable::setVisible(LLCamera& camera, std::vector* results, BOOL for_select) +void LLDrawable::setVisible(LLCamera& camera, std::vector* results, bool for_select) { LLViewerOctreeEntryData::setVisible(); @@ -1479,7 +1479,7 @@ public: } }; -void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector* results, BOOL for_select) +void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector* results, bool for_select) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE @@ -1502,8 +1502,8 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector* av = objparent->mDrawable; LLSpatialGroup* group = av->getSpatialGroup(); - BOOL impostor = FALSE; - BOOL loaded = FALSE; + bool impostor = false; + bool loaded = false; if (objparent->isAvatar()) { LLVOAvatar* avatarp = (LLVOAvatar*) objparent; @@ -1637,13 +1637,13 @@ void LLSpatialBridge::makeActive() LL_ERRS() << "makeActive called on spatial bridge" << LL_ENDL; } -void LLSpatialBridge::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate) +void LLSpatialBridge::move(LLDrawable *drawablep, LLSpatialGroup *curp, bool immediate) { LLSpatialPartition::move(drawablep, curp, immediate); - gPipeline.markMoved(this, FALSE); + gPipeline.markMoved(this, false); } -BOOL LLSpatialBridge::updateMove() +bool LLSpatialBridge::updateMove() { llassert_always(mDrawable); llassert_always(mDrawable->mVObjp); @@ -1654,9 +1654,9 @@ BOOL LLSpatialBridge::updateMove() mOctree->balance(); if (part) { - part->move(this, getSpatialGroup(), TRUE); + part->move(this, getSpatialGroup(), true); } - return TRUE; + return true; } void LLSpatialBridge::shiftPos(const LLVector4a& vec) @@ -1722,33 +1722,33 @@ const LLVector3 LLDrawable::getPositionAgent() const } } -BOOL LLDrawable::isAnimating() const +bool LLDrawable::isAnimating() const { if (!getVObj()) { - return TRUE; + return true; } if (getScale() != mVObjp->getScale()) { - return TRUE; + return true; } if (mVObjp->getPCode() == LLViewerObject::LL_VO_PART_GROUP) { - return TRUE; + return true; } if (mVObjp->getPCode() == LLViewerObject::LL_VO_HUD_PART_GROUP) { - return TRUE; + return true; } /*if (!isRoot() && !mVObjp->getAngularVelocity().isExactlyZero()) { //target omega - return TRUE; + return true; }*/ - return FALSE; + return false; } void LLDrawable::updateFaceSize(S32 idx) diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 3986d53c25..0efd4a0248 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -84,13 +84,13 @@ public: LLDrawable(LLViewerObject *vobj, bool new_entry = false); void markDead(); // Mark this drawable as dead - BOOL isDead() const { return isState(DEAD); } - BOOL isNew() const { return !isState(BUILT); } - BOOL isUnload() const { return isState(FOR_UNLOAD); } + bool isDead() const { return isState(DEAD); } + bool isNew() const { return !isState(BUILT); } + bool isUnload() const { return isState(FOR_UNLOAD); } - BOOL isLight() const; + bool isLight() const; - virtual void setVisible(LLCamera& camera_in, std::vector* results = NULL, BOOL for_select = FALSE); + virtual void setVisible(LLCamera& camera_in, std::vector* results = NULL, bool for_select = false); LLSpatialGroup* getSpatialGroup()const {return (LLSpatialGroup*)getGroup();} LLViewerRegion* getRegion() const { return mVObjp->getRegion(); } @@ -116,20 +116,20 @@ public: LLXformMatrix* getXform() { return &mXform; } U32 getState() const { return mState; } - BOOL isState (U32 bits) const { return ((mState & bits) != 0); } + bool isState (U32 bits) const { return ((mState & bits) != 0); } void setState (U32 bits) { mState |= bits; } void clearState(U32 bits) { mState &= ~bits; } - BOOL isAvatar() const { return mVObjp.notNull() && mVObjp->isAvatar(); } - BOOL isRoot() const { return !mParent || mParent->isAvatar(); } + bool isAvatar() const { return mVObjp.notNull() && mVObjp->isAvatar(); } + bool isRoot() const { return !mParent || mParent->isAvatar(); } LLDrawable* getRoot(); - BOOL isSpatialRoot() const { return !mParent || mParent->isAvatar(); } - virtual BOOL isSpatialBridge() const { return FALSE; } + bool isSpatialRoot() const { return !mParent || mParent->isAvatar(); } + virtual bool isSpatialBridge() const { return false; } virtual LLSpatialPartition* asPartition() { return NULL; } LLDrawable* getParent() const { return mParent; } // must set parent through LLViewerObject:: () - //BOOL setParent(LLDrawable *parent); + //bool setParent(LLDrawable *parent); inline LLFace* getFace(const S32 i) const; inline S32 getNumFaces() const; @@ -151,32 +151,32 @@ public: void destroy(); void update(); - F32 updateXform(BOOL undamped); + F32 updateXform(bool undamped); virtual void makeActive(); - /*virtual*/ void makeStatic(BOOL warning_enabled = TRUE); + /*virtual*/ void makeStatic(bool warning_enabled = true); - BOOL isActive() const { return isState(ACTIVE); } - BOOL isStatic() const { return !isActive(); } - BOOL isAnimating() const; + bool isActive() const { return isState(ACTIVE); } + bool isStatic() const { return !isActive(); } + bool isAnimating() const; - virtual BOOL updateMove(); + virtual bool updateMove(); virtual void movePartition(); void updateTexture(); void updateMaterial(); virtual void updateDistance(LLCamera& camera, bool force_update); - BOOL updateGeometry(); + bool updateGeometry(); void updateFaceSize(S32 idx); - void updateSpecialHoverCursor(BOOL enabled); + void updateSpecialHoverCursor(bool enabled); virtual void shiftPos(const LLVector4a &shift_vector); S32 getGeneration() const { return mGeneration; } - BOOL getLit() const { return isState(UNLIT) ? FALSE : TRUE; } - void setLit(BOOL lit) { lit ? clearState(UNLIT) : setState(UNLIT); } + bool getLit() const { return isState(UNLIT) ? false : true; } + void setLit(bool lit) { lit ? clearState(UNLIT) : setState(UNLIT); } bool isVisible() const; bool isRecentlyVisible() const; @@ -195,7 +195,7 @@ public: virtual void updateBinRadius(); void setRenderType(S32 type) { mRenderType = type; } - BOOL isRenderType(S32 type) { return mRenderType == type; } + bool isRenderType(S32 type) { return mRenderType == type; } S32 getRenderType() { return mRenderType; } // Debugging methods @@ -214,10 +214,10 @@ public: protected: ~LLDrawable() { destroy(); } - void moveUpdatePipeline(BOOL moved); + void moveUpdatePipeline(bool moved); void updatePartition(); - BOOL updateMoveDamped(); - BOOL updateMoveUndamped(); + bool updateMoveDamped(); + bool updateMoveUndamped(); public: friend class LLPipeline; @@ -244,11 +244,11 @@ public: { if (lhs->isVisible() && !rhs->isVisible()) { - return TRUE; //visible things come first + return true; //visible things come first } else if (!lhs->isVisible() && rhs->isVisible()) { - return FALSE; //rhs is visible, comes first + return false; //rhs is visible, comes first } return lhs->mDistanceWRTCamera < rhs->mDistanceWRTCamera; // farthest = last diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 50210b06c4..a8006d3e91 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -269,20 +269,20 @@ void LLFacePool::enqueue(LLFace* facep) } // virtual -BOOL LLFacePool::addFace(LLFace *facep) +bool LLFacePool::addFace(LLFace *facep) { addFaceReference(facep); - return TRUE; + return true; } // virtual -BOOL LLFacePool::removeFace(LLFace *facep) +bool LLFacePool::removeFace(LLFace *facep) { removeFaceReference(facep); vector_replace_with_last(mDrawFace, facep); - return TRUE; + return true; } // Not absolutely sure if we should be resetting all of the chained pools as well - djs @@ -328,9 +328,9 @@ void LLFacePool::pushFaceGeometry() } } -BOOL LLFacePool::verify() const +bool LLFacePool::verify() const { - BOOL ok = TRUE; + bool ok = true; for (std::vector::const_iterator iter = mDrawFace.begin(); iter != mDrawFace.end(); iter++) @@ -340,11 +340,11 @@ BOOL LLFacePool::verify() const { LL_INFOS() << "Face in wrong pool!" << LL_ENDL; facep->printDebugInfo(); - ok = FALSE; + ok = false; } else if (!facep->verify()) { - ok = FALSE; + ok = false; } } @@ -356,7 +356,7 @@ void LLFacePool::printDebugInfo() const LL_INFOS() << "Pool " << this << " Type: " << getType() << LL_ENDL; } -BOOL LLFacePool::LLOverrideFaceColor::sOverrideFaceColor = FALSE; +bool LLFacePool::LLOverrideFaceColor::sOverrideFaceColor = false; void LLFacePool::LLOverrideFaceColor::setColor(const LLColor4& color) { @@ -677,7 +677,7 @@ bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinI LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX, count, - FALSE, + false, (GLfloat*)&(mpc.mGLMp[0])); return true; diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h index 0925a01439..a6c1965888 100644 --- a/indra/newview/lldrawpool.h +++ b/indra/newview/lldrawpool.h @@ -80,13 +80,13 @@ public: LLDrawPool(const U32 type); virtual ~LLDrawPool(); - virtual BOOL isDead() = 0; + virtual bool isDead() = 0; S32 getId() const { return mId; } U32 getType() const { return mType; } - BOOL getSkipRenderFlag() const { return mSkipRender;} - void setSkipRenderFlag( BOOL flag ) { mSkipRender = flag; } + bool getSkipRenderFlag() const { return mSkipRender;} + void setSkipRenderFlag( bool flag ) { mSkipRender = flag; } virtual LLViewerTexture *getDebugTexture(); virtual void beginRenderPass( S32 pass ); @@ -111,19 +111,19 @@ public: virtual void render(S32 pass = 0) {}; virtual void prerender() {}; virtual U32 getVertexDataMask() { return 0; } // DEPRECATED -- draw pool doesn't actually determine vertex data mask any more - virtual BOOL verify() const { return TRUE; } // Verify that all data in the draw pool is correct! + virtual bool verify() const { return true; } // Verify that all data in the draw pool is correct! virtual S32 getShaderLevel() const { return mShaderLevel; } static LLDrawPool* createPool(const U32 type, LLViewerTexture *tex0 = NULL); virtual LLViewerTexture* getTexture() = 0; - virtual BOOL isFacePool() { return FALSE; } + virtual bool isFacePool() { return false; } virtual void resetDrawOrders() = 0; virtual void pushFaceGeometry() {} S32 mShaderLevel; S32 mId; U32 mType; // Type of draw pool - BOOL mSkipRender; + bool mSkipRender; }; class LLRenderPass : public LLDrawPool @@ -345,7 +345,7 @@ public: virtual ~LLRenderPass(); /*virtual*/ LLViewerTexture* getDebugTexture() { return NULL; } LLViewerTexture* getTexture() { return NULL; } - BOOL isDead() { return FALSE; } + bool isDead() { return false; } void resetDrawOrders() { } static void applyModelMatrix(const LLDrawInfo& params); @@ -404,16 +404,16 @@ public: LLFacePool(const U32 type); virtual ~LLFacePool(); - BOOL isDead() { return mReferences.empty(); } + bool isDead() { return mReferences.empty(); } virtual LLViewerTexture *getTexture(); virtual void dirtyTextures(const std::set& textures); virtual void enqueue(LLFace *face); - virtual BOOL addFace(LLFace *face); - virtual BOOL removeFace(LLFace *face); + virtual bool addFace(LLFace *face); + virtual bool removeFace(LLFace *face); - virtual BOOL verify() const; // Verify that all data in the draw pool is correct! + virtual bool verify() const; // Verify that all data in the draw pool is correct! virtual void resetDrawOrders(); void resetAll(); @@ -427,7 +427,7 @@ public: void printDebugInfo() const; - BOOL isFacePool() { return TRUE; } + bool isFacePool() { return true; } // call drawIndexed on every draw face void pushFaceGeometry(); @@ -446,24 +446,24 @@ public: LLOverrideFaceColor(LLDrawPool* pool) : mOverride(sOverrideFaceColor), mPool(pool) { - sOverrideFaceColor = TRUE; + sOverrideFaceColor = true; } LLOverrideFaceColor(LLDrawPool* pool, const LLColor4& color) : mOverride(sOverrideFaceColor), mPool(pool) { - sOverrideFaceColor = TRUE; + sOverrideFaceColor = true; setColor(color); } LLOverrideFaceColor(LLDrawPool* pool, const LLColor4U& color) : mOverride(sOverrideFaceColor), mPool(pool) { - sOverrideFaceColor = TRUE; + sOverrideFaceColor = true; setColor(color); } LLOverrideFaceColor(LLDrawPool* pool, F32 r, F32 g, F32 b, F32 a) : mOverride(sOverrideFaceColor), mPool(pool) { - sOverrideFaceColor = TRUE; + sOverrideFaceColor = true; setColor(r, g, b, a); } ~LLOverrideFaceColor() @@ -473,9 +473,9 @@ public: void setColor(const LLColor4& color); void setColor(const LLColor4U& color); void setColor(F32 r, F32 g, F32 b, F32 a); - BOOL mOverride; + bool mOverride; LLDrawPool* mPool; - static BOOL sOverrideFaceColor; + static bool sOverrideFaceColor; }; }; diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index b1f903f448..9fff563b50 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -52,8 +52,8 @@ #include "llenvironment.h" -BOOL LLDrawPoolAlpha::sShowDebugAlpha = FALSE; -BOOL LLDrawPoolAlpha::sShowDebugAlphaRigged = FALSE; +bool LLDrawPoolAlpha::sShowDebugAlpha = false; +bool LLDrawPoolAlpha::sShowDebugAlphaRigged = false; #define current_shader (LLGLSLShader::sCurBoundShaderPtr) @@ -144,7 +144,7 @@ static void prepare_alpha_shader(LLGLSLShader* shader, bool textureGamma, bool d } } -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; void LLDrawPoolAlpha::renderPostDeferred(S32 pass) { @@ -596,8 +596,8 @@ void LLDrawPoolAlpha::renderRiggedPbrEmissives(std::vector& emissiv void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; - BOOL initialized_lighting = FALSE; - BOOL light_enabled = TRUE; + bool initialized_lighting = false; + bool light_enabled = true; LLVOAvatar* lastAvatar = nullptr; U64 lastMeshId = 0; @@ -728,18 +728,18 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged) // Turn off lighting if it hasn't already been so. if (light_enabled || !initialized_lighting) { - initialized_lighting = TRUE; + initialized_lighting = true; target_shader = fullbright_shader; - light_enabled = FALSE; + light_enabled = false; } } // Turn on lighting if it isn't already. else if (!light_enabled || !initialized_lighting) { - initialized_lighting = TRUE; + initialized_lighting = true; target_shader = simple_shader; - light_enabled = TRUE; + light_enabled = true; } if (LLPipeline::sRenderingHUDs) @@ -956,7 +956,7 @@ bool LLDrawPoolAlpha::uploadMatrixPalette(const LLDrawInfo& params) LLGLSLShader::sCurBoundShaderPtr->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX, count, - FALSE, + false, (GLfloat*)&(mpc.mGLMp[0])); return true; diff --git a/indra/newview/lldrawpoolalpha.h b/indra/newview/lldrawpoolalpha.h index c4ab8eab1c..c0a27fbe8e 100644 --- a/indra/newview/lldrawpoolalpha.h +++ b/indra/newview/lldrawpoolalpha.h @@ -63,13 +63,13 @@ public: void renderDebugAlpha(); - void renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture = TRUE); + void renderGroupAlpha(LLSpatialGroup* group, U32 type, U32 mask, bool texture = true); void renderAlpha(U32 mask, bool depth_only = false, bool rigged = false); void renderAlphaHighlight(); bool uploadMatrixPalette(const LLDrawInfo& params); - static BOOL sShowDebugAlpha; - static BOOL sShowDebugAlphaRigged; + static bool sShowDebugAlpha; + static bool sShowDebugAlphaRigged; private: LLGLSLShader* target_shader; diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index e9b9b967dd..48c6197f9a 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -64,8 +64,8 @@ static U32 sShaderLevel = 0; LLGLSLShader* LLDrawPoolAvatar::sVertexProgram = NULL; -BOOL LLDrawPoolAvatar::sSkipOpaque = FALSE; -BOOL LLDrawPoolAvatar::sSkipTransparent = FALSE; +bool LLDrawPoolAvatar::sSkipOpaque = false; +bool LLDrawPoolAvatar::sSkipTransparent = false; S32 LLDrawPoolAvatar::sShadowPass = -1; S32 LLDrawPoolAvatar::sDiffuseChannel = 0; F32 LLDrawPoolAvatar::sMinimumAlpha = 0.2f; @@ -75,7 +75,7 @@ LLUUID gBlackSquareID; static bool is_deferred_render = false; static bool is_post_deferred_render = false; -extern BOOL gUseGLPick; +extern bool gUseGLPick; F32 CLOTHING_GRAVITY_EFFECT = 0.7f; F32 CLOTHING_ACCEL_FORCE_FACTOR = 0.2f; @@ -103,8 +103,8 @@ S32 AVATAR_OFFSET_TEX0 = 32; S32 AVATAR_OFFSET_TEX1 = 40; S32 AVATAR_VERTEX_BYTES = 48; -BOOL gAvatarEmbossBumpMap = FALSE; -static BOOL sRenderingSkinned = FALSE; +bool gAvatarEmbossBumpMap = false; +static bool sRenderingSkinned = false; S32 normal_channel = -1; S32 specular_channel = -1; S32 cube_channel = -1; @@ -124,16 +124,16 @@ LLDrawPoolAvatar::~LLDrawPoolAvatar() } // virtual -BOOL LLDrawPoolAvatar::isDead() +bool LLDrawPoolAvatar::isDead() { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR if (!LLFacePool::isDead()) { - return FALSE; + return false; } - return TRUE; + return true; } S32 LLDrawPoolAvatar::getShaderLevel() const @@ -176,7 +176,7 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - sSkipTransparent = TRUE; + sSkipTransparent = true; is_deferred_render = true; if (LLPipeline::sImpostorRender) @@ -202,7 +202,7 @@ void LLDrawPoolAvatar::endDeferredPass(S32 pass) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - sSkipTransparent = FALSE; + sSkipTransparent = false; is_deferred_render = false; if (LLPipeline::sImpostorRender) @@ -240,10 +240,10 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR - sSkipOpaque = TRUE; + sSkipOpaque = true; sShaderLevel = mShaderLevel; sVertexProgram = &gDeferredAvatarAlphaProgram; - sRenderingSkinned = TRUE; + sRenderingSkinned = true; gPipeline.bindDeferredShader(*sVertexProgram); @@ -256,8 +256,8 @@ void LLDrawPoolAvatar::endPostDeferredPass(S32 pass) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done - sRenderingSkinned = FALSE; - sSkipOpaque = FALSE; + sRenderingSkinned = false; + sSkipOpaque = false; gPipeline.unbindDeferredShader(*sVertexProgram); sDiffuseChannel = 0; @@ -297,7 +297,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass) if ((sShaderLevel > 0)) // for hardware blending { - sRenderingSkinned = TRUE; + sRenderingSkinned = true; sVertexProgram->bind(); } @@ -317,7 +317,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass) if ((sShaderLevel > 0)) // for hardware blending { - sRenderingSkinned = TRUE; + sRenderingSkinned = true; sVertexProgram->bind(); } @@ -337,7 +337,7 @@ void LLDrawPoolAvatar::beginShadowPass(S32 pass) if ((sShaderLevel > 0)) // for hardware blending { - sRenderingSkinned = TRUE; + sRenderingSkinned = true; sVertexProgram->bind(); } @@ -354,7 +354,7 @@ void LLDrawPoolAvatar::endShadowPass(S32 pass) sVertexProgram->unbind(); } sVertexProgram = NULL; - sRenderingSkinned = FALSE; + sRenderingSkinned = false; LLDrawPoolAvatar::sShadowPass = -1; } @@ -380,7 +380,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass) } LLVOAvatar::AvatarOverallAppearance oa = avatarp->getOverallAppearance(); - BOOL impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor(); + bool impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor(); // no shadows if the shadows are causing this avatar to breach the limit. if (avatarp->isTooSlow() || impostor || (oa == LLVOAvatar::AOA_INVISIBLE)) { @@ -603,7 +603,7 @@ void LLDrawPoolAvatar::beginSkinned() sVertexProgram = &gAvatarProgram; - sRenderingSkinned = TRUE; + sRenderingSkinned = true; sVertexProgram->bind(); sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha); @@ -616,7 +616,7 @@ void LLDrawPoolAvatar::endSkinned() // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done if (sShaderLevel > 0) { - sRenderingSkinned = FALSE; + sRenderingSkinned = false; sVertexProgram->disableTexture(LLViewerShaderMgr::BUMP_MAP); gGL.getTexUnit(0)->activate(); sVertexProgram->unbind(); @@ -641,7 +641,7 @@ void LLDrawPoolAvatar::beginDeferredSkinned() sShaderLevel = mShaderLevel; sVertexProgram = &gDeferredAvatarProgram; - sRenderingSkinned = TRUE; + sRenderingSkinned = true; sVertexProgram->bind(); sVertexProgram->setMinimumAlpha(LLDrawPoolAvatar::sMinimumAlpha); @@ -654,7 +654,7 @@ void LLDrawPoolAvatar::endDeferredSkinned() LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR // if we're in software-blending, remember to set the fence _after_ we draw so we wait till this rendering is done - sRenderingSkinned = FALSE; + sRenderingSkinned = false; sVertexProgram->unbind(); sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP); @@ -818,7 +818,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass) } }// rendertime Tracy annotations - BOOL impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor() && !single_avatar; + bool impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor() && !single_avatar; // rendertime Tracy annotations { diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h index 013cfad372..0c92778d97 100644 --- a/indra/newview/lldrawpoolavatar.h +++ b/indra/newview/lldrawpoolavatar.h @@ -61,7 +61,7 @@ public: }; ~LLDrawPoolAvatar(); - /*virtual*/ BOOL isDead(); + /*virtual*/ bool isDead(); typedef enum { @@ -123,8 +123,8 @@ typedef enum LLVOAvatar* mAvatar; // Add avatar hitbox debug - remember avatar pointer in case avatar draw face breaks - static BOOL sSkipOpaque; - static BOOL sSkipTransparent; + static bool sSkipOpaque; + static bool sSkipTransparent; static S32 sShadowPass; static S32 sDiffuseChannel; static F32 sMinimumAlpha; @@ -139,5 +139,5 @@ extern S32 AVATAR_OFFSET_TEX1; extern S32 AVATAR_VERTEX_BYTES; const S32 AVATAR_BUFFER_ELEMENTS = 8192; // Needs to be enough to store all avatar vertices. -extern BOOL gAvatarEmbossBumpMap; +extern bool gAvatarEmbossBumpMap; #endif // LL_LLDRAWPOOLAVATAR_H diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 203072f7bf..005ac34fd7 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -77,7 +77,7 @@ static LLGLSLShader* shader = NULL; static S32 cube_channel = -1; static S32 diffuse_channel = -1; static S32 bump_channel = -1; -static BOOL shiny = FALSE; +static bool shiny = false; // Enabled after changing LLViewerTexture::mNeedsCreateTexture to an // LLAtomicBool; this should work just fine, now. HB @@ -168,7 +168,7 @@ void LLStandardBumpmap::addstandard() gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage = LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id)); gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLGLTexture::LOCAL) ; - gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL ); + gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, true, false, NULL, NULL ); gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->forceToSaveRawImage(0, 30.f) ; LLStandardBumpmap::sStandardBumpmapCount++; } @@ -201,7 +201,7 @@ void LLStandardBumpmap::destroyGL() LLDrawPoolBump::LLDrawPoolBump() : LLRenderPass(LLDrawPool::POOL_BUMP) { - shiny = FALSE; + shiny = false; } @@ -357,7 +357,7 @@ void LLDrawPoolBump::beginFullbrightShiny() diffuse_channel = 0; } - shiny = TRUE; + shiny = true; } void LLDrawPoolBump::renderFullbrightShiny() @@ -409,7 +409,7 @@ void LLDrawPoolBump::endFullbrightShiny() diffuse_channel = -1; cube_channel = 0; - shiny = FALSE; + shiny = false; } void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, bool texture = true) @@ -429,7 +429,7 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, bool texture = // static -BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel) +bool LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel) { U8 bump_code = params.mBump; @@ -437,7 +437,7 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel) } //static -BOOL LLDrawPoolBump::bindBumpMap(LLFace* face, S32 channel) +bool LLDrawPoolBump::bindBumpMap(LLFace* face, S32 channel) { const LLTextureEntry* te = face->getTextureEntry(); if (te) @@ -446,11 +446,11 @@ BOOL LLDrawPoolBump::bindBumpMap(LLFace* face, S32 channel) return bindBumpMap(bump_code, face->getTexture(), channel); } - return FALSE; + return false; } //static -BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, S32 channel) +bool LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, S32 channel) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //Note: texture atlas does not support bump texture now. @@ -458,7 +458,7 @@ BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, S32 cha if(!tex) { //if the texture is not a fetched texture - return FALSE; + return false; } LLViewerTexture* bump = NULL; @@ -494,10 +494,10 @@ BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, S32 cha gGL.getTexUnit(channel)->bind(bump); } - return TRUE; + return true; } - return FALSE; + return false; } //static @@ -552,7 +552,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; //LL_RECORD_BLOCK_TIME(FTM_RENDER_BUMP); - shiny = TRUE; + shiny = true; for (int i = 0; i < 2; ++i) { bool rigged = i == 1; @@ -600,7 +600,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass) gGL.getTexUnit(0)->activate(); } - shiny = FALSE; + shiny = false; } @@ -708,12 +708,12 @@ void LLBumpImageList::updateImages() LLViewerTexture* image = curiter->second; if( image ) { - BOOL destroy = TRUE; + bool destroy = true; if( image->hasGLTexture()) { if( image->getBoundRecently() ) { - destroy = FALSE; + destroy = false; } else { @@ -735,12 +735,12 @@ void LLBumpImageList::updateImages() LLViewerTexture* image = curiter->second; if( image ) { - BOOL destroy = TRUE; + bool destroy = true; if( image->hasGLTexture()) { if( image->getBoundRecently() ) { - destroy = FALSE; + destroy = false; } else { @@ -767,7 +767,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText LLViewerTexture* bump = NULL; bump_image_map_t* entries_list = NULL; - void (*callback_func)( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) = NULL; + void (*callback_func)( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ) = NULL; switch( bump_code ) { @@ -791,7 +791,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText } else { - (*entries_list)[src_image->getID()] = LLViewerTextureManager::getLocalTexture( TRUE ); + (*entries_list)[src_image->getID()] = LLViewerTextureManager::getLocalTexture( true ); bump = (*entries_list)[src_image->getID()]; // In case callback was called immediately and replaced the image } @@ -802,7 +802,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText //(LLPipeline::sRenderDeferred && bump->getComponents() != 4)) { src_image->setBoostLevel(LLGLTexture::BOOST_BUMP) ; - src_image->setLoadedCallback( callback_func, 0, TRUE, FALSE, new LLUUID(src_image->getID()), NULL ); + src_image->setLoadedCallback( callback_func, 0, true, false, new LLUUID(src_image->getID()), NULL ); src_image->forceToSaveRawImage(0) ; } } @@ -812,7 +812,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText // static -void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) +void LLBumpImageList::onSourceBrightnessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; LLUUID* source_asset_id = (LLUUID*)userdata; @@ -824,7 +824,7 @@ void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTex } // static -void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) +void LLBumpImageList::onSourceDarknessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ) { LLUUID* source_asset_id = (LLUUID*)userdata; LLBumpImageList::onSourceLoaded( success, src_vi, src, *source_asset_id, BE_DARKNESS ); @@ -834,7 +834,7 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu } } -void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +void LLBumpImageList::onSourceStandardLoaded( bool success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata) { if (success && LLPipeline::sRenderDeferred) { @@ -913,7 +913,7 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr } // static -void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code ) +void LLBumpImageList::onSourceLoaded( bool success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code ) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL; @@ -932,7 +932,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI iter->second->getWidth() != src->getWidth() || iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution { //make sure an entry exists for this image - entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture(TRUE); + entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture(true); iter = entries_list.find(src_vi->getID()); } } @@ -1097,7 +1097,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI bump_ptr->ref(); auto create_func = [=]() { - img->setUseMipMaps(TRUE); + img->setUseMipMaps(true); // upload dst_image to GPU (greyscale in red channel) img->setExplicitFormat(GL_RED, GL_RED); @@ -1123,7 +1123,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI LLGLDepthTest depth(GL_FALSE); LLGLDisable cull(GL_CULL_FACE); LLGLDisable blend(GL_BLEND); - gGL.setColorMask(TRUE, TRUE); + gGL.setColorMask(true, true); gNormalMapGenProgram.bind(); diff --git a/indra/newview/lldrawpoolbump.h b/indra/newview/lldrawpoolbump.h index b1fe454c72..7e44834b2e 100644 --- a/indra/newview/lldrawpoolbump.h +++ b/indra/newview/lldrawpoolbump.h @@ -43,10 +43,10 @@ class LLViewerFetchedTexture; class LLDrawPoolBump : public LLRenderPass { protected : - LLDrawPoolBump(const U32 type):LLRenderPass(type) { mShiny = FALSE; } + LLDrawPoolBump(const U32 type):LLRenderPass(type) { mShiny = false; } public: static U32 sVertexMask; - BOOL mShiny; + bool mShiny; virtual U32 getVertexDataMask() override { return sVertexMask; } @@ -76,11 +76,11 @@ public: virtual S32 getNumPostDeferredPasses() override { return 1; } /*virtual*/ void renderPostDeferred(S32 pass) override; - static BOOL bindBumpMap(LLDrawInfo& params, S32 channel = -2); - static BOOL bindBumpMap(LLFace* face, S32 channel = -2); + static bool bindBumpMap(LLDrawInfo& params, S32 channel = -2); + static bool bindBumpMap(LLFace* face, S32 channel = -2); private: - static BOOL bindBumpMap(U8 bump_code, LLViewerTexture* tex, S32 channel); + static bool bindBumpMap(U8 bump_code, LLViewerTexture* tex, S32 channel); bool mRigged = false; // if true, doing a rigged pass }; @@ -140,14 +140,14 @@ public: LLViewerTexture* getBrightnessDarknessImage(LLViewerFetchedTexture* src_image, U8 bump_code); void addTextureStats(U8 bump, const LLUUID& base_image_id, F32 virtual_size); - static void onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ); - static void onSourceDarknessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ); - static void onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ); + static void onSourceBrightnessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ); + static void onSourceDarknessLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ); + static void onSourceStandardLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ); static void generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nrm_image); private: - static void onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump ); + static void onSourceLoaded( bool success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump ); private: typedef std::unordered_map > bump_image_map_t; diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp index c0e4ed38c1..66137ed7cd 100644 --- a/indra/newview/lldrawpoolmaterials.cpp +++ b/indra/newview/lldrawpoolmaterials.cpp @@ -260,7 +260,7 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass) mShader->uniformMatrix3x4fv(LLViewerShaderMgr::AVATAR_MATRIX, count, - FALSE, + false, (GLfloat*)&(mpc.mGLMp[0])); } } diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 3807226933..0c702ae2e5 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -158,9 +158,9 @@ void LLDrawPoolTree::endShadowPass(S32 pass) gDeferredTreeShadowProgram.unbind(); } -BOOL LLDrawPoolTree::verify() const +bool LLDrawPoolTree::verify() const { - return TRUE; + return true; } LLViewerTexture *LLDrawPoolTree::getTexture() diff --git a/indra/newview/lldrawpooltree.h b/indra/newview/lldrawpooltree.h index 496445692c..13d59f36c5 100644 --- a/indra/newview/lldrawpooltree.h +++ b/indra/newview/lldrawpooltree.h @@ -55,7 +55,7 @@ public: /*virtual*/ void endShadowPass(S32 pass); /*virtual*/ void renderShadow(S32 pass); - /*virtual*/ BOOL verify() const; + /*virtual*/ bool verify() const; /*virtual*/ LLViewerTexture *getTexture(); /*virtual*/ LLViewerTexture *getDebugTexture(); /*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 44160b306e..b45027cdb7 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -49,12 +49,12 @@ #include "llsettingssky.h" #include "llsettingswater.h" -BOOL LLDrawPoolWater::sSkipScreenCopy = FALSE; -BOOL LLDrawPoolWater::sNeedsReflectionUpdate = TRUE; -BOOL LLDrawPoolWater::sNeedsDistortionUpdate = TRUE; +bool LLDrawPoolWater::sSkipScreenCopy = false; +bool LLDrawPoolWater::sNeedsReflectionUpdate = true; +bool LLDrawPoolWater::sNeedsDistortionUpdate = true; F32 LLDrawPoolWater::sWaterFogEnd = 0.f; -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; LLDrawPoolWater::LLDrawPoolWater() : LLFacePool(POOL_WATER) { @@ -331,8 +331,8 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) // Note non-void water being drawn, updates required if (!edge) // SL-16461 remove !LLPipeline::sUseOcclusion check { - sNeedsReflectionUpdate = TRUE; - sNeedsDistortionUpdate = TRUE; + sNeedsReflectionUpdate = true; + sNeedsDistortionUpdate = true; } } } diff --git a/indra/newview/lldrawpoolwater.h b/indra/newview/lldrawpoolwater.h index 1c9e252d58..add5c9d586 100644 --- a/indra/newview/lldrawpoolwater.h +++ b/indra/newview/lldrawpoolwater.h @@ -44,9 +44,9 @@ protected: LLPointer mOpaqueWaterImagep; public: - static BOOL sSkipScreenCopy; - static BOOL sNeedsReflectionUpdate; - static BOOL sNeedsDistortionUpdate; + static bool sSkipScreenCopy; + static bool sNeedsReflectionUpdate; + static bool sNeedsDistortionUpdate; static F32 sWaterFogEnd; enum diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index b14235f25c..4580744a1f 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -45,7 +45,7 @@ #include "llvowlsky.h" #include "llsettingsvo.h" -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; static LLStaticHashedString sCamPosLocal("camPosLocal"); static LLStaticHashedString sCustomAlpha("custom_alpha"); diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h index c26d0a1e23..85d0e57838 100644 --- a/indra/newview/lldrawpoolwlsky.h +++ b/indra/newview/lldrawpoolwlsky.h @@ -43,7 +43,7 @@ public: LLDrawPoolWLSky(void); /*virtual*/ ~LLDrawPoolWLSky(); - /*virtual*/ BOOL isDead() { return FALSE; } + /*virtual*/ bool isDead() { return false; } /*virtual*/ S32 getNumDeferredPasses() { return 1; } /*virtual*/ void beginDeferredPass(S32 pass); @@ -52,13 +52,13 @@ public: /*virtual*/ LLViewerTexture *getDebugTexture(); /*virtual*/ U32 getVertexDataMask() { return SKY_VERTEX_DATA_MASK; } - /*virtual*/ BOOL verify() const { return TRUE; } // Verify that all data in the draw pool is correct! + /*virtual*/ bool verify() const { return true; } // Verify that all data in the draw pool is correct! /*virtual*/ S32 getShaderLevel() const { return mShaderLevel; } //static LLDrawPool* createPool(const U32 type, LLViewerTexture *tex0 = NULL); /*virtual*/ LLViewerTexture* getTexture(); - /*virtual*/ BOOL isFacePool() { return FALSE; } + /*virtual*/ bool isFacePool() { return false; } /*virtual*/ void resetDrawOrders(); static void cleanupGL(); diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 816a9cafa1..17f1c501d4 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -50,8 +50,8 @@ S32 LLViewerDynamicTexture::sNumRenders = 0; //----------------------------------------------------------------------------- // LLViewerDynamicTexture() //----------------------------------------------------------------------------- -LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 components, EOrder order, BOOL clamp) : - LLViewerTexture(width, height, components, FALSE), +LLViewerDynamicTexture::LLViewerDynamicTexture(S32 width, S32 height, S32 components, EOrder order, bool clamp) : + LLViewerTexture(width, height, components, false), mClamp(clamp) { llassert((1 <= components) && (components <= 4)); @@ -85,10 +85,10 @@ S8 LLViewerDynamicTexture::getType() const void LLViewerDynamicTexture::generateGLTexture() { LLViewerTexture::generateGLTexture() ; - generateGLTexture(-1, 0, 0, FALSE); + generateGLTexture(-1, 0, 0, false); } -void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes) +void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, bool swap_bytes) { if (mComponents < 1 || mComponents > 4) { @@ -108,15 +108,15 @@ void LLViewerDynamicTexture::generateGLTexture(LLGLint internal_format, LLGLenum //----------------------------------------------------------------------------- // render() //----------------------------------------------------------------------------- -BOOL LLViewerDynamicTexture::render() +bool LLViewerDynamicTexture::render() { - return FALSE; + return false; } //----------------------------------------------------------------------------- // preRender() //----------------------------------------------------------------------------- -void LLViewerDynamicTexture::preRender(BOOL clear_depth) +void LLViewerDynamicTexture::preRender(bool clear_depth) { //use the bottom left corner mOrigin.set(0, 0); @@ -140,7 +140,7 @@ void LLViewerDynamicTexture::preRender(BOOL clear_depth) //----------------------------------------------------------------------------- // postRender() //----------------------------------------------------------------------------- -void LLViewerDynamicTexture::postRender(BOOL success) +void LLViewerDynamicTexture::postRender(bool success) { { if (success) @@ -179,12 +179,12 @@ void LLViewerDynamicTexture::postRender(BOOL success) // updateDynamicTextures() // Calls update on each dynamic texture. Calls each group in order: "first," then "middle," then "last." //----------------------------------------------------------------------------- -BOOL LLViewerDynamicTexture::updateAllInstances() +bool LLViewerDynamicTexture::updateAllInstances() { sNumRenders = 0; if (gGLManager.mIsDisabled) { - return TRUE; + return true; } bool use_fbo = gPipeline.mBake.isComplete(); @@ -198,8 +198,8 @@ BOOL LLViewerDynamicTexture::updateAllInstances() LLGLSLShader::unbind(); LLVertexBuffer::unbind(); - BOOL result = FALSE; - BOOL ret = FALSE ; + bool result = false; + bool ret = false ; for( S32 order = 0; order < ORDER_COUNT; order++ ) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; @@ -212,18 +212,18 @@ BOOL LLViewerDynamicTexture::updateAllInstances() { LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("needsRender"); glClear(GL_DEPTH_BUFFER_BIT); - gDepthDirty = TRUE; + gDepthDirty = true; gGL.color4f(1,1,1,1); dynamicTexture->setBoundTarget(use_fbo ? &gPipeline.mBake : nullptr); dynamicTexture->preRender(); // Must be called outside of startRender() - result = FALSE; + result = false; { LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("DynTexture->render"); if (dynamicTexture->render()) { - ret = TRUE ; - result = TRUE; + ret = true ; + result = true; sNumRenders++; } } diff --git a/indra/newview/lldynamictexture.h b/indra/newview/lldynamictexture.h index caedf928c3..e2ae1090bc 100644 --- a/indra/newview/lldynamictexture.h +++ b/indra/newview/lldynamictexture.h @@ -60,7 +60,7 @@ public: S32 height, S32 components, // = 4, EOrder order, // = ORDER_MIDDLE, - BOOL clamp); + bool clamp); /*virtual*/ S8 getType() const ; @@ -69,15 +69,15 @@ public: S32 getSize() { return mFullWidth * mFullHeight * mComponents; } - virtual BOOL needsRender() { return TRUE; } - virtual void preRender(BOOL clear_depth = TRUE); - virtual BOOL render(); - virtual void postRender(BOOL success); + virtual bool needsRender() { return true; } + virtual void preRender(bool clear_depth = true); + virtual bool render(); + virtual void postRender(bool success); virtual void restoreGLTexture() {} virtual void destroyGLTexture() {} - static BOOL updateAllInstances(); + static bool updateAllInstances(); static void destroyGL() ; static void restoreGL() ; @@ -85,10 +85,10 @@ public: protected: void generateGLTexture(); - void generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, BOOL swap_bytes = FALSE); + void generateGLTexture(LLGLint internal_format, LLGLenum primary_format, LLGLenum type_format, bool swap_bytes = false); protected: - BOOL mClamp; + bool mClamp; LLCoordGL mOrigin; LL_ALIGN_16(LLCamera mCamera); diff --git a/indra/newview/llemote.cpp b/indra/newview/llemote.cpp index 04ceb97261..f64c65d0fc 100644 --- a/indra/newview/llemote.cpp +++ b/indra/newview/llemote.cpp @@ -78,7 +78,7 @@ bool LLEmote::onActivate() { // mCharacter being 0 might be one of the reasons for FIRE-10737 if( !mCharacter ) - return TRUE; + return true; // LLVisualParam* default_param = mCharacter->getVisualParam( "Express_Closed_Mouth" ); diff --git a/indra/newview/llemote.h b/indra/newview/llemote.h index 1b15445e4b..c4b35c3265 100644 --- a/indra/newview/llemote.h +++ b/indra/newview/llemote.h @@ -94,13 +94,13 @@ 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(); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. + // 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 diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 6c92e60cf3..221e2c4cc3 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1774,7 +1774,7 @@ LLVector4 LLEnvironment::getRotatedLightNorm() const return toLightNorm(light_direction); } -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; //------------------------------------------------------------------------- void LLEnvironment::update(const LLViewerCamera * cam) @@ -1813,7 +1813,7 @@ void LLEnvironment::update(const LLViewerCamera * cam) && (gPipeline.canUseWindLightShaders() || shaders_iter->mShaderGroup == LLGLSLShader::SG_WATER)) { - shaders_iter->mUniformsDirty = TRUE; + shaders_iter->mUniformsDirty = true; } } } diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp index 15e1ab3f66..ee73e5d5f2 100644 --- a/indra/newview/lleventnotifier.cpp +++ b/indra/newview/lleventnotifier.cpp @@ -310,13 +310,13 @@ void LLEventNotifier::load(const LLSD& event_options) } -BOOL LLEventNotifier::hasNotification(const U32 event_id) +bool LLEventNotifier::hasNotification(const U32 event_id) { if (mEventNotifications.find(event_id) != mEventNotifications.end()) { - return TRUE; + return true; } - return FALSE; + return false; } void LLEventNotifier::remove(const U32 event_id) diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h index 93d9a94e5d..c5d9a2746d 100644 --- a/indra/newview/lleventnotifier.h +++ b/indra/newview/lleventnotifier.h @@ -52,7 +52,7 @@ public: void load(const LLSD& event_options); // In the format that it comes in from login void remove(U32 event_id); - BOOL hasNotification(const U32 event_id); + bool hasNotification(const U32 event_id); void serverPushRequest(U32 event_id, bool add); typedef std::map en_map; diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index dea09276c2..38da03911c 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -115,7 +115,7 @@ LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) mExpanderLabel(p.label.isProvided() ? p.label : LLTrans::getString("More")), mExpanderVisible(false) { - setIsChrome(TRUE); + setIsChrome(true); setMaxTextLength(p.max_text_length); } @@ -247,11 +247,11 @@ void LLExpandableTextBox::draw() { if(mBGVisible && !mExpanded) { - gl_rect_2d(getLocalRect(), mBGColor.get(), TRUE); + gl_rect_2d(getLocalRect(), mBGColor.get(), true); } if(mExpandedBGVisible && mExpanded) { - gl_rect_2d(getLocalRect(), mExpandedBGColor.get(), TRUE); + gl_rect_2d(getLocalRect(), mExpandedBGColor.get(), true); } collapseIfPosChanged(); @@ -383,10 +383,10 @@ void LLExpandableTextBox::expandTextBox() // expand text box localRectToOtherView(expanded_rect, &expanded_screen_rect, getParent()); - reshape(expanded_screen_rect.getWidth(), expanded_screen_rect.getHeight(), FALSE); + reshape(expanded_screen_rect.getWidth(), expanded_screen_rect.getHeight(), false); setRect(expanded_screen_rect); - setFocus(TRUE); + setFocus(true); // this lets us receive top_lost event(needed to collapse text box) // it also draws text box above all other ui elements gViewerWindow->addPopup(this); @@ -403,7 +403,7 @@ void LLExpandableTextBox::collapseTextBox() mExpanded = false; - reshape(mCollapsedRect.getWidth(), mCollapsedRect.getHeight(), FALSE); + reshape(mCollapsedRect.getWidth(), mCollapsedRect.getHeight(), false); setRect(mCollapsedRect); updateTextBoxRect(); diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp index 422404774d..2af2449016 100644 --- a/indra/newview/llexternaleditor.cpp +++ b/indra/newview/llexternaleditor.cpp @@ -155,8 +155,8 @@ size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str) tokenizer tokens_list(str, sep); tokenizer::iterator token_iter; - BOOL inside_quotes = FALSE; - BOOL last_was_space = FALSE; + bool inside_quotes = false; + bool last_was_space = false; for (token_iter = tokens_list.begin(); token_iter != tokens_list.end(); ++token_iter) { if (!strncmp("\"",(*token_iter).c_str(),2)) @@ -168,7 +168,7 @@ size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str) if(inside_quotes) { tokens.back().append(std::string(" ")); - last_was_space = TRUE; + last_was_space = true; } } else @@ -177,7 +177,7 @@ size_t LLExternalEditor::tokenize(string_vec_t& tokens, const std::string& str) if (last_was_space) { tokens.back().append(to_push); - last_was_space = FALSE; + last_was_space = false; } else { diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 4775686fc0..2cad454543 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -72,7 +72,7 @@ static LLStaticHashedString sTextureIndexIn("texture_index_in"); static LLStaticHashedString sColorIn("color_in"); -BOOL LLFace::sSafeRenderSelect = TRUE; // FALSE +bool LLFace::sSafeRenderSelect = true; // false #define DOTVEC(a,b) (a.mV[0]*b.mV[0] + a.mV[1]*b.mV[1] + a.mV[2]*b.mV[2]) @@ -345,7 +345,7 @@ void LLFace::dirtyTexture() LLVOVolume* vobj = drawablep->getVOVolume(); if (vobj) { - vobj->mLODChanged = TRUE; + vobj->mLODChanged = true; vobj->updateVisualComplexity(); } @@ -836,8 +836,8 @@ bool less_than_max_mag(const LLVector4a& vec) return lt == 0x7; } -BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, - const LLMatrix4& mat_vert_in, BOOL global_volume) +bool LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, + const LLMatrix4& mat_vert_in, bool global_volume) { LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE @@ -862,7 +862,7 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, { LL_DEBUGS("RiggedBox") << "skipping face " << f << ", bad num vertices " << face.mNumVertices << " " << face.mNumIndices << " " << face.mWeights << LL_ENDL; - return FALSE; + return false; } //VECTORIZE THIS @@ -902,7 +902,7 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f, updateCenterAgent(); } - return TRUE; + return true; } @@ -1191,7 +1191,7 @@ void push_for_transform(LLVertexBuffer* buff, U32 source_count, U32 dest_count) } } -BOOL LLFace::getGeometryVolume(const LLVolume& volume, +bool LLFace::getGeometryVolume(const LLVolume& volume, S32 face_index, const LLMatrix4& mat_vert_in, const LLMatrix3& mat_norm_in, @@ -1212,7 +1212,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, " Attempt get access to: " << face_index << LL_ENDL; llassert(no_debug_assert); } - return FALSE; + return false; } bool rigged = isState(RIGGED); @@ -1230,7 +1230,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, // The volume face vf can have more indices/vertices than this face. All striders below are aquired with a size of this face, but then written with num_verices/num_indices values, // thus overflowing the buffer when vf holds more data. // We can either clamp num_* down like here, or aquire all striders not using the face size, but the size if vf (that is swapping out mGeomCount with num_vertices and mIndicesCout with num_indices - // in all calls to nVertbuffer->get*Strider(...). Final solution is to just return FALSE and be done with it. + // in all calls to nVertbuffer->get*Strider(...). Final solution is to just return false and be done with it. // // The correct poison of choice is debatable, either copying not all data of vf (clamping) or writing more data than this face claims to have (aquiring bigger striders). Returning will not display this face at all. // @@ -1255,7 +1255,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, << " Pool Type: " << mPoolType << LL_ENDL; llassert(no_debug_assert); } - return FALSE; + return false; } if (num_vertices + mGeomIndex > mVertexBuffer->getNumVerts()) @@ -1265,7 +1265,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LL_WARNS() << "Vertex buffer overflow!" << LL_ENDL; llassert(no_debug_assert); } - return FALSE; + return false; } } @@ -1281,9 +1281,9 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, //LLStrider wght; LLStrider wght; - BOOL full_rebuild = force_rebuild || mDrawablep->isState(LLDrawable::REBUILD_VOLUME); + bool full_rebuild = force_rebuild || mDrawablep->isState(LLDrawable::REBUILD_VOLUME); - BOOL global_volume = mDrawablep->getVOVolume()->isVolumeGlobal(); + bool global_volume = mDrawablep->getVOVolume()->isVolumeGlobal(); LLVector3 scale; if (global_volume) { @@ -1305,8 +1305,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, const LLTextureEntry *tep = mVObjp->getTE(face_index); const U8 bump_code = tep ? tep->getBumpmap() : 0; - BOOL is_static = mDrawablep->isStatic(); - BOOL is_global = is_static; + bool is_static = mDrawablep->isStatic(); + bool is_global = is_static; LLVector3 center_sum(0.f, 0.f, 0.f); @@ -2141,7 +2141,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } - return TRUE; + return true; } void LLFace::renderIndexed() @@ -2154,18 +2154,18 @@ void LLFace::renderIndexed() } //check if the face has a media -BOOL LLFace::hasMedia() const +bool LLFace::hasMedia() const { if(mHasMedia) { - return TRUE ; + return true ; } if(mTexture[LLRender::DIFFUSE_MAP].notNull()) { return mTexture[LLRender::DIFFUSE_MAP]->hasParcelMedia() ; //if has a parcel media } - return FALSE ; //no media. + return false ; //no media. } const F32 LEAST_IMPORTANCE = 0.05f ; @@ -2182,7 +2182,7 @@ F32 LLFace::getTextureVirtualSize() LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; F32 radius; F32 cos_angle_to_view_dir; - BOOL in_frustum = calcPixelArea(cos_angle_to_view_dir, radius); + bool in_frustum = calcPixelArea(cos_angle_to_view_dir, radius); if (mPixelArea < F_ALMOST_ZERO || !in_frustum) { @@ -2226,7 +2226,7 @@ F32 LLFace::getTextureVirtualSize() return face_area; } -BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) +bool LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) { LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE; @@ -2412,19 +2412,19 @@ F32 LLFace::adjustPixelArea(F32 importance, F32 pixel_area) return pixel_area ; } -BOOL LLFace::verify(const U32* indices_array) const +bool LLFace::verify(const U32* indices_array) const { - BOOL ok = TRUE; + bool ok = true; if( mVertexBuffer.isNull() ) { //no vertex buffer, face is implicitly valid - return TRUE; + return true; } // First, check whether the face data fits within the pool's range. if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts()) { - ok = FALSE; + ok = false; LL_INFOS() << "Face references invalid vertices!" << LL_ENDL; } @@ -2432,18 +2432,18 @@ BOOL LLFace::verify(const U32* indices_array) const if (!indices_count) { - return TRUE; + return true; } if (indices_count > LL_MAX_INDICES_COUNT) { - ok = FALSE; + ok = false; LL_INFOS() << "Face has bogus indices count" << LL_ENDL; } if (mIndicesIndex + mIndicesCount > mVertexBuffer->getNumIndices()) { - ok = FALSE; + ok = false; LL_INFOS() << "Face references invalid indices!" << LL_ENDL; } @@ -2460,13 +2460,13 @@ BOOL LLFace::verify(const U32* indices_array) const { LL_WARNS() << "Face index too low!" << LL_ENDL; LL_INFOS() << "i:" << i << " Index:" << indicesp[i] << " GStart: " << geom_start << LL_ENDL; - ok = FALSE; + ok = false; } else if (delta >= geom_count) { LL_WARNS() << "Face index too high!" << LL_ENDL; LL_INFOS() << "i:" << i << " Index:" << indicesp[i] << " GEnd: " << geom_start + geom_count << LL_ENDL; - ok = FALSE; + ok = false; } } #endif diff --git a/indra/newview/llface.h b/indra/newview/llface.h index b76bfd7e86..612e39b46e 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -108,7 +108,7 @@ public: void switchTexture(U32 ch, LLViewerTexture* new_texture); void dirtyTexture(); LLXformMatrix* getXform() const { return mXform; } - BOOL hasGeometry() const { return mGeomCount > 0; } + bool hasGeometry() const { return mGeomCount > 0; } LLVector3 getPositionAgent() const; LLVector2 surfaceToTexture(LLVector2 surface_coord, const LLVector4a& position, const LLVector4a& normal); void getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_pos, F32* scale) const; @@ -118,7 +118,7 @@ public: U32 getState() const { return mState; } void setState(U32 state) { mState |= state; } void clearState(U32 state) { mState &= ~state; } - BOOL isState(U32 state) const { return ((mState & state) != 0) ? TRUE : FALSE; } + bool isState(U32 state) const { return ((mState & state) != 0) ? true : false; } void setVirtualSize(F32 size) { mVSize = size; } void setPixelArea(F32 area) { mPixelArea = area; } F32 getVirtualSize() const { return mVSize; } @@ -156,7 +156,7 @@ public: //for volumes void updateRebuildFlags(); bool canRenderAsMask(); // logic helper - BOOL getGeometryVolume(const LLVolume& volume, + bool getGeometryVolume(const LLVolume& volume, S32 face_index, const LLMatrix4& mat_vert, const LLMatrix3& mat_normal, @@ -185,8 +185,8 @@ public: void setSize(S32 numVertices, S32 num_indices = 0, bool align = false); - BOOL genVolumeBBoxes(const LLVolume &volume, S32 f, - const LLMatrix4& mat_vert_in, BOOL global_volume = FALSE); + bool genVolumeBBoxes(const LLVolume &volume, S32 f, + const LLMatrix4& mat_vert_in, bool global_volume = false); void init(LLDrawable* drawablep, LLViewerObject* objp); void destroy(); @@ -203,7 +203,7 @@ public: S32 getReferenceIndex() const { return mReferenceIndex; } void setReferenceIndex(const S32 index) { mReferenceIndex = index; } - BOOL verify(const U32* indices_array = NULL) const; + bool verify(const U32* indices_array = NULL) const; void printDebugInfo() const; void setGeomIndex(U16 idx); @@ -215,12 +215,12 @@ public: void resetVirtualSize(); void setHasMedia(bool has_media) { mHasMedia = has_media ;} - BOOL hasMedia() const ; + bool hasMedia() const ; void setMediaAllowed(bool is_media_allowed) { mIsMediaAllowed = is_media_allowed; } - BOOL isMediaAllowed() const { return mIsMediaAllowed; } + bool isMediaAllowed() const { return mIsMediaAllowed; } - BOOL switchTexture() ; + bool switchTexture() ; // [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0) bool isDefaultTexture(U32 nChannel) const; @@ -247,7 +247,7 @@ public: //aligned members private: friend class LLViewerTextureList; F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius ); - BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ; + bool calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ; public: static F32 calcImportanceToCamera(F32 to_view_dir, F32 dist); static F32 adjustPixelArea(F32 importance, F32 pixel_area) ; @@ -321,7 +321,7 @@ private: // [/SL:KB] protected: - static BOOL sSafeRenderSelect; + static bool sSafeRenderSelect; public: struct CompareDistanceGreater diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index e44022711e..ffb6048643 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -67,7 +67,7 @@ static constexpr S32 NUM_FRAMES_HISTORY = 200; std::vector ft_display_idx; // line of table entry for display purposes (for collapse) -BOOL LLFastTimerView::sAnalyzePerformance = FALSE; +bool LLFastTimerView::sAnalyzePerformance = false; S32 get_depth(const BlockTimerStatHandle* blockp) { @@ -238,7 +238,7 @@ bool LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) MAX_VISIBLE_HISTORY); if (mHoverBarIndex == 0) { - return TRUE; + return true; } else if (mHoverBarIndex < 0) { @@ -248,7 +248,7 @@ bool LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) // Check for index out of range if (mHoverBarIndex != 0 && ((mScrollIndex + mHoverBarIndex - 1) >= (S32)mTimerBarRows.size() || (mScrollIndex + mHoverBarIndex - 1) < 0)) { - return TRUE; + return true; } // @@ -460,7 +460,7 @@ void LLFastTimerView::onOpen(const LLSD& key) void LLFastTimerView::onClose(bool app_quitting) { - setVisible(FALSE); + setVisible(false); // Use Drake Arconis' memory fix mTimerBarRows.clear(); mTimerBarRows.resize(NUM_FRAMES_HISTORY); @@ -1315,7 +1315,7 @@ void LLFastTimerView::drawLegend() } x += dx; - BOOL is_child_of_hover_item = (idp == mHoverID); + bool is_child_of_hover_item = (idp == mHoverID); BlockTimerStatHandle* next_parent = idp->getParent(); while(!is_child_of_hover_item && next_parent) { @@ -1434,31 +1434,31 @@ void LLFastTimerView::drawBorders( S32 y, const S32 x_start, S32 bar_height, S32 S32 by = y + 6 + (S32)LLFontGL::getFontMonospace()->getLineHeight(); //heading - gl_rect_2d(x_start-5, by, getRect().getWidth()-5, y+5, LLColor4::grey, FALSE); + gl_rect_2d(x_start-5, by, getRect().getWidth()-5, y+5, LLColor4::grey, false); //tree view - gl_rect_2d(5, by, x_start-10, 5, LLColor4::grey, FALSE); + gl_rect_2d(5, by, x_start-10, 5, LLColor4::grey, false); by = y + 5; //average bar - gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-5, LLColor4::grey, FALSE); + gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-5, LLColor4::grey, false); by -= bar_height*2+dy; //current frame bar - gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-2, LLColor4::grey, FALSE); + gl_rect_2d(x_start-5, by, getRect().getWidth()-5, by-bar_height-dy-2, LLColor4::grey, false); by -= bar_height+dy+1; //history bars - gl_rect_2d(x_start-5, by, getRect().getWidth()-5, LINE_GRAPH_HEIGHT-bar_height-dy-2, LLColor4::grey, FALSE); + gl_rect_2d(x_start-5, by, getRect().getWidth()-5, LINE_GRAPH_HEIGHT-bar_height-dy-2, LLColor4::grey, false); by = LINE_GRAPH_HEIGHT-dy; //line graph //mGraphRect = LLRect(x_start-5, by, getRect().getWidth()-5, 5); - gl_rect_2d(mGraphRect, FALSE); + gl_rect_2d(mGraphRect, false); } } diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 05737b9aad..902d74fb4a 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -42,7 +42,7 @@ public: ~LLFastTimerView(); bool postBuild(); - static BOOL sAnalyzePerformance; + static bool sAnalyzePerformance; static void outputAllMetrics(); static void doAnalysis(std::string baseline, std::string target, std::string output); diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 8e07e7659d..1a0ff138aa 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -405,7 +405,7 @@ private: /** * This class was introduced just for fixing the following issue: * EXT-836 Nav bar: Favorites overflow menu passes left-mouse click through. - * We must explicitly handle drag and drop event by returning TRUE + * We must explicitly handle drag and drop event by returning true * because otherwise LLToolDragAndDrop will initiate drag and drop operation * with the world. */ @@ -417,7 +417,7 @@ public: void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override { mToolbar->handleDragAndDropToMenu(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - return TRUE; + return true; } // virtual @@ -611,7 +611,7 @@ bool LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, *accept = ACCEPT_NO; LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); - if (LLToolDragAndDrop::SOURCE_AGENT != source && LLToolDragAndDrop::SOURCE_LIBRARY != source) return FALSE; + if (LLToolDragAndDrop::SOURCE_AGENT != source && LLToolDragAndDrop::SOURCE_LIBRARY != source) return false; switch (cargo_type) { @@ -736,11 +736,11 @@ bool LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, return true; } -bool LLFavoritesBarCtrl::handleDragAndDropToMenu(S32 x, S32 y, MASK mask, BOOL drop, +bool LLFavoritesBarCtrl::handleDragAndDropToMenu(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) { mDragToOverflowMenu = true; - BOOL handled = handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + bool handled = handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); mDragToOverflowMenu = false; return handled; } @@ -1054,12 +1054,12 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update) if(mItems.empty()) { - mBarLabel->setVisible(TRUE); + mBarLabel->setVisible(true); mLastTab = NULL; } else { - mBarLabel->setVisible(FALSE); + mBarLabel->setVisible(false); } const child_list_t* childs = getChildList(); child_list_const_iter_t child_it = childs->begin(); @@ -1175,20 +1175,20 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update) //addChild(mMoreTextBox); //mMoreTextBox->setRect(rect); - //mMoreTextBox->setVisible(TRUE); + //mMoreTextBox->setVisible(true); LLRect rect(mMoreCtrl->getRect()); rect.translate(getRect().mRight - rect.mRight - buttonHGap, 0); addChild(mMoreCtrl); mMoreCtrl->setRect(rect); - mMoreCtrl->setVisible(TRUE); + mMoreCtrl->setVisible(true); // } // Update overflow menu LLToggleableMenu* overflow_menu = static_cast (mOverflowMenuHandle.get()); if (overflow_menu && overflow_menu->getVisible() && (overflow_menu->getItemCount() != mDropDownItemsCount)) { - overflow_menu->setVisible(FALSE); + overflow_menu->setVisible(false); if (mUpdateDropDownItems) { showDropDownMenu(); @@ -1269,11 +1269,11 @@ bool LLFavoritesBarCtrl::postBuild() return true; } -BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &items) +bool LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &items) { if (mFavoriteFolderId.isNull()) - return FALSE; + return false; LLInventoryModel::cat_array_t cats; @@ -1293,7 +1293,7 @@ BOOL LLFavoritesBarCtrl::collectFavoriteItems(LLInventoryModel::item_array_t &it LLFavoritesOrderStorage::instance().mSaveOnExit = true; } - return TRUE; + return true; } void LLFavoritesBarCtrl::onMoreTextBoxClicked() @@ -1656,11 +1656,11 @@ bool LLFavoritesBarCtrl::onRenameCommit(const LLSD& notification, const LLSD& re return false; } -BOOL LLFavoritesBarCtrl::isClipboardPasteable() const +bool LLFavoritesBarCtrl::isClipboardPasteable() const { if (!LLClipboard::instance().hasContents()) { - return FALSE; + return false; } std::vector objects; @@ -1674,16 +1674,16 @@ BOOL LLFavoritesBarCtrl::isClipboardPasteable() const const LLInventoryCategory *cat = gInventory.getCategory(item_id); if (cat) { - return FALSE; + return false; } const LLInventoryItem *item = gInventory.getItem(item_id); if (item && LLAssetType::AT_LANDMARK != item->getType()) { - return FALSE; + return false; } } - return TRUE; + return true; } void LLFavoritesBarCtrl::pasteFromClipboard() const @@ -1723,7 +1723,7 @@ void LLFavoritesBarCtrl::onButtonMouseDown(LLUUID id, LLUICtrl* ctrl, S32 x, S32 LLMenuGL* menu = (LLMenuGL*)mContextMenuHandle.get(); if(menu && menu->getVisible()) { - menu->setVisible(FALSE); + menu->setVisible(false); } mDragItemId = id; @@ -1796,16 +1796,16 @@ LLUICtrl* LLFavoritesBarCtrl::findChildByLocalCoords(S32 x, S32 y) return ctrl; } -BOOL LLFavoritesBarCtrl::needToSaveItemsOrder(const LLInventoryModel::item_array_t& items) +bool LLFavoritesBarCtrl::needToSaveItemsOrder(const LLInventoryModel::item_array_t& items) { - BOOL result = FALSE; + bool result = false; // if there is an item without sort order field set, we need to save items order for (LLInventoryModel::item_array_t::const_iterator i = items.begin(); i != items.end(); ++i) { if (LLFavoritesOrderStorage::instance().getSortIndex((*i)->getUUID()) < 0) { - result = TRUE; + result = true; break; } } @@ -2264,7 +2264,7 @@ void LLFavoritesOrderStorage::rearrangeFavoriteLandmarks(const LLUUID& source_it saveItemsOrder(items); } -BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed) +bool LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed) { pref_changed |= mRecreateFavoriteStorage; mRecreateFavoriteStorage = false; @@ -2272,13 +2272,13 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed) // Can get called before inventory is done initializing. if (!gInventory.isInventoryUsable()) { - return FALSE; + return false; } LLUUID favorite_folder= gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if (favorite_folder.isNull()) { - return FALSE; + return false; } LLInventoryModel::item_array_t items; @@ -2395,11 +2395,11 @@ BOOL LLFavoritesOrderStorage::saveFavoritesRecord(bool pref_changed) mPrevFavorites = items; } - return TRUE; + return true; } -void LLFavoritesOrderStorage::showFavoritesOnLoginChanged(BOOL show) +void LLFavoritesOrderStorage::showFavoritesOnLoginChanged(bool show) { if (show) { diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h index fa07a876c9..41745132a6 100644 --- a/indra/newview/llfavoritesbar.h +++ b/indra/newview/llfavoritesbar.h @@ -63,7 +63,7 @@ public: /*virtual*/ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg) override; - bool handleDragAndDropToMenu(S32 x, S32 y, MASK mask, BOOL drop, + bool handleDragAndDropToMenu(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask) override; @@ -80,7 +80,7 @@ protected: void updateButtons(bool force_update = false); LLButton* createButton(const LLPointer item, const LLButton::Params& button_params, S32 x_offset ); const LLButton::Params& getButtonParams(); - BOOL collectFavoriteItems(LLInventoryModel::item_array_t &items); + bool collectFavoriteItems(LLInventoryModel::item_array_t &items); void onButtonClick(LLUUID id); void onButtonRightClick(LLUUID id,LLView* button,S32 x,S32 y,MASK mask); @@ -93,7 +93,7 @@ protected: bool enableSelected(const LLSD& userdata); void doToSelected(const LLSD& userdata); static bool onRenameCommit(const LLSD& notification, const LLSD& response); - BOOL isClipboardPasteable() const; + bool isClipboardPasteable() const; void pasteFromClipboard() const; void showDropDownMenu(); @@ -135,7 +135,7 @@ private: bool findDragAndDropTarget(LLUUID &target_id, bool &insert_before, S32 x, S32 y); // checks if the current order of the favorites items must be saved - BOOL needToSaveItemsOrder(const LLInventoryModel::item_array_t& items); + bool needToSaveItemsOrder(const LLInventoryModel::item_array_t& items); /** * inserts an item identified by insertedItemId BEFORE an item identified by beforeItemId. @@ -228,8 +228,8 @@ public: // Remove record of current user's favorites from file on disk. static void removeFavoritesRecordOfUser(); - BOOL saveFavoritesRecord(bool pref_changed = false); - void showFavoritesOnLoginChanged(BOOL show); + bool saveFavoritesRecord(bool pref_changed = false); + void showFavoritesOnLoginChanged(bool show); bool isStorageUpdateNeeded(); diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index 6fa2401711..59229f945d 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -75,8 +75,8 @@ const char FEATURE_TABLE_FILENAME[] = "featuretable.txt"; #if 0 // consuming code in #if 0 below #endif -LLFeatureInfo::LLFeatureInfo(const std::string& name, const BOOL available, const F32 level) - : mValid(TRUE), mName(name), mAvailable(available), mRecommendedLevel(level) +LLFeatureInfo::LLFeatureInfo(const std::string& name, const bool available, const F32 level) + : mValid(true), mName(name), mAvailable(available), mRecommendedLevel(level) { } @@ -89,7 +89,7 @@ LLFeatureList::~LLFeatureList() { } -void LLFeatureList::addFeature(const std::string& name, const BOOL available, const F32 level) +void LLFeatureList::addFeature(const std::string& name, const bool available, const F32 level) { if (mFeatures.count(name)) { @@ -104,7 +104,7 @@ void LLFeatureList::addFeature(const std::string& name, const BOOL available, co mFeatures[name] = fi; } -BOOL LLFeatureList::isFeatureAvailable(const std::string& name) +bool LLFeatureList::isFeatureAvailable(const std::string& name) { if (mFeatures.count(name)) { @@ -113,9 +113,9 @@ BOOL LLFeatureList::isFeatureAvailable(const std::string& name) LL_WARNS_ONCE("RenderInit") << "Feature " << name << " not on feature list!" << LL_ENDL; - // changing this to TRUE so you have to explicitly disable + // changing this to true so you have to explicitly disable // something for it to be disabled - return TRUE; + return true; } F32 LLFeatureList::getRecommendedValue(const std::string& name) @@ -130,7 +130,7 @@ F32 LLFeatureList::getRecommendedValue(const std::string& name) return 0; } -BOOL LLFeatureList::maskList(LLFeatureList &mask) +bool LLFeatureList::maskList(LLFeatureList &mask) { LL_DEBUGS_ONCE() << "Masking with " << mask.mName << LL_ENDL; // @@ -173,7 +173,7 @@ BOOL LLFeatureList::maskList(LLFeatureList &mask) dump(); LL_CONT << LL_ENDL; - return TRUE; + return true; } void LLFeatureList::dump() @@ -248,13 +248,13 @@ LLFeatureList *LLFeatureManager::findMask(const std::string& name) return NULL; } -BOOL LLFeatureManager::maskFeatures(const std::string& name) +bool LLFeatureManager::maskFeatures(const std::string& name) { LLFeatureList *maskp = findMask(name); if (!maskp) { LL_DEBUGS("RenderInit") << "Unknown feature mask " << name << LL_ENDL; - return FALSE; + return false; } LL_INFOS("RenderInit") << "Applying GPU Feature list: " << name << LL_ENDL; return maskList(*maskp); @@ -299,7 +299,7 @@ bool LLFeatureManager::parseFeatureTable(std::string filename) if (!file) { LL_WARNS("RenderInit") << "Unable to open feature table " << filename << LL_ENDL; - return FALSE; + return false; } // Check file version @@ -496,7 +496,7 @@ bool LLFeatureManager::loadGPUClass() // defaults mGPUString = gGLManager.getRawGLString(); - mGPUSupported = TRUE; + mGPUSupported = true; return true; // indicates that a gpu value was established } diff --git a/indra/newview/llfeaturemanager.h b/indra/newview/llfeaturemanager.h index 651404d890..e5dedfbd24 100644 --- a/indra/newview/llfeaturemanager.h +++ b/indra/newview/llfeaturemanager.h @@ -50,15 +50,15 @@ typedef enum EGPUClass class LLFeatureInfo { public: - LLFeatureInfo() : mValid(FALSE), mAvailable(FALSE), mRecommendedLevel(-1) {} - LLFeatureInfo(const std::string& name, const BOOL available, const F32 level); + LLFeatureInfo() : mValid(false), mAvailable(false), mRecommendedLevel(-1) {} + LLFeatureInfo(const std::string& name, const bool available, const F32 level); - BOOL isValid() const { return mValid; }; + bool isValid() const { return mValid; }; public: - BOOL mValid; + bool mValid; std::string mName; - BOOL mAvailable; + bool mAvailable; F32 mRecommendedLevel; }; @@ -71,17 +71,17 @@ public: LLFeatureList(const std::string& name); virtual ~LLFeatureList(); - BOOL isFeatureAvailable(const std::string& name); + bool isFeatureAvailable(const std::string& name); F32 getRecommendedValue(const std::string& name); - void setFeatureAvailable(const std::string& name, const BOOL available); + void setFeatureAvailable(const std::string& name, const bool available); void setRecommendedLevel(const std::string& name, const F32 level); bool loadFeatureList(LLFILE *fp); - BOOL maskList(LLFeatureList &mask); + bool maskList(LLFeatureList &mask); - void addFeature(const std::string& name, const BOOL available, const F32 level); + void addFeature(const std::string& name, const bool available, const F32 level); feature_map_t& getFeatures() { @@ -115,17 +115,17 @@ public: // get the measured GPU memory bandwidth in GB/sec // may return 0 of benchmark has not been run or failed to run F32 getGPUMemoryBandwidth() { return mGPUMemoryBandwidth; } - BOOL isGPUSupported() { return mGPUSupported; } + bool isGPUSupported() { return mGPUSupported; } F32 getExpectedGLVersion() { return mExpectedGLVersion; } void cleanupFeatureTables(); S32 getVersion() const { return mTableVersion; } - void setSafe(const BOOL safe) { mSafe = safe; } - BOOL isSafe() const { return mSafe; } + void setSafe(const bool safe) { mSafe = safe; } + bool isSafe() const { return mSafe; } LLFeatureList *findMask(const std::string& name); - BOOL maskFeatures(const std::string& name); + bool maskFeatures(const std::string& name); // set the graphics to low, medium, high, or ultra. // skipFeatures forces skipping of mostly hardware settings @@ -156,32 +156,32 @@ protected: bool loadGPUClass(); bool parseFeatureTable(std::string filename); - ///< @returns TRUE is file parsed correctly, FALSE if not + ///< @returns true is file parsed correctly, false if not void initBaseMask(); std::map mMaskList; std::set mSkippedFeatures; - BOOL mInited; + bool mInited; S32 mTableVersion; - BOOL mSafe; // Reinitialize everything to the "safe" mask + bool mSafe; // Reinitialize everything to the "safe" mask EGPUClass mGPUClass; F32 mGPUMemoryBandwidth = 0.f; // measured memory bandwidth of GPU in GB/second F32 mExpectedGLVersion; //expected GL version according to gpu table std::string mGPUString; - BOOL mGPUSupported; + bool mGPUSupported; }; inline LLFeatureManager::LLFeatureManager() : LLFeatureList("default"), - mInited(FALSE), + mInited(false), mTableVersion(0), - mSafe(FALSE), + mSafe(false), mGPUClass(GPU_CLASS_UNKNOWN), mExpectedGLVersion(0.f), - mGPUSupported(FALSE) + mGPUSupported(false) { } diff --git a/indra/newview/llfetchedgltfmaterial.cpp b/indra/newview/llfetchedgltfmaterial.cpp index 46b9dffae9..612ee3b9d7 100644 --- a/indra/newview/llfetchedgltfmaterial.cpp +++ b/indra/newview/llfetchedgltfmaterial.cpp @@ -151,8 +151,8 @@ LLViewerFetchedTexture* fetch_texture(const LLUUID& id) LLViewerFetchedTexture* img = nullptr; if (id.notNull()) { - img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); - img->addTextureStats(64.f * 64.f, TRUE); + img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + img->addTextureStats(64.f * 64.f, true); } return img; }; @@ -278,7 +278,7 @@ LLPointer LLFetchedGLTFMaterial::getUITexture() } else { - img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); } } if (img) diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 0784d6d431..bf4da693d7 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -179,9 +179,9 @@ void LLFilePicker::reset() #if LL_WINDOWS -BOOL LLFilePicker::setupFilter(ELoadFilter filter) +bool LLFilePicker::setupFilter(ELoadFilter filter) { - BOOL res = TRUE; + bool res = true; switch (filter) { case FFLOAD_ALL: @@ -263,24 +263,24 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter) break; // default: - res = FALSE; + res = false; break; } return res; } -BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) +bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) { if( mLocked ) { - return FALSE; + return false; } - BOOL success = FALSE; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } // don't provide default file selection @@ -320,27 +320,27 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) return success; } -BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, +bool LLFilePicker::getOpenFileModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata) { // not supposed to be used yet, use LLFilePickerThread LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) { if( mLocked ) { - return FALSE; + return false; } - BOOL success = FALSE; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } // don't provide default file selection @@ -406,27 +406,27 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) return success; } -BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, +bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata ) { // not supposed to be used yet, use LLFilePickerThread LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking) +bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking) { if( mLocked ) { - return FALSE; + return false; } - BOOL success = FALSE; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } mOFN.lpstrFile = mFilesW; @@ -623,7 +623,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, break; // default: - return FALSE; + return false; } @@ -666,14 +666,14 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, return success; } -BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter, +bool LLFilePicker::getSaveFileModeless(ESaveFilter filter, const std::string& filename, void (*callback)(bool, std::string&, void*), void *userdata) { // not supposed to be used yet, use LLFilePickerThread LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } #elif LL_DARWIN @@ -969,17 +969,17 @@ bool LLFilePicker::doNavSaveDialogModeless(ESaveFilter filter, return true; } -BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) +bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) { if( mLocked ) - return FALSE; + return false; - BOOL success = FALSE; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -1025,17 +1025,17 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking) } -BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, +bool LLFilePicker::getOpenFileModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata) { if( mLocked ) - return FALSE; + return false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -1058,18 +1058,18 @@ BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, return doNavChooseDialogModeless(filter, callback, userdata); } -BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) { if( mLocked ) - return FALSE; + return false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } - BOOL success = FALSE; + bool success = false; reset(); @@ -1104,17 +1104,17 @@ BOOL LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking) } -BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, +bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata ) { if( mLocked ) - return FALSE; + return false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -1126,12 +1126,12 @@ BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, return doNavChooseDialogModeless(filter, callback, userdata); } -BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking) +bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking) { if( mLocked ) return false; - BOOL success = false; + bool success = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) @@ -1167,7 +1167,7 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, return success; } -BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter, +bool LLFilePicker::getSaveFileModeless(ESaveFilter filter, const std::string& filename, void (*callback)(bool, std::string&, void*), void *userdata) @@ -1498,14 +1498,14 @@ static std::string add_save_texture_filter_to_gtkchooser(GtkWindow *picker) return caption; } -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) +bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { - BOOL rtn = FALSE; + bool rtn = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } gViewerWindow->getWindow()->beforeDialog(); @@ -1629,14 +1629,14 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, return rtn; } -BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) +bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) { - BOOL rtn = FALSE; + bool rtn = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } gViewerWindow->getWindow()->beforeDialog(); @@ -1699,14 +1699,14 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) return rtn; } -BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) { - BOOL rtn = FALSE; + bool rtn = false; // if local file browsing is turned off, return without opening dialog if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } gViewerWindow->getWindow()->beforeDialog(); @@ -1734,46 +1734,46 @@ BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) #elif LL_FLTK -BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, +bool LLFilePicker::getOpenFileModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata) { // not supposed to be used yet, use LLFilePickerThread LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, +bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata ) { // not supposed to be used yet, use LLFilePickerThread LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter, +bool LLFilePicker::getSaveFileModeless(ESaveFilter filter, const std::string& filename, void (*callback)(bool, std::string&, void*), void *userdata) { // not supposed to be used yet, use LLFilePickerThread LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) +bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { return openFileDialog( filter, blocking, eSaveFile ); } -BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) +bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) { return openFileDialog( filter, blocking, eOpenFile ); } -BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) { return openFileDialog( filter, blocking, eOpenMultiple ); } @@ -2012,7 +2012,7 @@ bool LLFilePicker::openFileDialog( int32_t filter, bool blocking, EType aType ) LL_WARNS() << "FLTK failed: " << flDlg.errmsg() << LL_ENDL; } - return mFiles.empty()?FALSE:TRUE; + return mFiles.empty() ? false : true; } # else // LL_GTK @@ -2020,13 +2020,13 @@ bool LLFilePicker::openFileDialog( int32_t filter, bool blocking, EType aType ) // Hacky stubs designed to facilitate fake getSaveFile and getOpenFile with // static results, when we don't have a real filepicker. -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) +bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { // if local file browsing is turned off, return without opening dialog // (Even though this is a stub, I think we still should not return anything at all) if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -2036,27 +2036,27 @@ BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, if (!filename.empty()) { mFiles.push_back(gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + filename); - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLFilePicker::getSaveFileModeless(ESaveFilter filter, +bool LLFilePicker::getSaveFileModeless(ESaveFilter filter, const std::string& filename, void (*callback)(bool, std::string&, void*), void *userdata) { LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) +bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) { // if local file browsing is turned off, return without opening dialog // (Even though this is a stub, I think we still should not return anything at all) if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); @@ -2072,58 +2072,58 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) } mFiles.push_back(filename); LL_INFOS() << "getOpenFile: Will try to open file: " << filename << LL_ENDL; - return TRUE; + return true; } -BOOL LLFilePicker::getOpenFileModeless(ELoadFilter filter, +bool LLFilePicker::getOpenFileModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata) { LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } -BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) { // if local file browsing is turned off, return without opening dialog // (Even though this is a stub, I think we still should not return anything at all) if ( check_local_file_access_enabled() == false ) { - return FALSE; + return false; } reset(); - return FALSE; + return false; } -BOOL LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, +bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata ) { LL_ERRS() << "NOT IMPLEMENTED" << LL_ENDL; - return FALSE; + return false; } #endif // LL_GTK #else // not implemented -BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blockin ) +bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename, bool blocking ) { reset(); - return FALSE; + return false; } -BOOL LLFilePicker::getOpenFile( ELoadFilter filter ) +bool LLFilePicker::getOpenFile( ELoadFilter filter ) { reset(); - return FALSE; + return false; } -BOOL LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) +bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking) { reset(); - return FALSE; + return false; } #endif // LL_LINUX diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index b6a6d27b16..168da76254 100644 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -126,17 +126,17 @@ public: }; // open the dialog. This is a modal operation - BOOL getSaveFile( ESaveFilter filter = FFSAVE_ALL, const std::string& filename = LLStringUtil::null, bool blocking = true); - BOOL getSaveFileModeless(ESaveFilter filter, + bool getSaveFile( ESaveFilter filter = FFSAVE_ALL, const std::string& filename = LLStringUtil::null, bool blocking = true); + bool getSaveFileModeless(ESaveFilter filter, const std::string& filename, void (*callback)(bool, std::string&, void*), void *userdata); - BOOL getOpenFile( ELoadFilter filter = FFLOAD_ALL, bool blocking = true ); + bool getOpenFile( ELoadFilter filter = FFLOAD_ALL, bool blocking = true ); // Todo: implement getOpenFileModeless and getMultipleOpenFilesModeless // for windows and use directly instead of ugly LLFilePickerThread - BOOL getOpenFileModeless( ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata); // MAC only. - BOOL getMultipleOpenFiles( ELoadFilter filter = FFLOAD_ALL, bool blocking = true ); - BOOL getMultipleOpenFilesModeless( ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata ); // MAC only + bool getOpenFileModeless( ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata); // MAC only. + bool getMultipleOpenFiles( ELoadFilter filter = FFLOAD_ALL, bool blocking = true ); + bool getMultipleOpenFilesModeless( ELoadFilter filter, void (*callback)(bool, std::vector &, void*), void *userdata ); // MAC only // Get the filename(s) found. getFirstFile() sets the pointer to // the start of the structure and allows the start of iteration. @@ -179,7 +179,7 @@ private: OPENFILENAMEW mOFN; // for open and save dialogs WCHAR mFilesW[FILENAME_BUFFER_SIZE]; - BOOL setupFilter(ELoadFilter filter); + bool setupFilter(ELoadFilter filter); #endif #if LL_DARWIN diff --git a/indra/newview/llfilepicker_mac.mm b/indra/newview/llfilepicker_mac.mm index 4dd8bea4e1..b21bc724fb 100644 --- a/indra/newview/llfilepicker_mac.mm +++ b/indra/newview/llfilepicker_mac.mm @@ -121,7 +121,7 @@ void doLoadDialogModeless(const std::vector* allowed_types, [panel beginWithCompletionHandler:^(NSModalResponse result) { std::vector outfiles; - if (result == NSOKButton) + if (result == NSModalResponseOK) { NSArray *filesToOpen = [panel URLs]; int i, count = [filesToOpen count]; diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index 4253a30b19..36408864fc 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -176,7 +176,7 @@ bool LLFirstUse::processNotification(const LLSD& notify) if (notification) { // disable any future notifications - gWarningSettings.setBOOL(notification->getPayload()["control_var"], false); + gWarningSettings.setBOOL((std::string)notification->getPayload()["control_var"], false); } } return false; diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index e935bc5553..c619c19493 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -60,8 +60,8 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD { static U32 seed = 0; mID = seed++; - mInitialized = FALSE; - mUpdated = FALSE; + mInitialized = false; + mUpdated = false; mInitializedRes = -1; mSimulateRes = 0; mCollisionSphereRadius = 0.f; @@ -119,7 +119,7 @@ LLQuaternion LLVolumeImplFlexible::getFrameRotation() const return mVO->getRenderRotation(); } -void LLVolumeImplFlexible::onParameterChanged(U16 param_type, LLNetworkData *data, BOOL in_use, bool local_origin) +void LLVolumeImplFlexible::onParameterChanged(U16 param_type, LLNetworkData *data, bool in_use, bool local_origin) { if (param_type == LLNetworkData::PARAMS_FLEXIBLE) { @@ -324,7 +324,7 @@ void LLVolumeImplFlexible::updateRenderRes() { mSimulateRes = new_res; setAttributesOfAllSections(); - mInitialized = TRUE; + mInitialized = true; } } //--------------------------------------------------------------------------------- @@ -433,7 +433,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() LLPath *path = &volume->getPath(); if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible()) { - BOOL force_update = mSimulateRes == 0 ? TRUE : FALSE; + bool force_update = mSimulateRes == 0 ? true : false; doIdleUpdate(); if (!force_update || !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE)) @@ -668,7 +668,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() S32 num_render_sections = 1<getPathLength() != num_render_sections+1) { - ((LLVOVolume*) mVO)->mVolumeChanged = TRUE; + ((LLVOVolume*) mVO)->mVolumeChanged = true; volume->resizePath(num_render_sections+1); } @@ -708,7 +708,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() if (!mUpdated || (np-pos).magVec()/mVO->mDrawable->mDistanceWRTCamera > 0.001f) { new_point->mPos.load3((newSection[i].mPosition * rel_xform).mV); - mUpdated = FALSE; + mUpdated = false; } new_point->mRot.loadu(LLMatrix3(rot)); @@ -741,17 +741,17 @@ void LLVolumeImplFlexible::doFlexibleRebuild(bool rebuild_volume) volume->regen(); } - mUpdated = TRUE; + mUpdated = true; } //------------------------------------------------------------------ -void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, BOOL damped) +void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, bool damped) { setAttributesOfAllSections((LLVector3*) &scale); } -BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) +bool LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED; LLVOVolume *volume = (LLVOVolume*)mVO; @@ -770,21 +770,21 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) LLVOAvatar* avatar = (LLVOAvatar*) parent; if (avatar->isImpostor() && !avatar->needsImpostorUpdate()) { - return TRUE; + return true; } } } if (volume->mDrawable.isNull()) { - return TRUE; // No update to complete + return true; // No update to complete } if (volume->mLODChanged) { LLVolumeParams volume_params = volume->getVolume()->getParams(); volume->setVolume(volume_params, 0); - mUpdated = FALSE; + mUpdated = false; } volume->updateRelativeXform(); @@ -792,12 +792,12 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) doFlexibleUpdate(); // Object may have been rotated, which means it needs a rebuild. See SL-47220 - BOOL rotated = FALSE; + bool rotated = false; LLQuaternion cur_rotation = getFrameRotation(); if ( cur_rotation != mLastFrameRotation ) { mLastFrameRotation = cur_rotation; - rotated = TRUE; + rotated = true; } if (volume->mLODChanged || volume->mFaceMappingChanged || @@ -822,14 +822,14 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) volume->genBBoxes(isVolumeGlobal()); } - volume->mVolumeChanged = FALSE; - volume->mLODChanged = FALSE; - volume->mFaceMappingChanged = FALSE; + volume->mVolumeChanged = false; + volume->mLODChanged = false; + volume->mFaceMappingChanged = false; // clear UV flag drawable->clearState(LLDrawable::UV); - return TRUE; + return true; } //---------------------------------------------------------------------------------- diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h index 9383ab03ae..b615d33e1a 100644 --- a/indra/newview/llflexibleobject.h +++ b/indra/newview/llflexibleobject.h @@ -87,11 +87,11 @@ private: LLVolumeInterfaceType getInterfaceType() const { return INTERFACE_FLEXIBLE; } void updateRenderRes(); void doIdleUpdate(); - BOOL doUpdateGeometry(LLDrawable *drawable); + bool doUpdateGeometry(LLDrawable *drawable); LLVector3 getPivotPosition() const; void onSetVolume(const LLVolumeParams &volume_params, const S32 detail); - void onSetScale(const LLVector3 &scale, BOOL damped); - void onParameterChanged(U16 param_type, LLNetworkData *data, BOOL in_use, bool local_origin); + void onSetScale(const LLVector3 &scale, bool damped); + void onParameterChanged(U16 param_type, LLNetworkData *data, bool in_use, bool local_origin); void onShift(const LLVector4a &shift_vector); bool isVolumeUnique() const { return true; } bool isVolumeGlobal() const { return true; } @@ -125,8 +125,8 @@ private: LLQuaternion mParentRotation; LLQuaternion mLastFrameRotation; LLQuaternion mLastSegmentRotation; - BOOL mInitialized; - BOOL mUpdated; + bool mInitialized; + bool mUpdated; LLFlexibleObjectData* mAttributes; LLFlexibleObjectSection mSection [ (1<blockUndo(); // Fix views - support_widget->setEnabled(FALSE); + support_widget->setEnabled(false); support_widget->startOfDoc(); // Get the names of contributors, extracted from .../doc/contributions.txt by viewer_manifest.py at build time @@ -178,7 +178,7 @@ bool LLFloaterAbout::postBuild() LL_WARNS("AboutInit") << "Could not read contributors file at " << contributors_path << LL_ENDL; } contrib_names_widget->setText(contributors); - contrib_names_widget->setEnabled(FALSE); + contrib_names_widget->setEnabled(false); contrib_names_widget->startOfDoc(); // Get the Versions and Copyrights, created at build time @@ -191,7 +191,7 @@ bool LLFloaterAbout::postBuild() licenses_widget->clear(); while ( std::getline(licenses_file, license_line) ) { - licenses_widget->appendText(license_line+"\n", FALSE, + licenses_widget->appendText(license_line+"\n", false, LLStyle::Params() .color(about_color)); } licenses_file.close(); @@ -201,7 +201,7 @@ bool LLFloaterAbout::postBuild() // this case will use the (out of date) hard coded value from the XUI LL_INFOS("AboutInit") << "Could not read licenses file at " << licenses_path << LL_ENDL; } - licenses_widget->setEnabled(FALSE); + licenses_widget->setEnabled(false); licenses_widget->startOfDoc(); return true; @@ -339,7 +339,7 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor"); support_widget->clear(); support_widget->appendText(LLAppViewer::instance()->getViewerInfoString(), - FALSE, LLStyle::Params() .color(about_color)); + false, LLStyle::Params() .color(about_color)); } //This is bound as a callback in postBuild() @@ -356,11 +356,11 @@ void LLFloaterAbout::setUpdateListener() // => update ready for install //version directory, .done file and either .skip or .next file exists // => update deferred - BOOL downloads = false; + bool downloads = false; std::string downloadDir = ""; - BOOL done = false; - BOOL next = false; - BOOL skip = false; + bool done = false; + bool next = false; + bool skip = false; LLSD info(LLFloaterAbout::getInfo()); std::string version = info["VIEWER_VERSION_STR"].asString(); diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index e9ef765baf..34e6603d35 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -114,9 +114,9 @@ void LLFloaterAuction::initialize() mParcelUpdateCapUrl = region->getCapability("ParcelPropertiesUpdate"); getChild("parcel_text")->setValue(parcelp->getName()); - getChildView("snapshot_btn")->setEnabled(TRUE); - getChildView("reset_parcel_btn")->setEnabled(TRUE); - getChildView("start_auction_btn")->setEnabled(TRUE); + getChildView("snapshot_btn")->setEnabled(true); + getChildView("reset_parcel_btn")->setEnabled(true); + getChildView("start_auction_btn")->setEnabled(true); U32 estate_id = LLEstateInfoModel::instance().getID(); // Only enable "Sell to Anyone" on Teen grid or if we don't know the ID yet @@ -181,15 +181,15 @@ void LLFloaterAuction::onClickSnapshot(void* data) LLPointer raw = new LLImageRaw; gForceRenderLandFence = self->getChild("fence_check")->getValue().asBoolean(); - BOOL success = gViewerWindow->rawSnapshot(raw, + bool success = gViewerWindow->rawSnapshot(raw, gViewerWindow->getWindowWidthScaled(), gViewerWindow->getWindowHeightScaled(), - TRUE, - FALSE, - FALSE, //UI - FALSE, //HUD - FALSE); - gForceRenderLandFence = FALSE; + true, + false, + false, //UI + false, //HUD + false); + gForceRenderLandFence = false; if (success) { @@ -223,7 +223,7 @@ void LLFloaterAuction::onClickSnapshot(void* data) LLFileSystem j2c_file(self->mImageID, LLAssetType::AT_TEXTURE, LLFileSystem::WRITE); j2c_file.write(j2c->getData(), j2c->getDataSize()); - self->mImage = LLViewerTextureManager::getLocalTexture((LLImageRaw*)raw, FALSE); + self->mImage = LLViewerTextureManager::getLocalTexture((LLImageRaw*)raw, false); gGL.getTexUnit(0)->bind(self->mImage); self->mImage->setAddressMode(LLTexUnit::TAM_CLAMP); } @@ -247,14 +247,14 @@ void LLFloaterAuction::onClickStartAuction(void* data) gAssetStorage->storeAssetData(self->mTransactionID, LLAssetType::AT_IMAGE_TGA, &auction_tga_upload_done, (void*)name, - FALSE); + false); self->getWindow()->incBusyCount(); std::string* j2c_name = new std::string(parcel_name.asString()); gAssetStorage->storeAssetData(self->mTransactionID, LLAssetType::AT_TEXTURE, &auction_j2c_upload_done, (void*)j2c_name, - FALSE); + false); self->getWindow()->incBusyCount(); LLNotificationsUtil::add("UploadingAuctionSnapshot"); diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index c77298673f..52c716bdad 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -72,9 +72,9 @@ static std::map sAvatarNameMap; LLFloaterAvatarPicker::query_id_name_map_t LLFloaterAvatarPicker::sQueryNameMap; LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, - BOOL allow_multiple, - BOOL closeOnSelect, - BOOL skip_agent, + bool allow_multiple, + bool closeOnSelect, + bool skip_agent, const std::string& name, LLView * frustumOrigin) { @@ -89,7 +89,7 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, floater->mSelectionCallback = callback; floater->setAllowMultiple(allow_multiple); - floater->mNearMeListComplete = FALSE; + floater->mNearMeListComplete = false; floater->mCloseOnSelect = closeOnSelect; floater->mExcludeAgentFromSearchResults = skip_agent; @@ -114,9 +114,9 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback, LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key) : LLFloater(key), mNumResultsReturned(0), - mNearMeListComplete(FALSE), - mCloseOnSelect(FALSE), - mExcludeAgentFromSearchResults(FALSE), + mNearMeListComplete(false), + mCloseOnSelect(false), + mExcludeAgentFromSearchResults(false), mContextConeOpacity (0.f), mContextConeInAlpha(0.f), mContextConeOutAlpha(0.f), @@ -185,19 +185,19 @@ bool LLFloaterAvatarPicker::postBuild() // Search by UUID getChild("EditUUID")->setKeystrokeCallback(boost::bind(&LLFloaterAvatarPicker::editKeystrokeUUID, this, _1, _2), NULL); childSetAction("FindUUID", boost::bind(&LLFloaterAvatarPicker::onBtnFindUUID, this)); - getChildView("FindUUID")->setEnabled(FALSE); + getChildView("FindUUID")->setEnabled(false); FSScrollListCtrl* searchresultsuuid = getChild("SearchResultsUUID"); searchresultsuuid->setContextMenu(&gFSAvatarSearchMenu); searchresultsuuid->setDoubleClickCallback( boost::bind(&LLFloaterAvatarPicker::onBtnSelect, this)); searchresultsuuid->setCommitCallback(boost::bind(&LLFloaterAvatarPicker::onList, this)); - searchresultsuuid->setEnabled(FALSE); + searchresultsuuid->setEnabled(false); searchresultsuuid->setCommentText(getString("no_results")); getChild("SearchPanelUUID")->setDefaultBtn("FindUUID"); // - setAllowMultiple(FALSE); + setAllowMultiple(false); center(); @@ -271,13 +271,13 @@ void LLFloaterAvatarPicker::onFindUUIDAvatarNameCache(const LLUUID& av_id, const data["columns"][1]["value"] = av_name.getUserName(); search_results->addElement(data); - search_results->setEnabled(TRUE); - search_results->sortByColumnIndex(1, TRUE); + search_results->setEnabled(true); + search_results->sortByColumnIndex(1, true); search_results->selectFirstItem(); onList(); - search_results->setFocus(TRUE); + search_results->setFocus(true); - getChildView("ok_btn")->setEnabled(TRUE); + getChildView("ok_btn")->setEnabled(true); } else { @@ -288,8 +288,8 @@ void LLFloaterAvatarPicker::onFindUUIDAvatarNameCache(const LLUUID& av_id, const data["columns"][0]["column"] = "nameUUID"; data["columns"][0]["value"] = getString("not_found", map); search_results->addElement(data); - search_results->setEnabled(FALSE); - getChildView("ok_btn")->setEnabled(FALSE); + search_results->setEnabled(false); + getChildView("ok_btn")->setEnabled(false); } } // @@ -369,15 +369,15 @@ void LLFloaterAvatarPicker::onBtnSelect() mSelectionCallback(avatar_ids, avatar_names); } } - getChild("SearchResults")->deselectAllItems(TRUE); - getChild("NearMe")->deselectAllItems(TRUE); - getChild("Friends")->deselectAllItems(TRUE); + getChild("SearchResults")->deselectAllItems(true); + getChild("NearMe")->deselectAllItems(true); + getChild("Friends")->deselectAllItems(true); // Search by UUID - getChild("SearchResultsUUID")->deselectAllItems(TRUE); + getChild("SearchResultsUUID")->deselectAllItems(true); // if(mCloseOnSelect) { - mCloseOnSelect = FALSE; + mCloseOnSelect = false; closeFloater(); } } @@ -386,7 +386,7 @@ void LLFloaterAvatarPicker::onBtnRefresh() { getChild("NearMe")->deleteAllItems(); getChild("NearMe")->setCommentText(getString("searching")); - mNearMeListComplete = FALSE; + mNearMeListComplete = false; } void LLFloaterAvatarPicker::onBtnClose() @@ -423,8 +423,8 @@ void LLFloaterAvatarPicker::onList() void LLFloaterAvatarPicker::populateNearMe() { - BOOL all_loaded = TRUE; - BOOL empty = TRUE; + bool all_loaded = true; + bool empty = true; LLScrollListCtrl* near_me_scroller = getChild("NearMe"); near_me_scroller->deleteAllItems(); @@ -442,7 +442,7 @@ void LLFloaterAvatarPicker::populateNearMe() { element["columns"][0]["column"] = "name"; element["columns"][0]["value"] = LLCacheName::getDefaultName(); - all_loaded = FALSE; + all_loaded = false; } else { @@ -454,27 +454,27 @@ void LLFloaterAvatarPicker::populateNearMe() sAvatarNameMap[av] = av_name; } near_me_scroller->addElement(element); - empty = FALSE; + empty = false; } if (empty) { - getChildView("NearMe")->setEnabled(FALSE); - getChildView("ok_btn")->setEnabled(FALSE); + getChildView("NearMe")->setEnabled(false); + getChildView("ok_btn")->setEnabled(false); near_me_scroller->setCommentText(getString("no_one_near")); } else { - getChildView("NearMe")->setEnabled(TRUE); - getChildView("ok_btn")->setEnabled(TRUE); + getChildView("NearMe")->setEnabled(true); + getChildView("ok_btn")->setEnabled(true); near_me_scroller->selectFirstItem(); onList(); - near_me_scroller->setFocus(TRUE); + near_me_scroller->setFocus(true); } if (all_loaded) { - mNearMeListComplete = TRUE; + mNearMeListComplete = true; } } @@ -495,7 +495,7 @@ void LLFloaterAvatarPicker::populateFriend() //{ // friends_scroller->addStringUUIDItem(it->second, it->first); //} - //friends_scroller->sortByColumnIndex(0, TRUE); + //friends_scroller->sortByColumnIndex(0, true); LLAvatarTracker::buddy_map_t friend_list; LLAvatarTracker::instance().copyBuddyList(friend_list); @@ -515,7 +515,7 @@ void LLFloaterAvatarPicker::populateFriend() friends_scroller->addElement(element); } - friends_scroller->sortByColumnIndex(0, TRUE); + friends_scroller->sortByColumnIndex(0, true); // } @@ -548,7 +548,7 @@ void LLFloaterAvatarPicker::draw() } } -BOOL LLFloaterAvatarPicker::visibleItemsSelected() const +bool LLFloaterAvatarPicker::visibleItemsSelected() const { LLPanel* active_panel = getChild("ResidentChooserTabs")->getCurrentPanel(); @@ -570,7 +570,7 @@ BOOL LLFloaterAvatarPicker::visibleItemsSelected() const return getChild("SearchResultsUUID")->getFirstSelectedIndex() >= 0; } // - return FALSE; + return false; } /*static*/ @@ -673,11 +673,11 @@ void LLFloaterAvatarPicker::find() getChild("SearchResults")->deleteAllItems(); getChild("SearchResults")->setCommentText(getString("searching")); - getChildView("ok_btn")->setEnabled(FALSE); + getChildView("ok_btn")->setEnabled(false); mNumResultsReturned = 0; } -void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple) +void LLFloaterAvatarPicker::setAllowMultiple(bool allow_multiple) { getChild("SearchResults")->setAllowMultipleSelection(allow_multiple); getChild("NearMe")->setAllowMultipleSelection(allow_multiple); @@ -811,7 +811,7 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* search_results->deleteAllItems(); } - BOOL found_one = FALSE; + bool found_one = false; S32 num_new_rows = msg->getNumberOfBlocks("Data"); for (S32 i = 0; i < num_new_rows; i++) { @@ -827,14 +827,14 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* LLStringUtil::format_map_t map; map["[TEXT]"] = floater->getChild("Edit")->getValue().asString(); avatar_name = floater->getString("not_found", map); - search_results->setEnabled(FALSE); - floater->getChildView("ok_btn")->setEnabled(FALSE); + search_results->setEnabled(false); + floater->getChildView("ok_btn")->setEnabled(false); } else { avatar_name = LLCacheName::buildFullName(first_name, last_name); - search_results->setEnabled(TRUE); - found_one = TRUE; + search_results->setEnabled(true); + found_one = true; LLAvatarName av_name; av_name.fromString(avatar_name); @@ -852,10 +852,10 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* if (found_one) { - floater->getChildView("ok_btn")->setEnabled(TRUE); + floater->getChildView("ok_btn")->setEnabled(true); search_results->selectFirstItem(); floater->onList(); - search_results->setFocus(TRUE); + search_results->setFocus(true); } } @@ -917,14 +917,14 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD& { getChildView("ok_btn")->setEnabled(true); search_results->setEnabled(true); - search_results->sortByColumnIndex(1, TRUE); + search_results->sortByColumnIndex(1, true); std::string text = getChild("Edit")->getValue().asString(); - if (!search_results->selectItemByLabel(text, TRUE, 1)) + if (!search_results->selectItemByLabel(text, true, 1)) { search_results->selectFirstItem(); } onList(); - search_results->setFocus(TRUE); + search_results->setFocus(true); } } } diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index 0a0f0cf755..fa9b1ae151 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -46,9 +46,9 @@ public: typedef boost::function&)> select_callback_t; // Call this to select an avatar. static LLFloaterAvatarPicker* show(select_callback_t callback, - BOOL allow_multiple = FALSE, - BOOL closeOnSelect = FALSE, - BOOL skip_agent = FALSE, + bool allow_multiple = false, + bool closeOnSelect = false, + bool skip_agent = false, const std::string& name = "", LLView * frustumOrigin = NULL); @@ -68,7 +68,7 @@ public: std::string& tooltip_msg); void openFriendsTab(); - BOOL isExcludeAgentFromSearchResults() {return mExcludeAgentFromSearchResults;} + bool isExcludeAgentFromSearchResults() {return mExcludeAgentFromSearchResults;} // FIRE-15194: Avatar picker doesn't work anymore when using legacy simulator messages typedef std::map query_id_name_map_t; @@ -95,11 +95,11 @@ private: void populateNearMe(); void populateFriend(); - BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected. + bool visibleItemsSelected() const; // Returns true if any items in the current tab are selected. static void findCoro(std::string url, LLUUID mQueryID, std::string mName); void find(); - void setAllowMultiple(BOOL allow_multiple); + void setAllowMultiple(bool allow_multiple); LLScrollListCtrl* getActiveList(); void drawFrustum(); @@ -108,9 +108,9 @@ private: LLUUID mQueryID; int mNumResultsReturned; - BOOL mNearMeListComplete; - BOOL mCloseOnSelect; - BOOL mExcludeAgentFromSearchResults; + bool mNearMeListComplete; + bool mCloseOnSelect; + bool mExcludeAgentFromSearchResults; LLHandle mFrustumOrigin; F32 mContextConeOpacity; F32 mContextConeInAlpha; diff --git a/indra/newview/llfloateravatarrendersettings.cpp b/indra/newview/llfloateravatarrendersettings.cpp index 33b870dc05..b31e51fc6a 100644 --- a/indra/newview/llfloateravatarrendersettings.cpp +++ b/indra/newview/llfloateravatarrendersettings.cpp @@ -226,10 +226,10 @@ void LLFloaterAvatarRenderSettings::onClickAdd(const LLSD& userdata) visual_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER); } - LLView * button = findChild("plus_btn", TRUE); + LLView * button = findChild("plus_btn", true); LLFloater* root_floater = gFloaterView->getParentFloater(this); LLFloaterAvatarPicker * picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterAvatarRenderSettings::callbackAvatarPicked, this, _1, visual_setting), - FALSE, TRUE, FALSE, root_floater->getName(), button); + false, true, false, root_floater->getName(), button); if (root_floater) { diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index 1570d85acb..bdb4a9a726 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -59,8 +59,8 @@ bool LLFloaterAvatarTextures::postBuild() const std::string tex_name = LLAvatarAppearance::getDictionary()->getTexture(ETextureIndex(i))->mName; mTextures[i] = getChild(tex_name); // Mask avatar textures and disable - mTextures[i]->setIsMasked(TRUE); - mTextures[i]->setEnabled(FALSE); + mTextures[i]->setIsMasked(true); + mTextures[i]->setEnabled(false); // } mTitle = getTitle(); diff --git a/indra/newview/llfloaterbanduration.cpp b/indra/newview/llfloaterbanduration.cpp index 1e26bd5f0b..c9141322e3 100644 --- a/indra/newview/llfloaterbanduration.cpp +++ b/indra/newview/llfloaterbanduration.cpp @@ -42,7 +42,7 @@ bool LLFloaterBanDuration::postBuild() getChild("ban_duration_radio")->setCommitCallback(boost::bind(&LLFloaterBanDuration::onClickRadio, this)); getChild("ban_duration_radio")->setSelectedIndex(0); - getChild("ban_hours")->setEnabled(FALSE); + getChild("ban_hours")->setEnabled(false); return true; } diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index 8463f281a3..14fe54641c 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -73,10 +73,10 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) LLPipeline::getRenderScriptedBeacons() ) { LLPipeline::setRenderScriptedBeacons(false); - getChild("scripted")->setControlValue(LLSD(FALSE)); - getChild("scripted")->setValue(FALSE); - getChild("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline - getChild("touch_only")->setValue(TRUE); + getChild("scripted")->setControlValue(LLSD(false)); + getChild("scripted")->setValue(false); + getChild("touch_only")->setControlValue(LLSD(true)); // just to be sure it's in sync with llpipeline + getChild("touch_only")->setValue(true); } } else if(name == "scripted") @@ -88,10 +88,10 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) LLPipeline::getRenderScriptedBeacons() ) { LLPipeline::setRenderScriptedTouchBeacons(false); - getChild("touch_only")->setControlValue(LLSD(FALSE)); - getChild("touch_only")->setValue(FALSE); - getChild("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline - getChild("scripted")->setValue(TRUE); + getChild("touch_only")->setControlValue(LLSD(false)); + getChild("touch_only")->setValue(false); + getChild("scripted")->setControlValue(LLSD(true)); // just to be sure it's in sync with llpipeline + getChild("scripted")->setValue(true); } } else if(name == "physical") LLPipeline::setRenderPhysicalBeacons(check->get()); @@ -108,10 +108,10 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) // !LLPipeline::getRenderHighlights() ) // { // LLPipeline::setRenderBeacons(true); - // getChild("beacons")->setControlValue(LLSD(TRUE)); - // getChild("beacons")->setValue(TRUE); - // getChild("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline - // getChild("highlights")->setValue(FALSE); + // getChild("beacons")->setControlValue(LLSD(true)); + // getChild("beacons")->setValue(true); + // getChild("highlights")->setControlValue(LLSD(false)); // just to be sure it's in sync with llpipeline + // getChild("highlights")->setValue(false); // } } else if(name == "beacons") @@ -124,10 +124,10 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) // !LLPipeline::getRenderHighlights() ) // { // LLPipeline::setRenderHighlights(true); - // getChild("highlights")->setControlValue(LLSD(TRUE)); - // getChild("highlights")->setValue(TRUE); - // getChild("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline - // getChild("beacons")->setValue(FALSE); + // getChild("highlights")->setControlValue(LLSD(true)); + // getChild("highlights")->setValue(true); + // getChild("beacons")->setControlValue(LLSD(false)); // just to be sure it's in sync with llpipeline + // getChild("beacons")->setValue(false); // } } } diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index d70b7996d3..10478d6bcb 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -53,7 +53,7 @@ LLFloaterBulkPermission::LLFloaterBulkPermission(const LLSD& seed) : LLFloater(seed), - mDone(FALSE) + mDone(false) { mID.generate(); mCommitCallbackRegistrar.add("BulkPermission.Ok", boost::bind(&LLFloaterBulkPermission::onOkBtn, this)); @@ -120,7 +120,7 @@ void LLFloaterBulkPermission::doApply() } else { - mDone = FALSE; + mDone = false; if (!start()) { LL_WARNS() << "Unexpected bulk permission change failure." << LL_ENDL; @@ -213,7 +213,7 @@ void LLFloaterBulkPermission::onCommitCopy() xfer->setEnabled(copyable); } -BOOL LLFloaterBulkPermission::start() +bool LLFloaterBulkPermission::start() { // note: number of top-level objects to modify is mObjectIDs.size(). getChild("queue output")->setCommentText(getString("start_text")); @@ -221,10 +221,10 @@ BOOL LLFloaterBulkPermission::start() } // Go to the next object and start if found. Returns false if no objects left, true otherwise. -BOOL LLFloaterBulkPermission::nextObject() +bool LLFloaterBulkPermission::nextObject() { S32 count; - BOOL successful_start = FALSE; + bool successful_start = false; do { count = mObjectIDs.size(); @@ -240,17 +240,17 @@ BOOL LLFloaterBulkPermission::nextObject() if(isDone() && !mDone) { getChild("queue output")->setCommentText(getString("done_text")); - mDone = TRUE; + mDone = true; } return successful_start; } // Pop the top object off of the queue. -// Return TRUE if the queue has started, otherwise FALSE. -BOOL LLFloaterBulkPermission::popNext() +// Return true if the queue has started, otherwise false. +bool LLFloaterBulkPermission::popNext() { // get the head element from the container, and attempt to get its inventory. - BOOL rv = FALSE; + bool rv = false; S32 count = mObjectIDs.size(); if(mCurrentObjectID.isNull() && (count > 0)) { @@ -264,7 +264,7 @@ BOOL LLFloaterBulkPermission::popNext() LLUUID* id = new LLUUID(mID); registerVOInventoryListener(obj,id); requestVOInventory(); - rv = TRUE; + rv = true; } else { @@ -276,7 +276,7 @@ BOOL LLFloaterBulkPermission::popNext() } -void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check) +void LLFloaterBulkPermission::doCheckUncheckAll(bool check) { gSavedSettings.setBOOL("BulkChangeIncludeAnimations", check); gSavedSettings.setBOOL("BulkChangeIncludeBodyParts" , check); @@ -352,7 +352,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("BulkChange")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("BulkChange")); new_item->setPermissions(perm); // here's the beef - updateInventory(object,new_item,TASK_INVENTORY_ITEM_KEY,FALSE); + updateInventory(object,new_item,TASK_INVENTORY_ITEM_KEY,false); //status_text.setArg("[STATUS]", getString("status_ok_text")); status_text.setArg("[STATUS]", ""); } diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index dd0dd5f5a8..c23327aa88 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -48,9 +48,9 @@ private: LLFloaterBulkPermission(const LLSD& seed); virtual ~LLFloaterBulkPermission() {} - BOOL start(); // returns TRUE if the queue has started, otherwise FALSE. - BOOL nextObject(); - BOOL popNext(); + bool start(); // returns true if the queue has started, otherwise false. + bool nextObject(); + bool popNext(); // This is the callback method for the viewer object currently // being worked on. @@ -73,15 +73,15 @@ private: void onOkBtn(); void onApplyBtn(); void onCommitCopy(); - void onCheckAll() { doCheckUncheckAll(TRUE); } - void onUncheckAll() { doCheckUncheckAll(FALSE); } + void onCheckAll() { doCheckUncheckAll(true); } + void onUncheckAll() { doCheckUncheckAll(false); } // returns true if this is done - BOOL isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.size() == 0)); } + bool isDone() const { return (mCurrentObjectID.isNull() || (mObjectIDs.size() == 0)); } //Read the settings and Apply the permissions void doApply(); - void doCheckUncheckAll(BOOL check); + void doCheckUncheckAll(bool check); private: // UI @@ -91,7 +91,7 @@ private: // Object Queue std::vector mObjectIDs; LLUUID mCurrentObjectID; - BOOL mDone; + bool mDone; bool mBulkChangeIncludeAnimations; bool mBulkChangeIncludeBodyParts; diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index ba8b982c5b..d640595db2 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -131,7 +131,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info) LLUUID owner_id; std::string owner_name; - BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); + bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); if (!owners_identical) { LLNotificationsUtil::add("BuyObjectOneOwner"); @@ -249,12 +249,12 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, LLSD row; // Compute icon for this item - BOOL item_is_multi = FALSE; + bool item_is_multi = false; if (( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK)) { - item_is_multi = TRUE; + item_is_multi = true; } std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 927dc1e919..f704bff7e0 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -110,7 +110,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) LLUUID owner_id; std::string owner_name; - BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); + bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); if (!owners_identical) { LLNotificationsUtil::add("BuyContentsOneOwner"); @@ -170,7 +170,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, // default to turning off the buy button. LLView* buy_btn = getChildView("buy_btn"); - buy_btn->setEnabled(FALSE); + buy_btn->setEnabled(false); LLUUID owner_id; bool is_group_owned; @@ -211,17 +211,17 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, // There will be at least one item shown in the display, so go // ahead and enable the buy button. - buy_btn->setEnabled(TRUE); + buy_btn->setEnabled(true); // Create the line in the list LLSD row; - BOOL item_is_multi = FALSE; + bool item_is_multi = false; if ((inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) && !(inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK)) { - item_is_multi = TRUE; + item_is_multi = true; } std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), @@ -259,7 +259,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, if (wearable_count > 0) { - getChildView("wear_check")->setEnabled(TRUE); + getChildView("wear_check")->setEnabled(true); getChild("wear_check")->setValue(LLSD(false) ); } } @@ -279,7 +279,7 @@ void LLFloaterBuyContents::onClickBuy() // We may want to wear this item if (getChild("wear_check")->getValue()) { - LLInventoryState::sWearNewClothing = TRUE; + LLInventoryState::sWearNewClothing = true; } // Put the items where we put new folders. diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index 6998bfb723..e6b43c241e 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -190,11 +190,11 @@ void LLFloaterBuyCurrencyUI::updateUI() mManager.updateUI(!hasError && !mManager.buying()); // hide most widgets - we'll turn them on as needed next - getChildView("info_buying")->setVisible(FALSE); - getChildView("info_need_more")->setVisible(FALSE); - getChildView("purchase_warning_repurchase")->setVisible(FALSE); - getChildView("purchase_warning_notenough")->setVisible(FALSE); - getChildView("contacting")->setVisible(FALSE); + getChildView("info_buying")->setVisible(false); + getChildView("info_need_more")->setVisible(false); + getChildView("purchase_warning_repurchase")->setVisible(false); + getChildView("purchase_warning_notenough")->setVisible(false); + getChildView("contacting")->setVisible(false); if (hasError) { @@ -219,15 +219,15 @@ void LLFloaterBuyCurrencyUI::updateUI() else { // display the main Buy L$ interface - getChildView("normal_background")->setVisible(TRUE); + getChildView("normal_background")->setVisible(true); if (mHasTarget) { - getChildView("info_need_more")->setVisible(TRUE); + getChildView("info_need_more")->setVisible(true); } else { - getChildView("info_buying")->setVisible(TRUE); + getChildView("info_buying")->setVisible(true); } if (mManager.buying()) @@ -244,18 +244,18 @@ void LLFloaterBuyCurrencyUI::updateUI() } S32 balance = gStatusBar->getBalance(); - getChildView("balance_label")->setVisible(TRUE); - getChildView("balance_amount")->setVisible(TRUE); + getChildView("balance_label")->setVisible(true); + getChildView("balance_amount")->setVisible(true); getChild("balance_amount")->setTextArg("[AMT]", llformat("%d", balance)); S32 buying = mManager.getAmount(); - getChildView("buying_label")->setVisible(TRUE); - getChildView("buying_amount")->setVisible(TRUE); + getChildView("buying_label")->setVisible(true); + getChildView("buying_amount")->setVisible(true); getChild("buying_amount")->setTextArg("[AMT]", llformat("%d", buying)); S32 total = balance + buying; - getChildView("total_label")->setVisible(TRUE); - getChildView("total_amount")->setVisible(TRUE); + getChildView("total_label")->setVisible(true); + getChildView("total_amount")->setVisible(true); getChild("total_amount")->setTextArg("[AMT]", llformat("%d", total)); if (mHasTarget) diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 9c3fedb34d..bbe2b50f3e 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -306,7 +306,7 @@ void LLFloaterBuyLandUI::onClose(bool app_quitting) // This object holds onto observer, transactions, and parcel state. // Despite being single_instance, destroy it to call destructors and clean // everything up. - setVisible(FALSE); + setVisible(false); destroy(); } @@ -569,7 +569,7 @@ void LLFloaterBuyLandUI::updateCovenantInfo() LLTextBox* box = getChild("covenant_text"); if(box) { - box->setVisible(FALSE); + box->setVisible(false); } // send EstateCovenantInfo message @@ -605,14 +605,14 @@ void LLFloaterBuyLandUI::updateFloaterCovenantText(const std::string &string, co refreshUI(); // remove the line stating that you must agree - box->setVisible(FALSE); + box->setVisible(false); } else { check->setEnabled(true); // remove the line stating that you must agree - box->setVisible(TRUE); + box->setVisible(true); } } @@ -733,7 +733,7 @@ void LLFloaterBuyLandUI::runWebSitePrep(const std::string& password) return; } - BOOL remove_contribution = getChild("remove_contribution")->getValue().asBoolean(); + bool remove_contribution = getChild("remove_contribution")->getValue().asBoolean(); mParcelBuyInfo = LLViewerParcelMgr::getInstance()->setupParcelBuy(gAgent.getID(), gAgent.getSessionID(), gAgent.getGroupID(), mIsForGroup, mIsClaim, remove_contribution); @@ -1106,9 +1106,9 @@ void LLFloaterBuyLandUI::refreshUI() } else { - getChildView("step_error")->setVisible(FALSE); - getChildView("error_message")->setVisible(FALSE); - getChildView("error_web")->setVisible(FALSE); + getChildView("step_error")->setVisible(false); + getChildView("error_message")->setVisible(false); + getChildView("error_web")->setVisible(false); } @@ -1143,16 +1143,16 @@ void LLFloaterBuyLandUI::refreshUI() levels->setCurrentByIndex(mUserPlanChoice); } - getChildView("step_1")->setVisible(TRUE); - getChildView("account_action")->setVisible(TRUE); - getChildView("account_reason")->setVisible(TRUE); + getChildView("step_1")->setVisible(true); + getChildView("account_action")->setVisible(true); + getChildView("account_reason")->setVisible(true); } else { - getChildView("step_1")->setVisible(FALSE); - getChildView("account_action")->setVisible(FALSE); - getChildView("account_reason")->setVisible(FALSE); - getChildView("account_level")->setVisible(FALSE); + getChildView("step_1")->setVisible(false); + getChildView("account_action")->setVisible(false); + getChildView("account_reason")->setVisible(false); + getChildView("account_level")->setVisible(false); } // section two: land use fees @@ -1210,15 +1210,15 @@ void LLFloaterBuyLandUI::refreshUI() getChild("land_use_reason")->setValue(message); - getChildView("step_2")->setVisible(TRUE); - getChildView("land_use_action")->setVisible(TRUE); - getChildView("land_use_reason")->setVisible(TRUE); + getChildView("step_2")->setVisible(true); + getChildView("land_use_action")->setVisible(true); + getChildView("land_use_reason")->setVisible(true); } else { - getChildView("step_2")->setVisible(FALSE); - getChildView("land_use_action")->setVisible(FALSE); - getChildView("land_use_reason")->setVisible(FALSE); + getChildView("step_2")->setVisible(false); + getChildView("land_use_action")->setVisible(false); + getChildView("land_use_reason")->setVisible(false); } // section three: purchase & currency @@ -1290,18 +1290,18 @@ void LLFloaterBuyLandUI::refreshUI() llformat("%d", minContribution)); getChildView("remove_contribution")->setVisible( showRemoveContribution); - getChildView("step_3")->setVisible(TRUE); - getChildView("purchase_action")->setVisible(TRUE); - getChildView("currency_reason")->setVisible(TRUE); - getChildView("currency_balance")->setVisible(TRUE); + getChildView("step_3")->setVisible(true); + getChildView("purchase_action")->setVisible(true); + getChildView("currency_reason")->setVisible(true); + getChildView("currency_balance")->setVisible(true); } else { - getChildView("step_3")->setVisible(FALSE); - getChildView("purchase_action")->setVisible(FALSE); - getChildView("currency_reason")->setVisible(FALSE); - getChildView("currency_balance")->setVisible(FALSE); - getChildView("remove_group_donation")->setVisible(FALSE); + getChildView("step_3")->setVisible(false); + getChildView("purchase_action")->setVisible(false); + getChildView("currency_reason")->setVisible(false); + getChildView("currency_balance")->setVisible(false); + getChildView("remove_group_donation")->setVisible(false); } diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index 5cb81b4580..747fc0ad9c 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -290,13 +290,13 @@ bool LLFloaterBvhPreview::postBuild() setAnimCallbacks(); loadBVH(); - return TRUE; + return true; } //----------------------------------------------------------------------------- // loadBVH() //----------------------------------------------------------------------------- -BOOL LLFloaterBvhPreview::loadBVH() +bool LLFloaterBvhPreview::loadBVH() { LLKeyframeMotion* motionp = NULL; LLBVHLoader* loaderp = NULL; @@ -305,7 +305,7 @@ BOOL LLFloaterBvhPreview::loadBVH() mPauseButton->setVisible(false); // - getChildView("bad_animation_text")->setVisible(FALSE); + getChildView("bad_animation_text")->setVisible(false); mAnimPreview = new LLPreviewAnimation(256, 256); @@ -396,7 +396,7 @@ BOOL LLFloaterBvhPreview::loadBVH() loaderp->serialize(dp); dp.reset(); LL_INFOS("BVH") << "Deserializing motionp" << LL_ENDL; - BOOL success = motionp && motionp->deserialize(dp, mMotionID, false); + bool success = motionp && motionp->deserialize(dp, mMotionID, false); LL_INFOS("BVH") << "Done" << LL_ENDL; delete []buffer; @@ -456,7 +456,7 @@ BOOL LLFloaterBvhPreview::loadBVH() motionp->setEaseIn(ease_in); motionp->setEaseOut(ease_out); // - setEnabled(TRUE); + setEnabled(true); std::string seconds_string; seconds_string = llformat(" - %.2f seconds", motionp->getDuration()); @@ -488,7 +488,7 @@ BOOL LLFloaterBvhPreview::loadBVH() } } - //setEnabled(FALSE); + //setEnabled(false); mMotionID.setNull(); mAnimPreview = NULL; } @@ -553,7 +553,7 @@ LLFloaterBvhPreview::~LLFloaterBvhPreview() } // - setEnabled(FALSE); + setEnabled(false); } //----------------------------------------------------------------------------- @@ -637,7 +637,7 @@ void LLFloaterBvhPreview::resetMotion() //LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); LLVOAvatar* avatarp = mAnimPreview->getPreviewAvatar(this); // - BOOL paused = avatarp->areAnimationsPaused(); + bool paused = avatarp->areAnimationsPaused(); LLKeyframeMotion* motionp = dynamic_cast(avatarp->findMotion(mMotionID)); if( motionp ) @@ -701,7 +701,7 @@ bool LLFloaterBvhPreview::handleMouseUp(S32 x, S32 y, MASK mask) // Preview on own avatar if (mUseOwnAvatar) return LLFloater::handleMouseUp(x, y, mask); - gFocusMgr.setMouseCapture(FALSE); + gFocusMgr.setMouseCapture(nullptr); gViewerWindow->showCursor(); return LLFloater::handleMouseUp(x, y, mask); } @@ -918,13 +918,13 @@ void LLFloaterBvhPreview::onCommitBaseAnim() LLVOAvatar* avatarp = mAnimPreview->getPreviewAvatar(this); // - BOOL paused = avatarp->areAnimationsPaused(); + bool paused = avatarp->areAnimationsPaused(); // stop all other possible base motions - avatarp->stopMotion(mIDList["Standing"], TRUE); - avatarp->stopMotion(mIDList["Walking"], TRUE); - avatarp->stopMotion(mIDList["Sitting"], TRUE); - avatarp->stopMotion(mIDList["Flying"], TRUE); + avatarp->stopMotion(mIDList["Standing"], true); + avatarp->stopMotion(mIDList["Walking"], true); + avatarp->stopMotion(mIDList["Sitting"], true); + avatarp->stopMotion(mIDList["Flying"], true); resetMotion(); @@ -980,7 +980,7 @@ void LLFloaterBvhPreview::onCommitLoopIn() getChild("loop_in_frames")->setValue(LLSD((F32)getChild("loop_in_point")->getValue().asReal() / 100.f * (F32)mNumFrames)); // resetMotion(); - getChild("loop_check")->setValue(LLSD(TRUE)); + getChild("loop_check")->setValue(LLSD(true)); onCommitLoop(); } } @@ -1007,7 +1007,7 @@ void LLFloaterBvhPreview::onCommitLoopOut() getChild("loop_out_frames")->setValue(LLSD((F32)getChild("loop_out_point")->getValue().asReal() / 100.f * (F32)mNumFrames)); // resetMotion(); - getChild("loop_check")->setValue(LLSD(TRUE)); + getChild("loop_check")->setValue(LLSD(true)); onCommitLoop(); } } @@ -1029,7 +1029,7 @@ void LLFloaterBvhPreview::onCommitLoopInFrames() { getChild("loop_in_point")->setValue(LLSD(mNumFrames == 0 ? 0.f : 100.f * (F32)getChild("loop_in_frames")->getValue().asReal() / (F32)mNumFrames)); resetMotion(); - getChild("loop_check")->setValue(LLSD(TRUE)); + getChild("loop_check")->setValue(LLSD(true)); // The values are actually set here: onCommitLoop(); } @@ -1051,7 +1051,7 @@ void LLFloaterBvhPreview::onCommitLoopOutFrames() { getChild("loop_out_point")->setValue(LLSD(mNumFrames == 0 ? 100.f : 100.f * (F32)getChild("loop_out_frames")->getValue().asReal() / (F32)mNumFrames)); resetMotion(); - getChild("loop_check")->setValue(LLSD(TRUE)); + getChild("loop_check")->setValue(LLSD(true)); onCommitLoop(); } } @@ -1360,25 +1360,25 @@ void LLFloaterBvhPreview::refresh() bool show_play = true; if (!mAnimPreview) { - getChildView("bad_animation_text")->setVisible(TRUE); + getChildView("bad_animation_text")->setVisible(true); // play button visible but disabled - mPlayButton->setEnabled(FALSE); - mStopButton->setEnabled(FALSE); - getChildView("ok_btn")->setEnabled(FALSE); + mPlayButton->setEnabled(false); + mStopButton->setEnabled(false); + getChildView("ok_btn")->setEnabled(false); } else { - getChildView("bad_animation_text")->setVisible(FALSE); + getChildView("bad_animation_text")->setVisible(false); // re-enabled in case previous animation was bad - mPlayButton->setEnabled(TRUE); - mStopButton->setEnabled(TRUE); + mPlayButton->setEnabled(true); + mStopButton->setEnabled(true); // Preview on own avatar //LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); LLVOAvatar* avatarp = mAnimPreview->getPreviewAvatar(this); // if (avatarp->isMotionActive(mMotionID)) { - mStopButton->setEnabled(TRUE); + mStopButton->setEnabled(true); // Possible memory corruption //LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(mMotionID); LLKeyframeMotion* motionp = dynamic_cast(avatarp->findMotion(mMotionID)); @@ -1399,7 +1399,7 @@ void LLFloaterBvhPreview::refresh() // Motion just finished playing mPauseRequest = avatarp->requestPause(); } - getChildView("ok_btn")->setEnabled(TRUE); + getChildView("ok_btn")->setEnabled(true); mAnimPreview->requestUpdate(); } mPlayButton->setVisible(show_play); @@ -1494,9 +1494,9 @@ void LLFloaterBvhPreview::onBtnReload(void* userdata) //----------------------------------------------------------------------------- // LLPreviewAnimation //----------------------------------------------------------------------------- -LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE) +LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false) { - mNeedsUpdate = TRUE; + mNeedsUpdate = true; mCameraDistance = PREVIEW_CAMERA_DISTANCE; mCameraYaw = 0.f; mCameraPitch = 0.f; @@ -1513,10 +1513,10 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLViewerDynamicT mDummyAvatar->hideSkirt(); // stop extraneous animations - mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE ); - mDummyAvatar->stopMotion( ANIM_AGENT_EYE, TRUE ); - mDummyAvatar->stopMotion( ANIM_AGENT_BODY_NOISE, TRUE ); - mDummyAvatar->stopMotion( ANIM_AGENT_BREATHE_ROT, TRUE ); + mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, true ); + mDummyAvatar->stopMotion( ANIM_AGENT_EYE, true ); + mDummyAvatar->stopMotion( ANIM_AGENT_BODY_NOISE, true ); + mDummyAvatar->stopMotion( ANIM_AGENT_BREATHE_ROT, true ); } //----------------------------------------------------------------------------- @@ -1536,9 +1536,9 @@ S8 LLPreviewAnimation::getType() const //----------------------------------------------------------------------------- // update() //----------------------------------------------------------------------------- -BOOL LLPreviewAnimation::render() +bool LLPreviewAnimation::render() { - mNeedsUpdate = FALSE; + mNeedsUpdate = false; LLVOAvatar* avatarp = mDummyAvatar; gGL.matrixMode(LLRender::MM_PROJECTION); @@ -1581,7 +1581,7 @@ BOOL LLPreviewAnimation::render() camera->setViewNoBroadcast(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); camera->setAspect((F32) mFullWidth / (F32) mFullHeight); - camera->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE); + camera->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false); //SJB: Animation is updated in LLVOAvatar::updateCharacter @@ -1603,7 +1603,7 @@ BOOL LLPreviewAnimation::render() } gGL.color4f(1,1,1,1); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -1611,7 +1611,7 @@ BOOL LLPreviewAnimation::render() //----------------------------------------------------------------------------- void LLPreviewAnimation::requestUpdate() { - mNeedsUpdate = TRUE; + mNeedsUpdate = true; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterbvhpreview.h b/indra/newview/llfloaterbvhpreview.h index 815f2755ab..0f5755a4fe 100644 --- a/indra/newview/llfloaterbvhpreview.h +++ b/indra/newview/llfloaterbvhpreview.h @@ -49,20 +49,20 @@ public: /*virtual*/ S8 getType() const ; - BOOL render(); + bool render(); void requestUpdate(); void rotate(F32 yaw_radians, F32 pitch_radians); void zoom(F32 zoom_delta); void setZoom(F32 zoom_amt); void pan(F32 right, F32 up); - virtual BOOL needsUpdate() { return mNeedsUpdate; } + virtual bool needsUpdate() { return mNeedsUpdate; } LLVOAvatar* getDummyAvatar() { return mDummyAvatar; } // Preview on own avatar LLVOAvatar* getPreviewAvatar(LLFloaterBvhPreview* floaterp); protected: - BOOL mNeedsUpdate; + bool mNeedsUpdate; F32 mCameraDistance; F32 mCameraYaw; F32 mCameraPitch; @@ -126,7 +126,7 @@ private: std::map getJointAliases(); // Reload animation from disk - BOOL loadBVH(); + bool loadBVH(); void unloadMotion(); // diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 2ffdda7fea..84a4e42ff3 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -397,7 +397,7 @@ void LLFloaterCamera::onOpen(const LLSD& key) updateState(); else toPrevMode(); - mClosed = FALSE; + mClosed = false; // Optional small camera floater if (mPresetCombo) @@ -420,14 +420,14 @@ void LLFloaterCamera::onClose(bool app_quitting) mPrevMode = CAMERA_CTRL_MODE_PAN; switchMode(CAMERA_CTRL_MODE_PAN); - mClosed = TRUE; + mClosed = true; - gAgent.setMovementLocked(FALSE); + gAgent.setMovementLocked(false); } LLFloaterCamera::LLFloaterCamera(const LLSD& val) : LLFloater(val), - mClosed(FALSE), + mClosed(false), mCurrMode(CAMERA_CTRL_MODE_PAN), mPrevMode(CAMERA_CTRL_MODE_PAN), mPresetCombo(nullptr) // Optional small camera floater @@ -435,7 +435,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) LLHints::getInstance()->registerHintTarget("view_popup", getHandle()); mCommitCallbackRegistrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2)); mCommitCallbackRegistrar.add("CameraPresets.Save", boost::bind(&LLFloaterCamera::onSavePreset, this)); - mCommitCallbackRegistrar.add("CameraPresets.ShowPresetsList", boost::bind(&LLFloaterReg::showInstance, "camera_presets", LLSD(), FALSE)); + mCommitCallbackRegistrar.add("CameraPresets.ShowPresetsList", boost::bind(&LLFloaterReg::showInstance, "camera_presets", LLSD(), false)); } // virtual @@ -449,7 +449,7 @@ bool LLFloaterCamera::postBuild() // Improved camera floater //getChild("precise_ctrs_label")->setShowCursorHand(false); //getChild("precise_ctrs_label")->setSoundFlags(LLView::MOUSE_UP); - //getChild("precise_ctrs_label")->setClickedCallback(boost::bind(&LLFloaterReg::showInstance, "prefs_view_advanced", LLSD(), FALSE)); + //getChild("precise_ctrs_label")->setClickedCallback(boost::bind(&LLFloaterReg::showInstance, "prefs_view_advanced", LLSD(), false)); // // Phototools support @@ -578,7 +578,7 @@ void LLFloaterCamera::switchMode(ECameraControlMode mode) default: //normally we won't occur here - llassert_always(FALSE); + llassert_always(false); } } @@ -836,28 +836,28 @@ void LLFloaterCamera::switchViews(ECameraControlMode mode) switch (mode) { case CAMERA_CTRL_MODE_PRESETS: - getChildView("preset_views_list")->setVisible(TRUE); - getChildView("camera_modes_list")->setVisible(FALSE); - getChildView("zoom")->setVisible(FALSE); - getChild("presets_btn")->setToggleState(TRUE); - getChild("avatarview_btn")->setToggleState(FALSE); - getChild("pan_btn")->setToggleState(FALSE); + getChildView("preset_views_list")->setVisible(true); + getChildView("camera_modes_list")->setVisible(false); + getChildView("zoom")->setVisible(false); + getChild("presets_btn")->setToggleState(true); + getChild("avatarview_btn")->setToggleState(false); + getChild("pan_btn")->setToggleState(false); break; case CAMERA_CTRL_MODE_MODES: - getChildView("preset_views_list")->setVisible(FALSE); - getChildView("camera_modes_list")->setVisible(TRUE); - getChildView("zoom")->setVisible(FALSE); - getChild("presets_btn")->setToggleState(FALSE); - getChild("avatarview_btn")->setToggleState(TRUE); - getChild("pan_btn")->setToggleState(FALSE); + getChildView("preset_views_list")->setVisible(false); + getChildView("camera_modes_list")->setVisible(true); + getChildView("zoom")->setVisible(false); + getChild("presets_btn")->setToggleState(false); + getChild("avatarview_btn")->setToggleState(true); + getChild("pan_btn")->setToggleState(false); break; case CAMERA_CTRL_MODE_PAN: - getChildView("preset_views_list")->setVisible(FALSE); - getChildView("camera_modes_list")->setVisible(FALSE); - getChildView("zoom")->setVisible(TRUE); - getChild("presets_btn")->setToggleState(FALSE); - getChild("avatarview_btn")->setToggleState(FALSE); - getChild("pan_btn")->setToggleState(TRUE); + getChildView("preset_views_list")->setVisible(false); + getChildView("camera_modes_list")->setVisible(false); + getChildView("zoom")->setVisible(true); + getChild("presets_btn")->setToggleState(false); + getChild("avatarview_btn")->setToggleState(false); + getChild("pan_btn")->setToggleState(true); break; default: LL_WARNS() << "Tried to switch to unsupported mode: " << mode << LL_ENDL; diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index fedfc5eef4..473ddcbe8b 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -129,7 +129,7 @@ private: // remains true until preset camera mode is chosen, or pan button is clicked, or escape pressed static bool sFreeCamera; static bool sAppearanceEditing; - BOOL mClosed; + bool mClosed; ECameraControlMode mPrevMode; ECameraControlMode mCurrMode; std::map mMode2Button; diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp index 889d32621f..c0b9fd41f8 100644 --- a/indra/newview/llfloaterchangeitemthumbnail.cpp +++ b/indra/newview/llfloaterchangeitemthumbnail.cpp @@ -125,7 +125,7 @@ bool LLFloaterChangeItemThumbnail::postBuild() LLSD tooltip_text; mToolTipTextBox->setValue(tooltip_text); - mMultipleTextBox->setVisible(FALSE); + mMultipleTextBox->setVisible(false); LLButton *upload_local = getChild("upload_local"); upload_local->setClickedCallback(onUploadLocal, (void*)this); @@ -387,7 +387,7 @@ void LLFloaterChangeItemThumbnail::refreshFromObject(LLInventoryObject* obj) { setTitle(getString("title_item_thumbnail")); - icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE); + icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), false); mRemoveImageBtn->setEnabled(thumbnail_id.notNull() && ((item->getActualType() != LLAssetType::AT_TEXTURE) || (item->getAssetUUID() != thumbnail_id))); } else @@ -437,14 +437,14 @@ void LLFloaterChangeItemThumbnail::refreshFromObject(LLInventoryObject* obj) if (mItemList.size() == 1) { mItemTypeIcon->setImage(icon_img); - mItemTypeIcon->setVisible(TRUE); - mMultipleTextBox->setVisible(FALSE); + mItemTypeIcon->setVisible(true); + mMultipleTextBox->setVisible(false); mItemNameText->setValue(obj->getName()); mItemNameText->setToolTip(std::string()); } else { - mItemTypeIcon->setVisible(FALSE); + mItemTypeIcon->setVisible(false); mMultipleTextBox->setVisible(mMultipleThumbnails); mItemNameText->setValue(getString("multiple_item_names")); @@ -691,11 +691,11 @@ void LLFloaterChangeItemThumbnail::assignAndValidateAsset(const LLUUID &asset_id texturep->setLoadedCallback(onImageDataLoaded, MAX_DISCARD_LEVEL, // Don't need full image, just size data - FALSE, - FALSE, + false, + false, (void*)data, NULL, - FALSE); + false); } else { @@ -749,12 +749,12 @@ bool LLFloaterChangeItemThumbnail::validateAsset(const LLUUID &asset_id) //static void LLFloaterChangeItemThumbnail::onImageDataLoaded( - BOOL success, + bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata) { if (!userdata) return; @@ -795,12 +795,12 @@ void LLFloaterChangeItemThumbnail::onImageDataLoaded( //static void LLFloaterChangeItemThumbnail::onFullImageLoaded( - BOOL success, + bool success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata) { if (!userdata) return; @@ -862,12 +862,12 @@ void LLFloaterChangeItemThumbnail::showTexturePicker(const LLUUID &thumbnail_id) thumbnail_id, thumbnail_id, thumbnail_id, - FALSE, - TRUE, + false, + true, LLTrans::getString("TexturePickerOutfitHeader"), // "SELECT PHOTO", // Localizable floater header PERM_NONE, PERM_NONE, - FALSE, + false, NULL); mPickerHandle = floaterp->getHandle(); @@ -886,8 +886,8 @@ void LLFloaterChangeItemThumbnail::showTexturePicker(const LLUUID &thumbnail_id) } ); - texture_floaterp->setLocalTextureEnabled(FALSE); - texture_floaterp->setBakeTextureEnabled(FALSE); + texture_floaterp->setLocalTextureEnabled(false); + texture_floaterp->setBakeTextureEnabled(false); texture_floaterp->setCanApplyImmediately(false); texture_floaterp->setCanApply(false, true, false /*Hide 'preview disabled'*/); texture_floaterp->setMinDimentionsLimits(LLFloaterSimpleSnapshot::THUMBNAIL_SNAPSHOT_DIM_MIN); @@ -897,7 +897,7 @@ void LLFloaterChangeItemThumbnail::showTexturePicker(const LLUUID &thumbnail_id) floaterp->openFloater(); } - floaterp->setFocus(TRUE); + floaterp->setFocus(true); } void LLFloaterChangeItemThumbnail::onTexturePickerCommit() @@ -991,11 +991,11 @@ void LLFloaterChangeItemThumbnail::onTexturePickerCommit() texturep->setMinDiscardLevel(0); texturep->setLoadedCallback(onFullImageLoaded, 0, // Need best quality - TRUE, - FALSE, + true, + false, (void*)data, NULL, - FALSE); + false); texturep->forceToSaveRawImage(0); } return; @@ -1036,7 +1036,7 @@ void LLFloaterChangeItemThumbnail::onUploadComplete(const LLUUID& asset_id, if (floater) { floater->mMultipleThumbnails = false; - floater->mMultipleTextBox->setVisible(FALSE); + floater->mMultipleTextBox->setVisible(false); } } } diff --git a/indra/newview/llfloaterchangeitemthumbnail.h b/indra/newview/llfloaterchangeitemthumbnail.h index 63bbb8e36f..3328a07725 100644 --- a/indra/newview/llfloaterchangeitemthumbnail.h +++ b/indra/newview/llfloaterchangeitemthumbnail.h @@ -83,19 +83,19 @@ private: static void onRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle handle); void assignAndValidateAsset(const LLUUID &asset_id, bool silent = false); - static void onImageDataLoaded(BOOL success, + static void onImageDataLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata); - static void onFullImageLoaded(BOOL success, + static void onFullImageLoaded(bool success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata); void showTexturePicker(const LLUUID &thumbnail_id); diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 687bd07097..65d07fd46f 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -71,12 +71,12 @@ // ////////////////////////////////////////////////////////////////////////////// -LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate ) +LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, bool show_apply_immediate ) : LLFloater(LLSD()), mComponents ( 3 ), - mMouseDownInLumRegion ( FALSE ), - mMouseDownInHueRegion ( FALSE ), - mMouseDownInSwatch ( FALSE ), + mMouseDownInLumRegion ( false ), + mMouseDownInHueRegion ( false ), + mMouseDownInSwatch ( false ), // *TODO: Specify this in XML mRGBViewerImageLeft ( 140 ), mRGBViewerImageTop ( 356 ), @@ -102,7 +102,7 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show mPaletteRegionWidth ( mLumRegionLeft + mLumRegionWidth - 10 ), mPaletteRegionHeight ( 40 ), mSwatch ( swatch ), - mActive ( TRUE ), + mActive ( true ), mCanApplyImmediately ( show_apply_immediate ), mContextConeOpacity ( 0.f ), mContextConeInAlpha ( 0.f ), @@ -116,8 +116,8 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show if (!mCanApplyImmediately) { - mApplyImmediateCheck->setEnabled(FALSE); - mApplyImmediateCheck->set(FALSE); + mApplyImmediateCheck->setEnabled(false); + mApplyImmediateCheck->set(false); } mContextConeInAlpha = gSavedSettings.getF32("ContextConeInAlpha"); @@ -160,7 +160,7 @@ void LLFloaterColorPicker::createUI () * ( bits + x + y * linesize + 2 ) = ( U8 )( bVal * 255.0f ); } } - mRGBImage = LLViewerTextureManager::getLocalTexture( (LLImageRaw*)raw, FALSE ); + mRGBImage = LLViewerTextureManager::getLocalTexture( (LLImageRaw*)raw, false ); gGL.getTexUnit(0)->bind(mRGBImage); mRGBImage->setAddressMode(LLTexUnit::TAM_CLAMP); @@ -176,15 +176,15 @@ void LLFloaterColorPicker::createUI () void LLFloaterColorPicker::showUI () { openFloater(getKey()); - setVisible ( TRUE ); - setFocus ( TRUE ); + setVisible ( true ); + setFocus ( true ); // HACK: if system color picker is required - close the SL one we made and use default system dialog if ( gSavedSettings.getBOOL ( "UseDefaultColorPicker" ) ) { LLColorSwatchCtrl* swatch = getSwatch (); - setVisible ( FALSE ); + setVisible ( false ); // code that will get switched in for default system color picker if ( swatch ) @@ -438,7 +438,7 @@ void LLFloaterColorPicker::onClickSelect ( void* data ) void LLFloaterColorPicker::onClickPipette( ) { - BOOL pipette_active = mPipetteBtn->getToggleState(); + bool pipette_active = mPipetteBtn->getToggleState(); pipette_active = !pipette_active; if (pipette_active) { @@ -485,8 +485,8 @@ void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te ) void LLFloaterColorPicker::onMouseCaptureLost() { - setMouseDownInHueRegion(FALSE); - setMouseDownInLumRegion(FALSE); + setMouseDownInHueRegion(false); + setMouseDownInLumRegion(false); } F32 LLFloaterColorPicker::getSwatchTransparency() @@ -495,7 +495,7 @@ F32 LLFloaterColorPicker::getSwatchTransparency() return getTransparencyType() == TT_ACTIVE ? 1.f : LLFloater::getCurrentTransparency(); } -BOOL LLFloaterColorPicker::isColorChanged() +bool LLFloaterColorPicker::isColorChanged() { return ((getOrigR() != getCurR()) || (getOrigG() != getCurG()) || (getOrigB() != getCurB())); } @@ -540,7 +540,7 @@ void LLFloaterColorPicker::draw() mRGBViewerImageLeft + mRGBViewerImageWidth + 1, mRGBViewerImageTop, LLColor4 ( 0.0f, 0.0f, 0.0f, alpha ), - FALSE ); + false ); // draw luminance slider for ( S32 y = 0; y < mLumRegionHeight; ++y ) @@ -562,7 +562,7 @@ void LLFloaterColorPicker::draw() gl_triangle_2d ( startX, startY, startX + mLumMarkerSize, startY - mLumMarkerSize, startX + mLumMarkerSize, startY + mLumMarkerSize, - LLColor4 ( 0.75f, 0.75f, 0.75f, 1.0f ), TRUE ); + LLColor4 ( 0.75f, 0.75f, 0.75f, 1.0f ), true ); // draw luminance slider outline gl_rect_2d ( mLumRegionLeft, @@ -570,7 +570,7 @@ void LLFloaterColorPicker::draw() mLumRegionLeft + mLumRegionWidth + 1, mLumRegionTop, LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ), - FALSE ); + false ); // draw selected color swatch gl_rect_2d ( mSwatchRegionLeft, @@ -578,7 +578,7 @@ void LLFloaterColorPicker::draw() mSwatchRegionLeft + mSwatchRegionWidth, mSwatchRegionTop, LLColor4 ( getCurR (), getCurG (), getCurB (), alpha ), - TRUE ); + true ); // draw selected color swatch outline gl_rect_2d ( mSwatchRegionLeft, @@ -586,7 +586,7 @@ void LLFloaterColorPicker::draw() mSwatchRegionLeft + mSwatchRegionWidth + 1, mSwatchRegionTop, LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ), - FALSE ); + false ); // color palette code is a little more involved so break it out into its' own method drawPalette (); @@ -654,8 +654,8 @@ void LLFloaterColorPicker::drawPalette () // draw palette entry color if ( mPalette [ curEntry ] ) { - gl_rect_2d ( x1 + 2, y1 - 2, x2 - 2, y2 + 2, *mPalette [ curEntry++ ] % alpha, TRUE ); - gl_rect_2d ( x1 + 1, y1 - 1, x2 - 1, y2 + 1, LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ), FALSE ); + gl_rect_2d ( x1 + 2, y1 - 2, x2 - 2, y2 + 2, *mPalette [ curEntry++ ] % alpha, true ); + gl_rect_2d ( x1 + 1, y1 - 1, x2 - 1, y2 + 1, LLColor4 ( 0.0f, 0.0f, 0.0f, 1.0f ), false ); } } } @@ -823,7 +823,7 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl ) ////////////////////////////////////////////////////////////////////////////// // -BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn ) +bool LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn ) { if ( xPosIn >= mRGBViewerImageLeft && xPosIn <= mRGBViewerImageLeft + mRGBViewerImageWidth && @@ -836,7 +836,7 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn ) getCurL () ); // indicate a value changed - return TRUE; + return true; } else if ( xPosIn >= mLumRegionLeft && @@ -851,10 +851,10 @@ BOOL LLFloaterColorPicker::updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn ) ( ( F32 )yPosIn - ( ( F32 )mRGBViewerImageTop - ( F32 )mRGBViewerImageHeight ) ) / ( F32 )mRGBViewerImageHeight ); // indicate a value changed - return TRUE; + return true; } - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////////////// @@ -874,7 +874,7 @@ bool LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask ) { gFocusMgr.setMouseCapture(this); // mouse button down - setMouseDownInHueRegion ( TRUE ); + setMouseDownInHueRegion ( true ); // update all values based on initial click updateRgbHslFromPoint ( x, y ); @@ -893,7 +893,7 @@ bool LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask ) { gFocusMgr.setMouseCapture(this); // mouse button down - setMouseDownInLumRegion ( TRUE ); + setMouseDownInLumRegion ( true ); // required by base class return true; @@ -905,10 +905,10 @@ bool LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask ) mSwatchRegionLeft + mSwatchRegionWidth, mSwatchRegionTop - mSwatchRegionHeight ); - setMouseDownInSwatch( FALSE ); + setMouseDownInSwatch( false ); if ( swatchRect.pointInRect ( x, y ) ) { - setMouseDownInSwatch( TRUE ); + setMouseDownInSwatch( true ); // required - dont drag windows here. return true; @@ -925,7 +925,7 @@ bool LLFloaterColorPicker::handleMouseDown ( S32 x, S32 y, MASK mask ) // release keyboard focus so we can change text values if (gFocusMgr.childHasKeyboardFocus(this)) { - mSelectBtn->setFocus(TRUE); + mSelectBtn->setFocus(true); } // calculate which palette index we selected @@ -978,7 +978,7 @@ bool LLFloaterColorPicker::handleHover ( S32 x, S32 y, MASK mask ) clamped_y = llclamp(y, mLumRegionTop - mLumRegionHeight, mLumRegionTop); } - // update the stored RGB/HSL values using the mouse position - returns TRUE if RGB was updated + // update the stored RGB/HSL values using the mouse position - returns true if RGB was updated if ( updateRgbHslFromPoint ( clamped_x, clamped_y ) ) { // update text entry fields @@ -1084,8 +1084,8 @@ bool LLFloaterColorPicker::handleMouseUp ( S32 x, S32 y, MASK mask ) } // mouse button not down anymore - setMouseDownInHueRegion ( FALSE ); - setMouseDownInLumRegion ( FALSE ); + setMouseDownInHueRegion ( false ); + setMouseDownInLumRegion ( false ); // mouse button not down in color swatch anymore mMouseDownInSwatch = false; @@ -1110,10 +1110,10 @@ void LLFloaterColorPicker::cancelSelection () LLColorSwatchCtrl::onColorChanged( getSwatch(), LLColorSwatchCtrl::COLOR_CANCEL ); // hide picker dialog - this->setVisible ( FALSE ); + this->setVisible ( false ); } -void LLFloaterColorPicker::setMouseDownInHueRegion ( BOOL mouse_down_in_region ) +void LLFloaterColorPicker::setMouseDownInHueRegion ( bool mouse_down_in_region ) { mMouseDownInHueRegion = mouse_down_in_region; if (mouse_down_in_region) @@ -1121,12 +1121,12 @@ void LLFloaterColorPicker::setMouseDownInHueRegion ( BOOL mouse_down_in_region ) if (gFocusMgr.childHasKeyboardFocus(this)) { // get focus out of spinners so that they can update freely - mSelectBtn->setFocus(TRUE); + mSelectBtn->setFocus(true); } } } -void LLFloaterColorPicker::setMouseDownInLumRegion ( BOOL mouse_down_in_region ) +void LLFloaterColorPicker::setMouseDownInLumRegion ( bool mouse_down_in_region ) { mMouseDownInLumRegion = mouse_down_in_region; if (mouse_down_in_region) @@ -1134,12 +1134,12 @@ void LLFloaterColorPicker::setMouseDownInLumRegion ( BOOL mouse_down_in_region ) if (gFocusMgr.childHasKeyboardFocus(this)) { // get focus out of spinners so that they can update freely - mSelectBtn->setFocus(TRUE); + mSelectBtn->setFocus(true); } } } -void LLFloaterColorPicker::setMouseDownInSwatch (BOOL mouse_down_in_swatch) +void LLFloaterColorPicker::setMouseDownInSwatch (bool mouse_down_in_swatch) { mMouseDownInSwatch = mouse_down_in_swatch; if (mouse_down_in_swatch) @@ -1147,12 +1147,12 @@ void LLFloaterColorPicker::setMouseDownInSwatch (BOOL mouse_down_in_swatch) if (gFocusMgr.childHasKeyboardFocus(this)) { // get focus out of spinners so that they can update freely - mSelectBtn->setFocus(TRUE); + mSelectBtn->setFocus(true); } } } -void LLFloaterColorPicker::setActive(BOOL active) +void LLFloaterColorPicker::setActive(bool active) { // shut down pipette tool if active if (!active && mPipetteBtn->getToggleState()) diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index e7f2699b3d..bb157c889a 100644 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -44,7 +44,7 @@ class LLFloaterColorPicker : public LLFloater { public: - LLFloaterColorPicker (LLColorSwatchCtrl* swatch, BOOL show_apply_immediate = FALSE); + LLFloaterColorPicker (LLColorSwatchCtrl* swatch, bool show_apply_immediate = false); virtual ~LLFloaterColorPicker (); // overrides @@ -87,7 +87,7 @@ class LLFloaterColorPicker F32 getCurL () { return curL; }; // updates current RGB/HSL values based on point in picker - BOOL updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn ); + bool updateRgbHslFromPoint ( S32 xPosIn, S32 yPosIn ); // updates text entry fields with current RGB/HSL void updateTextEntry (); @@ -95,16 +95,16 @@ class LLFloaterColorPicker void stopUsingPipette(); // mutator / accessor for mouse button pressed in region - void setMouseDownInHueRegion ( BOOL mouse_down_in_region ); - BOOL getMouseDownInHueRegion () { return mMouseDownInHueRegion; }; + void setMouseDownInHueRegion ( bool mouse_down_in_region ); + bool getMouseDownInHueRegion () { return mMouseDownInHueRegion; }; - void setMouseDownInLumRegion ( BOOL mouse_down_in_region ); - BOOL getMouseDownInLumRegion () { return mMouseDownInLumRegion; }; + void setMouseDownInLumRegion ( bool mouse_down_in_region ); + bool getMouseDownInLumRegion () { return mMouseDownInLumRegion; }; - void setMouseDownInSwatch (BOOL mouse_down_in_swatch); - BOOL getMouseDownInSwatch () { return mMouseDownInSwatch; } + void setMouseDownInSwatch (bool mouse_down_in_swatch); + bool getMouseDownInSwatch () { return mMouseDownInSwatch; } - BOOL isColorChanged (); + bool isColorChanged (); // called when text entries (RGB/HSL etc.) are changed by user void onTextEntryChanged ( LLUICtrl* ctrl ); @@ -113,7 +113,7 @@ class LLFloaterColorPicker void hslToRgb ( F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32& bValOut ); F32 hueToRgb ( F32 val1In, F32 val2In, F32 valHUeIn ); - void setActive(BOOL active); + void setActive(bool active); protected: // callbacks @@ -142,9 +142,9 @@ class LLFloaterColorPicker const S32 mComponents; - BOOL mMouseDownInLumRegion; - BOOL mMouseDownInHueRegion; - BOOL mMouseDownInSwatch; + bool mMouseDownInLumRegion; + bool mMouseDownInHueRegion; + bool mMouseDownInSwatch; const S32 mRGBViewerImageLeft; const S32 mRGBViewerImageTop; @@ -181,11 +181,11 @@ class LLFloaterColorPicker LLColorSwatchCtrl* mSwatch; // are we actively tied to some output? - BOOL mActive; + bool mActive; // enable/disable immediate updates LLCheckBoxCtrl* mApplyImmediateCheck; - BOOL mCanApplyImmediately; + bool mCanApplyImmediately; LLButton* mSelectBtn; LLButton* mCancelBtn; diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index f78d2db26d..60cdc16497 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -91,7 +91,7 @@ void LLFloaterDisplayName::onOpen(const LLSD& key) getChild("save_btn")->setEnabled(false); getChild("display_name_editor")->setEnabled(false); getChild("display_name_confirm")->setEnabled(false); - getChild("cancel_btn")->setFocus(TRUE); + getChild("cancel_btn")->setFocus(true); } else @@ -176,7 +176,7 @@ void LLFloaterDisplayName::onReset() //{ // // UI is enabled, fill the first field // getChild("display_name_confirm")->clear(); - // getChild("display_name_confirm")->setFocus(TRUE); + // getChild("display_name_confirm")->setFocus(true); //} //else //{ diff --git a/indra/newview/llfloatereditenvironmentbase.cpp b/indra/newview/llfloatereditenvironmentbase.cpp index e7e0ff717e..07bc5701cf 100644 --- a/indra/newview/llfloatereditenvironmentbase.cpp +++ b/indra/newview/llfloatereditenvironmentbase.cpp @@ -443,7 +443,7 @@ void LLFloaterEditEnvironmentBase::onInventoryCreated(LLUUID asset_id, LLUUID in } clearDirtyFlag(); - setFocus(TRUE); // Call back the focus... + setFocus(true); // Call back the focus... loadInventoryItem(inventory_id, can_trans); } diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index c1c6a82e29..c0c9c4654f 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -890,7 +890,7 @@ void LLFloaterEditExtDayCycle::onFrameSliderCallback(const LLSD &data) keymap_t::iterator it = mSliderKeyMap.find(curslider); if (it != mSliderKeyMap.end()) { - if (gKeyboard->currentMask(TRUE) == MASK_SHIFT && mShiftCopyEnabled && mCanMod) + if (gKeyboard->currentMask(true) == MASK_SHIFT && mShiftCopyEnabled && mCanMod) { // don't move the point/frame as long as shift is pressed and user is attempting to copy // handleKeyUp will do the move if user releases key too early. @@ -961,7 +961,7 @@ void LLFloaterEditExtDayCycle::onFrameSliderMouseDown(S32 x, S32 y, MASK mask) std::string slidername = mFramesSlider->getCurSlider(); - mShiftCopyEnabled = !slidername.empty() && gKeyboard->currentMask(TRUE) == MASK_SHIFT; + mShiftCopyEnabled = !slidername.empty() && gKeyboard->currentMask(true) == MASK_SHIFT; if (!slidername.empty()) { @@ -1213,7 +1213,7 @@ void LLFloaterEditExtDayCycle::updateButtons() mDeleteFrameButton->setEnabled(can_manipulate && isRemovingFrameAllowed()); mLoadFrame->setEnabled(can_manipulate); - BOOL enable_play = mEditDay ? TRUE : FALSE; + bool enable_play = mEditDay ? true : false; childSetEnabled(BTN_PLAY, enable_play); childSetEnabled(BTN_SKIP_BACK, enable_play); childSetEnabled(BTN_SKIP_FORWARD, enable_play); @@ -1562,8 +1562,8 @@ void LLFloaterEditExtDayCycle::startPlay() gIdleCallbacks.addFunction(onIdlePlay, this); mPlayStartFrame = mTimeSlider->getCurSliderValue(); - getChild("play_layout", true)->setVisible(FALSE); - getChild("pause_layout", true)->setVisible(TRUE); + getChild("play_layout", true)->setVisible(false); + getChild("pause_layout", true)->setVisible(true); } void LLFloaterEditExtDayCycle::stopPlay() @@ -1577,8 +1577,8 @@ void LLFloaterEditExtDayCycle::stopPlay() F32 frame = mTimeSlider->getCurSliderValue(); selectFrame(frame, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR); - getChild("play_layout", true)->setVisible(TRUE); - getChild("pause_layout", true)->setVisible(FALSE); + getChild("play_layout", true)->setVisible(true); + getChild("pause_layout", true)->setVisible(false); } //static @@ -1698,7 +1698,7 @@ void LLFloaterEditExtDayCycle::doOpenInventoryFloater(LLSettingsType::type_e typ picker->setTrackMode(LLFloaterSettingsPicker::TRACK_NONE); } picker->openFloater(); - picker->setFocus(TRUE); + picker->setFocus(true); } void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID item_id, S32 track) diff --git a/indra/newview/llfloaterenvironmentadjust.cpp b/indra/newview/llfloaterenvironmentadjust.cpp index cc5936be03..f99ad3c41c 100644 --- a/indra/newview/llfloaterenvironmentadjust.cpp +++ b/indra/newview/llfloaterenvironmentadjust.cpp @@ -113,7 +113,7 @@ bool LLFloaterEnvironmentAdjust::postBuild() getChild(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); }); getChild(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::GetDefaultCloudNoiseTextureId()); - getChild(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE); + getChild(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(true); getChild(FIELD_WATER_NORMAL_MAP)->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId()); getChild(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(LLUUID(gSavedSettings.getString("DefaultBlankNormalTexture"))); @@ -157,12 +157,12 @@ void LLFloaterEnvironmentAdjust::refresh() { if (!mLiveSky || !mLiveWater) { - setAllChildrenEnabled(FALSE); + setAllChildrenEnabled(false); return; } - setEnabled(TRUE); - setAllChildrenEnabled(TRUE); + setEnabled(true); + setAllChildrenEnabled(true); getChild(FIELD_SKY_AMBIENT_LIGHT)->set(mLiveSky->getAmbientColor() / SLIDER_SCALE_SUN_AMBIENT); getChild(FIELD_SKY_BLUE_HORIZON)->set(mLiveSky->getBlueHorizon() / SLIDER_SCALE_BLUE_HORIZON_DENSITY); diff --git a/indra/newview/llfloaterexperiencepicker.cpp b/indra/newview/llfloaterexperiencepicker.cpp index 9858f38210..b39c731489 100644 --- a/indra/newview/llfloaterexperiencepicker.cpp +++ b/indra/newview/llfloaterexperiencepicker.cpp @@ -44,7 +44,7 @@ #include "lldraghandle.h" #include "llpanelexperiencepicker.h" -LLFloaterExperiencePicker* LLFloaterExperiencePicker::show( select_callback_t callback, const LLUUID& key, BOOL allow_multiple, BOOL close_on_select, filter_list filters, LLView * frustumOrigin ) +LLFloaterExperiencePicker* LLFloaterExperiencePicker::show( select_callback_t callback, const LLUUID& key, bool allow_multiple, bool close_on_select, filter_list filters, LLView * frustumOrigin ) { LLFloaterExperiencePicker* floater = LLFloaterReg::showTypedInstance("experience_search", key); diff --git a/indra/newview/llfloaterexperiencepicker.h b/indra/newview/llfloaterexperiencepicker.h index 5ef3281a82..b941cca3c9 100644 --- a/indra/newview/llfloaterexperiencepicker.h +++ b/indra/newview/llfloaterexperiencepicker.h @@ -43,7 +43,7 @@ public: typedef boost::function filter_function; typedef std::vector filter_list; - static LLFloaterExperiencePicker* show( select_callback_t callback, const LLUUID& key, BOOL allow_multiple, BOOL close_on_select, filter_list filters, LLView * frustumOrigin); + static LLFloaterExperiencePicker* show( select_callback_t callback, const LLUUID& key, bool allow_multiple, bool close_on_select, filter_list filters, LLView * frustumOrigin); LLFloaterExperiencePicker(const LLSD& key); virtual ~LLFloaterExperiencePicker(); diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index e23525b3c3..a0f423c56c 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -178,7 +178,7 @@ bool LLFloaterExperienceProfile::postBuild() childSetCommitCallback(EDIT IMG_LOGO, boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this), NULL); - getChild(EDIT TF_DESC)->setCommitOnFocusLost(TRUE); + getChild(EDIT TF_DESC)->setCommitOnFocusLost(true); LLEventPumps::instance().obtain("experience_permission").listen(mExperienceId.asString()+"-profile", @@ -314,11 +314,11 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) LLLayoutPanel* topPanel = getChild(PNL_TOP); - imagePanel->setVisible(FALSE); - descriptionPanel->setVisible(FALSE); - locationPanel->setVisible(FALSE); - marketplacePanel->setVisible(FALSE); - topPanel->setVisible(FALSE); + imagePanel->setVisible(false); + descriptionPanel->setVisible(false); + locationPanel->setVisible(false); + marketplacePanel->setVisible(false); + topPanel->setVisible(false); LLTextBox* child = getChild(TF_NAME); @@ -383,9 +383,9 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) enable = getChild(EDIT BTN_PRIVATE); enable->set(properties & LLExperienceCache::PROPERTY_PRIVATE); - topPanel->setVisible(TRUE); + topPanel->setVisible(true); child=getChild(TF_GRID_WIDE); - child->setVisible(TRUE); + child->setVisible(true); if(properties & LLExperienceCache::PROPERTY_GRID) { @@ -398,13 +398,13 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) if(getChild(BTN_EDIT)->getVisible()) { - topPanel->setVisible(TRUE); + topPanel->setVisible(true); } if(properties & LLExperienceCache::PROPERTY_PRIVILEGED) { child = getChild(TF_PRIVILEGED); - child->setVisible(TRUE); + child->setVisible(true); } else { @@ -436,16 +436,16 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) child->setText(value); if(value.size()) { - marketplacePanel->setVisible(TRUE); + marketplacePanel->setVisible(true); } else { - marketplacePanel->setVisible(FALSE); + marketplacePanel->setVisible(false); } } else { - marketplacePanel->setVisible(FALSE); + marketplacePanel->setVisible(false); } linechild = getChild(EDIT TF_MRKT); @@ -457,7 +457,7 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) LLUUID id = data[IMG_LOGO].asUUID(); logo->setImageAssetID(id); - imagePanel->setVisible(TRUE); + imagePanel->setVisible(true); logo = getChild(EDIT IMG_LOGO); logo->setImageAssetID(data[IMG_LOGO].asUUID()); @@ -467,8 +467,8 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) } else { - marketplacePanel->setVisible(FALSE); - imagePanel->setVisible(FALSE); + marketplacePanel->setVisible(false); + imagePanel->setVisible(false); } mDirty=false; @@ -563,7 +563,7 @@ bool LLFloaterExperienceProfile::handleSaveChangesDialog( const LLSD& notificati case 1: // "No" if(action != NOTHING) { - mForceClose = TRUE; + mForceClose = true; if(action==CLOSE) { closeFloater(); @@ -744,37 +744,37 @@ void LLFloaterExperienceProfile::updatePermission( const LLSD& permission ) void LLFloaterExperienceProfile::experienceAllowed() { LLButton* button=getChild(BTN_ALLOW); - button->setEnabled(FALSE); + button->setEnabled(false); button=getChild(BTN_FORGET); - button->setEnabled(TRUE); + button->setEnabled(true); button=getChild(BTN_BLOCK); - button->setEnabled(TRUE); + button->setEnabled(true); } void LLFloaterExperienceProfile::experienceForgotten() { LLButton* button=getChild(BTN_ALLOW); - button->setEnabled(TRUE); + button->setEnabled(true); button=getChild(BTN_FORGET); - button->setEnabled(FALSE); + button->setEnabled(false); button=getChild(BTN_BLOCK); - button->setEnabled(TRUE); + button->setEnabled(true); } void LLFloaterExperienceProfile::experienceBlocked() { LLButton* button=getChild(BTN_ALLOW); - button->setEnabled(TRUE); + button->setEnabled(true); button=getChild(BTN_FORGET); - button->setEnabled(TRUE); + button->setEnabled(true); button=getChild(BTN_BLOCK); - button->setEnabled(FALSE); + button->setEnabled(false); } void LLFloaterExperienceProfile::onClose( bool app_quitting ) @@ -924,8 +924,8 @@ void LLFloaterExperienceProfile::experienceIsAdmin(LLHandlegetChild(PNL_TOP)->setVisible(TRUE); - parent->getChild(BTN_EDIT)->setVisible(TRUE); + parent->getChild(PNL_TOP)->setVisible(true); + parent->getChild(BTN_EDIT)->setVisible(true); } } diff --git a/indra/newview/llfloaterexperiences.cpp b/indra/newview/llfloaterexperiences.cpp index 2dcda52b53..8e5a48ce6c 100644 --- a/indra/newview/llfloaterexperiences.cpp +++ b/indra/newview/llfloaterexperiences.cpp @@ -129,7 +129,7 @@ void LLFloaterExperiences::resizeToTabs() { rect.mRight = rect.mLeft + tabs->getTotalTabWidth() + TAB_WIDTH_PADDING; } - reshape(rect.getWidth(), rect.getHeight(), FALSE); + reshape(rect.getWidth(), rect.getHeight(), false); } void LLFloaterExperiences::refreshContents() diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 04fd6cb1c8..28d0a3c7da 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -99,7 +99,7 @@ bool LLFloaterFixedEnvironment::postBuild() mTab = getChild(CONTROL_TAB_AREA); mTxtName = getChild(FIELD_SETTINGS_NAME); - mTxtName->setCommitOnFocusLost(TRUE); + mTxtName->setCommitOnFocusLost(true); mTxtName->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNameChanged(mTxtName->getValue().asString()); }); getChild(BUTTON_NAME_IMPORT)->setClickedCallback([this](LLUICtrl *, const LLSD &) { onButtonImport(); }); @@ -366,7 +366,7 @@ void LLFloaterFixedEnvironment::onInventoryCreated(LLUUID asset_id, LLUUID inven } } clearDirtyFlag(); - setFocus(TRUE); // Call back the focus... + setFocus(true); // Call back the focus... loadInventoryItem(inventory_id, can_trans); } @@ -403,7 +403,7 @@ void LLFloaterFixedEnvironment::doSelectFromInventory() picker->setSettingsFilter(mSettings->getSettingsTypeValue()); picker->openFloater(); - picker->setFocus(TRUE); + picker->setFocus(true); } //========================================================================= diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index ebba99b001..bbac02150e 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -110,9 +110,9 @@ bool LLFlickrPhotoPanel::postBuild() setVisibleCallback(boost::bind(&LLFlickrPhotoPanel::onVisibilityChange, this, _2)); mResolutionComboBox = getChild("resolution_combobox"); - mResolutionComboBox->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE)); + mResolutionComboBox->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, true)); mFilterComboBox = getChild("filters_combobox"); - mFilterComboBox->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE)); + mFilterComboBox->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, true)); mRefreshBtn = getChild("new_snapshot_btn"); mBtnPreview = getChild("big_preview_btn"); mWorkingLabel = getChild("working_lbl"); @@ -131,9 +131,9 @@ bool LLFlickrPhotoPanel::postBuild() mBigPreviewFloater = dynamic_cast(LLFloaterReg::getInstance("big_preview")); // FIRE-15112: Allow custom resolution for SLShare - getChild("custom_snapshot_width")->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE)); - getChild("custom_snapshot_height")->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE)); - getChild("keep_aspect_ratio")->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE)); + getChild("custom_snapshot_width")->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, true)); + getChild("custom_snapshot_height")->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, true)); + getChild("keep_aspect_ratio")->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, true)); getChild("resolution_combobox")->setCurrentByIndex(gSavedSettings.getS32("FSLastSnapshotToFlickrResolution")); getChild("custom_snapshot_width")->setValue(gSavedSettings.getS32("FSLastSnapshotToFlickrWidth")); @@ -260,7 +260,7 @@ void LLFlickrPhotoPanel::onVisibilityChange(bool visible) if(preview) { LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL; - preview->updateSnapshot(TRUE); + preview->updateSnapshot(true); } } else @@ -274,9 +274,9 @@ void LLFlickrPhotoPanel::onVisibilityChange(bool visible) previewp->setContainer(this); previewp->setSnapshotType(LLSnapshotModel::SNAPSHOT_WEB); previewp->setSnapshotFormat(LLSnapshotModel::SNAPSHOT_FORMAT_PNG); - previewp->setThumbnailSubsampled(TRUE); // We want the preview to reflect the *saved* image - previewp->setAllowRenderUI(FALSE); // We do not want the rendered UI in our snapshots - previewp->setAllowFullScreenPreview(FALSE); // No full screen preview in SL Share mode + previewp->setThumbnailSubsampled(true); // We want the preview to reflect the *saved* image + previewp->setAllowRenderUI(false); // We do not want the rendered UI in our snapshots + previewp->setAllowFullScreenPreview(false); // No full screen preview in SL Share mode previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect()); updateControls(); @@ -289,7 +289,7 @@ void LLFlickrPhotoPanel::onClickNewSnapshot() LLSnapshotLivePreview* previewp = getPreviewView(); if (previewp) { - previewp->updateSnapshot(TRUE); + previewp->updateSnapshot(true); } } @@ -469,15 +469,15 @@ void LLFlickrPhotoPanel::clearAndClose() void LLFlickrPhotoPanel::updateControls() { LLSnapshotLivePreview* previewp = getPreviewView(); - BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); + bool got_snap = previewp && previewp->getSnapshotUpToDate(); // *TODO: Separate maximum size for Web images from postcards LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL; - updateResolution(FALSE); + updateResolution(false); } -void LLFlickrPhotoPanel::updateResolution(BOOL do_update) +void LLFlickrPhotoPanel::updateResolution(bool do_update) { LLComboBox* combobox = static_cast(mResolutionComboBox); LLComboBox* filterbox = static_cast(mFilterComboBox); @@ -516,7 +516,7 @@ void LLFlickrPhotoPanel::updateResolution(BOOL do_update) LLSpinCtrl* height_spinner = getChild("custom_snapshot_height"); S32 custom_width = width_spinner->getValue().asInteger(); S32 custom_height = height_spinner->getValue().asInteger(); - if (checkImageSize(previewp, custom_width, custom_height, TRUE, previewp->getMaxImageSize())) + if (checkImageSize(previewp, custom_width, custom_height, true, previewp->getMaxImageSize())) { width_spinner->set(custom_width); height_spinner->set(custom_height); @@ -541,8 +541,8 @@ void LLFlickrPhotoPanel::updateResolution(BOOL do_update) previewp->setSize(width, height); if (do_update) { - //previewp->updateSnapshot(TRUE); - previewp->updateSnapshot(TRUE, TRUE); + //previewp->updateSnapshot(true); + previewp->updateSnapshot(true, true); updateControls(); } } @@ -553,14 +553,14 @@ void LLFlickrPhotoPanel::updateResolution(BOOL do_update) previewp->setFilter(filter_name); if (do_update) { - previewp->updateSnapshot(FALSE, TRUE); + previewp->updateSnapshot(false, true); updateControls(); } } } // FIRE-15112: Allow custom resolution for SLShare - BOOL custom_resolution = static_cast(mResolutionComboBox)->getSelectedValue().asString() == "[i-1,i-1]"; + bool custom_resolution = static_cast(mResolutionComboBox)->getSelectedValue().asString() == "[i-1,i-1]"; getChild("custom_snapshot_width")->setEnabled(custom_resolution); getChild("custom_snapshot_height")->setEnabled(custom_resolution); getChild("keep_aspect_ratio")->setEnabled(custom_resolution); @@ -571,11 +571,11 @@ void LLFlickrPhotoPanel::checkAspectRatio(S32 index) { LLSnapshotLivePreview *previewp = getPreviewView() ; - BOOL keep_aspect = FALSE; + bool keep_aspect = false; if (0 == index) // current window size { - keep_aspect = TRUE; + keep_aspect = true; } // FIRE-15112: Allow custom resolution for SLShare else if (-1 == index) @@ -585,7 +585,7 @@ void LLFlickrPhotoPanel::checkAspectRatio(S32 index) // else // predefined resolution { - keep_aspect = FALSE; + keep_aspect = false; } if (previewp) @@ -638,7 +638,7 @@ void LLFlickrPhotoPanel::flickrAuthResponse(bool success, const LLSD& response) // // FIRE-15112: Allow custom resolution for SLShare -BOOL LLFlickrPhotoPanel::checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value) +bool LLFlickrPhotoPanel::checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, bool isWidthChanged, S32 max_value) { S32 w = width ; S32 h = height ; @@ -647,7 +647,7 @@ BOOL LLFlickrPhotoPanel::checkImageSize(LLSnapshotLivePreview* previewp, S32& wi { if(gViewerWindow->getWindowWidthRaw() < 1 || gViewerWindow->getWindowHeightRaw() < 1) { - return FALSE ; + return false; } //aspect ratio of the current window diff --git a/indra/newview/llfloaterflickr.h b/indra/newview/llfloaterflickr.h index 0a19ecff5a..67aed1fd39 100644 --- a/indra/newview/llfloaterflickr.h +++ b/indra/newview/llfloaterflickr.h @@ -57,7 +57,7 @@ public: void clearAndClose(); void updateControls(); - void updateResolution(BOOL do_update); + void updateResolution(bool do_update); void checkAspectRatio(S32 index); LLUICtrl* getRefreshBtn(); @@ -72,7 +72,7 @@ private: void attachPreview(); // FIRE-15112: Allow custom resolution for SLShare - BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value); + bool checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, bool isWidthChanged, S32 max_value); LLHandle mPreviewHandle; diff --git a/indra/newview/llfloaterforgetuser.cpp b/indra/newview/llfloaterforgetuser.cpp index cfff6d2b3e..8b1c7e05aa 100644 --- a/indra/newview/llfloaterforgetuser.cpp +++ b/indra/newview/llfloaterforgetuser.cpp @@ -135,7 +135,7 @@ void LLFloaterForgetUser::onForgetClicked() const std::string user_id = user_data["user_id"]; LLCheckBoxCtrl *chk_box = getChild("delete_data"); - BOOL delete_data = chk_box->getValue(); + bool delete_data = chk_box->getValue(); if (delete_data && mUserGridsCount[user_id] > 1) { @@ -192,7 +192,7 @@ void LLFloaterForgetUser::processForgetUser() { LLScrollListCtrl *scroll_list = getChild("user_list"); LLCheckBoxCtrl *chk_box = getChild("delete_data"); - BOOL delete_data = chk_box->getValue(); + bool delete_data = chk_box->getValue(); LLSD user_data = scroll_list->getSelectedValue(); const std::string user_id = user_data["user_id"]; const std::string grid = user_data["grid"]; diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index bcf750a95c..9564745a2c 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -51,7 +51,7 @@ #include "llviewercontrol.h" #include "llfloaterperms.h" -BOOL item_name_precedes( LLInventoryItem* a, LLInventoryItem* b ) +bool item_name_precedes( LLInventoryItem* a, LLInventoryItem* b ) { return LLStringUtil::precedesDict( a->getName(), b->getName() ); } @@ -498,8 +498,8 @@ void LLFloaterGesture::onClickPlay() if(!LLGestureMgr::instance().isGestureActive(item_id)) { // we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList. - BOOL inform_server = TRUE; - BOOL deactivate_similar = FALSE; + bool inform_server = true; + bool deactivate_similar = false; LLGestureMgr::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id)); LLViewerInventoryItem *item = gInventory.getItem(item_id); llassert(item); @@ -540,13 +540,13 @@ void LLFloaterGesture::onActivateBtnClick() LLGestureMgr* gm = LLGestureMgr::getInstance(); uuid_vec_t::const_iterator it = ids.begin(); - BOOL first_gesture_state = gm->isGestureActive(*it); - BOOL is_mixed = FALSE; + bool first_gesture_state = gm->isGestureActive(*it); + bool is_mixed = false; while( ++it != ids.end() ) { if(first_gesture_state != gm->isGestureActive(*it)) { - is_mixed = TRUE; + is_mixed = true; break; } } diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 6c50369c8b..813bde0fac 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -82,10 +82,10 @@ const F32 SECONDS_BETWEEN_UPDATE_REQUESTS = 5.0f; void LLFloaterGodTools::onOpen(const LLSD& key) { center(); - setFocus(TRUE); + setFocus(true); // LLPanel *panel = getChild("GodTools Tabs")->getCurrentPanel(); // if (panel) -// panel->setFocus(TRUE); +// panel->setFocus(true); if (mPanelObjectTools) mPanelObjectTools->setTargetAvatar(LLUUID::null); @@ -200,7 +200,7 @@ void LLFloaterGodTools::showPanel(const std::string& panel_name) openFloater(); LLPanel *panel = getChild("GodTools Tabs")->getCurrentPanel(); if (panel) - panel->setFocus(TRUE); + panel->setFocus(true); } // static @@ -483,41 +483,41 @@ void LLPanelRegionTools::clearAllWidgets() { // clear all widgets getChild("region name")->setValue("unknown"); - getChild("region name")->setFocus( FALSE); + getChild("region name")->setFocus( false); - getChild("check prelude")->setValue(FALSE); - getChildView("check prelude")->setEnabled(FALSE); + getChild("check prelude")->setValue(false); + getChildView("check prelude")->setEnabled(false); - getChild("check fixed sun")->setValue(FALSE); - getChildView("check fixed sun")->setEnabled(FALSE); + getChild("check fixed sun")->setValue(false); + getChildView("check fixed sun")->setEnabled(false); - getChild("check reset home")->setValue(FALSE); - getChildView("check reset home")->setEnabled(FALSE); + getChild("check reset home")->setValue(false); + getChildView("check reset home")->setEnabled(false); - getChild("check damage")->setValue(FALSE); - getChildView("check damage")->setEnabled(FALSE); + getChild("check damage")->setValue(false); + getChildView("check damage")->setEnabled(false); - getChild("check visible")->setValue(FALSE); - getChildView("check visible")->setEnabled(FALSE); + getChild("check visible")->setValue(false); + getChildView("check visible")->setEnabled(false); - getChild("block terraform")->setValue(FALSE); - getChildView("block terraform")->setEnabled(FALSE); + getChild("block terraform")->setValue(false); + getChildView("block terraform")->setEnabled(false); - getChild("block dwell")->setValue(FALSE); - getChildView("block dwell")->setEnabled(FALSE); + getChild("block dwell")->setValue(false); + getChildView("block dwell")->setEnabled(false); - getChild("is sandbox")->setValue(FALSE); - getChildView("is sandbox")->setEnabled(FALSE); + getChild("is sandbox")->setValue(false); + getChildView("is sandbox")->setEnabled(false); getChild("billable factor")->setValue(BILLABLE_FACTOR_DEFAULT); - getChildView("billable factor")->setEnabled(FALSE); + getChildView("billable factor")->setEnabled(false); getChild("land cost")->setValue(PRICE_PER_METER_DEFAULT); - getChildView("land cost")->setEnabled(FALSE); + getChildView("land cost")->setEnabled(false); - getChildView("Apply")->setEnabled(FALSE); - getChildView("Bake Terrain")->setEnabled(FALSE); - getChildView("Autosave now")->setEnabled(FALSE); + getChildView("Apply")->setEnabled(false); + getChildView("Bake Terrain")->setEnabled(false); + getChildView("Autosave now")->setEnabled(false); } @@ -525,21 +525,21 @@ void LLPanelRegionTools::enableAllWidgets() { // enable all of the widgets - getChildView("check prelude")->setEnabled(TRUE); - getChildView("check fixed sun")->setEnabled(TRUE); - getChildView("check reset home")->setEnabled(TRUE); - getChildView("check damage")->setEnabled(TRUE); - getChildView("check visible")->setEnabled(FALSE); // use estates to update... - getChildView("block terraform")->setEnabled(TRUE); - getChildView("block dwell")->setEnabled(TRUE); - getChildView("is sandbox")->setEnabled(TRUE); + getChildView("check prelude")->setEnabled(true); + getChildView("check fixed sun")->setEnabled(true); + getChildView("check reset home")->setEnabled(true); + getChildView("check damage")->setEnabled(true); + getChildView("check visible")->setEnabled(false); // use estates to update... + getChildView("block terraform")->setEnabled(true); + getChildView("block dwell")->setEnabled(true); + getChildView("is sandbox")->setEnabled(true); - getChildView("billable factor")->setEnabled(TRUE); - getChildView("land cost")->setEnabled(TRUE); + getChildView("billable factor")->setEnabled(true); + getChildView("land cost")->setEnabled(true); - getChildView("Apply")->setEnabled(FALSE); // don't enable this one - getChildView("Bake Terrain")->setEnabled(TRUE); - getChildView("Autosave now")->setEnabled(TRUE); + getChildView("Apply")->setEnabled(false); // don't enable this one + getChildView("Bake Terrain")->setEnabled(true); + getChildView("Autosave now")->setEnabled(true); } void LLPanelRegionTools::onSaveState(void* userdata) @@ -718,14 +718,14 @@ void LLPanelRegionTools::setParentEstateID(U32 id) void LLPanelRegionTools::setCheckFlags(U64 flags) { - getChild("check prelude")->setValue(is_prelude(flags) ? TRUE : FALSE); - getChild("check fixed sun")->setValue(flags & REGION_FLAGS_SUN_FIXED ? TRUE : FALSE); - getChild("check reset home")->setValue(flags & REGION_FLAGS_RESET_HOME_ON_TELEPORT ? TRUE : FALSE); - getChild("check damage")->setValue(flags & REGION_FLAGS_ALLOW_DAMAGE ? TRUE : FALSE); - getChild("check visible")->setValue(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? TRUE : FALSE); - getChild("block terraform")->setValue(flags & REGION_FLAGS_BLOCK_TERRAFORM ? TRUE : FALSE); - getChild("block dwell")->setValue(flags & REGION_FLAGS_BLOCK_DWELL ? TRUE : FALSE); - getChild("is sandbox")->setValue(flags & REGION_FLAGS_SANDBOX ? TRUE : FALSE ); + getChild("check prelude")->setValue(is_prelude(flags) ? true : false); + getChild("check fixed sun")->setValue(flags & REGION_FLAGS_SUN_FIXED ? true : false); + getChild("check reset home")->setValue(flags & REGION_FLAGS_RESET_HOME_ON_TELEPORT ? true : false); + getChild("check damage")->setValue(flags & REGION_FLAGS_ALLOW_DAMAGE ? true : false); + getChild("check visible")->setValue(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? true : false); + getChild("block terraform")->setValue(flags & REGION_FLAGS_BLOCK_TERRAFORM ? true : false); + getChild("block dwell")->setValue(flags & REGION_FLAGS_BLOCK_DWELL ? true : false); + getChild("is sandbox")->setValue(flags & REGION_FLAGS_SANDBOX ? true : false ); } void LLPanelRegionTools::setBillableFactor(F32 billable_factor) @@ -742,7 +742,7 @@ void LLPanelRegionTools::onChangeAnything() { if (gAgent.isGodlike()) { - getChildView("Apply")->setEnabled(TRUE); + getChildView("Apply")->setEnabled(true); } } @@ -751,8 +751,8 @@ void LLPanelRegionTools::onChangePrelude() // checking prelude auto-checks fixed sun if (getChild("check prelude")->getValue().asBoolean()) { - getChild("check fixed sun")->setValue(TRUE); - getChild("check reset home")->setValue(TRUE); + getChild("check fixed sun")->setValue(true); + getChild("check reset home")->setValue(true); onChangeAnything(); } // pass on to default onChange handler @@ -765,7 +765,7 @@ void LLPanelRegionTools::onChangeSimName(LLLineEditor* caller, void* userdata ) if (userdata && gAgent.isGodlike()) { LLPanelRegionTools* region_tools = (LLPanelRegionTools*) userdata; - region_tools->getChildView("Apply")->setEnabled(TRUE); + region_tools->getChildView("Apply")->setEnabled(true); } } @@ -790,7 +790,7 @@ void LLPanelRegionTools::onApplyChanges() LLViewerRegion *region = gAgent.getRegion(); if (region && gAgent.isGodlike()) { - getChildView("Apply")->setEnabled(FALSE); + getChildView("Apply")->setEnabled(false); god_tools->sendGodUpdateRegionInfo(); //LLFloaterReg::getTypedInstance("god_tools")->sendGodUpdateRegionInfo(); } @@ -824,7 +824,7 @@ void LLPanelRegionTools::onSelectRegion() LLVector3d north_east(REGION_WIDTH_METERS, REGION_WIDTH_METERS, 0); LLViewerParcelMgr::getInstance()->selectLand(regionp->getOriginGlobal(), - regionp->getOriginGlobal() + north_east, FALSE); + regionp->getOriginGlobal() + north_east, false); } @@ -1004,36 +1004,36 @@ U64 LLPanelObjectTools::computeRegionFlags(U64 flags) const void LLPanelObjectTools::setCheckFlags(U64 flags) { - getChild("disable scripts")->setValue(flags & REGION_FLAGS_SKIP_SCRIPTS ? TRUE : FALSE); - getChild("disable collisions")->setValue(flags & REGION_FLAGS_SKIP_COLLISIONS ? TRUE : FALSE); - getChild("disable physics")->setValue(flags & REGION_FLAGS_SKIP_PHYSICS ? TRUE : FALSE); + getChild("disable scripts")->setValue(flags & REGION_FLAGS_SKIP_SCRIPTS ? true : false); + getChild("disable collisions")->setValue(flags & REGION_FLAGS_SKIP_COLLISIONS ? true : false); + getChild("disable physics")->setValue(flags & REGION_FLAGS_SKIP_PHYSICS ? true : false); } void LLPanelObjectTools::clearAllWidgets() { - getChild("disable scripts")->setValue(FALSE); - getChildView("disable scripts")->setEnabled(FALSE); + getChild("disable scripts")->setValue(false); + getChildView("disable scripts")->setEnabled(false); - getChildView("Apply")->setEnabled(FALSE); - getChildView("Set Target")->setEnabled(FALSE); - getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(FALSE); - getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(FALSE); - getChildView("Delete *ALL* Of Target's Objects")->setEnabled(FALSE); + getChildView("Apply")->setEnabled(false); + getChildView("Set Target")->setEnabled(false); + getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(false); + getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(false); + getChildView("Delete *ALL* Of Target's Objects")->setEnabled(false); } void LLPanelObjectTools::enableAllWidgets() { - getChildView("disable scripts")->setEnabled(TRUE); + getChildView("disable scripts")->setEnabled(true); - getChildView("Apply")->setEnabled(FALSE); // don't enable this one - getChildView("Set Target")->setEnabled(TRUE); - getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(TRUE); - getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(TRUE); - getChildView("Delete *ALL* Of Target's Objects")->setEnabled(TRUE); - getChildView("Get Top Colliders")->setEnabled(TRUE); - getChildView("Get Top Scripts")->setEnabled(TRUE); + getChildView("Apply")->setEnabled(false); // don't enable this one + getChildView("Set Target")->setEnabled(true); + getChildView("Delete Target's Scripted Objects On Others Land")->setEnabled(true); + getChildView("Delete Target's Scripted Objects On *Any* Land")->setEnabled(true); + getChildView("Delete *ALL* Of Target's Objects")->setEnabled(true); + getChildView("Get Top Colliders")->setEnabled(true); + getChildView("Get Top Scripts")->setEnabled(true); } @@ -1154,7 +1154,7 @@ void LLPanelObjectTools::onClickSet() { LLView * button = findChild("Set Target"); LLFloater * root_floater = gFloaterView->getParentFloater(this); - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelObjectTools::callbackAvatarID, this, _1,_2), FALSE, FALSE, FALSE, root_floater->getName(), button); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelObjectTools::callbackAvatarID, this, _1,_2), false, false, false, root_floater->getName(), button); // grandparent is a floater, which can have a dependent if (picker) { @@ -1167,7 +1167,7 @@ void LLPanelObjectTools::onClickSetBySelection(void* data) LLPanelObjectTools* panelp = (LLPanelObjectTools*) data; if (!panelp) return; - const BOOL non_root_ok = TRUE; + const bool non_root_ok = true; LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok); if (!node) return; @@ -1195,7 +1195,7 @@ void LLPanelObjectTools::onChangeAnything() { if (gAgent.isGodlike()) { - getChildView("Apply")->setEnabled(TRUE); + getChildView("Apply")->setEnabled(true); } } @@ -1207,7 +1207,7 @@ void LLPanelObjectTools::onApplyChanges() if (region && gAgent.isGodlike()) { // TODO -- implement this - getChildView("Apply")->setEnabled(FALSE); + getChildView("Apply")->setEnabled(false); god_tools->sendGodUpdateRegionInfo(); //LLFloaterReg::getTypedInstance("god_tools")->sendGodUpdateRegionInfo(); } diff --git a/indra/newview/llfloatergotoline.cpp b/indra/newview/llfloatergotoline.cpp index 443fea2644..22337d7c98 100644 --- a/indra/newview/llfloatergotoline.cpp +++ b/indra/newview/llfloatergotoline.cpp @@ -112,13 +112,13 @@ void LLFloaterGotoLine::handleBtnGoto() // { //mEditorCore->mEditor->deselect(); //mEditorCore->mEditor->setCursor(row, column); - //mEditorCore->mEditor->setFocus(TRUE); + //mEditorCore->mEditor->setFocus(true); // } if (mEditorCore && mEditorCore->mCurrentEditor) { mEditorCore->mCurrentEditor->deselect(); mEditorCore->mCurrentEditor->setCursor(row, column); - mEditorCore->mCurrentEditor->setFocus(TRUE); + mEditorCore->mCurrentEditor->setFocus(true); } // } @@ -157,11 +157,11 @@ void LLFloaterGotoLine::onGotoBoxCommit() //S32 rownew = 0; //S32 columnnew = 0; - //mEditorCore->mEditor->getCurrentLineAndColumn( &rownew, &columnnew, FALSE ); // don't include wordwrap + //mEditorCore->mEditor->getCurrentLineAndColumn( &rownew, &columnnew, false ); // don't include wordwrap //if (rownew == row && columnnew == column) //{ // mEditorCore->mEditor->deselect(); - // mEditorCore->mEditor->setFocus(TRUE); + // mEditorCore->mEditor->setFocus(true); // sInstance->closeFloater(); //} //else do nothing (if the cursor-position didn't change) // } @@ -171,11 +171,11 @@ void LLFloaterGotoLine::onGotoBoxCommit() S32 rownew = 0; S32 columnnew = 0; - mEditorCore->mCurrentEditor->getCurrentLineAndColumn( &rownew, &columnnew, FALSE ); // don't include wordwrap + mEditorCore->mCurrentEditor->getCurrentLineAndColumn( &rownew, &columnnew, false ); // don't include wordwrap if (rownew == row && columnnew == column) { mEditorCore->mCurrentEditor->deselect(); - mEditorCore->mCurrentEditor->setFocus(TRUE); + mEditorCore->mCurrentEditor->setFocus(true); sInstance->closeFloater(); } //else do nothing (if the cursor-position didn't change) } diff --git a/indra/newview/llfloatergridstatus.cpp b/indra/newview/llfloatergridstatus.cpp index d0128c6459..a71a6e3ce2 100644 --- a/indra/newview/llfloatergridstatus.cpp +++ b/indra/newview/llfloatergridstatus.cpp @@ -48,7 +48,7 @@ std::map LLFloaterGridStatus::sItemsMap; LLFloaterGridStatus::LLFloaterGridStatus(const Params& key) : LLFloaterWebContent(key), - mIsFirstUpdate(TRUE) + mIsFirstUpdate(true) { } @@ -185,7 +185,7 @@ void LLFloaterGridStatus::getGridStatusRSSCoro() { gToolBarView->flashCommand(LLCommandId("gridstatus"), true); } - getInstance()->setFirstUpdate(FALSE); + getInstance()->setFirstUpdate(false); } // virtual diff --git a/indra/newview/llfloatergridstatus.h b/indra/newview/llfloatergridstatus.h index 8c51fd99a0..4d9b344b56 100644 --- a/indra/newview/llfloatergridstatus.h +++ b/indra/newview/llfloatergridstatus.h @@ -52,8 +52,8 @@ public: static void getGridStatusRSSCoro(); void startGridStatusTimer(); - BOOL isFirstUpdate() { return mIsFirstUpdate; } - void setFirstUpdate(BOOL first_update) { mIsFirstUpdate = first_update; } + bool isFirstUpdate() { return mIsFirstUpdate; } + void setFirstUpdate(bool first_update) { mIsFirstUpdate = first_update; } static LLFloaterGridStatus* getInstance(); @@ -66,7 +66,7 @@ private: static std::map sItemsMap; LLFrameTimer mGridStatusTimer; - BOOL mIsFirstUpdate; + bool mIsFirstUpdate; }; #endif // LL_LLFLOATERGRIDSTATUS_H diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index 07395a05d3..6a79e9b78a 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -379,7 +379,7 @@ void init_group_list(LLScrollListCtrl* group_list, const LLUUID& highlight_id, U } } - group_list->sortOnce(0, TRUE); + group_list->sortOnce(0, true); // add "none" to list at top { diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index 032aa10d08..20e5fa8c10 100644 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -49,7 +49,7 @@ void LLFloaterHoverHeight::syncFromPreferenceSetting(void *user_data, bool updat LLFloaterHoverHeight *self = static_cast(user_data); LLSliderCtrl* sldrCtrl = self->getChild("HoverHeightSlider"); - sldrCtrl->setValue(value,FALSE); + sldrCtrl->setValue(value,false); // Legacy baking avatar z-offset //if (isAgentAvatarValid() && update_offset) diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 8473018ad0..af25dc52ca 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -132,7 +132,7 @@ bool LLFloaterImagePreview::postBuild() if (mRawImagep.notNull() && gAgent.getRegion() != NULL) { mAvatarPreview = new LLImagePreviewAvatar(256, 256); - mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, FALSE); + mAvatarPreview->setPreviewTarget("mPelvis", "mUpperBodyMesh0", mRawImagep, 2.f, false); mSculptedPreview = new LLImagePreviewSculpted(256, 256); mSculptedPreview->setPreviewTarget(mRawImagep, 2.0f); @@ -143,7 +143,7 @@ bool LLFloaterImagePreview::postBuild() // // We want "lossless_check" to be unchecked when it is disabled, regardless of // // LosslessJ2CUpload state, so only assign control when enabling checkbox // LLCheckBoxCtrl* check_box = getChild("lossless_check"); - // check_box->setEnabled(TRUE); + // check_box->setEnabled(true); // check_box->setControlVariable(gSavedSettings.getControl("LosslessJ2CUpload")); //} if (mRawImagep->getWidth() * mRawImagep->getHeight () <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF) @@ -164,7 +164,7 @@ bool LLFloaterImagePreview::postBuild() && gAgent.getRegion()->getCentralBakeVersion() == 0); if (!enable_temp_uploads) { - gSavedSettings.setBOOL("TemporaryUpload", FALSE); + gSavedSettings.setBOOL("TemporaryUpload", false); } temp_check->setVisible(enable_temp_uploads); // @@ -174,7 +174,7 @@ bool LLFloaterImagePreview::postBuild() uploaded_size_text->setTextArg("[X_RES]", llformat("%d", mRawImagep->getWidth())); uploaded_size_text->setTextArg("[Y_RES]", llformat("%d", mRawImagep->getHeight())); - uploaded_size_text->setVisible(TRUE); + uploaded_size_text->setVisible(true); mEmptyAlphaCheck = getChild("strip_alpha_check"); @@ -222,9 +222,9 @@ bool LLFloaterImagePreview::postBuild() getChildView("ok_btn")->setEnabled(false); // FIRE-32944 - Hide some items if texture is invalid - uploaded_size_text->setVisible(FALSE); - lossless_check->setVisible(FALSE); - temp_check->setVisible(FALSE); + uploaded_size_text->setVisible(false); + lossless_check->setVisible(false); + temp_check->setVisible(false); // if(!mImageLoadError.empty()) @@ -329,28 +329,28 @@ void LLFloaterImagePreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata) case 0: break; case 1: - fp->mAvatarPreview->setPreviewTarget("mSkull", "mHairMesh0", fp->mRawImagep, 0.4f, FALSE); + fp->mAvatarPreview->setPreviewTarget("mSkull", "mHairMesh0", fp->mRawImagep, 0.4f, false); break; case 2: - fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, FALSE); + fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, false); break; case 3: - fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.0f, FALSE); + fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.0f, false); break; case 4: - fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, FALSE); + fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, false); break; case 5: - fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, TRUE); + fp->mAvatarPreview->setPreviewTarget("mSkull", "mHeadMesh0", fp->mRawImagep, 0.4f, true); break; case 6: - fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.2f, TRUE); + fp->mAvatarPreview->setPreviewTarget("mChest", "mUpperBodyMesh0", fp->mRawImagep, 1.2f, true); break; case 7: - fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, TRUE); + fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mLowerBodyMesh0", fp->mRawImagep, 1.2f, true); break; case 8: - fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mSkirtMesh0", fp->mRawImagep, 1.3f, FALSE); + fp->mAvatarPreview->setPreviewTarget("mKneeLeft", "mSkirtMesh0", fp->mRawImagep, 1.3f, false); break; case 9: fp->mSculptedPreview->setPreviewTarget(fp->mRawImagep, 2.0f); @@ -406,7 +406,7 @@ void LLFloaterImagePreview::draw() } else { - mImagep = LLViewerTextureManager::getLocalTexture(mRawImagep.get(), FALSE) ; + mImagep = LLViewerTextureManager::getLocalTexture(mRawImagep.get(), false) ; gGL.getTexUnit(0)->unbind(mImagep->getTarget()) ; gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mImagep->getTexName()); @@ -599,7 +599,7 @@ bool LLFloaterImagePreview::handleMouseDown(S32 x, S32 y, MASK mask) //----------------------------------------------------------------------------- bool LLFloaterImagePreview::handleMouseUp(S32 x, S32 y, MASK mask) { - gFocusMgr.setMouseCapture(FALSE); + gFocusMgr.setMouseCapture(nullptr); gViewerWindow->showCursor(); return LLFloater::handleMouseUp(x, y, mask); } @@ -754,9 +754,9 @@ void LLFloaterImagePreview::onMouseCaptureLostImagePreview(LLMouseHandler* handl //----------------------------------------------------------------------------- // LLImagePreviewAvatar //----------------------------------------------------------------------------- -LLImagePreviewAvatar::LLImagePreviewAvatar(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE) +LLImagePreviewAvatar::LLImagePreviewAvatar(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false) { - mNeedsUpdate = TRUE; + mNeedsUpdate = true; mTargetJoint = NULL; mTargetMesh = NULL; mCameraDistance = 0.f; @@ -782,7 +782,7 @@ S8 LLImagePreviewAvatar::getType() const return LLViewerDynamicTexture::LL_IMAGE_PREVIEW_AVATAR ; } -void LLImagePreviewAvatar::setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male) +void LLImagePreviewAvatar::setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, bool male) { mTargetJoint = mDummyAvatar->mRoot->findJoint(joint_name); // clear out existing test mesh @@ -803,11 +803,11 @@ void LLImagePreviewAvatar::setPreviewTarget(const std::string& joint_name, const mDummyAvatar->updateVisualParams(); mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); } - mDummyAvatar->mRoot->setVisible(FALSE, TRUE); + mDummyAvatar->mRoot->setVisible(false, true); mTargetMesh = dynamic_cast(mDummyAvatar->mRoot->findJoint(mesh_name)); mTargetMesh->setTestTexture(mTextureName); - mTargetMesh->setVisible(TRUE, FALSE); + mTargetMesh->setVisible(true, false); mCameraDistance = distance; mCameraZoom = 1.f; mCameraPitch = 0.f; @@ -834,9 +834,9 @@ void LLImagePreviewAvatar::clearPreviewTexture(const std::string& mesh_name) //----------------------------------------------------------------------------- // update() //----------------------------------------------------------------------------- -BOOL LLImagePreviewAvatar::render() +bool LLImagePreviewAvatar::render() { - mNeedsUpdate = FALSE; + mNeedsUpdate = false; LLVOAvatar* avatarp = mDummyAvatar; gGL.pushUIMatrix(); @@ -881,7 +881,7 @@ BOOL LLImagePreviewAvatar::render() LLViewerCamera::getInstance()->setAspect((F32)mFullWidth / mFullHeight); LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); - LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE); + LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false); LLVertexBuffer::unbind(); avatarp->updateLOD(); @@ -903,7 +903,7 @@ BOOL LLImagePreviewAvatar::render() gGL.popUIMatrix(); gGL.color4f(1,1,1,1); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -911,7 +911,7 @@ BOOL LLImagePreviewAvatar::render() //----------------------------------------------------------------------------- void LLImagePreviewAvatar::refresh() { - mNeedsUpdate = TRUE; + mNeedsUpdate = true; } //----------------------------------------------------------------------------- @@ -943,9 +943,9 @@ void LLImagePreviewAvatar::pan(F32 right, F32 up) // LLImagePreviewSculpted //----------------------------------------------------------------------------- -LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE) +LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false) { - mNeedsUpdate = TRUE; + mNeedsUpdate = true; mCameraDistance = 0.f; mCameraYaw = 0.f; mCameraPitch = 0.f; @@ -1038,9 +1038,9 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance) //----------------------------------------------------------------------------- // render() //----------------------------------------------------------------------------- -BOOL LLImagePreviewSculpted::render() +bool LLImagePreviewSculpted::render() { - mNeedsUpdate = FALSE; + mNeedsUpdate = false; LLGLSUIDefault def; LLGLDisable no_blend(GL_BLEND); LLGLEnable cull(GL_CULL_FACE); @@ -1084,7 +1084,7 @@ BOOL LLImagePreviewSculpted::render() LLViewerCamera::getInstance()->setAspect((F32) mFullWidth / mFullHeight); LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); - LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE); + LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false); const LLVolumeFace &vf = mVolume->getVolumeFace(0); U32 num_indices = vf.mNumIndices; @@ -1107,7 +1107,7 @@ BOOL LLImagePreviewSculpted::render() gObjectPreviewProgram.unbind(); - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -1115,7 +1115,7 @@ BOOL LLImagePreviewSculpted::render() //----------------------------------------------------------------------------- void LLImagePreviewSculpted::refresh() { - mNeedsUpdate = TRUE; + mNeedsUpdate = true; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h index cff6d6013c..936d3b1f8d 100644 --- a/indra/newview/llfloaterimagepreview.h +++ b/indra/newview/llfloaterimagepreview.h @@ -54,15 +54,15 @@ protected: void setPreviewTarget(LLImageRaw *imagep, F32 distance); void setTexture(U32 name) { mTextureName = name; } - BOOL render(); + bool render(); void refresh(); void rotate(F32 yaw_radians, F32 pitch_radians); void zoom(F32 zoom_amt); void pan(F32 right, F32 up); - virtual BOOL needsRender() { return mNeedsUpdate; } + virtual bool needsRender() { return mNeedsUpdate; } protected: - BOOL mNeedsUpdate; + bool mNeedsUpdate; U32 mTextureName; F32 mCameraDistance; F32 mCameraYaw; @@ -84,19 +84,19 @@ public: /*virtual*/ S8 getType() const ; - void setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, BOOL male); + void setPreviewTarget(const std::string& joint_name, const std::string& mesh_name, LLImageRaw* imagep, F32 distance, bool male); void setTexture(U32 name) { mTextureName = name; } void clearPreviewTexture(const std::string& mesh_name); - BOOL render(); + bool render(); void refresh(); void rotate(F32 yaw_radians, F32 pitch_radians); void zoom(F32 zoom_amt); void pan(F32 right, F32 up); - virtual BOOL needsRender() { return mNeedsUpdate; } + virtual bool needsRender() { return mNeedsUpdate; } protected: - BOOL mNeedsUpdate; + bool mNeedsUpdate; LLJoint* mTargetJoint; LLViewerJointMesh* mTargetMesh; F32 mCameraDistance; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index c95a8ee641..554c42622e 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -93,7 +93,7 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param // Firstly add our self to IMSession observers, so we catch session events LLIMMgr::getInstance()->addSessionObserver(this); - mAutoResize = FALSE; + mAutoResize = false; LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); } @@ -119,7 +119,7 @@ LLFloaterIMContainer::~LLFloaterIMContainer() } } -void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) +void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) { addConversationListItem(session_id); LLFloaterIMSessionTab::addToHost(session_id); @@ -272,7 +272,7 @@ bool LLFloaterIMContainer::postBuild() S32 conversations_panel_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth"); LLRect conversations_panel_rect = mConversationsPane->getRect(); conversations_panel_rect.mRight = conversations_panel_rect.mLeft + conversations_panel_width; - mConversationsPane->handleReshape(conversations_panel_rect, TRUE); + mConversationsPane->handleReshape(conversations_panel_rect, true); } // Init the sort order now that the root had been created @@ -334,7 +334,7 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp, LLIconCtrl* icon = 0; - bool is_in_group = gAgent.isInGroup(session_id, TRUE); + bool is_in_group = gAgent.isInGroup(session_id, true); LLUUID icon_id; if (is_in_group) @@ -389,8 +389,8 @@ void LLFloaterIMContainer::onNewMessageReceived(const LLSD& data) if(floaterp && current_floater && floaterp != current_floater) { if(LLMultiFloater::isFloaterFlashing(floaterp)) - LLMultiFloater::setFloaterFlashing(floaterp, FALSE); - LLMultiFloater::setFloaterFlashing(floaterp, TRUE); + LLMultiFloater::setFloaterFlashing(floaterp, false); + LLMultiFloater::setFloaterFlashing(floaterp, true); } } @@ -639,7 +639,7 @@ void LLFloaterIMContainer::handleConversationModelEvent(const LLSD& event) { participant_view = createConversationViewParticipant(participant_model); participant_view->addToFolder(session_view); - participant_view->setVisible(TRUE); + participant_view->setVisible(true); } } // Add a participant view to the conversation floater @@ -994,7 +994,7 @@ void LLFloaterIMContainer::onAddButtonClicked() { LLView * button = findChild("conversations_pane_buttons_expanded")->findChild("add_btn"); LLFloater* root_floater = gFloaterView->getParentFloater(this); - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), TRUE, TRUE, TRUE, root_floater->getName(), button); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMContainer::onAvatarPicked, this, _1), true, true, true, root_floater->getName(), button); if (picker && root_floater) { @@ -1064,7 +1064,7 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) } } -BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) +bool LLFloaterIMContainer::isActionChecked(const LLSD& userdata) { LLConversationSort order = mConversationViewModel.getSorter(); std::string command = userdata.asString(); @@ -1100,7 +1100,7 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) { return gSavedSettings.getBOOL("TranslateChat"); } - return FALSE; + return false; } void LLFloaterIMContainer::setSortOrderSessions(const LLConversationFilter::ESortOrderType order) @@ -1720,9 +1720,9 @@ void LLFloaterIMContainer::selectNextConversationByID(const LLUUID& uuid) } // Synchronous select the conversation item and the conversation floater -BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/) +bool LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/) { - BOOL handled = TRUE; + bool handled = true; LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); /* widget processing */ @@ -1731,7 +1731,7 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id); if (widget && widget->getParentFolder()) { - widget->getParentFolder()->setSelection(widget, FALSE, FALSE); + widget->getParentFolder()->setSelection(widget, false, false); mConversationsRoot->scrollToShowSelection(); } } @@ -1912,10 +1912,10 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c is_widget_selected = widget->isSelected(); if (mConversationsRoot) { - new_selection = mConversationsRoot->getNextFromChild(widget, FALSE); + new_selection = mConversationsRoot->getNextFromChild(widget, false); if (!new_selection) { - new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE); + new_selection = mConversationsRoot->getPreviousFromChild(widget, false); } } @@ -1932,7 +1932,7 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c // Don't let the focus fall IW, select and refocus on the first conversation in the list if (change_focus) { - setFocus(TRUE); + setFocus(true); if (new_selection) { if (mConversationsWidgets.size() == 1) @@ -2264,7 +2264,7 @@ void LLFloaterIMContainer::openNearbyChat() if (nearby_chat) { reSelectConversation(); - nearby_chat->setOpen(TRUE); + nearby_chat->setOpen(true); } } } @@ -2372,11 +2372,11 @@ bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next, bo { if(select_next) { - new_selection = mConversationsRoot->getNextFromChild(widget, FALSE); + new_selection = mConversationsRoot->getNextFromChild(widget, false); } else { - new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE); + new_selection = mConversationsRoot->getPreviousFromChild(widget, false); } if (new_selection) { @@ -2417,7 +2417,7 @@ bool LLFloaterIMContainer::isParticipantListExpanded() return is_expanded; } -// By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return FALSE, which can lead to some bugs +// By default, if torn off session is currently frontmost, LLFloater::isFrontmost() will return false, which can lead to some bugs // So LLFloater::isFrontmost() is overriden here to check both selected session and the IM floater itself // Exclude "Nearby Chat" session from the check, as "Nearby Chat" window and "Conversations" floater can be brought // to front independently diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index a8a5019c60..94dc9a95c8 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -76,7 +76,7 @@ public: void showConversation(const LLUUID& session_id); void selectConversation(const LLUUID& session_id); void selectNextConversationByID(const LLUUID& session_id); - BOOL selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true); + bool selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true); void clearAllFlashStates(); bool selectAdjacentConversation(bool focus_selected); bool selectNextorPreviousConversation(bool select_next, bool focus_selected = true); @@ -98,7 +98,7 @@ public: static void idle(void* user_data); // LLIMSessionObserver observe triggers - /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg); + /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg); /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); /*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id); /*virtual*/ void sessionRemoved(const LLUUID& session_id); @@ -148,7 +148,7 @@ private: void onAddButtonClicked(); void onAvatarPicked(const uuid_vec_t& ids); - BOOL isActionChecked(const LLSD& userdata); + bool isActionChecked(const LLSD& userdata); void onCustomAction (const LLSD& userdata); void setSortOrderSessions(const LLConversationFilter::ESortOrderType order); void setSortOrderParticipants(const LLConversationFilter::ESortOrderType order); diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index a7d5ca31e4..c35e82350f 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -132,7 +132,7 @@ LLFloaterIMNearbyChat* LLFloaterIMNearbyChat::buildFloater(const LLSD& key) //virtual bool LLFloaterIMNearbyChat::postBuild() { - setIsSingleInstance(TRUE); + setIsSingleInstance(true); bool result = LLFloaterIMSessionTab::postBuild(); mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5)); @@ -163,7 +163,7 @@ void LLFloaterIMNearbyChat::closeHostedFloater() // If detached from conversations window close anyway if (!getHost()) { - setVisible(FALSE); + setVisible(false); } // Should check how many conversations are ongoing. Select next to "Nearby Chat" in case there are some other besides. @@ -390,7 +390,7 @@ void LLFloaterIMNearbyChat::showHistory() } else { - LLFloaterIMContainer::getInstance()->setFocus(TRUE); + LLFloaterIMContainer::getInstance()->setFocus(true); } setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); } @@ -437,7 +437,7 @@ bool LLFloaterIMNearbyChat::handleKeyHere( KEY key, MASK mask ) return handled; } -BOOL LLFloaterIMNearbyChat::matchChatTypeTrigger(const std::string& in_str, std::string* out_str) +bool LLFloaterIMNearbyChat::matchChatTypeTrigger(const std::string& in_str, std::string* out_str) { U32 in_len = in_str.length(); S32 cnt = sizeof(sChatTypeTriggers) / sizeof(*sChatTypeTriggers); @@ -688,8 +688,8 @@ void LLFloaterIMNearbyChat::displaySpeakingIndicator() LLUUID id; id.setNull(); - mSpeakerMgr->update(FALSE); - mSpeakerMgr->getSpeakerList(&speaker_list, FALSE); + mSpeakerMgr->update(false); + mSpeakerMgr->getSpeakerList(&speaker_list, false); for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i) { @@ -702,12 +702,12 @@ void LLFloaterIMNearbyChat::displaySpeakingIndicator() } } -void LLFloaterIMNearbyChat::sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate) +void LLFloaterIMNearbyChat::sendChatFromViewer(const std::string &utf8text, EChatType type, bool animate) { sendChatFromViewer(utf8str_to_wstring(utf8text), type, animate); } -void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) +void LLFloaterIMNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, bool animate) { // Look for "/20 foo" channel chats. S32 channel = 0; @@ -800,7 +800,7 @@ void LLFloaterIMNearbyChat::startChat(const char* line) nearby_chat->setMinimized(false); } nearby_chat->show(); - nearby_chat->setFocus(TRUE); + nearby_chat->setFocus(true); if (line) { @@ -819,7 +819,7 @@ void LLFloaterIMNearbyChat::stopChat() LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat"); if (nearby_chat) { - nearby_chat->mInputEditor->setFocus(FALSE); + nearby_chat->mInputEditor->setFocus(false); gAgent.stopTyping(); } } diff --git a/indra/newview/llfloaterimnearbychat.h b/indra/newview/llfloaterimnearbychat.h index 55bb2580db..25ac5ee508 100644 --- a/indra/newview/llfloaterimnearbychat.h +++ b/indra/newview/llfloaterimnearbychat.h @@ -79,15 +79,15 @@ public: static void startChat(const char* line); static void stopChat(); - static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); - static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); + static void sendChatFromViewer(const std::string &utf8text, EChatType type, bool animate); + static void sendChatFromViewer(const LLWString &wtext, EChatType type, bool animate); static bool isWordsName(const std::string& name); void showHistory(); protected: - static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); + static bool matchChatTypeTrigger(const std::string& in_str, std::string* out_str); void onChatBoxKeystroke(); void onChatBoxFocusLost(); void onChatBoxFocusReceived(); diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp index 2031fc6a4e..f892f946ba 100644 --- a/indra/newview/llfloaterimnearbychathandler.cpp +++ b/indra/newview/llfloaterimnearbychathandler.cpp @@ -137,7 +137,7 @@ protected: { if (!toast) return; LL_DEBUGS("NearbyChat") << "Pooling toast" << LL_ENDL; - toast->setVisible(FALSE); + toast->setVisible(false); toast->stopTimer(); toast->setIsHidden(true); @@ -207,7 +207,7 @@ private: void LLFloaterIMNearbyChatScreenChannel::reshapePanel(LLFloaterIMNearbyChatToastPanel* panel) { S32 percentage = gSavedSettings.getS32("NearbyToastWidth"); - panel->reshape(gViewerWindow->getWindowWidthScaled() * percentage / 100, panel->getRect().getHeight(), TRUE); + panel->reshape(gViewerWindow->getWindowWidthScaled() * percentage / 100, panel->getRect().getHeight(), true); } void LLFloaterIMNearbyChatScreenChannel::updateSize(LLRect old_world_rect, LLRect new_world_rect) @@ -387,7 +387,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat) if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG)) { - if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) + if(gSavedSettings.getBOOL("ShowScriptErrors") == false) return; if(gSavedSettings.getS32("ShowScriptErrorsLocation")== 1) return; @@ -500,7 +500,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts() if (toast) { toast->setIsHidden(false); - toast->setVisible(TRUE); + toast->setVisible(true); } } @@ -545,7 +545,7 @@ void LLFloaterIMNearbyChatHandler::initChannel() void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) { - if(chat_msg.mMuted == TRUE) + if(chat_msg.mMuted == true) // Optional muted chat history //return; { @@ -567,12 +567,12 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, if ( (!RlvActions::canShowLocation()) && (!tmp_chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) ) { RlvUtil::filterLocation(tmp_chat.mText); - tmp_chat.mRlvLocFiltered = TRUE; + tmp_chat.mRlvLocFiltered = true; } if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) && (!tmp_chat.mRlvNamesFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) && (!args.has("ONLINE_STATUS") || !args["ONLINE_STATUS"].asBoolean()) ) { RlvUtil::filterNames(tmp_chat.mText); - tmp_chat.mRlvNamesFiltered = TRUE; + tmp_chat.mRlvNamesFiltered = true; } } // [/RLVa:KB] @@ -620,8 +620,8 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg, if (chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG || (chat_msg.mChatType == CHAT_TYPE_OWNER && FSllOwnerSayToScriptDebugWindow)) { // [FSllOwnerSayToScriptDebugWindow] Show llOwnerSays in the script debug window instead of local chat - // if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) - if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE && chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) + // if(gSavedSettings.getBOOL("ShowScriptErrors") == false) + if(gSavedSettings.getBOOL("ShowScriptErrors") == false && chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) return; // don't process debug messages from not owned objects, see EXT-7762 diff --git a/indra/newview/llfloaterimnearbychatlistener.cpp b/indra/newview/llfloaterimnearbychatlistener.cpp index 3b99194c47..d9523faf20 100644 --- a/indra/newview/llfloaterimnearbychatlistener.cpp +++ b/indra/newview/llfloaterimnearbychatlistener.cpp @@ -97,7 +97,7 @@ void LLFloaterIMNearbyChatListener::sendChat(LLSD const & chat_data) const } // Send it as if it was typed in - mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, ((BOOL)(channel == 0)) && gSavedSettings.getBOOL("PlayChatAnim")); + mChatbar.sendChatFromViewer(chat_to_send, type_o_chat, ((bool)(channel == 0)) && gSavedSettings.getBOOL("PlayChatAnim")); } #endif diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index 0a7b7e872a..4353e3a7a6 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -113,7 +113,7 @@ void LLFloaterIMSession::refresh() if (mMeTypingTimer.getElapsedTimeF32() > ME_TYPING_TIMEOUT && false == mShouldSendTypingState) { LL_DEBUGS("TypingMsgs") << "Send additional Start Typing packet" << LL_ENDL; - LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE); + LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, true); mMeTypingTimer.reset(); } @@ -300,7 +300,7 @@ void LLFloaterIMSession::sendMsg(const std::string& msg) } LLSpeakerMgr::speaker_list_t speakers; - pIMSession->mSpeakers->getSpeakerList(&speakers, TRUE); + pIMSession->mSpeakers->getSpeakerList(&speakers, true); for (LLSpeakerMgr::speaker_list_t::const_iterator itSpeaker = speakers.begin(); itSpeaker != speakers.end(); ++itSpeaker) { @@ -386,7 +386,7 @@ void LLFloaterIMSession::initIMFloater() // Disable input editor if session cannot accept text if ( mSession && !mSession->mTextIMPossible ) { - mInputEditor->setEnabled(FALSE); + mInputEditor->setEnabled(false); mInputEditor->setLabel(LLTrans::getString("IM_unavailable_text_label")); } @@ -433,7 +433,7 @@ void LLFloaterIMSession::onAddButtonClicked() { LLView * button = findChild("toolbar_panel")->findChild("add_btn"); LLFloater* root_floater = gFloaterView->getParentFloater(this); - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMSession::addSessionParticipants, this, _1), TRUE, TRUE, FALSE, root_floater->getName(), button); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterIMSession::addSessionParticipants, this, _1), true, true, false, root_floater->getName(), button); if (!picker) { return; @@ -660,13 +660,13 @@ LLFloaterIMSession* LLFloaterIMSession::show(const LLUUID& session_id) LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END; if (floater_container) { - floater_container->addFloater(floater, TRUE, i_pt); + floater_container->addFloater(floater, true, i_pt); } } floater->openFloater(floater->getKey()); - floater->setVisible(TRUE); + floater->setVisible(true); return floater; } @@ -796,7 +796,7 @@ bool LLFloaterIMSession::getVisible() } else { - // getVisible() returns TRUE when Tabbed IM window is minimized. + // getVisible() returns true when Tabbed IM window is minimized. visible = is_active && !im_container->isMinimized() && im_container->getVisible(); } @@ -837,8 +837,8 @@ bool LLFloaterIMSession::toggle(const LLUUID& session_id) } else if(floater && ((!floater->isDocked() || floater->getVisible()) && !floater->hasFocus())) { - floater->setVisible(TRUE); - floater->setFocus(TRUE); + floater->setVisible(true); + floater->setFocus(true); return true; } } @@ -1044,7 +1044,7 @@ void LLFloaterIMSession::setTyping(bool typing) if ( mTypingTimer.getElapsedTimeF32() > 1.f ) { // Still typing, send 'start typing' notification - LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE); + LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, true); mShouldSendTypingState = false; mMeTypingTimer.reset(); } @@ -1052,7 +1052,7 @@ void LLFloaterIMSession::setTyping(bool typing) else { // Send 'stop typing' notification immediately - LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, FALSE); + LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, false); mShouldSendTypingState = false; } } @@ -1062,12 +1062,12 @@ void LLFloaterIMSession::setTyping(bool typing) LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); if (speaker_mgr) { - speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE); + speaker_mgr->setSpeakerTyping(gAgent.getID(), false); } } } -void LLFloaterIMSession::processIMTyping(const LLUUID& from_id, BOOL typing) +void LLFloaterIMSession::processIMTyping(const LLUUID& from_id, bool typing) { LL_DEBUGS("TypingMsgs") << "typing=" << typing << LL_ENDL; if ( typing ) @@ -1108,7 +1108,7 @@ void LLFloaterIMSession::processAgentListUpdates(const LLSD& body) // process the moderator mutes if (agent_id == gAgentID && agent_data.has("info") && agent_data["info"].has("mutes")) { - BOOL moderator_muted_text = agent_data["info"]["mutes"]["text"].asBoolean(); + bool moderator_muted_text = agent_data["info"]["mutes"]["text"].asBoolean(); mInputEditor->setEnabled(!moderator_muted_text); std::string label; if (moderator_muted_text) @@ -1153,7 +1153,7 @@ void LLFloaterIMSession::processSessionUpdate(const LLSD& session_update) if ( false && session_update.has("moderated_mode") && session_update["moderated_mode"].has("voice") ) { - BOOL voice_moderated = session_update["moderated_mode"]["voice"]; + bool voice_moderated = session_update["moderated_mode"]["voice"]; const std::string session_label = LLIMModel::instance().getName(mSessionID); if (voice_moderated) @@ -1232,14 +1232,14 @@ bool LLFloaterIMSession::dropPerson(LLUUID* person_id, bool drop) return res; } -BOOL LLFloaterIMSession::isInviteAllowed() const +bool LLFloaterIMSession::isInviteAllowed() const { return ( (IM_SESSION_CONFERENCE_START == mDialog) || (IM_SESSION_INVITE == mDialog && !gAgent.isInGroup(mSessionID)) || mIsP2PChat); } -BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids) +bool LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids) { LLViewerRegion* region = gAgent.getRegion(); bool is_region_exist = region != NULL; @@ -1320,7 +1320,7 @@ Note: OTHER_TYPING_TIMEOUT must be > ME_TYPING_TIMEOUT for proper operation of t LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); if ( speaker_mgr ) { - speaker_mgr->setSpeakerTyping(from_id, TRUE); + speaker_mgr->setSpeakerTyping(from_id, true); } } } @@ -1337,7 +1337,7 @@ void LLFloaterIMSession::removeTypingIndicator(const LLUUID& from_id) LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); if (speaker_mgr) { - speaker_mgr->setSpeakerTyping(from_id, FALSE); + speaker_mgr->setSpeakerTyping(from_id, false); } } } diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h index 76c92355ab..ce83ff3f9b 100644 --- a/indra/newview/llfloaterimsession.h +++ b/indra/newview/llfloaterimsession.h @@ -124,7 +124,7 @@ public: const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state); - void processIMTyping(const LLUUID& from_id, BOOL typing); + void processIMTyping(const LLUUID& from_id, bool typing); void processAgentListUpdates(const LLSD& body); void processSessionUpdate(const LLSD& session_update); @@ -150,8 +150,8 @@ private: bool dropPerson(LLUUID* person_id, bool drop); - BOOL isInviteAllowed() const; - BOOL inviteToSession(const uuid_vec_t& agent_ids); + bool isInviteAllowed() const; + bool inviteToSession(const uuid_vec_t& agent_ids); static void onInputEditorFocusReceived( LLFocusableElement* caller,void* userdata ); static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata); static void onInputEditorKeystroke(LLTextEditor* caller, void* userdata); diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 16bd5d80d5..561c03968b 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -77,7 +77,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) mInputPanels(NULL), mChatLayoutPanelHeight(0) { - setAutoFocus(FALSE); + setAutoFocus(false); mSession = LLIMModel::getInstance()->findIMSession(mSessionID); mCommitCallbackRegistrar.add("IMSession.Menu.Action", @@ -538,7 +538,7 @@ void LLFloaterIMSessionTab::addConversationViewParticipant(LLConversationItem* p mConversationsWidgets[uuid] = participant_view; participant_view->addToFolder(mConversationsRoot); participant_view->addToSession(mSessionID); - participant_view->setVisible(TRUE); + participant_view->setVisible(true); } } @@ -583,7 +583,7 @@ void LLFloaterIMSessionTab::refreshConversation() if (widget_it->second->getViewModelItem()) { widget_it->second->refresh(); - widget_it->second->setVisible(TRUE); + widget_it->second->setVisible(true); } ++widget_it; } @@ -828,7 +828,7 @@ void LLFloaterIMSessionTab::forceReshape() void LLFloaterIMSessionTab::reshapeChatLayoutPanel() { - mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, FALSE); + mChatLayoutPanel->reshape(mChatLayoutPanel->getRect().getWidth(), mInputEditor->getRect().getHeight() + mInputEditorPad, false); } // static @@ -989,7 +989,7 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key) mInputButtonPanel->setVisible(isTornOff()); - setFocus(TRUE); + setFocus(true); } diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index ad6a630408..19c90d7900 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -66,7 +66,7 @@ LLFloaterInspect::LLFloaterInspect(const LLSD& key) : LLFloater(key), - mDirty(FALSE), + mDirty(false), mOwnerNameCacheConnection(), mCreatorNameCacheConnection(), // FIRE-22292: Configurable columns @@ -146,7 +146,7 @@ LLFloaterInspect::~LLFloaterInspect(void) } else { - LLFloaterReg::showInstance("build", LLSD(), TRUE); + LLFloaterReg::showInstance("build", LLSD(), true); } // FIRE-22292: Configurable columns @@ -161,7 +161,7 @@ LLFloaterInspect::~LLFloaterInspect(void) void LLFloaterInspect::onOpen(const LLSD& key) { - BOOL forcesel = LLSelectMgr::getInstance()->setForceSelection(TRUE); + bool forcesel = LLSelectMgr::getInstance()->setForceSelection(true); LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance()); LLSelectMgr::getInstance()->setForceSelection(forcesel); // restore previouis value mObjectSelection = LLSelectMgr::getInstance()->getSelection(); @@ -741,7 +741,7 @@ void LLFloaterInspect::draw() if (mDirty) { refresh(); - mDirty = FALSE; + mDirty = false; } LLFloater::draw(); @@ -760,7 +760,7 @@ void LLFloaterInspect::onColumnDisplayModeChanged() getResizeLimits(&min_width, &min_height); std::string current_sort_col = mObjectList->getSortColumnName(); - BOOL current_sort_asc = mObjectList->getSortAscending(); + bool current_sort_asc = mObjectList->getSortAscending(); mObjectList->clearRows(); mObjectList->clearColumns(); diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h index f2e79e4f2d..6e868db346 100644 --- a/indra/newview/llfloaterinspect.h +++ b/indra/newview/llfloaterinspect.h @@ -65,7 +65,7 @@ public: LLScrollListCtrl* mObjectList; protected: // protected members - void setDirty() { mDirty = TRUE; } + void setDirty() { mDirty = true; } bool mDirty; // [RLVa:KB] - Checked: RLVa-2.0.1 diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index fdfe01425c..cf64248100 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -484,7 +484,7 @@ void LLFloaterJoystick::onCommitJoystickEnabled(LLUICtrl*, void *joy_panel) joystick_enabled = true; } gSavedSettings.setBOOL("JoystickEnabled", joystick_enabled); - BOOL flycam_enabled = self->mCheckFlycamEnabled->get(); + bool flycam_enabled = self->mCheckFlycamEnabled->get(); if (!joystick_enabled || !flycam_enabled) { diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp index 253a9e141e..c69f9c1b5a 100644 --- a/indra/newview/llfloaterlagmeter.cpp +++ b/indra/newview/llfloaterlagmeter.cpp @@ -372,7 +372,7 @@ void LLFloaterLagMeter::updateControls(bool shrink) button->setLabel( getString("bigger_label", mStringArgs) ); } // Don't put keyboard focus on the button - button->setFocus(FALSE); + button->setFocus(false); // self->mClientText->setVisible(self->mShrunk); // self->mClientCause->setVisible(self->mShrunk); @@ -389,7 +389,7 @@ void LLFloaterLagMeter::updateControls(bool shrink) // self->mShrunk = !self->mShrunk; } -BOOL LLFloaterLagMeter::isShrunk() +bool LLFloaterLagMeter::isShrunk() { return gSavedSettings.getBOOL("LagMeterShrunk"); } diff --git a/indra/newview/llfloaterlagmeter.h b/indra/newview/llfloaterlagmeter.h index 559e462b5d..5072ec8ed6 100644 --- a/indra/newview/llfloaterlagmeter.h +++ b/indra/newview/llfloaterlagmeter.h @@ -46,7 +46,7 @@ private: void determineNetwork(); void determineServer(); void updateControls(bool shrink); - BOOL isShrunk(); + bool isShrunk(); void onClickShrink(); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 526d2ac0d5..b5bf62e932 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -101,8 +101,8 @@ static std::string OWNER_GROUP = "2"; static std::string MATURITY = "[MATURITY]"; // constants used in callbacks below - syntactic sugar. -static const BOOL BUY_GROUP_LAND = TRUE; -static const BOOL BUY_PERSONAL_LAND = FALSE; +static const bool BUY_GROUP_LAND = true; +static const bool BUY_PERSONAL_LAND = false; LLPointer LLPanelLandGeneral::sSelectionForBuyPass = NULL; // Statics @@ -455,7 +455,7 @@ void* LLFloaterLand::createPanelLandEnvironment(void* data) LLPanelLandGeneral::LLPanelLandGeneral(LLParcelSelectionHandle& parcel) : LLPanel(), - mUncheckedSell(FALSE), + mUncheckedSell(false), mParcel(parcel), mLastParcelLocalID(0) { @@ -468,10 +468,10 @@ bool LLPanelLandGeneral::postBuild() getChild("Name")->setPrevalidate(LLTextValidate::validateASCIIPrintableNoPipe); mEditUUID = getChild("UUID"); - mEditUUID->setEnabled(FALSE); + mEditUUID->setEnabled(false); mEditDesc = getChild("Description"); - mEditDesc->setCommitOnFocusLost(TRUE); + mEditDesc->setCommitOnFocusLost(true); mEditDesc->setCommitCallback(onCommitAny, this); mEditDesc->setContentTrusted(false); // No prevalidate function - historically the prevalidate function was broken, @@ -600,54 +600,54 @@ LLPanelLandGeneral::~LLPanelLandGeneral() // public void LLPanelLandGeneral::refresh() { - mEditName->setEnabled(FALSE); + mEditName->setEnabled(false); mEditName->setText(LLStringUtil::null); mEditUUID->setText(LLStringUtil::null); - mEditDesc->setEnabled(FALSE); + mEditDesc->setEnabled(false); mEditDesc->setText(getString("no_selection_text")); mTextSalePending->setText(LLStringUtil::null); - mTextSalePending->setEnabled(FALSE); + mTextSalePending->setEnabled(false); - mBtnDeedToGroup->setEnabled(FALSE); - mBtnSetGroup->setEnabled(FALSE); - mBtnStartAuction->setEnabled(FALSE); + mBtnDeedToGroup->setEnabled(false); + mBtnSetGroup->setEnabled(false); + mBtnStartAuction->setEnabled(false); - mCheckDeedToGroup ->set(FALSE); - mCheckDeedToGroup ->setEnabled(FALSE); - mCheckContributeWithDeed->set(FALSE); - mCheckContributeWithDeed->setEnabled(FALSE); + mCheckDeedToGroup ->set(false); + mCheckDeedToGroup ->setEnabled(false); + mCheckContributeWithDeed->set(false); + mCheckContributeWithDeed->setEnabled(false); mTextOwner->setText(LLStringUtil::null); mContentRating->setText(LLStringUtil::null); mLandType->setText(LLStringUtil::null); // Doesn't exists as of 2014-04-14 //mBtnProfile->setLabel(getString("profile_text")); - //mBtnProfile->setEnabled(FALSE); + //mBtnProfile->setEnabled(false); mTextClaimDate->setText(LLStringUtil::null); mTextGroup->setText(LLStringUtil::null); mTextPrice->setText(LLStringUtil::null); - mSaleInfoForSale1->setVisible(FALSE); - mSaleInfoForSale2->setVisible(FALSE); - mSaleInfoForSaleObjects->setVisible(FALSE); - mSaleInfoForSaleNoObjects->setVisible(FALSE); - mSaleInfoNotForSale->setVisible(FALSE); - mBtnSellLand->setVisible(FALSE); - mBtnStopSellLand->setVisible(FALSE); + mSaleInfoForSale1->setVisible(false); + mSaleInfoForSale2->setVisible(false); + mSaleInfoForSaleObjects->setVisible(false); + mSaleInfoForSaleNoObjects->setVisible(false); + mSaleInfoNotForSale->setVisible(false); + mBtnSellLand->setVisible(false); + mBtnStopSellLand->setVisible(false); mTextPriceLabel->setText(LLStringUtil::null); mTextDwell->setText(LLStringUtil::null); - mBtnBuyLand->setEnabled(FALSE); - mBtnScriptLimits->setEnabled(FALSE); - mBtnBuyGroupLand->setEnabled(FALSE); - mBtnReleaseLand->setEnabled(FALSE); - mBtnReclaimLand->setEnabled(FALSE); - mBtnBuyPass->setEnabled(FALSE); + mBtnBuyLand->setEnabled(false); + mBtnScriptLimits->setEnabled(false); + mBtnBuyGroupLand->setEnabled(false); + mBtnReleaseLand->setEnabled(false); + mBtnReclaimLand->setEnabled(false); + mBtnBuyPass->setEnabled(false); if(gDisconnected) { @@ -660,24 +660,24 @@ void LLPanelLandGeneral::refresh() if(regionp && (regionp->getOwner() == gAgent.getID())) { region_owner = true; - mBtnReleaseLand->setVisible(FALSE); - mBtnReclaimLand->setVisible(TRUE); + mBtnReleaseLand->setVisible(false); + mBtnReclaimLand->setVisible(true); } else { - mBtnReleaseLand->setVisible(TRUE); - mBtnReclaimLand->setVisible(FALSE); + mBtnReleaseLand->setVisible(true); + mBtnReclaimLand->setVisible(false); } LLParcel *parcel = mParcel->getParcel(); if (parcel) { // something selected, hooray! - BOOL is_leased = (LLParcel::OS_LEASED == parcel->getOwnershipStatus()); - BOOL region_xfer = FALSE; + bool is_leased = (LLParcel::OS_LEASED == parcel->getOwnershipStatus()); + bool region_xfer = false; if(regionp && !(regionp->getRegionFlag(REGION_FLAGS_BLOCK_LAND_RESELL))) { - region_xfer = TRUE; + region_xfer = true; } if (regionp) @@ -687,59 +687,59 @@ void LLPanelLandGeneral::refresh() } // estate owner/manager cannot edit other parts of the parcel - BOOL estate_manager_sellable = !parcel->getAuctionID() + bool estate_manager_sellable = !parcel->getAuctionID() && gAgent.canManageEstate() // estate manager/owner can only sell parcels owned by estate owner && regionp && (parcel->getOwnerID() == regionp->getOwner()); - BOOL owner_sellable = region_xfer && !parcel->getAuctionID() + bool owner_sellable = region_xfer && !parcel->getAuctionID() && LLViewerParcelMgr::isParcelModifiableByAgent( parcel, GP_LAND_SET_SALE_INFO); - BOOL can_be_sold = owner_sellable || estate_manager_sellable; + bool can_be_sold = owner_sellable || estate_manager_sellable; const LLUUID &owner_id = parcel->getOwnerID(); - BOOL is_public = parcel->isPublic(); + bool is_public = parcel->isPublic(); // Is it owned? if (is_public) { mTextSalePending->setText(LLStringUtil::null); - mTextSalePending->setEnabled(FALSE); + mTextSalePending->setEnabled(false); mTextOwner->setText(getString("public_text")); - mTextOwner->setEnabled(FALSE); + mTextOwner->setEnabled(false); // Doesn't exists as of 2014-04-14 - //mBtnProfile->setEnabled(FALSE); + //mBtnProfile->setEnabled(false); mTextClaimDate->setText(LLStringUtil::null); - mTextClaimDate->setEnabled(FALSE); + mTextClaimDate->setEnabled(false); mTextGroup->setText(getString("none_text")); - mTextGroup->setEnabled(FALSE); - mBtnStartAuction->setEnabled(FALSE); + mTextGroup->setEnabled(false); + mBtnStartAuction->setEnabled(false); } else { if(!is_leased && (owner_id == gAgent.getID())) { mTextSalePending->setText(getString("need_tier_to_modify")); - mTextSalePending->setEnabled(TRUE); + mTextSalePending->setEnabled(true); } else if(parcel->getAuctionID()) { mTextSalePending->setText(getString("auction_id_text")); mTextSalePending->setTextArg("[ID]", llformat("%u", parcel->getAuctionID())); - mTextSalePending->setEnabled(TRUE); + mTextSalePending->setEnabled(true); } else { // not the owner, or it is leased mTextSalePending->setText(LLStringUtil::null); - mTextSalePending->setEnabled(FALSE); + mTextSalePending->setEnabled(false); } //refreshNames(); - mTextOwner->setEnabled(TRUE); + mTextOwner->setEnabled(true); // We support both group and personal profiles // Doesn't exists as of 2014-04-14 - //mBtnProfile->setEnabled(TRUE); + //mBtnProfile->setEnabled(true); if (parcel->getGroupID().isNull()) { @@ -748,7 +748,7 @@ void LLPanelLandGeneral::refresh() //mBtnProfile->setLabel(getString("profile_text")); mTextGroup->setText(getString("none_text")); - mTextGroup->setEnabled(FALSE); + mTextGroup->setEnabled(false); } else { @@ -757,7 +757,7 @@ void LLPanelLandGeneral::refresh() //mBtnProfile->setLabel(getString("info_text")); //mTextGroup->setText("HIPPOS!");//parcel->getGroupName()); - mTextGroup->setEnabled(TRUE); + mTextGroup->setEnabled(true); } // Display claim date @@ -769,25 +769,25 @@ void LLPanelLandGeneral::refresh() mTextClaimDate->setText(claim_date_str); mTextClaimDate->setEnabled(is_leased); - BOOL enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON) + bool enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON) && (owner_id == GOVERNOR_LINDEN_ID) && (parcel->getAuctionID() == 0); mBtnStartAuction->setEnabled(enable_auction); } // Display options - BOOL can_edit_identity = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY); + bool can_edit_identity = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_IDENTITY); mEditName->setEnabled(can_edit_identity); mEditDesc->setEnabled(can_edit_identity); mEditDesc->setParseURLs(!can_edit_identity); - BOOL can_edit_agent_only = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_NO_POWERS); + bool can_edit_agent_only = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_NO_POWERS); mBtnSetGroup->setEnabled(can_edit_agent_only && !parcel->getIsGroupOwned()); const LLUUID& group_id = parcel->getGroupID(); // Can only allow deeding if you own it and it's got a group. - BOOL enable_deed = (owner_id == gAgent.getID() + bool enable_deed = (owner_id == gAgent.getID() && group_id.notNull() && gAgent.isInGroup(group_id)); // You don't need special powers to allow your object to @@ -799,7 +799,7 @@ void LLPanelLandGeneral::refresh() // Actually doing the deeding requires you to have GP_LAND_DEED // powers in the group. - BOOL can_deed = gAgent.hasPowerInGroup(group_id, GP_LAND_DEED); + bool can_deed = gAgent.hasPowerInGroup(group_id, GP_LAND_DEED); mBtnDeedToGroup->setEnabled( parcel->getAllowDeedToGroup() && group_id.notNull() && can_deed @@ -810,10 +810,10 @@ void LLPanelLandGeneral::refresh() mEditDesc->setText( parcel->getDesc() ); mEditUUID->setText(LLStringUtil::null); - BOOL for_sale = parcel->getForSale(); + bool for_sale = parcel->getForSale(); - mBtnSellLand->setVisible(FALSE); - mBtnStopSellLand->setVisible(FALSE); + mBtnSellLand->setVisible(false); + mBtnStopSellLand->setVisible(false); // show pricing information S32 area; @@ -842,19 +842,19 @@ void LLPanelLandGeneral::refresh() if (for_sale) { - mSaleInfoForSale1->setVisible(TRUE); - mSaleInfoForSale2->setVisible(TRUE); + mSaleInfoForSale1->setVisible(true); + mSaleInfoForSale2->setVisible(true); if (parcel->getSellWithObjects()) { - mSaleInfoForSaleObjects->setVisible(TRUE); - mSaleInfoForSaleNoObjects->setVisible(FALSE); + mSaleInfoForSaleObjects->setVisible(true); + mSaleInfoForSaleNoObjects->setVisible(false); } else { - mSaleInfoForSaleObjects->setVisible(FALSE); - mSaleInfoForSaleNoObjects->setVisible(TRUE); + mSaleInfoForSaleObjects->setVisible(false); + mSaleInfoForSaleNoObjects->setVisible(true); } - mSaleInfoNotForSale->setVisible(FALSE); + mSaleInfoNotForSale->setVisible(false); F32 cost_per_sqm = 0.0f; if (area > 0) @@ -867,19 +867,19 @@ void LLPanelLandGeneral::refresh() mSaleInfoForSale1->setTextArg("[PRICE_PER_SQM]", llformat("%.1f", cost_per_sqm)); if (can_be_sold) { - mBtnStopSellLand->setVisible(TRUE); + mBtnStopSellLand->setVisible(true); } } else { - mSaleInfoForSale1->setVisible(FALSE); - mSaleInfoForSale2->setVisible(FALSE); - mSaleInfoForSaleObjects->setVisible(FALSE); - mSaleInfoForSaleNoObjects->setVisible(FALSE); - mSaleInfoNotForSale->setVisible(TRUE); + mSaleInfoForSale1->setVisible(false); + mSaleInfoForSale2->setVisible(false); + mSaleInfoForSaleObjects->setVisible(false); + mSaleInfoForSaleNoObjects->setVisible(false); + mSaleInfoNotForSale->setVisible(true); if (can_be_sold) { - mBtnSellLand->setVisible(TRUE); + mBtnSellLand->setVisible(true); } } @@ -899,15 +899,15 @@ void LLPanelLandGeneral::refresh() } else { - BOOL is_owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE); - BOOL is_manager_release = (gAgent.canManageEstate() && + bool is_owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE); + bool is_manager_release = (gAgent.canManageEstate() && regionp && (parcel->getOwnerID() != regionp->getOwner())); - BOOL can_release = is_owner_release || is_manager_release; + bool can_release = is_owner_release || is_manager_release; mBtnReleaseLand->setEnabled( can_release ); } - BOOL use_pass = parcel->getOwnerID()!= gAgent.getID() && parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();; + bool use_pass = parcel->getOwnerID()!= gAgent.getID() && parcel->getParcelFlag(PF_USE_PASS_LIST) && !LLViewerParcelMgr::getInstance()->isCollisionBanned();; mBtnBuyPass->setEnabled(use_pass); // Retrieve parcel UUID. We need to ask the itself for the @@ -1054,7 +1054,7 @@ void LLPanelLandGeneral::setGroup(const LLUUID& group_id) // static void LLPanelLandGeneral::onClickBuyLand(void* data) { - BOOL* for_group = (BOOL*)data; + bool* for_group = (bool*)data; LLViewerParcelMgr::getInstance()->startBuyLand(*for_group); } @@ -1093,7 +1093,7 @@ void LLPanelLandGeneral::onClickReclaim(void*) } // static -BOOL LLPanelLandGeneral::enableBuyPass(void* data) +bool LLPanelLandGeneral::enableBuyPass(void* data) { LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data; LLParcel* parcel = panelp != NULL ? panelp->mParcel->getParcel() : LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); @@ -1181,8 +1181,8 @@ void LLPanelLandGeneral::onCommitAny(LLUICtrl *ctrl, void *userdata) parcel->setName(name); parcel->setDesc(desc); - BOOL allow_deed_to_group= panelp->mCheckDeedToGroup->get(); - BOOL contribute_with_deed = panelp->mCheckContributeWithDeed->get(); + bool allow_deed_to_group= panelp->mCheckDeedToGroup->get(); + bool contribute_with_deed = panelp->mCheckContributeWithDeed->get(); parcel->setParcelFlag(PF_ALLOW_DEED_TO_GROUP, allow_deed_to_group); parcel->setContributeWithDeed(contribute_with_deed); @@ -1208,7 +1208,7 @@ void LLPanelLandGeneral::onClickStopSellLand(void* data) LLPanelLandGeneral* panelp = (LLPanelLandGeneral*)data; LLParcel* parcel = panelp->mParcel->getParcel(); - parcel->setParcelFlag(PF_FOR_SALE, FALSE); + parcel->setParcelFlag(PF_FOR_SALE, false); parcel->setSalePrice(0); parcel->setAuthorizedBuyerID(LLUUID::null); @@ -1263,9 +1263,9 @@ LLPanelLandObjects::LLPanelLandObjects(LLParcelSelectionHandle& parcel) mBtnRefresh(NULL), mBtnReturnOwnerList(NULL), mOwnerList(NULL), - mFirstReply(TRUE), + mFirstReply(true), mSelectedCount(0), - mSelectedIsGroup(FALSE) + mSelectedIsGroup(false) { } @@ -1274,7 +1274,7 @@ LLPanelLandObjects::LLPanelLandObjects(LLParcelSelectionHandle& parcel) bool LLPanelLandObjects::postBuild() { - mFirstReply = TRUE; + mFirstReply = true; mParcelObjectBonus = getChild("parcel_object_bonus"); mSWTotalObjects = getChild("objects_available"); mObjectContribution = getChild("object_contrib_text"); @@ -1320,7 +1320,7 @@ bool LLPanelLandObjects::postBuild() mOwnerList = getChild("owner list"); mOwnerList->setIsFriendCallback(LLAvatarActions::isFriend); - mOwnerList->sortByColumnIndex(3, FALSE); + mOwnerList->sortByColumnIndex(3, false); childSetCommitCallback("owner list", onCommitList, this); mOwnerList->setDoubleClickCallback(onDoubleClickOwner, this); // Special Firestorm menu also allowing multi-select action @@ -1355,7 +1355,7 @@ void LLPanelLandObjects::onDoubleClickOwner(void *userdata) return; } // Is this a group? - BOOL is_group = cell->getValue().asString() == OWNER_GROUP; + bool is_group = cell->getValue().asString() == OWNER_GROUP; if (is_group) { LLGroupActions::show(owner_id); @@ -1372,19 +1372,19 @@ void LLPanelLandObjects::refresh() { LLParcel *parcel = mParcel->getParcel(); - mBtnShowOwnerObjects->setEnabled(FALSE); - mBtnShowGroupObjects->setEnabled(FALSE); - mBtnShowOtherObjects->setEnabled(FALSE); - mBtnReturnOwnerObjects->setEnabled(FALSE); - mBtnReturnGroupObjects->setEnabled(FALSE); - mBtnReturnOtherObjects->setEnabled(FALSE); - mCleanOtherObjectsTime->setEnabled(FALSE); - mBtnRefresh-> setEnabled(FALSE); - mBtnReturnOwnerList-> setEnabled(FALSE); + mBtnShowOwnerObjects->setEnabled(false); + mBtnShowGroupObjects->setEnabled(false); + mBtnShowOtherObjects->setEnabled(false); + mBtnReturnOwnerObjects->setEnabled(false); + mBtnReturnGroupObjects->setEnabled(false); + mBtnReturnOtherObjects->setEnabled(false); + mCleanOtherObjectsTime->setEnabled(false); + mBtnRefresh-> setEnabled(false); + mBtnReturnOwnerList-> setEnabled(false); mSelectedOwners.clear(); mOwnerList->deleteAllItems(); - mOwnerList->setEnabled(FALSE); + mOwnerList->setEnabled(false); if (!parcel || gDisconnected) { @@ -1423,12 +1423,12 @@ void LLPanelLandObjects::refresh() if (parcel_object_bonus != 1.0f) { - mParcelObjectBonus->setVisible(TRUE); + mParcelObjectBonus->setVisible(true); mParcelObjectBonus->setTextArg("[BONUS]", llformat("%.2f", parcel_object_bonus)); } else { - mParcelObjectBonus->setVisible(FALSE); + mParcelObjectBonus->setVisible(false); } if (sw_total > sw_max) @@ -1452,30 +1452,30 @@ void LLPanelLandObjects::refresh() mSelectedObjects->setTextArg("[COUNT]", llformat("%d", selected)); mCleanOtherObjectsTime->setText(llformat("%d", mOtherTime)); - BOOL can_return_owned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_OWNED); - BOOL can_return_group_set = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_SET); - BOOL can_return_other = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_NON_GROUP); + bool can_return_owned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_OWNED); + bool can_return_group_set = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_GROUP_SET); + bool can_return_other = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_RETURN_NON_GROUP); if (can_return_owned || can_return_group_set || can_return_other) { if (owned && can_return_owned) { - mBtnShowOwnerObjects->setEnabled(TRUE); - mBtnReturnOwnerObjects->setEnabled(TRUE); + mBtnShowOwnerObjects->setEnabled(true); + mBtnReturnOwnerObjects->setEnabled(true); } if (group && can_return_group_set) { - mBtnShowGroupObjects->setEnabled(TRUE); - mBtnReturnGroupObjects->setEnabled(TRUE); + mBtnShowGroupObjects->setEnabled(true); + mBtnReturnGroupObjects->setEnabled(true); } if (other && can_return_other) { - mBtnShowOtherObjects->setEnabled(TRUE); - mBtnReturnOtherObjects->setEnabled(TRUE); + mBtnShowOtherObjects->setEnabled(true); + mBtnReturnOtherObjects->setEnabled(true); } - mCleanOtherObjectsTime->setEnabled(TRUE); - mBtnRefresh->setEnabled(TRUE); + mCleanOtherObjectsTime->setEnabled(true); + mBtnRefresh->setEnabled(true); } } } @@ -1700,8 +1700,8 @@ void LLPanelLandObjects::onClickRefresh(void* userdata) // ready the list for results self->mOwnerList->deleteAllItems(); self->mOwnerList->setCommentText(LLTrans::getString("Searching")); - self->mOwnerList->setEnabled(FALSE); - self->mFirstReply = TRUE; + self->mOwnerList->setEnabled(false); + self->mFirstReply = true; // send the message msg->newMessageFast(_PREHASH_ParcelObjectOwnersRequest); @@ -1743,7 +1743,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo if (self->mFirstReply) { self->mOwnerList->deleteAllItems(); - self->mFirstReply = FALSE; + self->mFirstReply = false; } // FIRE-1292: Highlight avatars in same region; Online status in @@ -1781,11 +1781,11 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo // ParcelObjectOwnersReply message was intentionally deprecated by LL! if (gAgentID == owner_id) { - is_online = TRUE; + is_online = true; } else { - is_online = FALSE; + is_online = false; for (U32 i = 0; i < avatar_ids.size(); i++) { if (avatar_ids[i] == owner_id) @@ -1793,7 +1793,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo LLViewerRegion* avatar_region = LLWorld::getInstance()->getRegionFromPosGlobal(positions[i]); if (avatar_region && avatar_region->getRegionID() == own_region_id) { - is_online = TRUE; + is_online = true; } break; } @@ -1846,7 +1846,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo } else { - self->mOwnerList->setEnabled(TRUE); + self->mOwnerList->setEnabled(true); } self->mBtnRefresh->setEnabled(true); @@ -1857,7 +1857,7 @@ void LLPanelLandObjects::onCommitList(LLUICtrl* ctrl, void* data) { LLPanelLandObjects* self = (LLPanelLandObjects*)data; - if (FALSE == self->mOwnerList->getCanSelect()) + if (false == self->mOwnerList->getCanSelect()) { return; } @@ -1881,7 +1881,7 @@ void LLPanelLandObjects::onCommitList(LLUICtrl* ctrl, void* data) // Set the selection, and enable the return button. self->mSelectedOwners.clear(); self->mSelectedOwners.insert(item->getUUID()); - self->mBtnReturnOwnerList->setEnabled(TRUE); + self->mBtnReturnOwnerList->setEnabled(true); // Highlight this user's objects clickShowCore(self, RT_LIST, &(self->mSelectedOwners)); @@ -2124,8 +2124,8 @@ bool LLPanelLandOptions::postBuild() if (gAgent.wantsPGOnly()) { // Disable these buttons if they are PG (Teen) users - mMatureCtrl->setVisible(FALSE); - mMatureCtrl->setEnabled(FALSE); + mMatureCtrl->setVisible(false); + mMatureCtrl->setEnabled(false); } @@ -2133,7 +2133,7 @@ bool LLPanelLandOptions::postBuild() if (mSnapshotCtrl) { mSnapshotCtrl->setCommitCallback( onCommitAny, this ); - mSnapshotCtrl->setAllowNoTexture ( TRUE ); + mSnapshotCtrl->setAllowNoTexture ( true ); mSnapshotCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); mSnapshotCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); } @@ -2178,59 +2178,59 @@ void LLPanelLandOptions::refresh() LLParcel *parcel = mParcel->getParcel(); if (!parcel || gDisconnected) { - mCheckEditObjects ->set(FALSE); - mCheckEditObjects ->setEnabled(FALSE); + mCheckEditObjects ->set(false); + mCheckEditObjects ->setEnabled(false); - mCheckEditGroupObjects ->set(FALSE); - mCheckEditGroupObjects ->setEnabled(FALSE); + mCheckEditGroupObjects ->set(false); + mCheckEditGroupObjects ->setEnabled(false); - mCheckAllObjectEntry ->set(FALSE); - mCheckAllObjectEntry ->setEnabled(FALSE); + mCheckAllObjectEntry ->set(false); + mCheckAllObjectEntry ->setEnabled(false); - mCheckGroupObjectEntry ->set(FALSE); - mCheckGroupObjectEntry ->setEnabled(FALSE); + mCheckGroupObjectEntry ->set(false); + mCheckGroupObjectEntry ->setEnabled(false); // FIRE-6604 : Reinstate the "Allow Other Residents to Edit Terrain" option in About Land if ( mCheckEditLand ) { - mCheckEditLand ->set(FALSE); - mCheckEditLand ->setEnabled(FALSE); + mCheckEditLand ->set(false); + mCheckEditLand ->setEnabled(false); } // - mCheckSafe ->set(FALSE); - mCheckSafe ->setEnabled(FALSE); + mCheckSafe ->set(false); + mCheckSafe ->setEnabled(false); - mCheckFly ->set(FALSE); - mCheckFly ->setEnabled(FALSE); + mCheckFly ->set(false); + mCheckFly ->setEnabled(false); - mCheckGroupScripts ->set(FALSE); - mCheckGroupScripts ->setEnabled(FALSE); + mCheckGroupScripts ->set(false); + mCheckGroupScripts ->setEnabled(false); - mCheckOtherScripts ->set(FALSE); - mCheckOtherScripts ->setEnabled(FALSE); + mCheckOtherScripts ->set(false); + mCheckOtherScripts ->setEnabled(false); - mPushRestrictionCtrl->set(FALSE); - mPushRestrictionCtrl->setEnabled(FALSE); + mPushRestrictionCtrl->set(false); + mPushRestrictionCtrl->setEnabled(false); - mSeeAvatarsCtrl->set(TRUE); - mSeeAvatarsCtrl->setEnabled(FALSE); - mSeeAvatarsText->setEnabled(FALSE); + mSeeAvatarsCtrl->set(true); + mSeeAvatarsCtrl->setEnabled(false); + mSeeAvatarsText->setEnabled(false); mLandingTypeCombo->setCurrentByIndex(0); - mLandingTypeCombo->setEnabled(FALSE); + mLandingTypeCombo->setEnabled(false); mSnapshotCtrl->setImageAssetID(LLUUID::null); - mSnapshotCtrl->setEnabled(FALSE); + mSnapshotCtrl->setEnabled(false); mLocationText->setTextArg("[LANDING]", getString("landing_point_none")); - mSetBtn->setEnabled(FALSE); - mClearBtn->setEnabled(FALSE); + mSetBtn->setEnabled(false); + mClearBtn->setEnabled(false); - mMatureCtrl->setEnabled(FALSE); + mMatureCtrl->setEnabled(false); // FIRE-10043: Teleport to LP button - mTeleportToLandingPointBtn->setEnabled(FALSE); + mTeleportToLandingPointBtn->setEnabled(false); // } else @@ -2238,7 +2238,7 @@ void LLPanelLandOptions::refresh() // something selected, hooray! // Display options - BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS); + bool can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS); mCheckEditObjects ->set( parcel->getAllowModify() ); mCheckEditObjects ->setEnabled( can_change_options ); @@ -2253,7 +2253,7 @@ void LLPanelLandOptions::refresh() // FIRE-6604 : Reinstate the "Allow Other Residents to Edit Terrain" option in About Land - BOOL can_change_terraform = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_EDIT); + bool can_change_terraform = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_EDIT); mCheckEditLand ->set( parcel->getAllowTerraform() ); mCheckEditLand ->setEnabled( can_change_terraform ); // @@ -2275,7 +2275,7 @@ void LLPanelLandOptions::refresh() { mPushRestrictionCtrl->setLabel(getString("push_restrict_region_text")); mPushRestrictionCtrl->setEnabled(false); - mPushRestrictionCtrl->set(TRUE); + mPushRestrictionCtrl->set(true); } else { @@ -2287,7 +2287,7 @@ void LLPanelLandOptions::refresh() mSeeAvatarsCtrl->setEnabled(can_change_options && parcel->getHaveNewParcelLimitData()); mSeeAvatarsText->setEnabled(can_change_options && parcel->getHaveNewParcelLimitData()); - BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, + bool can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_SET_LANDING_POINT); mLandingTypeCombo->setCurrentByIndex((S32)parcel->getLandingType()); mLandingTypeCombo->setEnabled( can_change_landing_point ); @@ -2307,7 +2307,7 @@ void LLPanelLandOptions::refresh() { mLocationText->setTextArg("[LANDING]", getString("landing_point_none")); // FIRE-10043: Teleport to LP button - mTeleportToLandingPointBtn->setEnabled(FALSE); + mTeleportToLandingPointBtn->setEnabled(false); // } else @@ -2318,7 +2318,7 @@ void LLPanelLandOptions::refresh() ll_round(pos.mV[VZ]), user_look_at_angle)); // FIRE-10043: Teleport to LP button - mTeleportToLandingPointBtn->setEnabled(TRUE); + mTeleportToLandingPointBtn->setEnabled(true); // } @@ -2328,13 +2328,13 @@ void LLPanelLandOptions::refresh() if (gAgent.wantsPGOnly()) { // Disable these buttons if they are PG (Teen) users - mMatureCtrl->setVisible(FALSE); - mMatureCtrl->setEnabled(FALSE); + mMatureCtrl->setVisible(false); + mMatureCtrl->setEnabled(false); } else { // not teen so fill in the data for the maturity control - mMatureCtrl->setVisible(TRUE); + mMatureCtrl->setVisible(true); LLStyle::Params style; style.image(LLUI::getUIImage(gFloaterView->getParentFloater(this)->getString("maturity_icon_moderate"))); LLCheckBoxWithTBAcess* fullaccess_mature_ctrl = (LLCheckBoxWithTBAcess*)mMatureCtrl; @@ -2342,7 +2342,7 @@ void LLPanelLandOptions::refresh() fullaccess_mature_ctrl->getTextBox()->appendImageSegment(style); fullaccess_mature_ctrl->getTextBox()->appendText(getString("mature_check_mature"), false); fullaccess_mature_ctrl->setToolTip(getString("mature_check_mature_tooltip")); - fullaccess_mature_ctrl->reshape(fullaccess_mature_ctrl->getRect().getWidth(), fullaccess_mature_ctrl->getRect().getHeight(), FALSE); + fullaccess_mature_ctrl->reshape(fullaccess_mature_ctrl->getRect().getWidth(), fullaccess_mature_ctrl->getRect().getHeight(), false); // they can see the checkbox, but its disposition depends on the // state of the region @@ -2351,8 +2351,8 @@ void LLPanelLandOptions::refresh() { if (regionp->getSimAccess() == SIM_ACCESS_PG) { - mMatureCtrl->setEnabled(FALSE); - mMatureCtrl->set(FALSE); + mMatureCtrl->setEnabled(false); + mMatureCtrl->set(false); } else if (regionp->getSimAccess() == SIM_ACCESS_MATURE) { @@ -2361,8 +2361,8 @@ void LLPanelLandOptions::refresh() } else if (regionp->getSimAccess() == SIM_ACCESS_ADULT) { - mMatureCtrl->setEnabled(FALSE); - mMatureCtrl->set(TRUE); + mMatureCtrl->setEnabled(false); + mMatureCtrl->set(true); mMatureCtrl->setLabel(getString("mature_check_adult")); mMatureCtrl->setToolTip(getString("mature_check_adult_tooltip")); } @@ -2413,12 +2413,12 @@ void LLPanelLandOptions::refreshSearch() LLParcel *parcel = mParcel->getParcel(); if (!parcel || gDisconnected) { - mCheckShowDirectory->set(FALSE); - mCheckShowDirectory->setEnabled(FALSE); + mCheckShowDirectory->set(false); + mCheckShowDirectory->setEnabled(false); const std::string& none_string = LLParcel::getCategoryString(LLParcel::C_NONE); mCategoryCombo->setValue(none_string); - mCategoryCombo->setEnabled(FALSE); + mCategoryCombo->setEnabled(false); return; } @@ -2431,7 +2431,7 @@ void LLPanelLandOptions::refreshSearch() && region && !(region->getRegionFlag(REGION_FLAGS_BLOCK_PARCEL_SEARCH)); - BOOL show_directory = parcel->getParcelFlag(PF_SHOW_DIRECTORY); + bool show_directory = parcel->getParcelFlag(PF_SHOW_DIRECTORY); mCheckShowDirectory->set(show_directory); // Set by string in case the order in UI doesn't match the order by index. @@ -2506,25 +2506,25 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata) } // Extract data from UI - BOOL create_objects = self->mCheckEditObjects->get(); - BOOL create_group_objects = self->mCheckEditGroupObjects->get() || self->mCheckEditObjects->get(); - BOOL all_object_entry = self->mCheckAllObjectEntry->get(); - BOOL group_object_entry = self->mCheckGroupObjectEntry->get() || self->mCheckAllObjectEntry->get(); + bool create_objects = self->mCheckEditObjects->get(); + bool create_group_objects = self->mCheckEditGroupObjects->get() || self->mCheckEditObjects->get(); + bool all_object_entry = self->mCheckAllObjectEntry->get(); + bool group_object_entry = self->mCheckGroupObjectEntry->get() || self->mCheckAllObjectEntry->get(); // FIRE-6604 : Reinstate the "Allow Other Residents to Edit Terrain" option in About Land - BOOL allow_terraform = self->mCheckEditLand->get(); - // BOOL allow_terraform = false; // removed from UI so always off now - self->mCheckEditLand->get(); + bool allow_terraform = self->mCheckEditLand->get(); + // bool allow_terraform = false; // removed from UI so always off now - self->mCheckEditLand->get(); // - BOOL allow_damage = !self->mCheckSafe->get(); - BOOL allow_fly = self->mCheckFly->get(); - BOOL allow_landmark = TRUE; // cannot restrict landmark creation - BOOL allow_other_scripts = self->mCheckOtherScripts->get(); - BOOL allow_group_scripts = self->mCheckGroupScripts->get() || allow_other_scripts; - BOOL allow_publish = FALSE; - BOOL mature_publish = self->mMatureCtrl->get(); - BOOL push_restriction = self->mPushRestrictionCtrl->get(); - BOOL see_avs = self->mSeeAvatarsCtrl->get(); - BOOL show_directory = self->mCheckShowDirectory->get(); + bool allow_damage = !self->mCheckSafe->get(); + bool allow_fly = self->mCheckFly->get(); + bool allow_landmark = true; // cannot restrict landmark creation + bool allow_other_scripts = self->mCheckOtherScripts->get(); + bool allow_group_scripts = self->mCheckGroupScripts->get() || allow_other_scripts; + bool allow_publish = false; + bool mature_publish = self->mMatureCtrl->get(); + bool push_restriction = self->mPushRestrictionCtrl->get(); + bool see_avs = self->mSeeAvatarsCtrl->get(); + bool show_directory = self->mCheckShowDirectory->get(); // we have to get the index from a lookup, not from the position in the dropdown! S32 category_index = LLParcel::getCategoryFromString(self->mCategoryCombo->getSelectedValue()); S32 landing_type_index = self->mLandingTypeCombo->getCurrentIndex(); @@ -2668,7 +2668,7 @@ bool LLPanelLandAccess::postBuild() mListAccess = getChild("AccessList"); if (mListAccess) { - mListAccess->sortByColumnIndex(0, TRUE); // ascending + mListAccess->sortByColumnIndex(0, true); // ascending // Special Firestorm menu also allowing multi-select action //mListAccess->setContextMenu(LLScrollListCtrl::MENU_AVATAR); mListAccess->setContextMenu(&gFSNameListAvatarMenu); @@ -2678,7 +2678,7 @@ bool LLPanelLandAccess::postBuild() mListBanned = getChild("BannedList"); if (mListBanned) { - mListBanned->sortByColumnIndex(0, TRUE); // ascending + mListBanned->sortByColumnIndex(0, true); // ascending // Special Firestorm menu also allowing multi-select action //mListBanned->setContextMenu(LLScrollListCtrl::MENU_AVATAR); mListBanned->setContextMenu(&gFSNameListAvatarMenu); @@ -2702,9 +2702,9 @@ void LLPanelLandAccess::refresh() // Display options if (parcel && !gDisconnected) { - BOOL use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST); - BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP); - BOOL public_access = !use_access_list; + bool use_access_list = parcel->getParcelFlag(PF_USE_ACCESS_LIST); + bool use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP); + bool public_access = !use_access_list; if (parcel->getRegionAllowAccessOverride()) { @@ -2713,8 +2713,8 @@ void LLPanelLandAccess::refresh() } else { - getChild("public_access")->setValue(TRUE); - getChild("GroupCheck")->setValue(FALSE); + getChild("public_access")->setValue(true); + getChild("GroupCheck")->setValue(false); } std::string group_name; gCacheName->getGroupName(parcel->getGroupID(), group_name); @@ -2763,9 +2763,9 @@ void LLPanelLandAccess::refresh() } prefix.append(" " + parent_floater->getString("Remaining") + ") "); } - mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, "", prefix); + mListAccess->addNameItem(entry.mID, ADD_DEFAULT, true, "", prefix); } - mListAccess->sortByName(TRUE); + mListAccess->sortByName(true); } // Ban List @@ -2831,12 +2831,12 @@ void LLPanelLandAccess::refresh() columns[1]["alt_value"] = entry.mTime != 0 ? std::to_string(seconds) : "Always"; mListBanned->addElement(item); } - mListBanned->sortByName(TRUE); + mListBanned->sortByName(true); } if(parcel->getRegionDenyAnonymousOverride()) { - getChild("limit_payment")->setValue(TRUE); + getChild("limit_payment")->setValue(true); getChild("limit_payment")->setLabelArg("[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") ); } else @@ -2846,7 +2846,7 @@ void LLPanelLandAccess::refresh() } if(parcel->getRegionDenyAgeUnverifiedOverride()) { - getChild("limit_age_verified")->setValue(TRUE); + getChild("limit_age_verified")->setValue(true); getChild("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", getString("access_estate_defined") ); } else @@ -2855,7 +2855,7 @@ void LLPanelLandAccess::refresh() getChild("limit_age_verified")->setLabelArg("[ESTATE_AGE_LIMIT]", std::string() ); } - BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST); + bool use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST); getChild("PassCheck")->setValue(use_pass); LLCtrlSelectionInterface* passcombo = childGetSelectionInterface("pass_combo"); if (passcombo) @@ -2874,12 +2874,12 @@ void LLPanelLandAccess::refresh() } else { - getChild("public_access")->setValue(FALSE); - getChild("limit_payment")->setValue(FALSE); - getChild("limit_age_verified")->setValue(FALSE); - getChild("GroupCheck")->setValue(FALSE); + getChild("public_access")->setValue(false); + getChild("limit_payment")->setValue(false); + getChild("limit_age_verified")->setValue(false); + getChild("GroupCheck")->setValue(false); getChild("GroupCheck")->setLabelArg("[GROUP]", LLStringUtil::null ); - getChild("PassCheck")->setValue(FALSE); + getChild("PassCheck")->setValue(false); getChild("PriceSpin")->setValue((F32)PARCEL_PASS_PRICE_DEFAULT); getChild("HoursSpin")->setValue(PARCEL_PASS_HOURS_DEFAULT ); getChild("AccessList")->setToolTipArg(LLStringExplicit("[LISTED]"), llformat("%d",0)); @@ -2897,26 +2897,26 @@ void LLPanelLandAccess::refresh() void LLPanelLandAccess::refresh_ui() { - getChildView("public_access")->setEnabled(FALSE); - getChildView("limit_payment")->setEnabled(FALSE); - getChildView("limit_age_verified")->setEnabled(FALSE); - getChildView("GroupCheck")->setEnabled(FALSE); - getChildView("PassCheck")->setEnabled(FALSE); - getChildView("pass_combo")->setEnabled(FALSE); - getChildView("PriceSpin")->setEnabled(FALSE); - getChildView("HoursSpin")->setEnabled(FALSE); - getChildView("AccessList")->setEnabled(FALSE); - getChildView("BannedList")->setEnabled(FALSE); - getChildView("add_allowed")->setEnabled(FALSE); - getChildView("remove_allowed")->setEnabled(FALSE); - getChildView("add_banned")->setEnabled(FALSE); - getChildView("remove_banned")->setEnabled(FALSE); + getChildView("public_access")->setEnabled(false); + getChildView("limit_payment")->setEnabled(false); + getChildView("limit_age_verified")->setEnabled(false); + getChildView("GroupCheck")->setEnabled(false); + getChildView("PassCheck")->setEnabled(false); + getChildView("pass_combo")->setEnabled(false); + getChildView("PriceSpin")->setEnabled(false); + getChildView("HoursSpin")->setEnabled(false); + getChildView("AccessList")->setEnabled(false); + getChildView("BannedList")->setEnabled(false); + getChildView("add_allowed")->setEnabled(false); + getChildView("remove_allowed")->setEnabled(false); + getChildView("add_banned")->setEnabled(false); + getChildView("remove_banned")->setEnabled(false); LLParcel *parcel = mParcel->getParcel(); if (parcel && !gDisconnected) { - BOOL can_manage_allowed = false; - BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED); + bool can_manage_allowed = false; + bool can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED); if (parcel->getRegionAllowAccessOverride()) { // Estate owner may have disabled allowing the parcel owner from managing access. @@ -2924,14 +2924,14 @@ void LLPanelLandAccess::refresh_ui() } getChildView("public_access")->setEnabled(can_manage_allowed); - BOOL public_access = getChild("public_access")->getValue().asBoolean(); + bool public_access = getChild("public_access")->getValue().asBoolean(); if (public_access) { bool override = false; if(parcel->getRegionDenyAnonymousOverride()) { override = true; - getChildView("limit_payment")->setEnabled(FALSE); + getChildView("limit_payment")->setEnabled(false); } else { @@ -2940,7 +2940,7 @@ void LLPanelLandAccess::refresh_ui() if(parcel->getRegionDenyAgeUnverifiedOverride()) { override = true; - getChildView("limit_age_verified")->setEnabled(FALSE); + getChildView("limit_age_verified")->setEnabled(false); } else { @@ -2956,17 +2956,17 @@ void LLPanelLandAccess::refresh_ui() // getChildView("Only Allow")->setToolTip(std::string()); //} // - getChildView("PassCheck")->setEnabled(FALSE); - getChildView("pass_combo")->setEnabled(FALSE); - getChildView("AccessList")->setEnabled(FALSE); + getChildView("PassCheck")->setEnabled(false); + getChildView("pass_combo")->setEnabled(false); + getChildView("AccessList")->setEnabled(false); } else { - getChildView("limit_payment")->setEnabled(FALSE); - getChildView("limit_age_verified")->setEnabled(FALSE); + getChildView("limit_payment")->setEnabled(false); + getChildView("limit_age_verified")->setEnabled(false); - BOOL sell_passes = getChild("PassCheck")->getValue().asBoolean(); + bool sell_passes = getChild("PassCheck")->getValue().asBoolean(); getChildView("PassCheck")->setEnabled(can_manage_allowed); if (sell_passes) { @@ -2984,7 +2984,7 @@ void LLPanelLandAccess::refresh_ui() getChildView("AccessList")->setEnabled(can_manage_allowed); S32 allowed_list_count = parcel->mAccessList.size(); getChildView("add_allowed")->setEnabled(can_manage_allowed && allowed_list_count < PARCEL_MAX_ACCESS_LIST); - BOOL has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0); + bool has_selected = (mListAccess && mListAccess->getSelectionInterface()->getFirstSelectedIndex() >= 0); getChildView("remove_allowed")->setEnabled(can_manage_allowed && has_selected); getChildView("BannedList")->setEnabled(can_manage_banned); @@ -3035,7 +3035,7 @@ void LLPanelLandAccess::onCommitPublicAccess(LLUICtrl *ctrl, void *userdata) std::string group_name; if (gCacheName->getGroupName(parcel->getGroupID(), group_name)) { - self->getChild("GroupCheck")->setValue(public_access ? FALSE : TRUE); + self->getChild("GroupCheck")->setValue(public_access ? false : true); } } // @@ -3052,8 +3052,8 @@ void LLPanelLandAccess::onCommitGroupCheck(LLUICtrl *ctrl, void *userdata) return; } - BOOL use_pass_list = !self->getChild("public_access")->getValue().asBoolean(); - BOOL use_access_group = self->getChild("GroupCheck")->getValue().asBoolean(); + bool use_pass_list = !self->getChild("public_access")->getValue().asBoolean(); + bool use_access_group = self->getChild("GroupCheck")->getValue().asBoolean(); LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo"); if (passcombo) { @@ -3081,30 +3081,30 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata) } // Extract data from UI - BOOL public_access = self->getChild("public_access")->getValue().asBoolean(); - BOOL use_access_group = self->getChild("GroupCheck")->getValue().asBoolean(); + bool public_access = self->getChild("public_access")->getValue().asBoolean(); + bool use_access_group = self->getChild("GroupCheck")->getValue().asBoolean(); if (use_access_group) { std::string group_name; if (!gCacheName->getGroupName(parcel->getGroupID(), group_name)) { - use_access_group = FALSE; + use_access_group = false; } } - BOOL limit_payment = FALSE, limit_age_verified = FALSE; - BOOL use_access_list = FALSE; - BOOL use_pass_list = FALSE; + bool limit_payment = false, limit_age_verified = false; + bool use_access_list = false; + bool use_pass_list = false; if (public_access) { - use_access_list = FALSE; + use_access_list = false; limit_payment = self->getChild("limit_payment")->getValue().asBoolean(); limit_age_verified = self->getChild("limit_age_verified")->getValue().asBoolean(); } else { - use_access_list = TRUE; + use_access_list = true; use_pass_list = self->getChild("PassCheck")->getValue().asBoolean(); LLCtrlSelectionInterface* passcombo = self->childGetSelectionInterface("pass_combo"); if (passcombo) @@ -3113,7 +3113,7 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata) { if (passcombo->getSelectedValue().asString() == "group") { - use_access_group = FALSE; + use_access_group = false; } } } @@ -3126,7 +3126,7 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata) parcel->setParcelFlag(PF_USE_ACCESS_GROUP, use_access_group); parcel->setParcelFlag(PF_USE_ACCESS_LIST, use_access_list); parcel->setParcelFlag(PF_USE_PASS_LIST, use_pass_list); - parcel->setParcelFlag(PF_USE_BAN_LIST, TRUE); + parcel->setParcelFlag(PF_USE_BAN_LIST, true); parcel->setParcelFlag(PF_DENY_ANONYMOUS, limit_payment); parcel->setParcelFlag(PF_DENY_AGEUNVERIFIED, limit_age_verified); @@ -3145,7 +3145,7 @@ void LLPanelLandAccess::onClickAddAccess() LLView * button = findChild("add_allowed"); LLFloater * root_floater = gFloaterView->getParentFloater(this); LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( - boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), FALSE, FALSE, FALSE, root_floater->getName(), button); + boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), false, false, false, root_floater->getName(), button); if (picker) { root_floater->addDependentFloater(picker); @@ -3202,7 +3202,7 @@ void LLPanelLandAccess::onClickAddBanned() LLView * button = findChild("add_banned"); LLFloater * root_floater = gFloaterView->getParentFloater(this); LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( - boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), TRUE, FALSE, FALSE, root_floater->getName(), button); + boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), true, false, false, root_floater->getName(), button); if (picker) { root_floater->addDependentFloater(picker); @@ -3470,8 +3470,8 @@ bool LLPanelLandExperiences::postBuild() // no privileged ones mBlocked->addFilter(boost::bind(LLPanelExperiencePicker::FilterWithoutProperties, _1, LLExperienceCache::PROPERTY_PRIVILEGED|LLExperienceCache::PROPERTY_GRID)); - getChild("trusted_layout_panel")->setVisible(FALSE); - getChild("experiences_help_text")->setVisible(FALSE); + getChild("trusted_layout_panel")->setVisible(false); + getChild("experiences_help_text")->setVisible(false); getChild("allowed_text_help")->setText(getString("allowed_parcel_text")); getChild("blocked_text_help")->setText(getString("blocked_parcel_text")); @@ -3526,13 +3526,13 @@ void LLPanelLandExperiences::refreshPanel(LLPanelExperienceListEditor* panel, U3 if (!parcel || gDisconnected) { // disable the panel - panel->setEnabled(FALSE); + panel->setEnabled(false); panel->setExperienceIds(LLSD::emptyArray()); } else { // enable the panel - panel->setEnabled(TRUE); + panel->setEnabled(true); LLAccessEntry::map entries = parcel->getExperienceKeysByType(xp_type); LLAccessEntry::map::iterator it = entries.begin(); LLSD ids = LLSD::emptyArray(); diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index fb1e04feba..aeb9a56e96 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -131,7 +131,7 @@ public: // we send an update to the simulator, it usually replies with the // parcel information, causing the land to be reselected. This allows // us to suppress that behavior. - static BOOL sRequestReplyOnUpdate; + static bool sRequestReplyOnUpdate; }; @@ -155,7 +155,7 @@ public: static void onClickRelease(void*); static void onClickReclaim(void*); static void onClickBuyPass(void* deselect_when_done); - static BOOL enableBuyPass(void*); + static bool enableBuyPass(void*); static void onCommitAny(LLUICtrl* ctrl, void *userdata); static void finalizeCommit(void * userdata); static void onForSaleChange(LLUICtrl *ctrl, void * userdata); @@ -180,7 +180,7 @@ public: virtual bool postBuild(); protected: - BOOL mUncheckedSell; // True only when verifying land information when land is for sale on sale info change + bool mUncheckedSell; // True only when verifying land information when land is for sale on sale info change LLTextBox* mLabelName; LLLineEditor* mEditName; @@ -313,12 +313,12 @@ protected: LLPointer mIconAvatarOffline; LLPointer mIconGroup; - BOOL mFirstReply; + bool mFirstReply; uuid_list_t mSelectedOwners; std::string mSelectedName; S32 mSelectedCount; - BOOL mSelectedIsGroup; + bool mSelectedIsGroup; LLSafeHandle& mParcel; }; diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp index 7260b61781..901841c541 100644 --- a/indra/newview/llfloaterlandholdings.cpp +++ b/indra/newview/llfloaterlandholdings.cpp @@ -60,9 +60,9 @@ LLFloaterLandHoldings::LLFloaterLandHoldings(const LLSD& key) : LLFloater(key), mActualArea(0), mBillableArea(0), - mFirstPacketReceived(FALSE), + mFirstPacketReceived(false), mSortColumn(""), - mSortAscending(TRUE) + mSortAscending(true) { } @@ -139,10 +139,10 @@ void LLFloaterLandHoldings::draw() void LLFloaterLandHoldings::refresh() { LLCtrlSelectionInterface *list = childGetSelectionInterface("parcel list"); - BOOL enable_btns = FALSE; + bool enable_btns = false; if (list && list->getFirstSelectedIndex()> -1) { - enable_btns = TRUE; + enable_btns = true; } getChildView("Teleport")->setEnabled(enable_btns); @@ -183,7 +183,7 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**) // If this is the first packet, clear out the "loading..." indicator if (!self->mFirstPacketReceived) { - self->mFirstPacketReceived = TRUE; + self->mFirstPacketReceived = true; list->operateOnAll(LLCtrlSelectionInterface::OP_DELETE); } diff --git a/indra/newview/llfloaterlandholdings.h b/indra/newview/llfloaterlandholdings.h index c3279d2bc6..21bff27c02 100644 --- a/indra/newview/llfloaterlandholdings.h +++ b/indra/newview/llfloaterlandholdings.h @@ -69,10 +69,10 @@ protected: // Has a packet of data been received? // Used to clear out the mParcelList's "Loading..." indicator - BOOL mFirstPacketReceived; + bool mFirstPacketReceived; std::string mSortColumn; - BOOL mSortAscending; + bool mSortAscending; }; #endif diff --git a/indra/newview/llfloaterlinkreplace.cpp b/indra/newview/llfloaterlinkreplace.cpp index 4a942b1cd8..855fe0a8d9 100644 --- a/indra/newview/llfloaterlinkreplace.cpp +++ b/indra/newview/llfloaterlinkreplace.cpp @@ -244,8 +244,8 @@ void LLFloaterLinkReplace::onStartClickedResponse(const LLSD& notification, cons args["NUM"] = llformat("%d", mRemainingItems); mStatusText->setText(getString("ItemsRemaining", args)); - mStartBtn->setEnabled(FALSE); - mRefreshBtn->setEnabled(FALSE); + mStartBtn->setEnabled(false); + mRefreshBtn->setEnabled(false); mEventTimer.start(); tick(); @@ -342,8 +342,8 @@ void LLFloaterLinkReplace::decreaseOpenItemCount() if (mRemainingItems == 0) { mStatusText->setText(getString("ReplaceFinished")); - mStartBtn->setEnabled(TRUE); - mRefreshBtn->setEnabled(TRUE); + mStartBtn->setEnabled(true); + mRefreshBtn->setEnabled(true); mEventTimer.stop(); LL_INFOS() << "Inventory link replace finished." << LL_ENDL; } diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index e9893dde61..c18b322171 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -123,8 +123,8 @@ bool LLFloaterMap::postBuild() sendChildToBack(getDragHandle()); // Remove titlebar - setIsChrome(TRUE); - getDragHandle()->setTitleVisible(TRUE); + setIsChrome(true); + getDragHandle()->setTitleVisible(true); // // keep onscreen @@ -138,7 +138,7 @@ bool LLFloaterMap::handleDoubleClick(S32 x, S32 y, MASK mask) // If floater is minimized, minimap should be shown on doubleclick (STORM-299) if (isMinimized()) { - setMinimized(FALSE); + setMinimized(false); return true; } @@ -248,13 +248,13 @@ void LLFloaterMap::draw() // Note: we can't just gAgent.check cameraMouselook() because the transition states are wrong. if(gAgentCamera.cameraMouselook()) { - setMouseOpaque(FALSE); - getDragHandle()->setMouseOpaque(FALSE); + setMouseOpaque(false); + getDragHandle()->setMouseOpaque(false); } else { - setMouseOpaque(TRUE); - getDragHandle()->setMouseOpaque(TRUE); + setMouseOpaque(true); + getDragHandle()->setMouseOpaque(true); } LLFloater::draw(); diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 764a102035..9530c39732 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -72,7 +72,7 @@ bool LLPanelMarketplaceListings::postBuild() mFilterEditor->setCommitCallback(boost::bind(&LLPanelMarketplaceListings::onFilterEdit, this, _2)); mAuditBtn = getChild("audit_btn"); - mAuditBtn->setEnabled(FALSE); + mAuditBtn->setEnabled(false); return LLPanel::postBuild(); } @@ -190,7 +190,7 @@ void LLPanelMarketplaceListings::draw() LLPanel::draw(); } -void LLPanelMarketplaceListings::onSelectionChange(LLInventoryPanel *panel, const std::deque& items, BOOL user_action) +void LLPanelMarketplaceListings::onSelectionChange(LLInventoryPanel *panel, const std::deque& items, bool user_action) { panel->onSelectionChange(items, user_action); } @@ -251,8 +251,8 @@ void LLPanelMarketplaceListings::onAddButtonClicked() if (panel) { gInventory.notifyObservers(); - panel->setSelectionByID(new_cat_id, TRUE); - panel->getRootFolder()->setNeedsAutoRename(TRUE); + panel->setSelectionByID(new_cat_id, true); + panel->getRootFolder()->setNeedsAutoRename(true); } } ); @@ -604,7 +604,7 @@ void LLFloaterMarketplaceListings::updateView() { // Just show the loading indicator in that case and fetch the data (fetch will be skipped if it's already loading) mInventoryInitializationInProgress->setVisible(true); - mPanelListings->setVisible(FALSE); + mPanelListings->setVisible(false); fetchContents(); return; } @@ -621,13 +621,13 @@ void LLFloaterMarketplaceListings::updateView() // We need to rebuild the tabs cleanly the first time we make them visible setPanels(); } - mPanelListings->setVisible(TRUE); - mInventoryPlaceholder->setVisible(FALSE); + mPanelListings->setVisible(true); + mInventoryPlaceholder->setVisible(false); } else { - mPanelListings->setVisible(FALSE); - mInventoryPlaceholder->setVisible(TRUE); + mPanelListings->setVisible(false); + mInventoryPlaceholder->setVisible(true); std::string text; std::string title; @@ -712,7 +712,7 @@ bool LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, bo // Pass to the children LLView * handled_view = childrenHandleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - BOOL handled = (handled_view != NULL); + bool handled = (handled_view != NULL); // If no one handled it or it was not accepted and we drop on an empty panel, we try to accept it at the floater level // as if it was dropped on the marketplace listings root folder @@ -792,7 +792,7 @@ LLFloaterAssociateListing::~LLFloaterAssociateListing() bool LLFloaterAssociateListing::postBuild() { - getChild("OK")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::apply, this, TRUE)); + getChild("OK")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::apply, this, true)); getChild("Cancel")->setCommitCallback(boost::bind(&LLFloaterAssociateListing::cancel, this)); getChild("listing_id")->setPrevalidate(&LLTextValidate::validateNonNegativeS32); center(); @@ -832,11 +832,11 @@ void LLFloaterAssociateListing::callback_apply(const LLSD& notification, const L S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) // YES { - apply(FALSE); + apply(false); } } -void LLFloaterAssociateListing::apply(BOOL user_confirm) +void LLFloaterAssociateListing::apply(bool user_confirm) { if (mUUID.notNull()) { diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index 46cce7da54..c55efa0eba 100644 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -72,7 +72,7 @@ private: bool onViewSortMenuItemCheck(const LLSD& userdata); void onAddButtonClicked(); void onAuditButtonClicked(); - void onSelectionChange(LLInventoryPanel *panel, const std::deque& items, BOOL user_action); + void onSelectionChange(LLInventoryPanel *panel, const std::deque& items, bool user_action); void onTabChange(); void onFilterEdit(const std::string& search_string); @@ -166,7 +166,7 @@ private: virtual ~LLFloaterAssociateListing(); // UI Callbacks - void apply(BOOL user_confirm = TRUE); + void apply(bool user_confirm = true); void cancel(); void callback_apply(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llfloatermemleak.cpp b/indra/newview/llfloatermemleak.cpp index 50be7ec6c6..327de5e2c3 100644 --- a/indra/newview/llfloatermemleak.cpp +++ b/indra/newview/llfloatermemleak.cpp @@ -40,9 +40,9 @@ U32 LLFloaterMemLeak::sMemLeakingSpeed = 0 ; //bytes leaked per frame U32 LLFloaterMemLeak::sMaxLeakedMem = 0 ; //maximum allowed leaked memory U32 LLFloaterMemLeak::sTotalLeaked = 0 ; S32 LLFloaterMemLeak::sStatus = LLFloaterMemLeak::STOP ; -BOOL LLFloaterMemLeak::sbAllocationFailed = FALSE ; +bool LLFloaterMemLeak::sbAllocationFailed = false ; -extern BOOL gSimulateMemLeak; +extern bool gSimulateMemLeak; LLFloaterMemLeak::LLFloaterMemLeak(const LLSD& key) : LLFloater(key) @@ -79,7 +79,7 @@ bool LLFloaterMemLeak::postBuild(void) sMaxLeakedMem = ((U32)b) << 20 ; } - sbAllocationFailed = FALSE ; + sbAllocationFailed = false ; return true ; } LLFloaterMemLeak::~LLFloaterMemLeak() @@ -105,14 +105,14 @@ void LLFloaterMemLeak::release() sStatus = STOP ; sTotalLeaked = 0 ; - sbAllocationFailed = FALSE ; - gSimulateMemLeak = FALSE; + sbAllocationFailed = false ; + gSimulateMemLeak = false; } void LLFloaterMemLeak::stop() { sStatus = STOP ; - sbAllocationFailed = TRUE ; + sbAllocationFailed = true ; } void LLFloaterMemLeak::idle() @@ -122,7 +122,7 @@ void LLFloaterMemLeak::idle() return ; } - sbAllocationFailed = FALSE ; + sbAllocationFailed = false ; if(RELEASE == sStatus) { @@ -183,7 +183,7 @@ void LLFloaterMemLeak::onChangeMaxMemLeaking() void LLFloaterMemLeak::onClickStart() { sStatus = START ; - gSimulateMemLeak = TRUE; + gSimulateMemLeak = true; } void LLFloaterMemLeak::onClickStop() @@ -198,7 +198,7 @@ void LLFloaterMemLeak::onClickRelease() void LLFloaterMemLeak::onClickClose() { - setVisible(FALSE); + setVisible(false); } void LLFloaterMemLeak::draw() diff --git a/indra/newview/llfloatermemleak.h b/indra/newview/llfloatermemleak.h index 932a838a96..122d4016ca 100644 --- a/indra/newview/llfloatermemleak.h +++ b/indra/newview/llfloatermemleak.h @@ -67,7 +67,7 @@ private: static U32 sMaxLeakedMem ; //maximum allowed leaked memory static U32 sTotalLeaked ; static S32 sStatus ; //0: stop ; >0: start ; <0: release - static BOOL sbAllocationFailed ; + static bool sbAllocationFailed ; std::vector mLeakedMem ; }; diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index d0782617b8..c8189dd95b 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -989,7 +989,7 @@ bool LLFloaterModelPreview::handleMouseDown(S32 x, S32 y, MASK mask) //----------------------------------------------------------------------------- bool LLFloaterModelPreview::handleMouseUp(S32 x, S32 y, MASK mask) { - gFocusMgr.setMouseCapture(FALSE); + gFocusMgr.setMouseCapture(nullptr); gViewerWindow->showCursor(); return LLFloater::handleMouseUp(x, y, mask); } diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index b6b6a7308b..ea3e76f377 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -108,7 +108,7 @@ bool LLFloaterMyEnvironment::postBuild() mInventoryList->setFilterTypes(filter_types); - mInventoryList->setSelectCallback([this](const std::deque&, BOOL) { onSelectionChange(); }); + mInventoryList->setSelectCallback([this](const std::deque&, bool) { onSelectionChange(); }); mInventoryList->setShowFolderState(mShowFolders); mInventoryList->setFilterSettingsTypes(mTypeFilter); } @@ -205,7 +205,7 @@ void LLFloaterMyEnvironment::onFilterEdit(const std::string& search_string) return; } - mSavedFolderState.setApply(TRUE); + mSavedFolderState.setApply(true); mInventoryList->getRootFolder()->applyFunctorRecursively(mSavedFolderState); // add folder with current item to list of previously opened folders LLOpenFoldersWithSelection opener; @@ -216,7 +216,7 @@ void LLFloaterMyEnvironment::onFilterEdit(const std::string& search_string) else if (mInventoryList->getFilterSubString().empty()) { // first letter in search term, save existing folder open state - mSavedFolderState.setApply(FALSE); + mSavedFolderState.setApply(false); mInventoryList->getRootFolder()->applyFunctorRecursively(mSavedFolderState); } diff --git a/indra/newview/llfloaternewfeaturenotification.cpp b/indra/newview/llfloaternewfeaturenotification.cpp index 20469db509..be347c46b0 100644 --- a/indra/newview/llfloaternewfeaturenotification.cpp +++ b/indra/newview/llfloaternewfeaturenotification.cpp @@ -40,7 +40,7 @@ LLFloaterNewFeatureNotification::~LLFloaterNewFeatureNotification() bool LLFloaterNewFeatureNotification::postBuild() { - setCanDrag(FALSE); + setCanDrag(false); getChild("close_btn")->setCommitCallback(boost::bind(&LLFloaterNewFeatureNotification::onCloseBtn, this)); const std::string title_txt = "title_txt"; diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index ce32630eee..9b205b79bd 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -117,7 +117,7 @@ void LLNotificationChannelPanel::onClickNotification(void* user_data) void* data = firstselected->getUserdata(); if (data) { - gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); + gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), true); } } } diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index fb78b4d824..8769bf58eb 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -103,7 +103,7 @@ void LLFloaterNotificationsTabbed::handleReshape(const LLRect& rect, bool by_use void LLFloaterNotificationsTabbed::onStartUpToastClick(S32 x, S32 y, MASK mask) { // just set floater visible. Screen channels will be cleared. - setVisible(TRUE); + setVisible(true); } //--------------------------------------------------------------------------------- @@ -151,7 +151,7 @@ void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id, std::string // hide chiclet window if there are no items left if(isWindowEmpty()) { - setVisible(FALSE); + setVisible(false); } } @@ -211,7 +211,7 @@ void LLFloaterNotificationsTabbed::setVisible(bool visible) } // do not show empty window - if (NULL == mNotificationsSeparator || isWindowEmpty()) visible = FALSE; + if (NULL == mNotificationsSeparator || isWindowEmpty()) visible = false; LLTransientDockableFloater::setVisible(visible); @@ -381,7 +381,7 @@ void LLFloaterNotificationsTabbed::collapseAllOnCurrentTab() { LLNotificationListItem* notify_item = dynamic_cast(*iter); if (notify_item) - notify_item->setExpanded(FALSE); + notify_item->setExpanded(false); } } @@ -440,7 +440,7 @@ void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item) } else { - item->setExpanded(TRUE); + item->setExpanded(true); } } diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index f1772d6645..4f482c4ab4 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -55,7 +55,7 @@ LLFloaterOpenObject::LLFloaterOpenObject(const LLSD& key) : LLFloater(key), mPanelInventoryObject(NULL), - mDirty(TRUE) + mDirty(true) { // Cinder's fly-out button //mCommitCallbackRegistrar.add("OpenObject.MoveToInventory", boost::bind(&LLFloaterOpenObject::onClickMoveToInventory, this)); @@ -102,7 +102,7 @@ void LLFloaterOpenObject::refresh() mPanelInventoryObject->refresh(); std::string name = ""; - BOOL enabled = FALSE; + bool enabled = false; LLSelectNode* node = mObjectSelection->getFirstRootNode(); // [RLVa:KB] - @edit and @editobj @@ -118,12 +118,12 @@ void LLFloaterOpenObject::refresh() if (node) { name = node->mName; - enabled = TRUE; + enabled = true; } else { name = ""; - enabled = FALSE; + enabled = false; } getChild("object_name")->setTextArg("[DESC]", name); @@ -140,14 +140,14 @@ void LLFloaterOpenObject::draw() if (mDirty) { refresh(); - mDirty = FALSE; + mDirty = false; } LLFloater::draw(); } void LLFloaterOpenObject::dirty() { - mDirty = TRUE; + mDirty = true; } @@ -201,9 +201,9 @@ void LLFloaterOpenObject::callbackCreateInventoryCategory(const LLUUID& category // Copy and/or move the items into the newly created folder. // Ignore any "you're going to break this item" messages. - BOOL success = move_inv_category_world_to_agent(object_id, + bool success = move_inv_category_world_to_agent(object_id, category_id, - TRUE, + true, [](S32 result, void* data, const LLMoveInv*) { callbackMoveInventory(result, data); diff --git a/indra/newview/llfloateropenobject.h b/indra/newview/llfloateropenobject.h index a277808aa9..886150b461 100644 --- a/indra/newview/llfloateropenobject.h +++ b/indra/newview/llfloateropenobject.h @@ -79,7 +79,7 @@ protected: LLPanelObjectInventory* mPanelInventoryObject; LLSafeHandle mObjectSelection; - BOOL mDirty; + bool mDirty; }; #endif diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp index 2be10dc57a..098a2edc64 100644 --- a/indra/newview/llfloaterpathfindingcharacters.cpp +++ b/indra/newview/llfloaterpathfindingcharacters.cpp @@ -65,17 +65,17 @@ void LLFloaterPathfindingCharacters::onClose(bool pIsAppQuitting) LLFloaterPathfindingObjects::onClose( pIsAppQuitting ); } -BOOL LLFloaterPathfindingCharacters::isShowPhysicsCapsule() const +bool LLFloaterPathfindingCharacters::isShowPhysicsCapsule() const { return mShowPhysicsCapsuleCheckBox->get(); } -void LLFloaterPathfindingCharacters::setShowPhysicsCapsule(BOOL pIsShowPhysicsCapsule) +void LLFloaterPathfindingCharacters::setShowPhysicsCapsule(bool pIsShowPhysicsCapsule) { mShowPhysicsCapsuleCheckBox->set(pIsShowPhysicsCapsule && (LLPathingLib::getInstance() != NULL)); } -BOOL LLFloaterPathfindingCharacters::isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const +bool LLFloaterPathfindingCharacters::isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const { id = mSelectedCharacterId; // Physics capsule is enable if the checkbox is enabled and if we can get the required render @@ -195,7 +195,7 @@ void LLFloaterPathfindingCharacters::onShowPhysicsCapsuleClicked() { if (isShowPhysicsCapsule()) { - setShowPhysicsCapsule(FALSE); + setShowPhysicsCapsule(false); } } else @@ -246,7 +246,7 @@ void LLFloaterPathfindingCharacters::updateStateOnDisplayControls() mShowPhysicsCapsuleCheckBox->setEnabled(isEditEnabled); if (!isEditEnabled) { - setShowPhysicsCapsule(FALSE); + setShowPhysicsCapsule(false); } } diff --git a/indra/newview/llfloaterpathfindingcharacters.h b/indra/newview/llfloaterpathfindingcharacters.h index 6c68d027d4..c9294840af 100644 --- a/indra/newview/llfloaterpathfindingcharacters.h +++ b/indra/newview/llfloaterpathfindingcharacters.h @@ -44,10 +44,10 @@ class LLFloaterPathfindingCharacters : public LLFloaterPathfindingObjects public: virtual void onClose(bool pIsAppQuitting); - BOOL isShowPhysicsCapsule() const; - void setShowPhysicsCapsule(BOOL pIsShowPhysicsCapsule); + bool isShowPhysicsCapsule() const; + void setShowPhysicsCapsule(bool pIsShowPhysicsCapsule); - BOOL isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const; + bool isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos, LLQuaternion& rot) const; static void openCharactersWithSelectedObjects(); static LLHandle getInstanceHandle(); diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 1ceb1dec4e..c6f9ef6bc7 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -310,94 +310,94 @@ LLHandle LLFloaterPathfindingConsole::getInstanceHa return sInstanceHandle; } -BOOL LLFloaterPathfindingConsole::isRenderNavMesh() const +bool LLFloaterPathfindingConsole::isRenderNavMesh() const { return mShowNavMeshCheckBox->get(); } -void LLFloaterPathfindingConsole::setRenderNavMesh(BOOL pIsRenderNavMesh) +void LLFloaterPathfindingConsole::setRenderNavMesh(bool pIsRenderNavMesh) { mShowNavMeshCheckBox->set(pIsRenderNavMesh); setNavMeshRenderState(); } -BOOL LLFloaterPathfindingConsole::isRenderWalkables() const +bool LLFloaterPathfindingConsole::isRenderWalkables() const { return mShowWalkablesCheckBox->get(); } -void LLFloaterPathfindingConsole::setRenderWalkables(BOOL pIsRenderWalkables) +void LLFloaterPathfindingConsole::setRenderWalkables(bool pIsRenderWalkables) { mShowWalkablesCheckBox->set(pIsRenderWalkables); } -BOOL LLFloaterPathfindingConsole::isRenderStaticObstacles() const +bool LLFloaterPathfindingConsole::isRenderStaticObstacles() const { return mShowStaticObstaclesCheckBox->get(); } -void LLFloaterPathfindingConsole::setRenderStaticObstacles(BOOL pIsRenderStaticObstacles) +void LLFloaterPathfindingConsole::setRenderStaticObstacles(bool pIsRenderStaticObstacles) { mShowStaticObstaclesCheckBox->set(pIsRenderStaticObstacles); } -BOOL LLFloaterPathfindingConsole::isRenderMaterialVolumes() const +bool LLFloaterPathfindingConsole::isRenderMaterialVolumes() const { return mShowMaterialVolumesCheckBox->get(); } -void LLFloaterPathfindingConsole::setRenderMaterialVolumes(BOOL pIsRenderMaterialVolumes) +void LLFloaterPathfindingConsole::setRenderMaterialVolumes(bool pIsRenderMaterialVolumes) { mShowMaterialVolumesCheckBox->set(pIsRenderMaterialVolumes); } -BOOL LLFloaterPathfindingConsole::isRenderExclusionVolumes() const +bool LLFloaterPathfindingConsole::isRenderExclusionVolumes() const { return mShowExclusionVolumesCheckBox->get(); } -void LLFloaterPathfindingConsole::setRenderExclusionVolumes(BOOL pIsRenderExclusionVolumes) +void LLFloaterPathfindingConsole::setRenderExclusionVolumes(bool pIsRenderExclusionVolumes) { mShowExclusionVolumesCheckBox->set(pIsRenderExclusionVolumes); } -BOOL LLFloaterPathfindingConsole::isRenderWorld() const +bool LLFloaterPathfindingConsole::isRenderWorld() const { return mShowWorldCheckBox->get(); } -void LLFloaterPathfindingConsole::setRenderWorld(BOOL pIsRenderWorld) +void LLFloaterPathfindingConsole::setRenderWorld(bool pIsRenderWorld) { mShowWorldCheckBox->set(pIsRenderWorld); setWorldRenderState(); } -BOOL LLFloaterPathfindingConsole::isRenderWorldMovablesOnly() const +bool LLFloaterPathfindingConsole::isRenderWorldMovablesOnly() const { return (mShowWorldCheckBox->get() && mShowWorldMovablesOnlyCheckBox->get()); } -void LLFloaterPathfindingConsole::setRenderWorldMovablesOnly(BOOL pIsRenderWorldMovablesOnly) +void LLFloaterPathfindingConsole::setRenderWorldMovablesOnly(bool pIsRenderWorldMovablesOnly) { mShowWorldMovablesOnlyCheckBox->set(pIsRenderWorldMovablesOnly); } -BOOL LLFloaterPathfindingConsole::isRenderWaterPlane() const +bool LLFloaterPathfindingConsole::isRenderWaterPlane() const { return mShowRenderWaterPlaneCheckBox->get(); } -void LLFloaterPathfindingConsole::setRenderWaterPlane(BOOL pIsRenderWaterPlane) +void LLFloaterPathfindingConsole::setRenderWaterPlane(bool pIsRenderWaterPlane) { mShowRenderWaterPlaneCheckBox->set(pIsRenderWaterPlane); } -BOOL LLFloaterPathfindingConsole::isRenderXRay() const +bool LLFloaterPathfindingConsole::isRenderXRay() const { return mShowXRayCheckBox->get(); } -void LLFloaterPathfindingConsole::setRenderXRay(BOOL pIsRenderXRay) +void LLFloaterPathfindingConsole::setRenderXRay(bool pIsRenderXRay) { mShowXRayCheckBox->set(pIsRenderXRay); } @@ -616,8 +616,8 @@ void LLFloaterPathfindingConsole::handleNavMeshZoneStatus(LLPathfindingNavMeshZo void LLFloaterPathfindingConsole::onRegionBoundaryCross() { initializeNavMeshZoneForCurrentRegion(); - setRenderWorld(TRUE); - setRenderWorldMovablesOnly(FALSE); + setRenderWorld(true); + setRenderWorldMovablesOnly(false); } void LLFloaterPathfindingConsole::onPathEvent() @@ -657,15 +657,15 @@ void LLFloaterPathfindingConsole::onPathEvent() void LLFloaterPathfindingConsole::setDefaultInputs() { mViewTestTabContainer->selectTab(XUI_VIEW_TAB_INDEX); - setRenderWorld(TRUE); - setRenderWorldMovablesOnly(FALSE); - setRenderNavMesh(FALSE); - setRenderWalkables(FALSE); - setRenderMaterialVolumes(FALSE); - setRenderStaticObstacles(FALSE); - setRenderExclusionVolumes(FALSE); - setRenderWaterPlane(FALSE); - setRenderXRay(FALSE); + setRenderWorld(true); + setRenderWorldMovablesOnly(false); + setRenderNavMesh(false); + setRenderWalkables(false); + setRenderMaterialVolumes(false); + setRenderStaticObstacles(false); + setRenderExclusionVolumes(false); + setRenderWaterPlane(false); + setRenderXRay(false); } void LLFloaterPathfindingConsole::setConsoleState(EConsoleState pConsoleState) @@ -678,18 +678,18 @@ void LLFloaterPathfindingConsole::setConsoleState(EConsoleState pConsoleState) void LLFloaterPathfindingConsole::setWorldRenderState() { - BOOL renderWorld = isRenderWorld(); + bool renderWorld = isRenderWorld(); mShowWorldMovablesOnlyCheckBox->setEnabled(renderWorld && mShowWorldCheckBox->getEnabled()); if (!renderWorld) { - mShowWorldMovablesOnlyCheckBox->set(FALSE); + mShowWorldMovablesOnlyCheckBox->set(false); } } void LLFloaterPathfindingConsole::setNavMeshRenderState() { - BOOL renderNavMesh = isRenderNavMesh(); + bool renderNavMesh = isRenderNavMesh(); mShowNavMeshWalkabilityLabel->setEnabled(renderNavMesh); mShowNavMeshWalkabilityComboBox->setEnabled(renderNavMesh); @@ -715,106 +715,106 @@ void LLFloaterPathfindingConsole::updateControlsOnConsoleState() case kConsoleStateRegionNotEnabled : case kConsoleStateRegionLoading : mViewTestTabContainer->selectTab(XUI_VIEW_TAB_INDEX); - mViewTab->setEnabled(FALSE); - mShowLabel->setEnabled(FALSE); - mShowWorldCheckBox->setEnabled(FALSE); - mShowWorldMovablesOnlyCheckBox->setEnabled(FALSE); - mShowNavMeshCheckBox->setEnabled(FALSE); - mShowNavMeshWalkabilityLabel->setEnabled(FALSE); - mShowNavMeshWalkabilityComboBox->setEnabled(FALSE); - mShowWalkablesCheckBox->setEnabled(FALSE); - mShowStaticObstaclesCheckBox->setEnabled(FALSE); - mShowMaterialVolumesCheckBox->setEnabled(FALSE); - mShowExclusionVolumesCheckBox->setEnabled(FALSE); - mShowRenderWaterPlaneCheckBox->setEnabled(FALSE); - mShowXRayCheckBox->setEnabled(FALSE); - mTestTab->setEnabled(FALSE); - mCtrlClickLabel->setEnabled(FALSE); - mShiftClickLabel->setEnabled(FALSE); - mCharacterWidthLabel->setEnabled(FALSE); - mCharacterWidthUnitLabel->setEnabled(FALSE); - mCharacterWidthSlider->setEnabled(FALSE); - mCharacterTypeLabel->setEnabled(FALSE); - mCharacterTypeComboBox->setEnabled(FALSE); - mClearPathButton->setEnabled(FALSE); + mViewTab->setEnabled(false); + mShowLabel->setEnabled(false); + mShowWorldCheckBox->setEnabled(false); + mShowWorldMovablesOnlyCheckBox->setEnabled(false); + mShowNavMeshCheckBox->setEnabled(false); + mShowNavMeshWalkabilityLabel->setEnabled(false); + mShowNavMeshWalkabilityComboBox->setEnabled(false); + mShowWalkablesCheckBox->setEnabled(false); + mShowStaticObstaclesCheckBox->setEnabled(false); + mShowMaterialVolumesCheckBox->setEnabled(false); + mShowExclusionVolumesCheckBox->setEnabled(false); + mShowRenderWaterPlaneCheckBox->setEnabled(false); + mShowXRayCheckBox->setEnabled(false); + mTestTab->setEnabled(false); + mCtrlClickLabel->setEnabled(false); + mShiftClickLabel->setEnabled(false); + mCharacterWidthLabel->setEnabled(false); + mCharacterWidthUnitLabel->setEnabled(false); + mCharacterWidthSlider->setEnabled(false); + mCharacterTypeLabel->setEnabled(false); + mCharacterTypeComboBox->setEnabled(false); + mClearPathButton->setEnabled(false); clearPath(); break; case kConsoleStateLibraryNotImplemented : mViewTestTabContainer->selectTab(XUI_VIEW_TAB_INDEX); - mViewTab->setEnabled(FALSE); - mShowLabel->setEnabled(FALSE); - mShowWorldCheckBox->setEnabled(FALSE); - mShowWorldMovablesOnlyCheckBox->setEnabled(FALSE); - mShowNavMeshCheckBox->setEnabled(FALSE); - mShowNavMeshWalkabilityLabel->setEnabled(FALSE); - mShowNavMeshWalkabilityComboBox->setEnabled(FALSE); - mShowWalkablesCheckBox->setEnabled(FALSE); - mShowStaticObstaclesCheckBox->setEnabled(FALSE); - mShowMaterialVolumesCheckBox->setEnabled(FALSE); - mShowExclusionVolumesCheckBox->setEnabled(FALSE); - mShowRenderWaterPlaneCheckBox->setEnabled(FALSE); - mShowXRayCheckBox->setEnabled(FALSE); - mTestTab->setEnabled(FALSE); - mCtrlClickLabel->setEnabled(FALSE); - mShiftClickLabel->setEnabled(FALSE); - mCharacterWidthLabel->setEnabled(FALSE); - mCharacterWidthUnitLabel->setEnabled(FALSE); - mCharacterWidthSlider->setEnabled(FALSE); - mCharacterTypeLabel->setEnabled(FALSE); - mCharacterTypeComboBox->setEnabled(FALSE); - mClearPathButton->setEnabled(FALSE); + mViewTab->setEnabled(false); + mShowLabel->setEnabled(false); + mShowWorldCheckBox->setEnabled(false); + mShowWorldMovablesOnlyCheckBox->setEnabled(false); + mShowNavMeshCheckBox->setEnabled(false); + mShowNavMeshWalkabilityLabel->setEnabled(false); + mShowNavMeshWalkabilityComboBox->setEnabled(false); + mShowWalkablesCheckBox->setEnabled(false); + mShowStaticObstaclesCheckBox->setEnabled(false); + mShowMaterialVolumesCheckBox->setEnabled(false); + mShowExclusionVolumesCheckBox->setEnabled(false); + mShowRenderWaterPlaneCheckBox->setEnabled(false); + mShowXRayCheckBox->setEnabled(false); + mTestTab->setEnabled(false); + mCtrlClickLabel->setEnabled(false); + mShiftClickLabel->setEnabled(false); + mCharacterWidthLabel->setEnabled(false); + mCharacterWidthUnitLabel->setEnabled(false); + mCharacterWidthSlider->setEnabled(false); + mCharacterTypeLabel->setEnabled(false); + mCharacterTypeComboBox->setEnabled(false); + mClearPathButton->setEnabled(false); clearPath(); break; case kConsoleStateCheckingVersion : case kConsoleStateDownloading : case kConsoleStateError : mViewTestTabContainer->selectTab(XUI_VIEW_TAB_INDEX); - mViewTab->setEnabled(FALSE); - mShowLabel->setEnabled(FALSE); - mShowWorldCheckBox->setEnabled(FALSE); - mShowWorldMovablesOnlyCheckBox->setEnabled(FALSE); - mShowNavMeshCheckBox->setEnabled(FALSE); - mShowNavMeshWalkabilityLabel->setEnabled(FALSE); - mShowNavMeshWalkabilityComboBox->setEnabled(FALSE); - mShowWalkablesCheckBox->setEnabled(FALSE); - mShowStaticObstaclesCheckBox->setEnabled(FALSE); - mShowMaterialVolumesCheckBox->setEnabled(FALSE); - mShowExclusionVolumesCheckBox->setEnabled(FALSE); - mShowRenderWaterPlaneCheckBox->setEnabled(FALSE); - mShowXRayCheckBox->setEnabled(FALSE); - mTestTab->setEnabled(FALSE); - mCtrlClickLabel->setEnabled(FALSE); - mShiftClickLabel->setEnabled(FALSE); - mCharacterWidthLabel->setEnabled(FALSE); - mCharacterWidthUnitLabel->setEnabled(FALSE); - mCharacterWidthSlider->setEnabled(FALSE); - mCharacterTypeLabel->setEnabled(FALSE); - mCharacterTypeComboBox->setEnabled(FALSE); - mClearPathButton->setEnabled(FALSE); + mViewTab->setEnabled(false); + mShowLabel->setEnabled(false); + mShowWorldCheckBox->setEnabled(false); + mShowWorldMovablesOnlyCheckBox->setEnabled(false); + mShowNavMeshCheckBox->setEnabled(false); + mShowNavMeshWalkabilityLabel->setEnabled(false); + mShowNavMeshWalkabilityComboBox->setEnabled(false); + mShowWalkablesCheckBox->setEnabled(false); + mShowStaticObstaclesCheckBox->setEnabled(false); + mShowMaterialVolumesCheckBox->setEnabled(false); + mShowExclusionVolumesCheckBox->setEnabled(false); + mShowRenderWaterPlaneCheckBox->setEnabled(false); + mShowXRayCheckBox->setEnabled(false); + mTestTab->setEnabled(false); + mCtrlClickLabel->setEnabled(false); + mShiftClickLabel->setEnabled(false); + mCharacterWidthLabel->setEnabled(false); + mCharacterWidthUnitLabel->setEnabled(false); + mCharacterWidthSlider->setEnabled(false); + mCharacterTypeLabel->setEnabled(false); + mCharacterTypeComboBox->setEnabled(false); + mClearPathButton->setEnabled(false); clearPath(); break; case kConsoleStateHasNavMesh : - mViewTab->setEnabled(TRUE); - mShowLabel->setEnabled(TRUE); - mShowWorldCheckBox->setEnabled(TRUE); + mViewTab->setEnabled(true); + mShowLabel->setEnabled(true); + mShowWorldCheckBox->setEnabled(true); setWorldRenderState(); - mShowNavMeshCheckBox->setEnabled(TRUE); + mShowNavMeshCheckBox->setEnabled(true); setNavMeshRenderState(); - mShowWalkablesCheckBox->setEnabled(TRUE); - mShowStaticObstaclesCheckBox->setEnabled(TRUE); - mShowMaterialVolumesCheckBox->setEnabled(TRUE); - mShowExclusionVolumesCheckBox->setEnabled(TRUE); - mShowRenderWaterPlaneCheckBox->setEnabled(TRUE); - mShowXRayCheckBox->setEnabled(TRUE); - mTestTab->setEnabled(TRUE); - mCtrlClickLabel->setEnabled(TRUE); - mShiftClickLabel->setEnabled(TRUE); - mCharacterWidthLabel->setEnabled(TRUE); - mCharacterWidthUnitLabel->setEnabled(TRUE); - mCharacterWidthSlider->setEnabled(TRUE); - mCharacterTypeLabel->setEnabled(TRUE); - mCharacterTypeComboBox->setEnabled(TRUE); - mClearPathButton->setEnabled(TRUE); + mShowWalkablesCheckBox->setEnabled(true); + mShowStaticObstaclesCheckBox->setEnabled(true); + mShowMaterialVolumesCheckBox->setEnabled(true); + mShowExclusionVolumesCheckBox->setEnabled(true); + mShowRenderWaterPlaneCheckBox->setEnabled(true); + mShowXRayCheckBox->setEnabled(true); + mTestTab->setEnabled(true); + mCtrlClickLabel->setEnabled(true); + mShiftClickLabel->setEnabled(true); + mCharacterWidthLabel->setEnabled(true); + mCharacterWidthUnitLabel->setEnabled(true); + mCharacterWidthSlider->setEnabled(true); + mCharacterTypeLabel->setEnabled(true); + mCharacterTypeComboBox->setEnabled(true); + mClearPathButton->setEnabled(true); break; default : llassert(0); @@ -1078,7 +1078,7 @@ void LLFloaterPathfindingConsole::updatePathTestStatus() } -BOOL LLFloaterPathfindingConsole::isRenderAnyShapes() const +bool LLFloaterPathfindingConsole::isRenderAnyShapes() const { return (isRenderWalkables() || isRenderStaticObstacles() || isRenderMaterialVolumes() || isRenderExclusionVolumes()); diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index bfd267ca10..7d557a73b5 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -61,34 +61,34 @@ public: static LLHandle getInstanceHandle(); - BOOL isRenderNavMesh() const; - void setRenderNavMesh(BOOL pIsRenderNavMesh); + bool isRenderNavMesh() const; + void setRenderNavMesh(bool pIsRenderNavMesh); - BOOL isRenderWalkables() const; - void setRenderWalkables(BOOL pIsRenderWalkables); + bool isRenderWalkables() const; + void setRenderWalkables(bool pIsRenderWalkables); - BOOL isRenderStaticObstacles() const; - void setRenderStaticObstacles(BOOL pIsRenderStaticObstacles); + bool isRenderStaticObstacles() const; + void setRenderStaticObstacles(bool pIsRenderStaticObstacles); - BOOL isRenderMaterialVolumes() const; - void setRenderMaterialVolumes(BOOL pIsRenderMaterialVolumes); + bool isRenderMaterialVolumes() const; + void setRenderMaterialVolumes(bool pIsRenderMaterialVolumes); - BOOL isRenderExclusionVolumes() const; - void setRenderExclusionVolumes(BOOL pIsRenderExclusionVolumes); + bool isRenderExclusionVolumes() const; + void setRenderExclusionVolumes(bool pIsRenderExclusionVolumes); - BOOL isRenderWorld() const; - void setRenderWorld(BOOL pIsRenderWorld); + bool isRenderWorld() const; + void setRenderWorld(bool pIsRenderWorld); - BOOL isRenderWorldMovablesOnly() const; - void setRenderWorldMovablesOnly(BOOL pIsRenderWorldMovablesOnly); + bool isRenderWorldMovablesOnly() const; + void setRenderWorldMovablesOnly(bool pIsRenderWorldMovablesOnly); - BOOL isRenderWaterPlane() const; - void setRenderWaterPlane(BOOL pIsRenderWaterPlane); + bool isRenderWaterPlane() const; + void setRenderWaterPlane(bool pIsRenderWaterPlane); - BOOL isRenderXRay() const; - void setRenderXRay(BOOL pIsRenderXRay); + bool isRenderXRay() const; + void setRenderXRay(bool pIsRenderXRay); - BOOL isRenderAnyShapes() const; + bool isRenderAnyShapes() const; U32 getRenderShapeFlags(); LLPathingLib::LLPLCharacterType getRenderHeatmapType() const; diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index fa423a819a..b33e3d6ea5 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -577,12 +577,12 @@ void LLFloaterPathfindingLinksets::updateStateOnEditFields() void LLFloaterPathfindingLinksets::updateStateOnEditLinksetUse() { - BOOL useWalkable = FALSE; - BOOL useStaticObstacle = FALSE; - BOOL useDynamicObstacle = FALSE; - BOOL useMaterialVolume = FALSE; - BOOL useExclusionVolume = FALSE; - BOOL useDynamicPhantom = FALSE; + bool useWalkable = false; + bool useStaticObstacle = false; + bool useDynamicObstacle = false; + bool useMaterialVolume = false; + bool useExclusionVolume = false; + bool useDynamicPhantom = false; LLPathfindingObjectListPtr selectedObjects = getSelectedObjects(); if ((selectedObjects != NULL) && !selectedObjects->isEmpty()) diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index 84b10a900c..00dbf5b8fb 100644 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -75,7 +75,7 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey) LLFloater::onOpen(pKey); selectNoneObjects(); - mObjectsScrollList->setCommitOnSelectionChange(TRUE); + mObjectsScrollList->setCommitOnSelectionChange(true); if (!mSelectionUpdateSlot.connected()) { @@ -112,7 +112,7 @@ void LLFloaterPathfindingObjects::onClose(bool pIsAppQuitting) mSelectionUpdateSlot.disconnect(); } - mObjectsScrollList->setCommitOnSelectionChange(FALSE); + mObjectsScrollList->setCommitOnSelectionChange(false); selectNoneObjects(); if (mObjectsSelection.notNull()) @@ -494,14 +494,14 @@ void LLFloaterPathfindingObjects::showFloaterWithSelectionObjects() rebuildObjectsScrollList(true); if (isMinimized()) { - setMinimized(FALSE); + setMinimized(false); } setVisibleAndFrontmost(); } - setFocus(TRUE); + setFocus(true); } -BOOL LLFloaterPathfindingObjects::isShowBeacons() const +bool LLFloaterPathfindingObjects::isShowBeacons() const { return mShowBeaconCheckBox->get(); } @@ -788,22 +788,22 @@ void LLFloaterPathfindingObjects::updateStateOnListControls() case kMessagingUnknown: case kMessagingGetRequestSent : case kMessagingSetRequestSent : - mRefreshListButton->setEnabled(FALSE); - mSelectAllButton->setEnabled(FALSE); - mSelectNoneButton->setEnabled(FALSE); + mRefreshListButton->setEnabled(false); + mSelectAllButton->setEnabled(false); + mSelectNoneButton->setEnabled(false); break; case kMessagingGetError : case kMessagingSetError : case kMessagingNotEnabled : - mRefreshListButton->setEnabled(TRUE); - mSelectAllButton->setEnabled(FALSE); - mSelectNoneButton->setEnabled(FALSE); + mRefreshListButton->setEnabled(true); + mSelectAllButton->setEnabled(false); + mSelectNoneButton->setEnabled(false); break; case kMessagingComplete : { int numItems = mObjectsScrollList->getItemCount(); int numSelectedItems = mObjectsScrollList->getNumSelected(); - mRefreshListButton->setEnabled(TRUE); + mRefreshListButton->setEnabled(true); mSelectAllButton->setEnabled(numSelectedItems < numItems); mSelectNoneButton->setEnabled(numSelectedItems > 0); } diff --git a/indra/newview/llfloaterpathfindingobjects.h b/indra/newview/llfloaterpathfindingobjects.h index 15008a5af5..6e744c9fa1 100644 --- a/indra/newview/llfloaterpathfindingobjects.h +++ b/indra/newview/llfloaterpathfindingobjects.h @@ -96,7 +96,7 @@ protected: void showFloaterWithSelectionObjects(); - BOOL isShowBeacons() const; + bool isShowBeacons() const; void clearAllObjects(); void selectAllObjects(); void selectNoneObjects(); diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index a0b7020338..c695f3bcbf 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -108,15 +108,15 @@ private: static void onGive(give_money_ptr info); void give(S32 amount); static void processPayPriceReply(LLMessageSystem* msg, void **userdata); - void finishPayUI(const LLUUID& target_id, BOOL is_group); + void finishPayUI(const LLUUID& target_id, bool is_group); protected: std::vector mCallbackData; money_callback mCallback; LLTextBox* mObjectNameText; LLUUID mTargetUUID; - BOOL mTargetIsGroup; - BOOL mHaveName; + bool mTargetIsGroup; + bool mHaveName; LLButton* mQuickPayButton[MAX_PAY_BUTTONS]; give_money_ptr mQuickPayInfo[MAX_PAY_BUTTONS]; @@ -139,8 +139,8 @@ LLFloaterPay::LLFloaterPay(const LLSD& key) mCallback(NULL), mObjectNameText(NULL), mTargetUUID(key.asUUID()), - mTargetIsGroup(FALSE), - mHaveName(FALSE) + mTargetIsGroup(false), + mHaveName(false) { } @@ -261,25 +261,25 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) if (PAY_PRICE_HIDE == price) { - self->getChildView("amount")->setVisible(FALSE); - self->getChildView("pay btn")->setVisible(FALSE); - self->getChildView("amount text")->setVisible(FALSE); + self->getChildView("amount")->setVisible(false); + self->getChildView("pay btn")->setVisible(false); + self->getChildView("amount text")->setVisible(false); } else if (PAY_PRICE_DEFAULT == price) { - self->getChildView("amount")->setVisible(TRUE); - self->getChildView("pay btn")->setVisible(TRUE); - self->getChildView("amount text")->setVisible(TRUE); + self->getChildView("amount")->setVisible(true); + self->getChildView("pay btn")->setVisible(true); + self->getChildView("amount text")->setVisible(true); } else { // PAY_PRICE_HIDE and PAY_PRICE_DEFAULT are negative values // So we take the absolute value here after we have checked for those cases - self->getChildView("amount")->setVisible(TRUE); - self->getChildView("pay btn")->setVisible(TRUE); - self->getChildView("pay btn")->setEnabled(TRUE); - self->getChildView("amount text")->setVisible(TRUE); + self->getChildView("amount")->setVisible(true); + self->getChildView("pay btn")->setVisible(true); + self->getChildView("pay btn")->setEnabled(true); + self->getChildView("amount text")->setVisible(true); self->getChild("amount")->setValue(llformat("%d", llabs(price))); } @@ -302,7 +302,7 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) self->mQuickPayButton[i]->setLabelSelected(button_str); self->mQuickPayButton[i]->setLabelUnselected(button_str); - self->mQuickPayButton[i]->setVisible(TRUE); + self->mQuickPayButton[i]->setVisible(true); self->mQuickPayInfo[i]->mAmount = pay_button; if ( pay_button > max_pay_amount ) @@ -312,7 +312,7 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) } else { - self->mQuickPayButton[i]->setVisible(FALSE); + self->mQuickPayButton[i]->setVisible(false); } } @@ -365,10 +365,10 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) for (i=num_blocks;imQuickPayButton[i]->setVisible(FALSE); + self->mQuickPayButton[i]->setVisible(false); } - self->reshape( self->getRect().getWidth() + padding_required, self->getRect().getHeight(), FALSE ); + self->reshape( self->getRect().getWidth() + padding_required, self->getRect().getHeight(), false ); } msg->setHandlerFunc("PayPriceReply",NULL,NULL); } @@ -427,16 +427,16 @@ void LLFloaterPay::payDirectly(money_callback callback, floater->setCallback(callback); floater->mObjectSelection = NULL; - floater->getChildView("amount")->setVisible(TRUE); - floater->getChildView("pay btn")->setVisible(TRUE); - floater->getChildView("amount text")->setVisible(TRUE); + floater->getChildView("amount")->setVisible(true); + floater->getChildView("pay btn")->setVisible(true); + floater->getChildView("amount text")->setVisible(true); // FIRE-21803: Prevent cheating IM restriction via pay message floater->getChildView("payment_message")->setEnabled(RlvActions::canSendIM(target_id)); for(S32 i=0;imQuickPayButton[i]->setVisible(TRUE); + floater->mQuickPayButton[i]->setVisible(true); } floater->finishPayUI(target_id, is_group); @@ -459,7 +459,7 @@ bool LLFloaterPay::payConfirmationCallback(const LLSD& notification, const LLSD& return false; } -void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group) +void LLFloaterPay::finishPayUI(const LLUUID& target_id, bool is_group) { std::string slurl; if (is_group) @@ -477,7 +477,7 @@ void LLFloaterPay::finishPayUI(const LLUUID& target_id, BOOL is_group) // Make sure the amount field has focus LLLineEditor* amount = getChild("amount"); - amount->setFocus(TRUE); + amount->setFocus(true); amount->selectAll(); mTargetIsGroup = is_group; @@ -612,7 +612,7 @@ void LLFloaterPay::give(S32 amount) } S32 tx_type = TRANS_PAY_OBJECT; if(dest_object->isAvatar()) tx_type = TRANS_GIFT; - mCallback(mTargetUUID, region, amount, FALSE, tx_type, object_name); + mCallback(mTargetUUID, region, amount, false, tx_type, object_name); mObjectSelection = NULL; // request the object owner in order to check if the owner needs to be unmuted diff --git a/indra/newview/llfloaterpay.h b/indra/newview/llfloaterpay.h index f322e5ef04..84aa2b87c2 100644 --- a/indra/newview/llfloaterpay.h +++ b/indra/newview/llfloaterpay.h @@ -32,7 +32,7 @@ class LLObjectSelection; class LLUUID; class LLViewerRegion; -typedef void (*money_callback)(const LLUUID&, LLViewerRegion*,S32,BOOL,S32,const std::string&); +typedef void (*money_callback)(const LLUUID&, LLViewerRegion*,S32,bool,S32,const std::string&); namespace LLFloaterPayUtil { diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp index cb1c10090b..6b93ab2b49 100644 --- a/indra/newview/llfloaterperformance.cpp +++ b/indra/newview/llfloaterperformance.cpp @@ -152,7 +152,7 @@ bool LLFloaterPerformance::postBuild() mStartAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::startAutotune, this)); mStopAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::stopAutotune, this)); - gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", FALSE, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS); + gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", false, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS); return true; } @@ -160,8 +160,8 @@ bool LLFloaterPerformance::postBuild() void LLFloaterPerformance::showSelectedPanel(LLPanel* selected_panel) { hidePanels(); - mMainPanel->setVisible(FALSE); - selected_panel->setVisible(TRUE); + mMainPanel->setVisible(false); + selected_panel->setVisible(true); if (mHUDsPanel == selected_panel) { @@ -214,16 +214,16 @@ void LLFloaterPerformance::draw() void LLFloaterPerformance::showMainPanel() { hidePanels(); - mMainPanel->setVisible(TRUE); + mMainPanel->setVisible(true); } void LLFloaterPerformance::hidePanels() { - mNearbyPanel->setVisible(FALSE); - mComplexityPanel->setVisible(FALSE); - mHUDsPanel->setVisible(FALSE); - mSettingsPanel->setVisible(FALSE); - mAutoadjustmentsPanel->setVisible(FALSE); + mNearbyPanel->setVisible(false); + mComplexityPanel->setVisible(false); + mHUDsPanel->setVisible(false); + mSettingsPanel->setVisible(false); + mAutoadjustmentsPanel->setVisible(false); } void LLFloaterPerformance::initBackBtn(LLPanel* panel) @@ -321,7 +321,7 @@ void LLFloaterPerformance::populateHUDList() } } } - mHUDList->sortByColumnIndex(1, FALSE); + mHUDList->sortByColumnIndex(1, false); mHUDList->setScrollPos(prev_pos); mHUDList->selectItemBySpecialId(prev_selected_id); } @@ -413,7 +413,7 @@ void LLFloaterPerformance::populateObjectList() } } } - mObjectList->sortByColumnIndex(1, FALSE); + mObjectList->sortByColumnIndex(1, false); mObjectList->setScrollPos(prev_pos); mObjectList->selectItemBySpecialId(prev_selected_id); } @@ -503,7 +503,7 @@ void LLFloaterPerformance::populateNearbyList() } char_iter++; } - mNearbyList->sortByColumnIndex(1, FALSE); + mNearbyList->sortByColumnIndex(1, false); mNearbyList->setScrollPos(prev_pos); mNearbyList->selectByID(prev_selected_id); } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 0ae5c9d415..7917d6ea71 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -278,7 +278,7 @@ bool callback_clear_web_browser_cache(const LLSD& notification, const LLSD& resp S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if ( option == 0 ) // YES { - gSavedSettings.setBOOL("FSStartupClearBrowserCache", TRUE); + gSavedSettings.setBOOL("FSStartupClearBrowserCache", true); } return false; @@ -672,14 +672,14 @@ bool LLFloaterPreference::postBuild() if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); - getChild("cache_location")->setEnabled(FALSE); // make it read-only but selectable (STORM-227) - // getChildView("log_path_string")->setEnabled(FALSE);// do the same for chat logs path - Field removed from Privacy tab, we have it already in Network & Files tab along with few fancy buttons (03 Mar 2015) - getChildView("log_path_string-panelsetup")->setEnabled(FALSE);// and the redundant instance -WoLf + getChild("cache_location")->setEnabled(false); // make it read-only but selectable (STORM-227) + // getChildView("log_path_string")->setEnabled(false);// do the same for chat logs path - Field removed from Privacy tab, we have it already in Network & Files tab along with few fancy buttons (03 Mar 2015) + getChildView("log_path_string-panelsetup")->setEnabled(false);// and the redundant instance -WoLf std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); setCacheLocation(cache_location); // Sound cache setSoundCacheLocation(gSavedSettings.getString("FSSoundCacheLocation")); - getChild("FSSoundCacheLocation")->setEnabled(FALSE); + getChild("FSSoundCacheLocation")->setEnabled(false); // getChild("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); @@ -892,7 +892,7 @@ void LLFloaterPreference::updateDeleteTranscriptsButton() void LLFloaterPreference::onDoNotDisturbResponseChanged() { - // set "DoNotDisturbResponseChanged" TRUE if user edited message differs from default, FALSE otherwise + // set "DoNotDisturbResponseChanged" true if user edited message differs from default, false otherwise bool response_changed_flag = LLTrans::getString("DoNotDisturbModeResponseDefault") != getChild("do_not_disturb_response")->getValue().asString(); @@ -947,7 +947,7 @@ LLFloaterPreference::~LLFloaterPreference() // FIRE-19539 - Include the alert messages in Prefs>Notifications>Alerts in preference Search. // void LLFloaterPreference::draw() // { -// BOOL has_first_selected = (getChildRef("disabled_popups").getFirstSelected()!=NULL); +// bool has_first_selected = (getChildRef("disabled_popups").getFirstSelected()!=NULL); // gSavedSettings.setBOOL("FirstSelectedDisabledPopups", has_first_selected); // // has_first_selected = (getChildRef("enabled_popups").getFirstSelected()!=NULL); @@ -1007,7 +1007,7 @@ void LLFloaterPreference::apply() //LLViewerMedia::getInstance()->setCookiesEnabled(getChild("cookies_enabled")->getValue()); - if (hasChild("web_proxy_enabled", TRUE) &&hasChild("web_proxy_editor", TRUE) && hasChild("web_proxy_port", TRUE)) + if (hasChild("web_proxy_enabled", true) &&hasChild("web_proxy_editor", true) && hasChild("web_proxy_port", true)) { bool proxy_enable = getChild("web_proxy_enabled")->getValue(); std::string proxy_address = getChild("web_proxy_editor")->getValue(); @@ -1111,7 +1111,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) { // this variable and if that follows it are used to properly handle do not disturb mode response message - static bool initialized = FALSE; + static bool initialized = false; // if user is logged in and we haven't initialized do not disturb mode response yet, do it if (!initialized && LLStartUp::getStartupState() == STATE_STARTED) { @@ -1120,8 +1120,8 @@ void LLFloaterPreference::onOpen(const LLSD& key) // To keep track of whether do not disturb response is default or changed by user additional setting DoNotDisturbResponseChanged // was added into per account settings. - // initialization should happen once,so setting variable to TRUE - initialized = TRUE; + // initialization should happen once,so setting variable to true + initialized = true; // this connection is needed to properly set "DoNotDisturbResponseChanged" setting when user makes changes in // do not disturb response message. gSavedPerAccountSettings.getControl("DoNotDisturbModeResponse")->getSignal()->connect(boost::bind(&LLFloaterPreference::onDoNotDisturbResponseChanged, this)); @@ -1135,7 +1135,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) // // FIRE-17630: Properly disable per-account settings backup list - getChildView("restore_per_account_disable_cover")->setVisible(FALSE); + getChildView("restore_per_account_disable_cover")->setVisible(false); // Keyword settings are per-account; enable after logging in LLPanel* keyword_panel = getChild("ChatKeywordAlerts"); @@ -1144,7 +1144,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) { LLUICtrl* child = static_cast(*iter); LLControlVariable* enabled_control = child->getEnabledControlVariable(); - BOOL enabled = !enabled_control || enabled_control->getValue().asBoolean(); + bool enabled = !enabled_control || enabled_control->getValue().asBoolean(); child->setEnabled(enabled); } // @@ -1228,7 +1228,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) refresh(); - getChildView("plain_text_chat_history")->setEnabled(TRUE); + getChildView("plain_text_chat_history")->setEnabled(true); getChild("plain_text_chat_history")->setValue(gSavedSettings.getBOOL("PlainTextChatHistory")); // Show/hide Client Tag panel @@ -1583,16 +1583,16 @@ void LLFloaterPreference::onBtnOK(const LLSD& userdata) } LLUIColorTable::instance().saveUserSettings(); - gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); + gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), true); // [SL:KB] - Patch: Viewer-CrashReporting | Checked: 2011-10-02 (Catznip-2.8.0e) | Added: Catznip-2.8.0e // We need to save all crash settings, even if they're defaults [see LLCrashLogger::loadCrashBehaviorSetting()] - gCrashSettings.saveToFile(gSavedSettings.getString("CrashSettingsFile"), FALSE); + gCrashSettings.saveToFile(gSavedSettings.getString("CrashSettingsFile"), false); // [/SL:KB] //Only save once logged in and loaded per account settings if(mGotPersonalInfo) { - gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); + gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), true); } } else @@ -1849,7 +1849,7 @@ public: bool tick() { - gSavedSettings.setBOOL("EnableVoiceChat", TRUE); + gSavedSettings.setBOOL("EnableVoiceChat", true); LLFloaterPreference* floater = LLFloaterReg::findTypedInstance("preferences"); if (floater) { @@ -1864,7 +1864,7 @@ void LLFloaterPreference::onClickResetVoice() { if (gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice")) { - gSavedSettings.setBOOL("EnableVoiceChat", FALSE); + gSavedSettings.setBOOL("EnableVoiceChat", false); childSetEnabled("enable_voice_check", false); childSetEnabled("enable_voice_check_volume", false); new FSResetVoiceTimer(); @@ -1952,7 +1952,7 @@ void LLFloaterPreference::changeExternalEditorPath(const std::vectorisFeatureAvailable("RenderCompressTextures")) { - getChildView("texture compression")->setEnabled(FALSE); + getChildView("texture compression")->setEnabled(false); } // anti-aliasing @@ -2182,28 +2182,28 @@ void LLFloaterPreference::refreshEnabledState() if (gPipeline.canUseAntiAliasing()) { - fsaa_ctrl->setEnabled(TRUE); + fsaa_ctrl->setEnabled(true); } else { - fsaa_ctrl->setEnabled(FALSE); + fsaa_ctrl->setEnabled(false); fsaa_ctrl->setValue((LLSD::Integer) 0); } if (!LLFeatureManager::instance().isFeatureAvailable("RenderFSAASamples")) { - fsaa_ctrl->setEnabled(FALSE); + fsaa_ctrl->setEnabled(false); } // WindLight LLSliderCtrl* sky = getChild("SkyMeshDetail"); - sky->setEnabled(TRUE); + sky->setEnabled(true); LLCheckBoxCtrl* ctrl_ssao = getChild("UseSSAO"); LLCheckBoxCtrl* ctrl_dof = getChild("UseDoF"); LLComboBox* ctrl_shadow = getChild("ShadowDetail"); - BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO"); + bool enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO"); ctrl_ssao->setEnabled(enabled); ctrl_dof->setEnabled(enabled); @@ -2212,10 +2212,10 @@ void LLFloaterPreference::refreshEnabledState() ctrl_shadow->setEnabled(enabled); - enabled = FALSE; + enabled = false; if (!LLFeatureManager::instance().isFeatureAvailable("RenderReflectionsEnabled")) { - // getChildView("ReflectionsEnabled")->setEnabled(FALSE); + // getChildView("ReflectionsEnabled")->setEnabled(false); } else { @@ -2302,14 +2302,14 @@ void LLFloaterPreference::disableUnavailableSettings() // disabled deferred SSAO if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO")) { - ctrl_ssao->setEnabled(FALSE); - ctrl_ssao->setValue(FALSE); + ctrl_ssao->setEnabled(false); + ctrl_ssao->setValue(false); } // disabled deferred shadows if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail")) { - ctrl_shadows->setEnabled(FALSE); + ctrl_shadows->setEnabled(false); ctrl_shadows->setValue(0); } } @@ -2380,7 +2380,7 @@ void LLFloaterPreference::onClickPreviewUISound(const LLSD& ui_sound_id) // for (itor = items.begin(); itor != items.end(); ++itor) // { // LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate(*(std::string*)((*itor)->getUserdata())); -// //gSavedSettings.setWarning(templatep->mName, TRUE); +// //gSavedSettings.setWarning(templatep->mName, true); // std::string notification_name = templatep->mName; // LLUI::getInstance()->mSettingGroups["ignores"]->setBOOL(notification_name, true); // } @@ -2459,7 +2459,7 @@ void LLFloaterPreference::changeLogPath(const std::vector& filename updateDeleteTranscriptsButton(); } //[FIX FIRE-2765 : SJ] Enable Reset button when own Chatlogdirectory is set - getChildView("reset_logpath")->setEnabled(TRUE); + getChildView("reset_logpath")->setEnabled(true); } //[FIX FIRE-2765 : SJ] Making sure Reset button resets the chatlogdirectory to the default setting @@ -2475,7 +2475,7 @@ void LLFloaterPreference::onClickResetLogPath() // enable/disable 'Delete transcripts button updateDeleteTranscriptsButton(); - getChildView("reset_logpath")->setEnabled(FALSE); + getChildView("reset_logpath")->setEnabled(false); // } @@ -2556,37 +2556,37 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im if (visibility == VISIBILITY_DEFAULT) { mOriginalHideOnlineStatus = false; - getChildView("online_visibility")->setEnabled(TRUE); + getChildView("online_visibility")->setEnabled(true); } else if (visibility == VISIBILITY_HIDDEN) { mOriginalHideOnlineStatus = true; - getChildView("online_visibility")->setEnabled(TRUE); + getChildView("online_visibility")->setEnabled(true); } else { mOriginalHideOnlineStatus = true; } - getChild("online_searchresults")->setEnabled(TRUE); - getChildView("friends_online_notify_checkbox")->setEnabled(TRUE); + getChild("online_searchresults")->setEnabled(true); + getChildView("friends_online_notify_checkbox")->setEnabled(true); getChild("online_visibility")->setValue(mOriginalHideOnlineStatus); getChild("online_visibility")->setLabelArg("[DIR_VIS]", mDirectoryVisibility); - getChildView("favorites_on_login_check")->setEnabled(TRUE); - //getChildView("log_path_button")->setEnabled(TRUE); // Does not exist as of 12-09-2014 - getChildView("chat_font_size")->setEnabled(TRUE); - //getChildView("open_log_path_button")->setEnabled(TRUE); // Does not exist as of 12-09-2014 - getChildView("log_path_button-panelsetup")->setEnabled(TRUE);// second set of controls for panel_preferences_setup -WoLf - getChildView("open_log_path_button-panelsetup")->setEnabled(TRUE); + getChildView("favorites_on_login_check")->setEnabled(true); + //getChildView("log_path_button")->setEnabled(true); // Does not exist as of 12-09-2014 + getChildView("chat_font_size")->setEnabled(true); + //getChildView("open_log_path_button")->setEnabled(true); // Does not exist as of 12-09-2014 + getChildView("log_path_button-panelsetup")->setEnabled(true);// second set of controls for panel_preferences_setup -WoLf + getChildView("open_log_path_button-panelsetup")->setEnabled(true); std::string Chatlogsdir = gDirUtilp->getOSUserAppDir(); - getChildView("conversation_log_combo")->setEnabled(TRUE); // - getChildView("LogNearbyChat")->setEnabled(TRUE); // - //getChildView("log_nearby_chat")->setEnabled(TRUE); // Does not exist as of 12-09-2014 + getChildView("conversation_log_combo")->setEnabled(true); // + getChildView("LogNearbyChat")->setEnabled(true); // + //getChildView("log_nearby_chat")->setEnabled(true); // Does not exist as of 12-09-2014 //[FIX FIRE-2765 : SJ] Set Chatlog Reset Button on enabled when Chatlogpath isn't the default folder if (gSavedPerAccountSettings.getString("InstantMessageLogPath") != gDirUtilp->getOSUserAppDir()) { - getChildView("reset_logpath")->setEnabled(TRUE); + getChildView("reset_logpath")->setEnabled(true); } // Keep this for OpenSim if (LLGridManager::instance().isInSecondLife()) @@ -2604,8 +2604,8 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im } LLCheckBoxCtrl* send_im_to_email = getChild("send_im_to_email"); - send_im_to_email->setVisible(TRUE); - send_im_to_email->setEnabled(TRUE); + send_im_to_email->setVisible(true); + send_im_to_email->setEnabled(true); send_im_to_email->setValue(im_via_email); send_im_to_email->setLabelArg("[EMAIL]", display_email); } @@ -2613,21 +2613,21 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im // // FIRE-420: Show end of last conversation in history - getChildView("LogShowHistory")->setEnabled(TRUE); + getChildView("LogShowHistory")->setEnabled(true); // Clear inventory cache button - getChildView("ClearInventoryCache")->setEnabled(TRUE); + getChildView("ClearInventoryCache")->setEnabled(true); // FIRE-18250: Option to disable default eye movement - getChildView("FSStaticEyes")->setEnabled(TRUE); + getChildView("FSStaticEyes")->setEnabled(true); // FIRE-22564: Route llOwnerSay to scipt debug window - getChildView("FSllOwnerSayToScriptDebugWindow_checkbox")->setEnabled(TRUE); + getChildView("FSllOwnerSayToScriptDebugWindow_checkbox")->setEnabled(true); // Clear Cache button actually clears per-account cache items - getChildView("clear_webcache")->setEnabled(TRUE); + getChildView("clear_webcache")->setEnabled(true); - getChild("voice_call_friends_only_check")->setEnabled(TRUE); + getChild("voice_call_friends_only_check")->setEnabled(true); getChild("voice_call_friends_only_check")->setValue(gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly")); } @@ -2913,8 +2913,8 @@ void LLFloaterPreference::onClickBlockList() // Optional standalone blocklist floater //LLFloaterSidePanelContainer::showPanel("people", "panel_people", // LLSD().with("people_panel_tab_name", "blocked_panel")); - BOOL saved_setting = gSavedSettings.getBOOL("FSDisableBlockListAutoOpen"); - gSavedSettings.setBOOL("FSDisableBlockListAutoOpen", FALSE); + bool saved_setting = gSavedSettings.getBOOL("FSDisableBlockListAutoOpen"); + gSavedSettings.setBOOL("FSDisableBlockListAutoOpen", false); LLPanelBlockedList::showPanelAndSelect(); gSavedSettings.setBOOL("FSDisableBlockListAutoOpen", saved_setting); // @@ -2984,9 +2984,9 @@ void LLFloaterPreference::onAtmosShaderChange() if(ctrl_alm) { //Deferred/SSAO/Shadows - BOOL bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump"); - BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders"); - BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + bool bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump"); + bool shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders"); + bool enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && bumpshiny && shaders; @@ -3048,11 +3048,11 @@ void LLFloaterPreference::updateUISoundsControls() earPosGroup->setIndexEnabled(hearNearbyVoiceFullVolume, LLGridManager::instance().isInOpenSim()); } // - getChild("textFSRestartOpenSim")->setVisible(TRUE); - getChild("UISndRestartOpenSim")->setVisible(TRUE); - getChild("Prev_UISndRestartOpenSim")->setVisible(TRUE); - getChild("Def_UISndRestartOpenSim")->setVisible(TRUE); - getChild("PlayModeUISndRestartOpenSim")->setVisible(TRUE); + getChild("textFSRestartOpenSim")->setVisible(true); + getChild("UISndRestartOpenSim")->setVisible(true); + getChild("Prev_UISndRestartOpenSim")->setVisible(true); + getChild("Def_UISndRestartOpenSim")->setVisible(true); + getChild("PlayModeUISndRestartOpenSim")->setVisible(true); #endif getChild("UseLSLFlightAssist")->setValue((int)gSavedPerAccountSettings.getF32("UseLSLFlightAssist")); // Flight Assist combo box; Not sound-related, but better to place it here instead of creating whole new void @@ -3307,14 +3307,14 @@ LLPanelPreference::LLPanelPreference() bool LLPanelPreference::postBuild() { ////////////////////// PanelGeneral /////////////////// - if (hasChild("display_names_check", TRUE)) + if (hasChild("display_names_check", true)) { - BOOL use_people_api = gSavedSettings.getBOOL("UsePeopleAPI"); + bool use_people_api = gSavedSettings.getBOOL("UsePeopleAPI"); LLCheckBoxCtrl* ctrl_display_name = getChild("display_names_check"); ctrl_display_name->setEnabled(use_people_api); if (!use_people_api) { - ctrl_display_name->setValue(FALSE); + ctrl_display_name->setValue(false); } } @@ -3329,7 +3329,7 @@ bool LLPanelPreference::postBuild() // // Flash chat toolbar button notification - if (hasChild("FSNotifyIMFlash", TRUE)) + if (hasChild("FSNotifyIMFlash", true)) { gSavedSettings.getControl("FSChatWindow")->getSignal()->connect(boost::bind(&LLPanelPreference::onChatWindowChanged, this)); onChatWindowChanged(); @@ -3337,7 +3337,7 @@ bool LLPanelPreference::postBuild() // // Exodus' mouselook combat feature - if (hasChild("FSMouselookCombatFeatures", TRUE)) + if (hasChild("FSMouselookCombatFeatures", true)) { gSavedSettings.getControl("EnableMouselook")->getSignal()->connect(boost::bind(&LLPanelPreference::updateMouselookCombatFeatures, this)); gSavedSettings.getControl("FSMouselookCombatFeatures")->getSignal()->connect(boost::bind(&LLPanelPreference::updateMouselookCombatFeatures, this)); @@ -3347,9 +3347,9 @@ bool LLPanelPreference::postBuild() ////////////////////// PanelVoice /////////////////// // Doesn't exist as of 25-07-2014 - //if (hasChild("voice_unavailable", TRUE)) + //if (hasChild("voice_unavailable", true)) //{ - // BOOL voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice"); + // bool voice_disabled = gSavedSettings.getBOOL("CmdLineDisableVoice"); // getChildView("voice_unavailable")->setVisible( voice_disabled); // getChildView("enable_voice_check")->setVisible( !voice_disabled); //} @@ -3358,7 +3358,7 @@ bool LLPanelPreference::postBuild() //////////////////////PanelSkins /////////////////// /* Handled below - if (hasChild("skin_selection", TRUE)) + if (hasChild("skin_selection", true)) { LLFloaterPreference::refreshSkin(this); @@ -3373,14 +3373,14 @@ bool LLPanelPreference::postBuild() */ //////////////////////PanelPrivacy /////////////////// - if (hasChild("media_enabled", TRUE)) + if (hasChild("media_enabled", true)) { bool media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); getChild("media_enabled")->set(media_enabled); getChild("autoplay_enabled")->setEnabled(media_enabled); } - if (hasChild("music_enabled", TRUE)) + if (hasChild("music_enabled", true)) { getChild("music_enabled")->set(gSavedSettings.getBOOL("AudioStreamingMusic")); } @@ -3388,17 +3388,17 @@ bool LLPanelPreference::postBuild() { getChild("media_filter")->set(gSavedSettings.getBOOL("MediaEnableFilter")); } - if (hasChild("voice_call_friends_only_check", TRUE)) + if (hasChild("voice_call_friends_only_check", true)) { getChild("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2)); } // Disable running multiple viewers warning - //if (hasChild("allow_multiple_viewer_check", TRUE)) + //if (hasChild("allow_multiple_viewer_check", true)) //{ // getChild("allow_multiple_viewer_check")->setCommitCallback(boost::bind(&showMultipleViewersWarning, _1, _2)); //} // - if (hasChild("favorites_on_login_check", TRUE)) + if (hasChild("favorites_on_login_check", true)) { getChild("favorites_on_login_check")->setCommitCallback(boost::bind(&handleFavoritesOnLoginChanged, _1, _2)); // [FS Login Panel] @@ -3407,7 +3407,7 @@ bool LLPanelPreference::postBuild() // [FS Login Panel] getChild("favorites_on_login_check")->setValue(show_favorites_at_login); } - if (hasChild("mute_chb_label", TRUE)) + if (hasChild("mute_chb_label", true)) { getChild("mute_chb_label")->setShowCursorHand(false); getChild("mute_chb_label")->setSoundFlags(LLView::MOUSE_UP); @@ -3423,7 +3423,7 @@ bool LLPanelPreference::postBuild() //////////////////////PanelSetup /////////////////// // FIRE-6340, FIRE-6567 - Setting Bandwidth issues - //if (hasChild("max_bandwidth", TRUE)) + //if (hasChild("max_bandwidth", true)) //{ // mBandWidthUpdater = new LLPanelPreference::Updater(boost::bind(&handleBandwidthChanged, _1), BANDWIDTH_UPDATER_TIMEOUT); // gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&LLPanelPreference::Updater::update, mBandWidthUpdater, _2)); @@ -3441,15 +3441,15 @@ bool LLPanelPreference::postBuild() #endif ////////////////////// PanelAlerts /////////////////// - if (hasChild("OnlineOfflinetoNearbyChat", TRUE)) + if (hasChild("OnlineOfflinetoNearbyChat", true)) { getChildView("OnlineOfflinetoNearbyChatHistory")->setEnabled(getChild("OnlineOfflinetoNearbyChat")->getValue().asBoolean()); } // Only enable Growl checkboxes if Growl is usable - if (hasChild("notify_growl_checkbox", TRUE)) + if (hasChild("notify_growl_checkbox", true)) { - BOOL growl_enabled = gSavedSettings.getBOOL("FSEnableGrowl") && GrowlManager::isUsable(); + bool growl_enabled = gSavedSettings.getBOOL("FSEnableGrowl") && GrowlManager::isUsable(); getChild("notify_growl_checkbox")->setCommitCallback(boost::bind(&LLPanelPreference::onEnableGrowlChanged, this)); getChild("notify_growl_checkbox")->setEnabled(GrowlManager::isUsable()); getChild("notify_growl_always_checkbox")->setEnabled(growl_enabled); @@ -3459,7 +3459,7 @@ bool LLPanelPreference::postBuild() ////////////////////// PanelUI /////////////////// // Customizable contact list columns - if (hasChild("textFriendlistColumns", TRUE)) + if (hasChild("textFriendlistColumns", true)) { onCheckContactListColumnMode(); } @@ -3589,7 +3589,7 @@ void LLPanelPreference::toggleMuteWhenMinimized() // Only enable Growl checkboxes if Growl is usable void LLPanelPreference::onEnableGrowlChanged() { - BOOL growl_enabled = gSavedSettings.getBOOL("FSEnableGrowl") && GrowlManager::isUsable(); + bool growl_enabled = gSavedSettings.getBOOL("FSEnableGrowl") && GrowlManager::isUsable(); getChild("notify_growl_always_checkbox")->setEnabled(growl_enabled); getChild("FSFilterGrowlKeywordDuplicateIMs")->setEnabled(growl_enabled); } @@ -3687,7 +3687,7 @@ void LLPanelPreference::setControlFalse(const LLSD& user_data) LLControlVariable* control = findControl(control_name); if (control) - control->set(LLSD(FALSE)); + control->set(LLSD(false)); } */ @@ -3830,7 +3830,7 @@ private: // DebugLookAt checkbox status not working properly void onChangeDebugLookAt() { - getChild("showlookat")->set(gSavedPerAccountSettings.getS32("DebugLookAt") == 0 ? FALSE : TRUE); + getChild("showlookat")->set(gSavedPerAccountSettings.getS32("DebugLookAt") == 0 ? false : true); } void onClickDebugLookAt(const LLSD& value) @@ -3883,7 +3883,7 @@ bool LLPanelPreferenceGraphics::postBuild() } LLCheckBoxCtrl *use_HiDPI = getChild("use HiDPI"); - use_HiDPI->setEnabled(FALSE); + use_HiDPI->setEnabled(false); #endif // @@ -3897,7 +3897,7 @@ bool LLPanelPreferenceGraphics::postBuild() // Hide this until we have fullscreen mode functional on OSX again #ifdef LL_DARWIN - getChild("Fullscreen Mode")->setVisible(FALSE); + getChild("Fullscreen Mode")->setVisible(false); #endif // LL_DARWIN // @@ -4429,7 +4429,7 @@ void LLPanelPreferenceControls::onListCommit() if (root_floater) root_floater->addDependentFloater(dialog); dialog->openFloater(); - dialog->setFocus(TRUE); + dialog->setFocus(true); } } else @@ -4867,9 +4867,9 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings() // Check for invalid states for the other HTTP proxy radio LLRadioGroup* otherHttpProxy = getChild("other_http_proxy_type"); if ((otherHttpProxy->getSelectedValue().asString() == "Socks" && - getChild("socks_proxy_enabled")->get() == FALSE )||( + getChild("socks_proxy_enabled")->get() == false )||( otherHttpProxy->getSelectedValue().asString() == "Web" && - getChild("web_proxy_enabled")->get() == FALSE ) ) + getChild("web_proxy_enabled")->get() == false ) ) { otherHttpProxy->selectFirstItem(); } @@ -5501,12 +5501,12 @@ void FSPanelPreferenceBackup::doBackupSettings(const LLSD& notification, const L LL_INFOS("SettingsBackup") << "saving UI color table" << LL_ENDL; LLUIColorTable::instance().saveUserSettings(); - // set it to save defaults, too (FALSE), because our declaration automatically + // set it to save defaults, too (false), because our declaration automatically // makes the value default std::string backup_global_name = gDirUtilp->getExpandedFilename(LL_PATH_NONE, dir_name, LLAppViewer::instance()->getSettingsFilename("Default","Global")); LL_INFOS("SettingsBackup") << "saving backup global settings" << LL_ENDL; - backup_global_controls.saveToFile(backup_global_name, FALSE); + backup_global_controls.saveToFile(backup_global_name, false); // Get scroll list control that holds the list of global files LLScrollListCtrl* globalScrollList = getChild("restore_global_files_list"); @@ -5551,9 +5551,9 @@ void FSPanelPreferenceBackup::doBackupSettings(const LLSD& notification, const L // run backup on per-account controls LL_INFOS("SettingsBackup") << "running functor on per account settings" << LL_ENDL; gSavedPerAccountSettings.applyToAll(&func_per_account); - // save defaults here as well (FALSE) + // save defaults here as well (false) LL_INFOS("SettingsBackup") << "saving backup per account settings" << LL_ENDL; - backup_per_account_controls.saveToFile(backup_per_account_name, FALSE); + backup_per_account_controls.saveToFile(backup_per_account_name, false); // Get scroll list control that holds the list of per account files LLScrollListCtrl* perAccountScrollList = getChild("restore_per_account_files_list"); @@ -5736,7 +5736,7 @@ void FSPanelPreferenceBackup:: doRestoreSettings(const LLSD& notification, const LL_INFOS("SettingsBackup") << "restoring global settings from backup" << LL_ENDL; gSavedSettings.loadFromFile(backup_global_name); LL_INFOS("SettingsBackup") << "saving global settings" << LL_ENDL; - gSavedSettings.saveToFile(global_name, TRUE); + gSavedSettings.saveToFile(global_name, true); } // Get scroll list control that holds the list of global files @@ -5781,7 +5781,7 @@ void FSPanelPreferenceBackup:: doRestoreSettings(const LLSD& notification, const LL_INFOS("SettingsBackup") << "restoring per account settings" << LL_ENDL; gSavedPerAccountSettings.loadFromFile(backup_per_account_name); LL_INFOS("SettingsBackup") << "saving per account settings" << LL_ENDL; - gSavedPerAccountSettings.saveToFile(per_account_name, TRUE); + gSavedPerAccountSettings.saveToFile(per_account_name, true); } // Get scroll list control that holds the list of per account files @@ -5814,7 +5814,7 @@ void FSPanelPreferenceBackup:: doRestoreSettings(const LLSD& notification, const LL_INFOS("SettingsBackup") << "clearing toolbars" << LL_ENDL; gToolBarView->clearToolbars(); LL_INFOS("SettingsBackup") << "reloading toolbars" << LL_ENDL; - gToolBarView->loadToolbars(FALSE); + gToolBarView->loadToolbars(false); #ifdef OPENSIM if (LLGridManager::instance().isInOpenSim()) { @@ -5917,7 +5917,7 @@ void FSPanelPreferenceBackup:: doRestoreSettings(const LLSD& notification, const } } // Set this true so we can update newer settings with their deprecated counterparts on next launch - gSavedSettings.setBOOL("FSFirstRunAfterSettingsRestore", TRUE); + gSavedSettings.setBOOL("FSFirstRunAfterSettingsRestore", true); // Tell the user we have finished restoring settings and the viewer must shut down LLNotificationsUtil::add("RestoreFinished", LLSD(), LLSD(), boost::bind(&FSPanelPreferenceBackup::onQuitConfirmed, this, _1, _2)); @@ -5927,7 +5927,7 @@ void FSPanelPreferenceBackup:: doRestoreSettings(const LLSD& notification, const void FSPanelPreferenceBackup::onQuitConfirmed(const LLSD& notification,const LLSD& response) { // Make sure the viewer will not save any settings on exit, so our copied files will survive - LLAppViewer::instance()->setSaveSettingsOnExit(FALSE); + LLAppViewer::instance()->setSaveSettingsOnExit(false); // Quit the viewer so all gets saved immediately LL_INFOS("SettingsBackup") << "setting to quit" << LL_ENDL; LLAppViewer::instance()->requestQuit(); @@ -5935,15 +5935,15 @@ void FSPanelPreferenceBackup::onQuitConfirmed(const LLSD& notification,const LLS void FSPanelPreferenceBackup::onClickSelectAll() { - doSelect(TRUE); + doSelect(true); } void FSPanelPreferenceBackup::onClickDeselectAll() { - doSelect(FALSE); + doSelect(false); } -void FSPanelPreferenceBackup::doSelect(BOOL all) +void FSPanelPreferenceBackup::doSelect(bool all) { // Get scroll list control that holds the list of global files LLScrollListCtrl* globalScrollList = getChild("restore_global_files_list"); @@ -5957,7 +5957,7 @@ void FSPanelPreferenceBackup::doSelect(BOOL all) applySelection(globalFoldersScrollList, all); } -void FSPanelPreferenceBackup::applySelection(LLScrollListCtrl* control, BOOL all) +void FSPanelPreferenceBackup::applySelection(LLScrollListCtrl* control, bool all) { // Pull out all data std::vector itemList = control->getAllData(); @@ -6123,7 +6123,7 @@ void LLPanelPreferenceOpensim::onClickAddGrid() if (!new_grid.empty()) { - getChild("grid_management_panel")->setEnabled(FALSE); + getChild("grid_management_panel")->setEnabled(false); if (mGridAddedCallbackConnection.connected()) { mGridAddedCallbackConnection.disconnect(); @@ -6216,7 +6216,7 @@ void LLPanelPreferenceOpensim::refreshGridList(bool success) { FSPanelLogin::updateServer(); - getChild("grid_management_panel")->setEnabled(TRUE); + getChild("grid_management_panel")->setEnabled(true); if (!mGridListControl) { diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 469aa4fe61..7d95697dbf 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -174,7 +174,7 @@ protected: // Correct enabled state of Animated Script Dialogs option void updateAnimatedScriptDialogs(); - // Group Notices and chiclets location setting conversion BOOL => S32 + // Group Notices and chiclets location setting conversion bool => S32 void onShowGroupNoticesTopRightChanged(); public: @@ -563,8 +563,8 @@ protected: void onClickBackupSettings(); void onClickRestoreSettings(); - void doSelect(BOOL all); // calls applySelection for each list - void applySelection(LLScrollListCtrl* control, BOOL all); // selects or deselects all items in a scroll list + void doSelect(bool all); // calls applySelection for each list + void applySelection(LLScrollListCtrl* control, bool all); // selects or deselects all items in a scroll list void doBackupSettings(const LLSD& notification, const LLSD& response); // callback for backup dialog void doRestoreSettings(const LLSD& notification, const LLSD& response); // callback for restore dialog void onQuitConfirmed(const LLSD& notification, const LLSD& response); // callback for finished restore dialog diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp index 5bdebbd24b..cfd6bdec57 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp @@ -76,7 +76,7 @@ bool LLFloaterPreferenceGraphicsAdvanced::postBuild() } LLCheckBoxCtrl *use_HiDPI = getChild("use HiDPI"); - use_HiDPI->setVisible(FALSE); + use_HiDPI->setVisible(false); #endif mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateComplexityText, this)); @@ -256,96 +256,96 @@ void LLFloaterPreferenceGraphicsAdvanced::disableUnavailableSettings() // disabled windlight if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")) { - ctrl_wind_light->setEnabled(FALSE); - ctrl_wind_light->setValue(FALSE); + ctrl_wind_light->setEnabled(false); + ctrl_wind_light->setValue(false); - sky->setEnabled(FALSE); - sky_text->setEnabled(FALSE); + sky->setEnabled(false); + sky_text->setEnabled(false); //deferred needs windlight, disable deferred - ctrl_shadows->setEnabled(FALSE); + ctrl_shadows->setEnabled(false); ctrl_shadows->setValue(0); - shadows_text->setEnabled(FALSE); + shadows_text->setEnabled(false); - ctrl_ssao->setEnabled(FALSE); - ctrl_ssao->setValue(FALSE); + ctrl_ssao->setEnabled(false); + ctrl_ssao->setValue(false); - ctrl_dof->setEnabled(FALSE); - ctrl_dof->setValue(FALSE); + ctrl_dof->setEnabled(false); + ctrl_dof->setValue(false); - ctrl_deferred->setEnabled(FALSE); - ctrl_deferred->setValue(FALSE); + ctrl_deferred->setEnabled(false); + ctrl_deferred->setValue(false); } // disabled deferred if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred")) { - ctrl_shadows->setEnabled(FALSE); + ctrl_shadows->setEnabled(false); ctrl_shadows->setValue(0); - shadows_text->setEnabled(FALSE); + shadows_text->setEnabled(false); - ctrl_ssao->setEnabled(FALSE); - ctrl_ssao->setValue(FALSE); + ctrl_ssao->setEnabled(false); + ctrl_ssao->setValue(false); - ctrl_dof->setEnabled(FALSE); - ctrl_dof->setValue(FALSE); + ctrl_dof->setEnabled(false); + ctrl_dof->setValue(false); - ctrl_deferred->setEnabled(FALSE); - ctrl_deferred->setValue(FALSE); + ctrl_deferred->setEnabled(false); + ctrl_deferred->setValue(false); } // disabled deferred SSAO if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO")) { - ctrl_ssao->setEnabled(FALSE); - ctrl_ssao->setValue(FALSE); + ctrl_ssao->setEnabled(false); + ctrl_ssao->setValue(false); } // disabled deferred shadows if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail")) { - ctrl_shadows->setEnabled(FALSE); + ctrl_shadows->setEnabled(false); ctrl_shadows->setValue(0); - shadows_text->setEnabled(FALSE); + shadows_text->setEnabled(false); } // disabled reflections if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionDetail")) { - ctrl_reflections->setEnabled(FALSE); - ctrl_reflections->setValue(FALSE); - reflections_text->setEnabled(FALSE); + ctrl_reflections->setEnabled(false); + ctrl_reflections->setValue(false); + reflections_text->setEnabled(false); } // disabled av if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarVP")) { - ctrl_avatar_vp->setEnabled(FALSE); - ctrl_avatar_vp->setValue(FALSE); + ctrl_avatar_vp->setEnabled(false); + ctrl_avatar_vp->setValue(false); - ctrl_avatar_cloth->setEnabled(FALSE); - ctrl_avatar_cloth->setValue(FALSE); + ctrl_avatar_cloth->setEnabled(false); + ctrl_avatar_cloth->setValue(false); //deferred needs AvatarVP, disable deferred - ctrl_shadows->setEnabled(FALSE); + ctrl_shadows->setEnabled(false); ctrl_shadows->setValue(0); - shadows_text->setEnabled(FALSE); + shadows_text->setEnabled(false); - ctrl_ssao->setEnabled(FALSE); - ctrl_ssao->setValue(FALSE); + ctrl_ssao->setEnabled(false); + ctrl_ssao->setValue(false); - ctrl_dof->setEnabled(FALSE); - ctrl_dof->setValue(FALSE); + ctrl_dof->setEnabled(false); + ctrl_dof->setValue(false); - ctrl_deferred->setEnabled(FALSE); - ctrl_deferred->setValue(FALSE); + ctrl_deferred->setEnabled(false); + ctrl_deferred->setValue(false); } // disabled cloth if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderAvatarCloth")) { - ctrl_avatar_cloth->setEnabled(FALSE); - ctrl_avatar_cloth->setValue(FALSE); + ctrl_avatar_cloth->setEnabled(false); + ctrl_avatar_cloth->setValue(false); } } @@ -355,14 +355,14 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() LLTextBox* reflections_text = getChild("ReflectionsText"); // Reflections - BOOL reflections = LLCubeMap::sUseCubeMaps; + bool reflections = LLCubeMap::sUseCubeMaps; ctrl_reflections->setEnabled(reflections); reflections_text->setEnabled(reflections); // Bump & Shiny LLCheckBoxCtrl* bumpshiny_ctrl = getChild("BumpShiny"); bool bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump"); - bumpshiny_ctrl->setEnabled(bumpshiny ? TRUE : FALSE); + bumpshiny_ctrl->setEnabled(bumpshiny ? true : false); // Avatar Mode // Enable Avatar Shaders @@ -374,18 +374,18 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() if (LLViewerShaderMgr::sInitialized) { S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel; - avatar_vp_enabled = (max_avatar_shader > 0) ? TRUE : FALSE; + avatar_vp_enabled = (max_avatar_shader > 0) ? true : false; } ctrl_avatar_vp->setEnabled(avatar_vp_enabled); - if (gSavedSettings.getBOOL("RenderAvatarVP") == FALSE) + if (gSavedSettings.getBOOL("RenderAvatarVP") == false) { - ctrl_avatar_cloth->setEnabled(FALSE); + ctrl_avatar_cloth->setEnabled(false); } else { - ctrl_avatar_cloth->setEnabled(TRUE); + ctrl_avatar_cloth->setEnabled(true); } /* remove orphaned code left over from EEP @@ -394,26 +394,26 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() LLSliderCtrl* terrain_detail = getChild("TerrainDetail"); // can be linked with control var LLTextBox* terrain_text = getChild("TerrainDetailText"); - terrain_detail->setEnabled(FALSE); - terrain_text->setEnabled(FALSE); + terrain_detail->setEnabled(false); + terrain_text->setEnabled(false); */ // WindLight //LLCheckBoxCtrl* ctrl_wind_light = getChild("WindLightUseAtmosShaders"); - //ctrl_wind_light->setEnabled(TRUE); + //ctrl_wind_light->setEnabled(true); LLSliderCtrl* sky = getChild("SkyMeshDetail"); LLTextBox* sky_text = getChild("SkyMeshDetailText"); - sky->setEnabled(TRUE); - sky_text->setEnabled(TRUE); + sky->setEnabled(true); + sky_text->setEnabled(true); - BOOL enabled = TRUE; + bool enabled = true; #if 0 // deferred always on now //Deferred/SSAO/Shadows LLCheckBoxCtrl* ctrl_deferred = getChild("UseLightShaders"); enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && - ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) && - (ctrl_wind_light->get()) ? TRUE : FALSE; + ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? true : false) && + (ctrl_wind_light->get()) ? true : false; ctrl_deferred->setEnabled(enabled); #endif @@ -421,7 +421,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() LLCheckBoxCtrl* ctrl_pbr = getChild("UsePBRShaders"); //PBR - ctrl_pbr->setEnabled(TRUE); + ctrl_pbr->setEnabled(true); LLCheckBoxCtrl* ctrl_ssao = getChild("UseSSAO"); LLCheckBoxCtrl* ctrl_dof = getChild("UseDoF"); @@ -429,7 +429,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() LLTextBox* shadow_text = getChild("RenderShadowDetailText"); // note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it - enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && (ctrl_deferred->get() ? TRUE : FALSE); + enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && (ctrl_deferred->get() ? true : false); //ctrl_deferred->set(gSavedSettings.getBOOL("RenderDeferred")); @@ -445,12 +445,12 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable")) { - getChildView("vbo")->setEnabled(FALSE); + getChildView("vbo")->setEnabled(false); } if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderCompressTextures")) { - getChildView("texture compression")->setEnabled(FALSE); + getChildView("texture compression")->setEnabled(false); } // if no windlight shaders, turn off nighttime brightness, gamma, and fog distance diff --git a/indra/newview/llfloaterpreviewtrash.cpp b/indra/newview/llfloaterpreviewtrash.cpp index 52f87571d8..bd50a6b821 100644 --- a/indra/newview/llfloaterpreviewtrash.cpp +++ b/indra/newview/llfloaterpreviewtrash.cpp @@ -60,7 +60,7 @@ LLFloaterPreviewTrash::~LLFloaterPreviewTrash() // static void LLFloaterPreviewTrash::show() { - LLFloaterReg::showTypedInstance("preview_trash", LLSD(), TRUE); + LLFloaterReg::showTypedInstance("preview_trash", LLSD(), true); } // static diff --git a/indra/newview/llfloaterprofiletexture.cpp b/indra/newview/llfloaterprofiletexture.cpp index b7adc85975..bdb0de5101 100644 --- a/indra/newview/llfloaterprofiletexture.cpp +++ b/indra/newview/llfloaterprofiletexture.cpp @@ -42,7 +42,7 @@ LLFloaterProfileTexture::LLFloaterProfileTexture(LLView* owner) : LLFloater(LLSD()) - , mUpdateDimensions(TRUE) + , mUpdateDimensions(true) , mLastHeight(0) , mLastWidth(0) , mImage(NULL) @@ -104,7 +104,7 @@ void LLFloaterProfileTexture::updateDimensions() { mAssetStatus = LLPreview::PREVIEW_ASSET_LOADED; // Asset has been fully loaded - mUpdateDimensions = TRUE; + mUpdateDimensions = true; } mLastHeight = img_height; @@ -113,7 +113,7 @@ void LLFloaterProfileTexture::updateDimensions() // Reshape the floater only when required if (mUpdateDimensions) { - mUpdateDimensions = FALSE; + mUpdateDimensions = false; LLRect old_floater_rect = getRect(); LLRect old_image_rect = mProfileIcon->getRect(); @@ -133,7 +133,7 @@ void LLFloaterProfileTexture::updateDimensions() //reshape floater reshape(width, height); - gFloaterView->adjustToFitScreen(this, FALSE); + gFloaterView->adjustToFitScreen(this, false); } } @@ -187,7 +187,7 @@ void LLFloaterProfileTexture::loadAsset(const LLUUID &image_id) if ((mImage->getFullWidth() * mImage->getFullHeight()) == 0) { mImage->setLoadedCallback(LLFloaterProfileTexture::onTextureLoaded, - 0, TRUE, FALSE, new LLHandle(getHandle()), &mCallbackTextureList); + 0, true, false, new LLHandle(getHandle()), &mCallbackTextureList); mImage->setBoostLevel(LLGLTexture::BOOST_PREVIEW); mAssetStatus = LLPreview::PREVIEW_ASSET_LOADING; @@ -197,18 +197,18 @@ void LLFloaterProfileTexture::loadAsset(const LLUUID &image_id) mAssetStatus = LLPreview::PREVIEW_ASSET_LOADED; } - mUpdateDimensions = TRUE; + mUpdateDimensions = true; updateDimensions(); } // static void LLFloaterProfileTexture::onTextureLoaded( - BOOL success, + bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata) { LLHandle* handle = (LLHandle*)userdata; @@ -218,7 +218,7 @@ void LLFloaterProfileTexture::onTextureLoaded( LLFloaterProfileTexture* floater = static_cast(handle->get()); if (floater && success) { - floater->mUpdateDimensions = TRUE; + floater->mUpdateDimensions = true; floater->updateDimensions(); } } diff --git a/indra/newview/llfloaterprofiletexture.h b/indra/newview/llfloaterprofiletexture.h index 22f173bdfa..3fb3398be4 100644 --- a/indra/newview/llfloaterprofiletexture.h +++ b/indra/newview/llfloaterprofiletexture.h @@ -51,12 +51,12 @@ public: static void onTextureLoaded( - BOOL success, + bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata); void reshape(S32 width, S32 height, bool called_from_parent = true) override; @@ -73,7 +73,7 @@ private: F32 mContextConeOpacity; S32 mLastHeight; S32 mLastWidth; - BOOL mUpdateDimensions; + bool mUpdateDimensions; LLHandle mOwnerHandle; LLIconCtrl* mProfileIcon; diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index efa93d561d..02250dcb76 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -252,7 +252,7 @@ void LLFloaterProperties::draw() { if (mDirty) { - // RN: clear dirty first because refresh can set dirty to TRUE + // RN: clear dirty first because refresh can set dirty to true mDirty = false; refresh(); } @@ -268,23 +268,23 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) // do not enable the UI for incomplete items. LLViewerInventoryItem* i = (LLViewerInventoryItem*)item; - BOOL is_complete = i->isFinished(); - const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(i->getInventoryType()); - const BOOL is_calling_card = (i->getInventoryType() == LLInventoryType::IT_CALLINGCARD); - const BOOL is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS); + bool is_complete = i->isFinished(); + const bool cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(i->getInventoryType()); + const bool is_calling_card = (i->getInventoryType() == LLInventoryType::IT_CALLINGCARD); + const bool is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS); const LLPermissions& perm = item->getPermissions(); - const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, + const bool can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); - const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, + const bool can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_SET_SALE) && !cannot_restrict_permissions; - const BOOL is_link = i->getIsLinkType(); + const bool is_link = i->getIsLinkType(); // You need permission to modify the object to modify an inventory // item in it. LLViewerObject* object = NULL; if(!mObjectID.isNull()) object = gObjectList.findObject(mObjectID); - BOOL is_obj_modify = TRUE; + bool is_obj_modify = true; if(object) { is_obj_modify = object->permOwnerModify(); @@ -293,10 +293,10 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) // Experience info if(item->getInventoryType() == LLInventoryType::IT_LSL) { - getChildView("LabelItemExperienceTitle")->setVisible(TRUE); + getChildView("LabelItemExperienceTitle")->setVisible(true); LLTextBox* tb = getChild("LabelItemExperience"); tb->setText(getString("loading_experience")); - tb->setVisible(TRUE); + tb->setVisible(true); LLExperienceCache::instance().fetchAssociatedExperience(item->getParentUUID(), item->getUUID(), boost::bind(&LLFloaterProperties::setAssociatedExperience, getDerivedHandle(), _1)); } // @@ -304,14 +304,14 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) ////////////////////// // ITEM NAME & DESC // ////////////////////// - BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm, + bool is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE) && is_obj_modify && is_complete; - getChildView("LabelItemNameTitle")->setEnabled(TRUE); + getChildView("LabelItemNameTitle")->setEnabled(true); getChildView("LabelItemName")->setEnabled(is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards getChild("LabelItemName")->setValue(item->getName()); - getChildView("LabelItemDescTitle")->setEnabled(TRUE); + getChildView("LabelItemDescTitle")->setEnabled(true); getChildView("LabelItemDesc")->setEnabled(is_modifiable); getChildView("IconLocked")->setVisible(!is_modifiable); getChild("LabelItemDesc")->setValue(item->getDescription()); @@ -327,22 +327,22 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) // Avatar names often not showing on first open //LLAvatarName av_name; //LLAvatarNameCache::get(item->getCreatorUUID(), &av_name); - //getChildView("BtnCreator")->setEnabled(TRUE); + //getChildView("BtnCreator")->setEnabled(true); // - getChildView("LabelCreatorTitle")->setEnabled(TRUE); - getChildView("LabelCreatorName")->setEnabled(TRUE); + getChildView("LabelCreatorTitle")->setEnabled(true); + getChildView("LabelCreatorName")->setEnabled(true); // Avatar names often not showing on first open //getChild("LabelCreatorName")->setValue(av_name.getUserName()); - getChildView("BtnCreator")->setEnabled(FALSE); + getChildView("BtnCreator")->setEnabled(false); getChild("LabelCreatorName")->setValue(LLTrans::getString("AvatarNameWaiting")); mCreatorNameCbConnection = LLAvatarNameCache::get(item->getCreatorUUID(), boost::bind(&LLFloaterProperties::onCreatorNameCallback, this, _1, _2, perm)); // } else { - getChildView("BtnCreator")->setEnabled(FALSE); - getChildView("LabelCreatorTitle")->setEnabled(FALSE); - getChildView("LabelCreatorName")->setEnabled(FALSE); + getChildView("BtnCreator")->setEnabled(false); + getChildView("LabelCreatorTitle")->setEnabled(false); + getChildView("LabelCreatorName")->setEnabled(false); getChild("LabelCreatorName")->setValue(getString("unknown")); } @@ -353,7 +353,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) { // Avatar names often not showing on first open //std::string name; - getChildView("BtnOwner")->setEnabled(FALSE); + getChildView("BtnOwner")->setEnabled(false); getChild("LabelOwnerName")->setValue(LLTrans::getString("AvatarNameWaiting")); // if (perm.isGroupOwned()) @@ -372,16 +372,16 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) mOwnerNameCbConnection = LLAvatarNameCache::get(perm.getOwner(), boost::bind(&LLFloaterProperties::onOwnerNameCallback, this, _1, _2)); // } - //getChildView("BtnOwner")->setEnabled(TRUE); // Avatar names often not showing on first open - getChildView("LabelOwnerTitle")->setEnabled(TRUE); - getChildView("LabelOwnerName")->setEnabled(TRUE); + //getChildView("BtnOwner")->setEnabled(true); // Avatar names often not showing on first open + getChildView("LabelOwnerTitle")->setEnabled(true); + getChildView("LabelOwnerName")->setEnabled(true); //getChild("LabelOwnerName")->setValue(name); // Avatar names often not showing on first open } else { - getChildView("BtnOwner")->setEnabled(FALSE); - getChildView("LabelOwnerTitle")->setEnabled(FALSE); - getChildView("LabelOwnerName")->setEnabled(FALSE); + getChildView("BtnOwner")->setEnabled(false); + getChildView("LabelOwnerTitle")->setEnabled(false); + getChildView("LabelOwnerName")->setEnabled(false); getChild("LabelOwnerName")->setValue(getString("public")); } @@ -421,17 +421,17 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) U32 everyone_mask = perm.getMaskEveryone(); U32 next_owner_mask = perm.getMaskNextOwner(); - getChildView("OwnerLabel")->setEnabled(TRUE); - getChildView("CheckOwnerModify")->setEnabled(FALSE); - getChild("CheckOwnerModify")->setValue(LLSD((BOOL)(owner_mask & PERM_MODIFY))); - getChildView("CheckOwnerCopy")->setEnabled(FALSE); - getChild("CheckOwnerCopy")->setValue(LLSD((BOOL)(owner_mask & PERM_COPY))); - getChildView("CheckOwnerTransfer")->setEnabled(FALSE); - getChild("CheckOwnerTransfer")->setValue(LLSD((BOOL)(owner_mask & PERM_TRANSFER))); + getChildView("OwnerLabel")->setEnabled(true); + getChildView("CheckOwnerModify")->setEnabled(false); + getChild("CheckOwnerModify")->setValue(LLSD((bool)(owner_mask & PERM_MODIFY))); + getChildView("CheckOwnerCopy")->setEnabled(false); + getChild("CheckOwnerCopy")->setValue(LLSD((bool)(owner_mask & PERM_COPY))); + getChildView("CheckOwnerTransfer")->setEnabled(false); + getChild("CheckOwnerTransfer")->setValue(LLSD((bool)(owner_mask & PERM_TRANSFER))); // OpenSim export permissions - getChildView("CheckOwnerExport")->setEnabled(FALSE); - getChild("CheckOwnerExport")->setValue(LLSD((BOOL)(owner_mask & PERM_EXPORT))); + getChildView("CheckOwnerExport")->setEnabled(false); + getChild("CheckOwnerExport")->setValue(LLSD((bool)(owner_mask & PERM_EXPORT))); // /////////////////////// @@ -440,9 +440,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) if( gSavedSettings.getBOOL("DebugPermissions") ) { - BOOL slam_perm = FALSE; - BOOL overwrite_group = FALSE; - BOOL overwrite_everyone = FALSE; + bool slam_perm = false; + bool overwrite_group = false; + bool overwrite_everyone = false; if (item->getType() == LLAssetType::AT_OBJECT) { @@ -465,38 +465,38 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) perm_string = "B: "; perm_string += mask_to_string(base_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("BaseMaskDebug")->setValue(perm_string); - getChildView("BaseMaskDebug")->setVisible(TRUE); + getChildView("BaseMaskDebug")->setVisible(true); perm_string = "O: "; perm_string += mask_to_string(owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("OwnerMaskDebug")->setValue(perm_string); - getChildView("OwnerMaskDebug")->setVisible(TRUE); + getChildView("OwnerMaskDebug")->setVisible(true); perm_string = "G"; perm_string += overwrite_group ? "*: " : ": "; perm_string += mask_to_string(group_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("GroupMaskDebug")->setValue(perm_string); - getChildView("GroupMaskDebug")->setVisible(TRUE); + getChildView("GroupMaskDebug")->setVisible(true); perm_string = "E"; perm_string += overwrite_everyone ? "*: " : ": "; perm_string += mask_to_string(everyone_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("EveryoneMaskDebug")->setValue(perm_string); - getChildView("EveryoneMaskDebug")->setVisible(TRUE); + getChildView("EveryoneMaskDebug")->setVisible(true); perm_string = "N"; perm_string += slam_perm ? "*: " : ": "; perm_string += mask_to_string(next_owner_mask, isOpenSim); // remove misleading X for export when not in OpenSim getChild("NextMaskDebug")->setValue(perm_string); - getChildView("NextMaskDebug")->setVisible(TRUE); + getChildView("NextMaskDebug")->setVisible(true); } else { - getChildView("BaseMaskDebug")->setVisible(FALSE); - getChildView("OwnerMaskDebug")->setVisible(FALSE); - getChildView("GroupMaskDebug")->setVisible(FALSE); - getChildView("EveryoneMaskDebug")->setVisible(FALSE); - getChildView("NextMaskDebug")->setVisible(FALSE); + getChildView("BaseMaskDebug")->setVisible(false); + getChildView("OwnerMaskDebug")->setVisible(false); + getChildView("GroupMaskDebug")->setVisible(false); + getChildView("EveryoneMaskDebug")->setVisible(false); + getChildView("NextMaskDebug")->setVisible(false); } ///////////// @@ -506,44 +506,44 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) // Check for ability to change values. if (is_link || cannot_restrict_permissions) { - getChildView("CheckShareWithGroup")->setEnabled(FALSE); - getChildView("CheckEveryoneCopy")->setEnabled(FALSE); + getChildView("CheckShareWithGroup")->setEnabled(false); + getChildView("CheckEveryoneCopy")->setEnabled(false); } else if (is_obj_modify && can_agent_manipulate) { - getChildView("CheckShareWithGroup")->setEnabled(TRUE); + getChildView("CheckShareWithGroup")->setEnabled(true); getChildView("CheckEveryoneCopy")->setEnabled((owner_mask & PERM_COPY) && (owner_mask & PERM_TRANSFER)); } else { - getChildView("CheckShareWithGroup")->setEnabled(FALSE); - getChildView("CheckEveryoneCopy")->setEnabled(FALSE); + getChildView("CheckShareWithGroup")->setEnabled(false); + getChildView("CheckEveryoneCopy")->setEnabled(false); } getChildView("CheckOwnerExport")->setEnabled(gAgentID == item->getCreatorUUID()); // OpenSim export permissions // Set values. - BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE; - BOOL is_group_modify = (group_mask & PERM_MODIFY) ? TRUE : FALSE; - BOOL is_group_move = (group_mask & PERM_MOVE) ? TRUE : FALSE; + bool is_group_copy = (group_mask & PERM_COPY) ? true : false; + bool is_group_modify = (group_mask & PERM_MODIFY) ? true : false; + bool is_group_move = (group_mask & PERM_MOVE) ? true : false; if (is_group_copy && is_group_modify && is_group_move) { - getChild("CheckShareWithGroup")->setValue(LLSD((BOOL)TRUE)); + getChild("CheckShareWithGroup")->setValue(LLSD(true)); LLCheckBoxCtrl* ctl = getChild("CheckShareWithGroup"); if(ctl) { - ctl->setTentative(FALSE); + ctl->setTentative(false); } } else if (!is_group_copy && !is_group_modify && !is_group_move) { - getChild("CheckShareWithGroup")->setValue(LLSD((BOOL)FALSE)); + getChild("CheckShareWithGroup")->setValue(LLSD(false)); LLCheckBoxCtrl* ctl = getChild("CheckShareWithGroup"); if(ctl) { - ctl->setTentative(FALSE); + ctl->setTentative(false); } } else @@ -551,19 +551,19 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) LLCheckBoxCtrl* ctl = getChild("CheckShareWithGroup"); if(ctl) { - ctl->setTentative(TRUE); - ctl->set(TRUE); + ctl->setTentative(true); + ctl->set(true); } } - getChild("CheckEveryoneCopy")->setValue(LLSD((BOOL)(everyone_mask & PERM_COPY))); + getChild("CheckEveryoneCopy")->setValue(LLSD((bool)(everyone_mask & PERM_COPY))); /////////////// // SALE INFO // /////////////// const LLSaleInfo& sale_info = item->getSaleInfo(); - BOOL is_for_sale = sale_info.isForSale(); + bool is_for_sale = sale_info.isForSale(); LLComboBox* combo_sale_type = getChild("ComboBoxSaleType"); LLUICtrl* edit_cost = getChild("Edit Cost"); @@ -573,7 +573,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) { getChildView("CheckPurchase")->setEnabled(is_complete); - getChildView("NextOwnerLabel")->setEnabled(TRUE); + getChildView("NextOwnerLabel")->setEnabled(true); getChildView("CheckNextOwnerModify")->setEnabled((base_mask & PERM_MODIFY) && !cannot_restrict_permissions); getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions && !is_settings); getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions); @@ -583,15 +583,15 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) } else { - getChildView("CheckPurchase")->setEnabled(FALSE); + getChildView("CheckPurchase")->setEnabled(false); - getChildView("NextOwnerLabel")->setEnabled(FALSE); - getChildView("CheckNextOwnerModify")->setEnabled(FALSE); - getChildView("CheckNextOwnerCopy")->setEnabled(FALSE); - getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE); + getChildView("NextOwnerLabel")->setEnabled(false); + getChildView("CheckNextOwnerModify")->setEnabled(false); + getChildView("CheckNextOwnerCopy")->setEnabled(false); + getChildView("CheckNextOwnerTransfer")->setEnabled(false); - combo_sale_type->setEnabled(FALSE); - edit_cost->setEnabled(FALSE); + combo_sale_type->setEnabled(false); + edit_cost->setEnabled(false); } // Hide any properties that are not relevant to settings @@ -617,9 +617,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) // Set values. getChild("CheckPurchase")->setValue(is_for_sale); - getChild("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY))); - getChild("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY))); - getChild("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER))); + getChild("CheckNextOwnerModify")->setValue(LLSD(bool(next_owner_mask & PERM_MODIFY))); + getChild("CheckNextOwnerCopy")->setValue(LLSD(bool(next_owner_mask & PERM_COPY))); + getChild("CheckNextOwnerTransfer")->setValue(LLSD(bool(next_owner_mask & PERM_TRANSFER))); if (is_for_sale) { @@ -717,7 +717,7 @@ void LLFloaterProperties::onCommitName() new_item->rename(labelItemName->getText()); if(mObjectID.isNull()) { - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } @@ -754,7 +754,7 @@ void LLFloaterProperties::onCommitDescription() new_item->setDescription(labelItemDesc->getText()); if(mObjectID.isNull()) { - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } @@ -855,7 +855,7 @@ void LLFloaterProperties::onCommitPermissions() new_item->setFlags(flags); if(mObjectID.isNull()) { - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } @@ -899,10 +899,10 @@ void LLFloaterProperties::updateSaleInfo() LLSaleInfo sale_info(item->getSaleInfo()); if(!gAgent.allowOperation(PERM_TRANSFER, item->getPermissions(), GP_OBJECT_SET_SALE)) { - getChild("CheckPurchase")->setValue(LLSD((BOOL)FALSE)); + getChild("CheckPurchase")->setValue(LLSD(false)); } - if((BOOL)getChild("CheckPurchase")->getValue()) + if((bool)getChild("CheckPurchase")->getValue()) { // turn on sale info LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY; @@ -956,7 +956,7 @@ void LLFloaterProperties::updateSaleInfo() if(mObjectID.isNull()) { // This is in the agent's inventory. - new_item->updateServer(FALSE); + new_item->updateServer(false); gInventory.updateItem(new_item); gInventory.notifyObservers(); } @@ -1051,7 +1051,7 @@ void LLFloaterProperties::onOwnerNameCallback(const LLUUID& av_id, const LLAvata void LLFloaterProperties::onGroupOwnerNameCallback(const std::string& name) { getChild("LabelOwnerName")->setValue(name); - getChildView("BtnOwner")->setEnabled(TRUE); + getChildView("BtnOwner")->setEnabled(true); } // diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index e637bf98a5..36571ad1c4 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -365,11 +365,11 @@ void LLFloaterRegionInfo::requestRegionInfo() LLTabContainer* tab = findChild("region_panels"); if (tab) { - tab->getChild("General")->setCtrlsEnabled(FALSE); - tab->getChild("Debug")->setCtrlsEnabled(FALSE); - tab->getChild("Terrain")->setCtrlsEnabled(FALSE); - tab->getChild("Estate")->setCtrlsEnabled(FALSE); - tab->getChild("Access")->setCtrlsEnabled(FALSE); + tab->getChild("General")->setCtrlsEnabled(false); + tab->getChild("Debug")->setCtrlsEnabled(false); + tab->getChild("Terrain")->setCtrlsEnabled(false); + tab->getChild("Estate")->setCtrlsEnabled(false); + tab->getChild("Access")->setCtrlsEnabled(false); } // Must allow anyone to request the RegionInfo data @@ -452,7 +452,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) LLTabContainer* tab = floater->getChild("region_panels"); LLViewerRegion* region = gAgent.getRegion(); - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); // *TODO: Replace parsing msg with accessing the region info model. LLRegionInfoModel& region_info = LLRegionInfoModel::instance(); @@ -530,14 +530,14 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->getChild("region_type")->setValue(LLSD(sim_type)); panel->getChild("version_channel_text")->setValue(gLastVersionChannel); - panel->getChild("block_terraform_check")->setValue((region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? TRUE : FALSE ); - panel->getChild("block_fly_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLY) ? TRUE : FALSE ); - panel->getChild("block_fly_over_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLYOVER) ? TRUE : FALSE ); - panel->getChild("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE ); - panel->getChild("restrict_pushobject")->setValue((region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? TRUE : FALSE ); - panel->getChild("allow_land_resell_check")->setValue((region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? FALSE : TRUE ); - panel->getChild("allow_parcel_changes_check")->setValue((region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? TRUE : FALSE ); - panel->getChild("block_parcel_search_check")->setValue((region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? TRUE : FALSE ); + panel->getChild("block_terraform_check")->setValue((region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? true : false ); + panel->getChild("block_fly_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLY) ? true : false ); + panel->getChild("block_fly_over_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLYOVER) ? true : false ); + panel->getChild("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? true : false ); + panel->getChild("restrict_pushobject")->setValue((region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? true : false ); + panel->getChild("allow_land_resell_check")->setValue((region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? false : true ); + panel->getChild("allow_parcel_changes_check")->setValue((region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? true : false ); + panel->getChild("block_parcel_search_check")->setValue((region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? true : false ); panel->getChild("agent_limit_spin")->setValue(LLSD((F32)agent_limit) ); panel->getChild("object_bonus_spin")->setValue(LLSD(object_bonus_factor) ); panel->getChild("access_combo")->setValue(LLSD(sim_access) ); @@ -554,7 +554,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) U32 parent_estate_id; msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id); - BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that + bool teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that panel->getChildView("access_combo")->setEnabled(gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid)); panel->setCtrlsEnabled(allow_modify); @@ -580,9 +580,9 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel = tab->getChild("Debug"); panel->getChild("region_text")->setValue(LLSD(sim_name) ); - panel->getChild("disable_scripts_check")->setValue(LLSD((BOOL)((region_flags & REGION_FLAGS_SKIP_SCRIPTS) ? TRUE : FALSE )) ); - panel->getChild("disable_collisions_check")->setValue(LLSD((BOOL)((region_flags & REGION_FLAGS_SKIP_COLLISIONS) ? TRUE : FALSE )) ); - panel->getChild("disable_physics_check")->setValue(LLSD((BOOL)((region_flags & REGION_FLAGS_SKIP_PHYSICS) ? TRUE : FALSE )) ); + panel->getChild("disable_scripts_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_SCRIPTS) ? true : false )) ); + panel->getChild("disable_collisions_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_COLLISIONS) ? true : false )) ); + panel->getChild("disable_physics_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_PHYSICS) ? true : false )) ); panel->setCtrlsEnabled(allow_modify); // TERRAIN PANEL @@ -682,12 +682,12 @@ void LLFloaterRegionInfo::disableTabCtrls() { LLTabContainer* tab = getChild("region_panels"); - tab->getChild("General")->setCtrlsEnabled(FALSE); - tab->getChild("Debug")->setCtrlsEnabled(FALSE); - tab->getChild("Terrain")->setCtrlsEnabled(FALSE); - tab->getChild("panel_env_info")->setCtrlsEnabled(FALSE); - tab->getChild("Estate")->setCtrlsEnabled(FALSE); - tab->getChild("Access")->setCtrlsEnabled(FALSE); + tab->getChild("General")->setCtrlsEnabled(false); + tab->getChild("Debug")->setCtrlsEnabled(false); + tab->getChild("Terrain")->setCtrlsEnabled(false); + tab->getChild("panel_env_info")->setCtrlsEnabled(false); + tab->getChild("Estate")->setCtrlsEnabled(false); + tab->getChild("Access")->setCtrlsEnabled(false); } // Aurora Sim - Region Settings Console @@ -860,7 +860,7 @@ void LLPanelRegionInfo::sendEstateOwnerMessage( msg->sendReliable(mHost); } -void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable) +void LLPanelRegionInfo::enableButton(const std::string& btn_name, bool enable) { LLView* button = findChildView(btn_name); if (button) button->setEnabled(enable); @@ -869,7 +869,7 @@ void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable) void LLPanelRegionInfo::disableButton(const std::string& btn_name) { LLView* button = findChildView(btn_name); - if (button) button->setEnabled(FALSE); + if (button) button->setEnabled(false); } void LLPanelRegionInfo::initCtrl(const std::string& name) @@ -888,9 +888,9 @@ void LLPanelRegionInfo::onClickManageTelehub() // bool LLPanelRegionGeneralInfo::refreshFromRegion(LLViewerRegion* region) { - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); setCtrlsEnabled(allow_modify); - getChildView("apply_btn")->setEnabled(FALSE); + getChildView("apply_btn")->setEnabled(false); getChildView("access_text")->setEnabled(allow_modify); // getChildView("access_combo")->setEnabled(allow_modify); // now set in processRegionInfo for teen grid detection @@ -971,7 +971,7 @@ void LLPanelRegionGeneralInfo::onClickKick() LLView * button = findChild("kick_btn"); LLFloater* parent_floater = gFloaterView->getParentFloater(this); LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, this, _1), - FALSE, TRUE, FALSE, parent_floater->getName(), button); + false, true, false, parent_floater->getName(), button); if (child_floater) { parent_floater->addDependentFloater(child_floater); @@ -1076,14 +1076,14 @@ bool LLPanelRegionGeneralInfo::onMessageCommit(const LLSD& notification, const L // strings[7] = restrict pushobject // strings[8] = 'Y' - allow parcel subdivide, 'N' - not // strings[9] = 'Y' - block parcel search, 'N' - allow -BOOL LLPanelRegionGeneralInfo::sendUpdate() +bool LLPanelRegionGeneralInfo::sendUpdate() { LL_INFOS() << "LLPanelRegionGeneralInfo::sendUpdate()" << LL_ENDL; // Crash fix if (!gAgent.getRegion()) { - return FALSE; + return false; } // @@ -1152,7 +1152,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() LLNotificationsUtil::add("RegionMaturityChange"); } - return TRUE; + return true; } // Aurora Sim - Region Settings Panel @@ -1162,7 +1162,7 @@ BOOL LLPanelRegionGeneralInfo::sendUpdate() bool LLPanelRegionOpenSettingsInfo::refreshFromRegion(LLViewerRegion* region) { // Data gets filled in by hippo manager - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); LLWorld *regionlimits = LLWorld::getInstance(); @@ -1290,10 +1290,10 @@ bool LLPanelRegionDebugInfo::postBuild() // virtual bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region) { - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); setCtrlsEnabled(allow_modify); - getChildView("apply_btn")->setEnabled(FALSE); - getChildView("target_avatar_name")->setEnabled(FALSE); + getChildView("apply_btn")->setEnabled(false); + getChildView("target_avatar_name")->setEnabled(false); getChildView("choose_avatar_btn")->setEnabled(allow_modify); getChildView("return_scripts")->setEnabled(allow_modify && !mTargetAvatar.isNull()); @@ -1310,7 +1310,7 @@ bool LLPanelRegionDebugInfo::refreshFromRegion(LLViewerRegion* region) } // virtual -BOOL LLPanelRegionDebugInfo::sendUpdate() +bool LLPanelRegionDebugInfo::sendUpdate() { LL_INFOS() << "LLPanelRegionDebugInfo::sendUpdate" << LL_ENDL; strings_t strings; @@ -1327,7 +1327,7 @@ BOOL LLPanelRegionDebugInfo::sendUpdate() LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); sendEstateOwnerMessage(gMessageSystem, "setregiondebug", invoice, strings); - return TRUE; + return true; } void LLPanelRegionDebugInfo::onClickChooseAvatar() @@ -1335,7 +1335,7 @@ void LLPanelRegionDebugInfo::onClickChooseAvatar() LLView * button = findChild("choose_avatar_btn"); LLFloater* parent_floater = gFloaterView->getParentFloater(this); LLFloater * child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, this, _1, _2), - FALSE, TRUE, FALSE, parent_floater->getName(), button); + false, true, false, parent_floater->getName(), button); if (child_floater) { parent_floater->addDependentFloater(child_floater); @@ -1491,7 +1491,7 @@ void LLPanelRegionDebugInfo::onClickDebugConsole(void* data) LLFloaterReg::showInstance("region_debug_console"); } -BOOL LLPanelRegionTerrainInfo::validateTextureSizes() +bool LLPanelRegionTerrainInfo::validateTextureSizes() { static const S32 MAX_TERRAIN_TEXTURE_SIZE = 1024; for(S32 i = 0; i < TERRAIN_TEXTURE_COUNT; ++i) @@ -1517,7 +1517,7 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes() args["TEXTURE_BIT_DEPTH"] = llformat("%d",components * 8); args["MAX_SIZE"] = MAX_TERRAIN_TEXTURE_SIZE; LLNotificationsUtil::add("InvalidTerrainBitDepth", args); - return FALSE; + return false; } if (width > MAX_TERRAIN_TEXTURE_SIZE || height > MAX_TERRAIN_TEXTURE_SIZE) @@ -1529,15 +1529,15 @@ BOOL LLPanelRegionTerrainInfo::validateTextureSizes() args["TEXTURE_SIZE_Y"] = height; args["MAX_SIZE"] = MAX_TERRAIN_TEXTURE_SIZE; LLNotificationsUtil::add("InvalidTerrainSize", args); - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLPanelRegionTerrainInfo::validateTextureHeights() +bool LLPanelRegionTerrainInfo::validateTextureHeights() { for (S32 i = 0; i < CORNER_COUNT; ++i) { @@ -1546,11 +1546,11 @@ BOOL LLPanelRegionTerrainInfo::validateTextureHeights() if (getChild(low)->getValue().asReal() > getChild(high)->getValue().asReal()) { - return FALSE; + return false; } } - return TRUE; + return true; } ///////////////////////////////////////////////////////////////////////////// @@ -1594,13 +1594,13 @@ bool LLPanelRegionTerrainInfo::postBuild() // virtual bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) { - BOOL owner_or_god = gAgent.isGodlike() + bool owner_or_god = gAgent.isGodlike() || (region && (region->getOwner() == gAgent.getID())); - BOOL owner_or_god_or_manager = owner_or_god + bool owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager()); setCtrlsEnabled(owner_or_god_or_manager); - getChildView("apply_btn")->setEnabled(FALSE); + getChildView("apply_btn")->setEnabled(false); if (region) { @@ -1645,7 +1645,7 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) // virtual -BOOL LLPanelRegionTerrainInfo::sendUpdate() +bool LLPanelRegionTerrainInfo::sendUpdate() { LL_INFOS() << "LLPanelRegionTerrainInfo::sendUpdate" << LL_ENDL; std::string buffer; @@ -1669,12 +1669,12 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() #ifdef OPENSIM if (!validateTextureSizes() && !LLGridManager::getInstance()->isInAuroraSim()) { - return FALSE; + return false; } #else if (!validateTextureSizes()) { - return FALSE; + return false; } #endif // OPENSIM // Aurora Sim - Region Settings Console @@ -1686,11 +1686,11 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() { LLNotificationsUtil::add("ConfirmTextureHeights", LLSD(), LLSD(), boost::bind(&LLPanelRegionTerrainInfo::callbackTextureHeights, this, _1, _2)); mAskedTextureHeights = true; - return FALSE; + return false; } else if (!mConfirmedTextureHeights) { - return FALSE; + return false; } } @@ -1731,7 +1731,7 @@ BOOL LLPanelRegionTerrainInfo::sendUpdate() sendEstateOwnerMessage(msg, "texturecommit", invoice, strings); - return TRUE; + return true; } bool LLPanelRegionTerrainInfo::callbackTextureHeights(const LLSD& notification, const LLSD& response) @@ -1902,7 +1902,7 @@ void LLPanelEstateInfo::onClickKickUser() LLView * button = findChild("kick_user_from_estate_btn"); LLFloater* parent_floater = gFloaterView->getParentFloater(this); LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, this, _1), - FALSE, TRUE, FALSE, parent_floater->getName(), button); + false, true, false, parent_floater->getName(), button); if (child_floater) { parent_floater->addDependentFloater(child_floater); @@ -2043,13 +2043,13 @@ void LLPanelEstateInfo::updateEstateName(const std::string& name) void LLPanelEstateInfo::updateControls(LLViewerRegion* region) { - BOOL god = gAgent.isGodlike(); - BOOL owner = (region && (region->getOwner() == gAgent.getID())); - BOOL manager = (region && region->isEstateManager()); + bool god = gAgent.isGodlike(); + bool owner = (region && (region->getOwner() == gAgent.getID())); + bool manager = (region && region->isEstateManager()); setCtrlsEnabled(god || owner || manager); - getChildView("apply_btn")->setEnabled(FALSE); - getChildView("estate_owner")->setEnabled(TRUE); + getChildView("apply_btn")->setEnabled(false); + getChildView("estate_owner")->setEnabled(true); getChildView("message_estate_btn")->setEnabled(god || owner || manager); getChildView("kick_user_from_estate_btn")->setEnabled(god || owner || manager); @@ -2110,7 +2110,7 @@ bool LLPanelEstateInfo::postBuild() getChild("parcel_access_override")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAccessOverride, this)); - getChild("externally_visible_radio")->setFocus(TRUE); + getChild("externally_visible_radio")->setFocus(true); getChild("estate_owner")->setIsFriendCallback(LLAvatarActions::isFriend); @@ -2157,7 +2157,7 @@ void LLPanelEstateInfo::refreshFromEstate() refresh(); } -BOOL LLPanelEstateInfo::sendUpdate() +bool LLPanelEstateInfo::sendUpdate() { LL_INFOS() << "LLPanelEsateInfo::sendUpdate()" << LL_ENDL; @@ -2174,7 +2174,7 @@ BOOL LLPanelEstateInfo::sendUpdate() // for normal estates, just make the change LLNotifications::instance().forceResponse(params, 0); } - return TRUE; + return true; } bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, const LLSD& response) @@ -2392,7 +2392,7 @@ bool LLPanelEstateCovenant::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop if (!gAgent.canManageEstate()) { *accept = ACCEPT_NO; - return TRUE; + return true; } switch(cargo_type) @@ -2461,7 +2461,7 @@ bool LLPanelEstateCovenant::confirmResetCovenantCallback(const LLSD& notificatio void LLPanelEstateCovenant::loadInvItem(LLInventoryItem *itemp) { - const BOOL high_priority = TRUE; + const bool high_priority = true; if (itemp) { gAssetStorage->getInvItemAsset(gAgent.getRegionHost(), @@ -2573,9 +2573,9 @@ void LLPanelEstateCovenant::sendChangeCovenantID(const LLUUID &asset_id) } // virtual -BOOL LLPanelEstateCovenant::sendUpdate() +bool LLPanelEstateCovenant::sendUpdate() { - return TRUE; + return true; } std::string LLPanelEstateCovenant::getEstateName() const @@ -2740,7 +2740,7 @@ bool LLPanelRegionExperiences::postBuild() mTrusted = setupList("panel_trusted", ESTATE_EXPERIENCE_TRUSTED_ADD, ESTATE_EXPERIENCE_TRUSTED_REMOVE); mBlocked = setupList("panel_blocked", ESTATE_EXPERIENCE_BLOCKED_ADD, ESTATE_EXPERIENCE_BLOCKED_REMOVE); - getChild("trusted_layout_panel")->setVisible(TRUE); + getChild("trusted_layout_panel")->setVisible(true); getChild("experiences_help_text")->setText(getString("estate_caption")); getChild("trusted_text_help")->setText(getString("trusted_estate_text")); getChild("allowed_text_help")->setText(getString("allowed_estate_text")); @@ -2881,7 +2881,7 @@ std::string LLPanelRegionExperiences::regionCapabilityQuery(LLViewerRegion* regi bool LLPanelRegionExperiences::refreshFromRegion(LLViewerRegion* region) { - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + bool allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); mAllowed->loading(); mAllowed->setReadonly(!allow_modify); @@ -2920,7 +2920,7 @@ LLSD LLPanelRegionExperiences::addIds(LLPanelExperienceListEditor* panel) } -BOOL LLPanelRegionExperiences::sendUpdate() +bool LLPanelRegionExperiences::sendUpdate() { LLViewerRegion* region = gAgent.getRegion(); @@ -2933,7 +2933,7 @@ BOOL LLPanelRegionExperiences::sendUpdate() LLExperienceCache::instance().setRegionExperiences(boost::bind(&LLPanelRegionExperiences::regionCapabilityQuery, region, _1), content, boost::bind(&LLPanelRegionExperiences::infoCallback, getDerivedHandle(), _1)); - return TRUE; + return true; } void LLPanelRegionExperiences::itemChanged( U32 event_type, const LLUUID& id ) @@ -3055,16 +3055,16 @@ bool LLPanelEstateAccess::postBuild() void LLPanelEstateAccess::updateControls(LLViewerRegion* region) { - BOOL god = gAgent.isGodlike(); - BOOL owner = (region && (region->getOwner() == gAgent.getID())); - BOOL manager = (region && region->isEstateManager()); - BOOL enable_cotrols = god || owner || manager; + bool god = gAgent.isGodlike(); + bool owner = (region && (region->getOwner() == gAgent.getID())); + bool manager = (region && region->isEstateManager()); + bool enable_cotrols = god || owner || manager; setCtrlsEnabled(enable_cotrols); - BOOL has_allowed_avatar = getChild("allowed_avatar_name_list")->getFirstSelected() ? TRUE : FALSE; - BOOL has_allowed_group = getChild("allowed_group_name_list")->getFirstSelected() ? TRUE : FALSE; - BOOL has_banned_agent = getChild("banned_avatar_name_list")->getFirstSelected() ? TRUE : FALSE; - BOOL has_estate_manager = getChild("estate_manager_name_list")->getFirstSelected() ? TRUE : FALSE; + bool has_allowed_avatar = getChild("allowed_avatar_name_list")->getFirstSelected() ? true : false; + bool has_allowed_group = getChild("allowed_group_name_list")->getFirstSelected() ? true : false; + bool has_banned_agent = getChild("banned_avatar_name_list")->getFirstSelected() ? true : false; + bool has_estate_manager = getChild("estate_manager_name_list")->getFirstSelected() ? true : false; getChildView("add_allowed_avatar_btn")->setEnabled(enable_cotrols); getChildView("remove_allowed_avatar_btn")->setEnabled(has_allowed_avatar && enable_cotrols); @@ -3327,7 +3327,7 @@ bool LLPanelEstateAccess::accessAddCore2(const LLSD& notification, const LLSD& r // avatar picker yes multi-select, yes close-on-select LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateAccess::accessAddCore3, _1, _2, (void*)change_info), - TRUE, TRUE, FALSE, parent_floater_name, button); + true, true, false, parent_floater_name, button); //Allows the closed parent floater to close the child floater (avatar picker) if (child_floater) @@ -3793,7 +3793,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) LLUUID id = (*it)["id"].asUUID(); allowed_agent_name_list->addNameItem(id); } - allowed_agent_name_list->sortByName(TRUE); + allowed_agent_name_list->sortByName(true); } LLNameListCtrl* banned_agent_name_list = panel->getChild("banned_avatar_name_list"); @@ -3836,7 +3836,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) banned_agent_name_list->addElement(item); } - banned_agent_name_list->sortByName(TRUE); + banned_agent_name_list->sortByName(true); } LLNameListCtrl* allowed_group_name_list = panel->getChild("allowed_group_name_list"); @@ -3855,7 +3855,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) LLUUID id = (*it)["id"].asUUID(); allowed_group_name_list->addGroupNameItem(id); } - allowed_group_name_list->sortByName(TRUE); + allowed_group_name_list->sortByName(true); } LLNameListCtrl* estate_manager_name_list = panel->getChild("estate_manager_name_list"); @@ -3874,7 +3874,7 @@ void LLPanelEstateAccess::requestEstateGetAccessCoro(std::string url) LLUUID id = (*it)["agent_id"].asUUID(); estate_manager_name_list->addNameItem(id); } - estate_manager_name_list->sortByName(TRUE); + estate_manager_name_list->sortByName(true); } @@ -3919,7 +3919,7 @@ void LLPanelEstateAccess::searchAgent(LLNameListCtrl* listCtrl, const std::strin } else { - listCtrl->deselectAllItems(TRUE); + listCtrl->deselectAllItems(true); } } @@ -3981,8 +3981,8 @@ bool LLPanelRegionEnvironment::postBuild() return false; getChild(BTN_USEDEFAULT)->setLabelArg("[USEDEFAULT]", getString(STR_LABEL_USEDEFAULT)); - getChild(CHK_ALLOWOVERRIDE)->setVisible(TRUE); - getChild(PNL_ENVIRONMENT_ALTITUDES)->setVisible(TRUE); + getChild(CHK_ALLOWOVERRIDE)->setVisible(true); + getChild(PNL_ENVIRONMENT_ALTITUDES)->setVisible(true); getChild(CHK_ALLOWOVERRIDE)->setCommitCallback([this](LLUICtrl *, const LLSD &value){ onChkAllowOverride(value.asBoolean()); }); diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 7a00f58ae0..f5897cb980 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -153,7 +153,7 @@ public: virtual bool postBuild(); virtual void updateChild(LLUICtrl* child_ctrl); - void enableButton(const std::string& btn_name, BOOL enable = TRUE); + void enableButton(const std::string& btn_name, bool enable = true); void disableButton(const std::string& btn_name); void onClickManageTelehub(); @@ -161,9 +161,9 @@ public: protected: void initCtrl(const std::string& name); - // Returns TRUE if update sent and apply button should be + // Returns true if update sent and apply button should be // disabled. - virtual BOOL sendUpdate() { return TRUE; } + virtual bool sendUpdate() { return true; } typedef std::vector strings_t; //typedef std::vector integers_t; @@ -219,7 +219,7 @@ public: void setObjBonusFactor(F32 object_bonus_factor) {mObjBonusFactor = object_bonus_factor;} protected: - virtual BOOL sendUpdate(); + virtual bool sendUpdate(); void onClickKick(); void onKickCommit(const uuid_vec_t& ids); static void onClickKickAll(void* userdata); @@ -246,7 +246,7 @@ public: virtual bool refreshFromRegion(LLViewerRegion* region); protected: - virtual BOOL sendUpdate(); + virtual bool sendUpdate(); void onClickChooseAvatar(); void callbackAvatarID(const uuid_vec_t& ids, const std::vector names); @@ -278,12 +278,12 @@ public: virtual bool refreshFromRegion(LLViewerRegion* region); // refresh local settings from region update from simulator void setEnvControls(bool available); // Whether environment settings are available for this region - BOOL validateTextureSizes(); - BOOL validateTextureHeights(); + bool validateTextureSizes(); + bool validateTextureHeights(); //static void onChangeAnything(LLUICtrl* ctrl, void* userData); // callback for any change, to enable commit button - virtual BOOL sendUpdate(); + virtual bool sendUpdate(); static void onClickDownloadRaw(void*); static void onClickUploadRaw(void*); @@ -349,14 +349,14 @@ public: void setOwnerName(const std::string& name); protected: - virtual BOOL sendUpdate(); + virtual bool sendUpdate(); // confirmation dialog callback bool callbackChangeLindenEstate(const LLSD& notification, const LLSD& response); void commitEstateAccess(); void commitEstateManagers(); - BOOL checkSunHourSlider(LLUICtrl* child_ctrl); + bool checkSunHourSlider(LLUICtrl* child_ctrl); U32 mEstateID; }; @@ -412,7 +412,7 @@ public: } EAssetStatus; protected: - virtual BOOL sendUpdate(); + virtual bool sendUpdate(); LLTextBox* mEstateNameText; LLTextBox* mEstateOwnerText; LLTextBox* mLastModifiedText; @@ -432,7 +432,7 @@ class LLPanelRegionExperiences : public LLPanelRegionInfo public: LLPanelRegionExperiences(){} /*virtual*/ bool postBuild(); - virtual BOOL sendUpdate(); + virtual bool sendUpdate(); static bool experienceCoreConfirm(const LLSD& notification, const LLSD& response); static void sendEstateExperienceDelta(U32 flags, const LLUUID& agent_id); @@ -520,7 +520,7 @@ private: void copyListToClipboard(std::string list_name); bool mPendingUpdate; - BOOL mCtrlsEnabled; + bool mCtrlsEnabled; }; #endif diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 754e136517..3dcd09245f 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -151,10 +151,10 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key) mScreenID(), mAbuserID(), mOwnerName(), - mDeselectOnClose( FALSE ), - mPicking( FALSE), + mDeselectOnClose( false ), + mPicking( false), mPosition(), - mCopyrightWarningSeen( FALSE ), + mCopyrightWarningSeen( false ), mResourceDatap(new LLResourceData()), mAvatarNameCacheConnection() { @@ -168,7 +168,7 @@ bool LLFloaterReporter::postBuild() LLAgentUI::buildSLURL(slurl); getChild("abuse_location_edit")->setValue(slurl.getSLURLString()); - enableControls(TRUE); + enableControls(true); // convert the position to a string LLVector3d pos = gAgent.getPositionGlobal(); @@ -185,7 +185,7 @@ bool LLFloaterReporter::postBuild() getChild("owner_name")->setValue(LLStringUtil::null); mOwnerName = LLStringUtil::null; - getChild("summary_edit")->setFocus(TRUE); + getChild("summary_edit")->setFocus(true); mDefaultSummary = getChild("details_edit")->getValue().asString(); @@ -274,11 +274,11 @@ void LLFloaterReporter::onIdle(void* user_data) } } -void LLFloaterReporter::enableControls(BOOL enable) +void LLFloaterReporter::enableControls(bool enable) { getChildView("category_combo")->setEnabled(enable); getChildView("chat_check")->setEnabled(enable); - getChildView("screenshot")->setEnabled(FALSE); + getChildView("screenshot")->setEnabled(false); getChildView("pick_btn")->setEnabled(enable); getChildView("summary_edit")->setEnabled(enable); getChildView("details_edit")->setEnabled(enable); @@ -379,10 +379,10 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id) void LLFloaterReporter::onClickSelectAbuser() { - LLView * button = findChild("select_abuser", TRUE); + LLView * button = findChild("select_abuser", true); LLFloater * root_floater = gFloaterView->getParentFloater(this); - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), false, true, false, root_floater->getName(), button); if (picker) { root_floater->addDependentFloater(picker); @@ -518,7 +518,7 @@ void LLFloaterReporter::onClickSend(void *userdata) category_value == IP_PERMISSONS_EXPLOIT) { LLNotificationsUtil::add("HelpReportAbuseContainsCopyright"); - self->mCopyrightWarningSeen = TRUE; + self->mCopyrightWarningSeen = true; return; } } @@ -542,8 +542,8 @@ void LLFloaterReporter::onClickSend(void *userdata) } else { - self->getChildView("send_btn")->setEnabled(FALSE); - self->getChildView("cancel_btn")->setEnabled(FALSE); + self->getChildView("send_btn")->setEnabled(false); + self->getChildView("cancel_btn")->setEnabled(false); // the callback from uploading the image calls sendReportViaLegacy() self->uploadImage(); } @@ -557,7 +557,7 @@ void LLFloaterReporter::onClickCancel(void *userdata) LLFloaterReporter *self = (LLFloaterReporter *)userdata; // reset flag in case the next report also contains this text - self->mCopyrightWarningSeen = FALSE; + self->mCopyrightWarningSeen = false; if (self->mPicking) { @@ -573,12 +573,12 @@ void LLFloaterReporter::onClickObjPicker(void *userdata) LLFloaterReporter *self = (LLFloaterReporter *)userdata; LLToolObjPicker::getInstance()->setExitCallback(LLFloaterReporter::closePickTool, self); LLToolMgr::getInstance()->setTransientTool(LLToolObjPicker::getInstance()); - self->mPicking = TRUE; + self->mPicking = true; self->getChild("object_name")->setValue(LLStringUtil::null); self->getChild("owner_name")->setValue(LLStringUtil::null); self->mOwnerName = LLStringUtil::null; LLButton* pick_btn = self->getChild("pick_btn"); - if (pick_btn) pick_btn->setToggleState(TRUE); + if (pick_btn) pick_btn->setToggleState(true); } @@ -591,9 +591,9 @@ void LLFloaterReporter::closePickTool(void *userdata) self->getObjectInfo(object_id); LLToolMgr::getInstance()->clearTransientTool(); - self->mPicking = FALSE; + self->mPicking = false; LLButton* pick_btn = self->getChild("pick_btn"); - if (pick_btn) pick_btn->setToggleState(FALSE); + if (pick_btn) pick_btn->setToggleState(false); } @@ -641,7 +641,7 @@ void LLFloaterReporter::show(const LLUUID& object_id, const std::string& avatar_ } // Need to deselect on close - reporter_floater->mDeselectOnClose = TRUE; + reporter_floater->mDeselectOnClose = true; } @@ -657,7 +657,7 @@ void LLFloaterReporter::showFromExperience( const LLUUID& experience_id ) reporter_floater->getExperienceInfo(experience_id); // Need to deselect on close - reporter_floater->mDeselectOnClose = TRUE; + reporter_floater->mDeselectOnClose = true; } @@ -753,7 +753,7 @@ LLSD LLFloaterReporter::gatherReport() if (!regionp) return LLSD(); // *TODO handle this failure case more gracefully // reset flag in case the next report also contains this text - mCopyrightWarningSeen = FALSE; + mCopyrightWarningSeen = false; std::ostringstream summary; if (LLGridManager::getInstance()->isInSLBeta()) @@ -955,14 +955,14 @@ void LLFloaterReporter::takeNewSnapshot(bool refresh) const S32 IMAGE_HEIGHT = 768; // Take a screenshot, but don't draw this floater. - setVisible(FALSE); - if (!gViewerWindow->rawSnapshot(mImageRaw,IMAGE_WIDTH, IMAGE_HEIGHT, TRUE, FALSE, TRUE /*UI*/, TRUE, FALSE)) + setVisible(false); + if (!gViewerWindow->rawSnapshot(mImageRaw,IMAGE_WIDTH, IMAGE_HEIGHT, true, false, true /*UI*/, true, false)) { LL_WARNS() << "Unable to take screenshot" << LL_ENDL; - setVisible(TRUE); + setVisible(true); return; } - setVisible(TRUE); + setVisible(true); // Refresh screenshot button //if(gSavedPerAccountSettings.getBOOL("PreviousScreenshotForReport")) @@ -1009,7 +1009,7 @@ void LLFloaterReporter::uploadImage() gAssetStorage->storeAssetData(mResourceDatap->mAssetInfo.mTransactionID, mResourceDatap->mAssetInfo.mType, LLFloaterReporter::uploadDoneCallback, - (void*)mResourceDatap, TRUE); + (void*)mResourceDatap, true); } diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index 268211c23e..8261d9b19f 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -122,7 +122,7 @@ private: void sendReportViaLegacy(const LLSD & report); void sendReportViaCaps(std::string url, std::string sshot_url, const LLSD & report); void setPosBox(const LLVector3d &pos); - void enableControls(BOOL own_avatar); + void enableControls(bool own_avatar); void getExperienceInfo(const LLUUID& object_id); void getObjectInfo(const LLUUID& object_id); void callbackAvatarID(const uuid_vec_t& ids, const std::vector names); @@ -142,10 +142,10 @@ private: LLUUID mExperienceID; // Store the real name, not the link, for upstream reporting std::string mOwnerName; - BOOL mDeselectOnClose; - BOOL mPicking; + bool mDeselectOnClose; + bool mPicking; LLVector3 mPosition; - BOOL mCopyrightWarningSeen; + bool mCopyrightWarningSeen; std::string mDefaultSummary; LLResourceData* mResourceDatap; boost::signals2::connection mAvatarNameCacheConnection; diff --git a/indra/newview/llfloatersavecamerapreset.cpp b/indra/newview/llfloatersavecamerapreset.cpp index 56a47f035a..d620f02767 100644 --- a/indra/newview/llfloatersavecamerapreset.cpp +++ b/indra/newview/llfloatersavecamerapreset.cpp @@ -122,7 +122,7 @@ void LLFloaterSaveCameraPreset::onBtnSave() gSavedSettings.setVector3("CameraOffsetRearView", gAgentCamera.getCurrentCameraOffset()); gSavedSettings.setVector3d("FocusOffsetRearView", gAgentCamera.getCurrentFocusOffset()); gAgentCamera.resetCameraZoomFraction(); - gAgentCamera.setFocusOnAvatar(TRUE, TRUE, FALSE); + gAgentCamera.setFocusOnAvatar(true, true, false); } else { diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index 3add120bae..007a233441 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -56,9 +56,9 @@ LLFloaterScriptDebug::LLFloaterScriptDebug(const LLSD& key) { // avoid resizing of the window to match // the initial size of the tabbed-childs, whenever a tab is opened or closed - mAutoResize = FALSE; + mAutoResize = false; // enabled autocous blocks controling focus via LLFloaterReg::showInstance - setAutoFocus(FALSE); + setAutoFocus(false); } LLFloaterScriptDebug::~LLFloaterScriptDebug() @@ -169,14 +169,14 @@ void LLFloaterScriptDebug::addScriptLine(const LLChat& chat) { if (isAgentAvatarValid()) { - ((LLViewerObject*)gAgentAvatarp)->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + ((LLViewerObject*)gAgentAvatarp)->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI)); // Mark script error icons ((LLViewerObject*)gAgentAvatarp)->getIcon()->setScriptError(); } } else { - objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI)); // Mark script error icons objectp->getIcon()->setScriptError(); } @@ -312,8 +312,8 @@ void LLFloaterScriptDebugOutput::addLine(const LLChat& chat, const std::string & if (mObjectID.isNull()) { - setCanTearOff(FALSE); - setCanClose(FALSE); + setCanTearOff(false); + setCanClose(false); } else { diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 0703cbc346..69bfc8b777 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -156,9 +156,9 @@ LLPanelScriptLimitsRegionMemory::~LLPanelScriptLimitsRegionMemory() } }; -BOOL LLPanelScriptLimitsRegionMemory::getLandScriptResources() +bool LLPanelScriptLimitsRegionMemory::getLandScriptResources() { - if (!gAgent.getRegion()) return FALSE; + if (!gAgent.getRegion()) return false; LLSD body; std::string url = gAgent.getRegion()->getCapability("LandResources"); @@ -166,11 +166,11 @@ BOOL LLPanelScriptLimitsRegionMemory::getLandScriptResources() { LLCoros::instance().launch("LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro", boost::bind(&LLPanelScriptLimitsRegionMemory::getLandScriptResourcesCoro, this, url)); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -468,7 +468,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) // ...and if not use the slightly more painful method of disovery: else { - BOOL name_is_cached; + bool name_is_cached; if (is_group_owned) { name_is_cached = gCacheName->getGroupName(owner_id, owner_buf); @@ -667,7 +667,7 @@ bool LLPanelScriptLimitsRegionMemory::postBuild() return StartRequestChain(); } -BOOL LLPanelScriptLimitsRegionMemory::StartRequestChain() +bool LLPanelScriptLimitsRegionMemory::StartRequestChain() { LLUUID region_id; @@ -677,7 +677,7 @@ BOOL LLPanelScriptLimitsRegionMemory::StartRequestChain() getChild("loading_text")->setValue(LLSD(std::string(""))); //might have to do parent post build here //if not logic below could use early outs - return FALSE; + return false; } LLParcel* parcel = instance->getCurrentSelectedParcel(); LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); @@ -693,7 +693,7 @@ BOOL LLPanelScriptLimitsRegionMemory::StartRequestChain() { std::string msg_wrong_region = LLTrans::getString("ScriptLimitsRequestWrongRegion"); getChild("loading_text")->setValue(LLSD(msg_wrong_region)); - return FALSE; + return false; } // FIRE-31213 - from Ubit Umarov - Correct position calcs to work with var regions // LLVector3d pos_global = region->getCenterGlobal(); diff --git a/indra/newview/llfloaterscriptlimits.h b/indra/newview/llfloaterscriptlimits.h index 39a03924f6..193733414c 100644 --- a/indra/newview/llfloaterscriptlimits.h +++ b/indra/newview/llfloaterscriptlimits.h @@ -107,9 +107,9 @@ public: void setRegionDetails(LLSD content); void setRegionSummary(LLSD content); - BOOL StartRequestChain(); + bool StartRequestChain(); - BOOL getLandScriptResources(); + bool getLandScriptResources(); void clearList(); void showBeacon(); void returnObjectsFromParcel(S32 local_id); diff --git a/indra/newview/llfloaterscriptrecover.cpp b/indra/newview/llfloaterscriptrecover.cpp index 669dc3cf39..d4816a8198 100644 --- a/indra/newview/llfloaterscriptrecover.cpp +++ b/indra/newview/llfloaterscriptrecover.cpp @@ -222,12 +222,12 @@ bool LLScriptRecoverQueue::recoverNext() if (m_FileQueue.end() == itFile) { - LLInventoryPanel* pInvPanel = LLInventoryPanel::getActiveInventoryPanel(TRUE); + LLInventoryPanel* pInvPanel = LLInventoryPanel::getActiveInventoryPanel(true); LLFolderViewFolder* pFVF = dynamic_cast(pInvPanel ? pInvPanel->getItemByID(idFNF) : NULL); if (pFVF) { - pFVF->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); - pInvPanel->setSelection(idFNF, TRUE); + pFVF->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP); + pInvPanel->setSelection(idFNF, true); } delete this; @@ -337,7 +337,7 @@ void LLScriptRecoverQueue::onSavedScript(LLUUID itemId, LLUUID newAssetId, LLUUI { LLPointer pNewItem = new LLViewerInventoryItem(pItem); pNewItem->rename(strScriptName); - pNewItem->updateServer(FALSE); + pNewItem->updateServer(false); gInventory.updateItem(pNewItem); gInventory.notifyObservers(); } @@ -352,7 +352,7 @@ void LLScriptRecoverQueue::onSavedScript(LLUUID itemId, LLUUID newAssetId, LLUUI LLViewerInventoryItem* pItem = gInventory.getItem( itemId ); if (pItem) - gInventory.changeItemParent(pItem, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH), FALSE); + gInventory.changeItemParent(pItem, gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH), false); m_FileQueue.erase(itFile); } recoverNext(); diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index b4ce042fe5..620e0b71c0 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -169,7 +169,7 @@ void LLFloaterSearch::search(const SearchQuery &p) } // reset the god level warning as we're sending the latest state - getChildView("refresh_search")->setVisible(FALSE); + getChildView("refresh_search")->setVisible(false); mSearchGodLevel = gAgent.getGodLevel(); // work out the subdir to use based on the requested category diff --git a/indra/newview/llfloatersearchreplace.cpp b/indra/newview/llfloatersearchreplace.cpp index 3ea4e82840..e89465147f 100644 --- a/indra/newview/llfloatersearchreplace.cpp +++ b/indra/newview/llfloatersearchreplace.cpp @@ -199,7 +199,7 @@ void LLFloaterSearchReplace::onSearchClick() LLTextEditor* pEditor = getEditor(); if (pEditor) { - pEditor->selectNext(m_pSearchEditor->getText(), m_pCaseInsensitiveCheck->get(), TRUE, m_pSearchUpCheck->get()); + pEditor->selectNext(m_pSearchEditor->getText(), m_pCaseInsensitiveCheck->get(), true, m_pSearchUpCheck->get()); } } @@ -208,7 +208,7 @@ void LLFloaterSearchReplace::onReplaceClick() LLTextEditor* pEditor = getEditor(); if (pEditor) { - pEditor->replaceText(m_pSearchEditor->getText(), m_pReplaceEditor->getText(), m_pCaseInsensitiveCheck->get(), TRUE, m_pSearchUpCheck->get()); + pEditor->replaceText(m_pSearchEditor->getText(), m_pReplaceEditor->getText(), m_pCaseInsensitiveCheck->get(), true, m_pSearchUpCheck->get()); } } diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 40cd26d127..f44b33da15 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -293,13 +293,13 @@ void LLFloaterSellLandUI::refreshUI() F32 per_meter_price = 0; per_meter_price = F32(mParcelPrice) / F32(mParcelActualArea); getChild("price_per_m")->setTextArg("[PER_METER]", llformat("%0.2f", per_meter_price)); - getChildView("price_per_m")->setVisible(TRUE); + getChildView("price_per_m")->setVisible(true); setBadge("step_price", BADGE_OK); } else { - getChildView("price_per_m")->setVisible(FALSE); + getChildView("price_per_m")->setVisible(false); if ("" == price_str) { @@ -314,8 +314,8 @@ void LLFloaterSellLandUI::refreshUI() if (mSellToBuyer) { getChild("sell_to")->setValue("user"); - getChildView("sell_to_agent")->setVisible(TRUE); - getChildView("sell_to_select_agent")->setVisible(TRUE); + getChildView("sell_to_agent")->setVisible(true); + getChildView("sell_to_select_agent")->setVisible(true); } else { @@ -327,8 +327,8 @@ void LLFloaterSellLandUI::refreshUI() { getChild("sell_to")->setValue("select"); } - getChildView("sell_to_agent")->setVisible(FALSE); - getChildView("sell_to_select_agent")->setVisible(FALSE); + getChildView("sell_to_agent")->setVisible(false); + getChildView("sell_to_select_agent")->setVisible(false); } // Must select Sell To: Anybody, or User (with a specified username) @@ -358,11 +358,11 @@ void LLFloaterSellLandUI::refreshUI() if (valid_sell_to && valid_price && valid_sell_objects) { - getChildView("sell_btn")->setEnabled(TRUE); + getChildView("sell_btn")->setEnabled(true); } else { - getChildView("sell_btn")->setEnabled(FALSE); + getChildView("sell_btn")->setEnabled(false); } } @@ -405,7 +405,7 @@ void LLFloaterSellLandUI::onChangeValue(LLUICtrl *ctrl, void *userdata) void LLFloaterSellLandUI::doSelectAgent() { LLView * button = findChild("sell_to_select_agent"); - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE, FALSE, this->getName(), button); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), false, true, false, this->getName(), button); // grandparent is a floater, in order to set up dependency if (picker) { @@ -539,7 +539,7 @@ bool LLFloaterSellLandUI::onConfirmSale(const LLSD& notification, const LLSD& re // return; // } - parcel->setParcelFlag(PF_FOR_SALE, TRUE); + parcel->setParcelFlag(PF_FOR_SALE, true); parcel->setSalePrice(sale_price); bool sell_with_objects = false; if ("yes" == getChild("sell_objects")->getValue().asString()) diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 56a1ced871..d5e7c2ed5f 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -134,7 +134,7 @@ void LLFloaterSettingsDebug::onUpdateFilter() // but only if actually a search term was given if (mSettingsScrollList->getItemCount() && !searchTerm.empty()) { - mSettingsScrollList->sortByColumnIndex(0, TRUE); + mSettingsScrollList->sortByColumnIndex(0, true); mSettingsScrollList->selectFirstItem(); } @@ -157,7 +157,7 @@ bool LLFloaterSettingsDebug::postBuild() mDefaultButton = getChild("default_btn"); mSanityButton = getChild("sanity_warning_btn"); - mSearchSettingsInput->setFocus(TRUE); // Make search textbox focused on opening + mSearchSettingsInput->setFocus(true); // Make search textbox focused on opening // tried to make this an XUI callback, but keystroke_callback doesn't // seem to work as hoped, so build the callback manually :/ -Zi @@ -359,21 +359,21 @@ void LLFloaterSettingsDebug::updateControl() return; } - mSpinner1->setVisible(FALSE); - mSpinner2->setVisible(FALSE); - mSpinner3->setVisible(FALSE); - mSpinner4->setVisible(FALSE); - mColorSwatch->setVisible(FALSE); - mValText->setVisible( FALSE); + mSpinner1->setVisible(false); + mSpinner2->setVisible(false); + mSpinner3->setVisible(false); + mSpinner4->setVisible(false); + mColorSwatch->setVisible(false); + mValText->setVisible(false); mComment->setText(LLStringUtil::null); - mBooleanCombo->setEnabled(TRUE); - getChild("TRUE")->setEnabled(TRUE); - getChild("FALSE")->setEnabled(TRUE); - mDefaultButton->setEnabled(TRUE); - mCopyButton->setEnabled(FALSE); - mDefaultButton->setEnabled(FALSE); - mBooleanCombo->setVisible(FALSE); - mSanityButton->setVisible(FALSE); + mBooleanCombo->setEnabled(true); + getChild("TRUE")->setEnabled(true); + getChild("FALSE")->setEnabled(true); + mDefaultButton->setEnabled(true); + mCopyButton->setEnabled(false); + mDefaultButton->setEnabled(false); + mBooleanCombo->setVisible(false); + mSanityButton->setVisible(false); if (mCurrentControlVariable) { @@ -391,7 +391,7 @@ void LLFloaterSettingsDebug::updateControl() mDefaultButton->setEnabled(!mOldVisibility); // [/RLVa:KB] - mCopyButton->setEnabled(TRUE); + mCopyButton->setEnabled(true); mSanityButton->setVisible(!mCurrentControlVariable->isSane()); eControlType type=mCurrentControlVariable->type(); @@ -427,7 +427,7 @@ void LLFloaterSettingsDebug::updateControl() switch (type) { case TYPE_U32: - mSpinner1->setVisible(TRUE); + mSpinner1->setVisible(true); mSpinner1->setLabel(std::string("value")); // Debug, don't translate if (!mSpinner1->hasFocus()) { @@ -439,7 +439,7 @@ void LLFloaterSettingsDebug::updateControl() } break; case TYPE_S32: - mSpinner1->setVisible(TRUE); + mSpinner1->setVisible(true); mSpinner1->setLabel(std::string("value")); // Debug, don't translate if (!mSpinner1->hasFocus()) { @@ -451,7 +451,7 @@ void LLFloaterSettingsDebug::updateControl() } break; case TYPE_F32: - mSpinner1->setVisible(TRUE); + mSpinner1->setVisible(true); mSpinner1->setLabel(std::string("value")); // Debug, don't translate if (!mSpinner1->hasFocus()) { @@ -460,7 +460,7 @@ void LLFloaterSettingsDebug::updateControl() } break; case TYPE_BOOLEAN: - mBooleanCombo->setVisible(TRUE); + mBooleanCombo->setVisible(true); if (!mBooleanCombo->hasFocus()) { if (sd.asBoolean()) @@ -474,7 +474,7 @@ void LLFloaterSettingsDebug::updateControl() } break; case TYPE_STRING: - mValText->setVisible( TRUE); + mValText->setVisible( true); if (!mValText->hasFocus()) { mValText->setValue(sd); @@ -484,11 +484,11 @@ void LLFloaterSettingsDebug::updateControl() { LLVector3 v; v.setValue(sd); - mSpinner1->setVisible(TRUE); + mSpinner1->setVisible(true); mSpinner1->setLabel(std::string("X")); - mSpinner2->setVisible(TRUE); + mSpinner2->setVisible(true); mSpinner2->setLabel(std::string("Y")); - mSpinner3->setVisible(TRUE); + mSpinner3->setVisible(true); mSpinner3->setLabel(std::string("Z")); if (!mSpinner1->hasFocus()) { @@ -511,11 +511,11 @@ void LLFloaterSettingsDebug::updateControl() { LLVector3d v; v.setValue(sd); - mSpinner1->setVisible(TRUE); + mSpinner1->setVisible(true); mSpinner1->setLabel(std::string("X")); - mSpinner2->setVisible(TRUE); + mSpinner2->setVisible(true); mSpinner2->setLabel(std::string("Y")); - mSpinner3->setVisible(TRUE); + mSpinner3->setVisible(true); mSpinner3->setLabel(std::string("Z")); if (!mSpinner1->hasFocus()) { @@ -538,13 +538,13 @@ void LLFloaterSettingsDebug::updateControl() { LLQuaternion q; q.setValue(sd); - mSpinner1->setVisible(TRUE); + mSpinner1->setVisible(true); mSpinner1->setLabel(std::string("X")); - mSpinner2->setVisible(TRUE); + mSpinner2->setVisible(true); mSpinner2->setLabel(std::string("Y")); - mSpinner3->setVisible(TRUE); + mSpinner3->setVisible(true); mSpinner3->setLabel(std::string("Z")); - mSpinner4->setVisible(TRUE); + mSpinner4->setVisible(true); mSpinner4->setLabel(std::string("S")); if (!mSpinner1->hasFocus()) { @@ -572,13 +572,13 @@ void LLFloaterSettingsDebug::updateControl() { LLRect r; r.setValue(sd); - mSpinner1->setVisible(TRUE); + mSpinner1->setVisible(true); mSpinner1->setLabel(std::string("Left")); - mSpinner2->setVisible(TRUE); + mSpinner2->setVisible(true); mSpinner2->setLabel(std::string("Right")); - mSpinner3->setVisible(TRUE); + mSpinner3->setVisible(true); mSpinner3->setLabel(std::string("Bottom")); - mSpinner4->setVisible(TRUE); + mSpinner4->setVisible(true); mSpinner4->setLabel(std::string("Top")); if (!mSpinner1->hasFocus()) { @@ -622,13 +622,13 @@ void LLFloaterSettingsDebug::updateControl() { LLColor4 clr; clr.setValue(sd); - mColorSwatch->setVisible(TRUE); + mColorSwatch->setVisible(true); // only set if changed so color picker doesn't update if(clr != LLColor4(mColorSwatch->getValue())) { - mColorSwatch->set(LLColor4(sd), TRUE, FALSE); + mColorSwatch->set(LLColor4(sd), true, false); } - mSpinner4->setVisible(TRUE); + mSpinner4->setVisible(true); mSpinner4->setLabel(std::string("Alpha")); if (!mSpinner4->hasFocus()) { @@ -643,7 +643,7 @@ void LLFloaterSettingsDebug::updateControl() { LLColor3 clr; clr.setValue(sd); - mColorSwatch->setVisible(TRUE); + mColorSwatch->setVisible(true); mColorSwatch->setValue(sd); break; } @@ -665,7 +665,7 @@ void LLFloaterSettingsDebug::updateControl() void LLFloaterSettingsDebug::showControl(const std::string& control) { - LLFloaterSettingsDebug* instance = LLFloaterReg::showTypedInstance("settings_debug", "all", TRUE); + LLFloaterSettingsDebug* instance = LLFloaterReg::showTypedInstance("settings_debug", "all", true); instance->mSearchSettingsInput->setText(control); instance->onUpdateFilter(); } diff --git a/indra/newview/llfloatersimplesnapshot.cpp b/indra/newview/llfloatersimplesnapshot.cpp index b944253159..b021d01682 100644 --- a/indra/newview/llfloatersimplesnapshot.cpp +++ b/indra/newview/llfloatersimplesnapshot.cpp @@ -228,8 +228,8 @@ void LLFloaterSimpleSnapshot::Impl::updateResolution(void* data) if (original_width != width || original_height != height) { // hide old preview as the aspect ratio could be wrong - checkAutoSnapshot(previewp, FALSE); - previewp->updateSnapshot(TRUE); + checkAutoSnapshot(previewp, false); + previewp->updateSnapshot(true); } } } @@ -291,10 +291,10 @@ bool LLFloaterSimpleSnapshot::postBuild() impl->setAdvanced(true); impl->setSkipReshaping(true); - previewp->mKeepAspectRatio = FALSE; + previewp->mKeepAspectRatio = false; previewp->setThumbnailPlaceholderRect(getThumbnailPlaceholderRect()); previewp->setAllowRenderUI(false); - previewp->setThumbnailSubsampled(TRUE); + previewp->setThumbnailSubsampled(true); return true; } @@ -348,12 +348,12 @@ void LLFloaterSimpleSnapshot::onOpen(const LLSD& key) LLSnapshotLivePreview* preview = getPreviewView(); if (preview) { - preview->updateSnapshot(TRUE); + preview->updateSnapshot(true); } - focusFirstItem(FALSE); - gSnapshotFloaterView->setEnabled(TRUE); - gSnapshotFloaterView->setVisible(TRUE); - gSnapshotFloaterView->adjustToFitScreen(this, FALSE); + focusFirstItem(false); + gSnapshotFloaterView->setEnabled(true); + gSnapshotFloaterView->setVisible(true); + gSnapshotFloaterView->adjustToFitScreen(this, false); impl->updateControls(this); impl->setStatus(ImplBase::STATUS_READY); @@ -505,7 +505,7 @@ void LLFloaterSimpleSnapshot::saveTexture() return; } - previewp->saveTexture(TRUE, getInventoryId().asString()); + previewp->saveTexture(true, getInventoryId().asString()); closeFloater(); } diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index b1af93eaa2..e67833c988 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -109,7 +109,7 @@ LLSpinCtrl* LLFloaterSnapshot::Impl::getHeightSpinner(LLFloaterSnapshotBase* flo return active_panel ? active_panel->getHeightSpinner() : floater->getChild("snapshot_height"); } -void LLFloaterSnapshot::Impl::enableAspectRatioCheckbox(LLFloaterSnapshotBase* floater, BOOL enable) +void LLFloaterSnapshot::Impl::enableAspectRatioCheckbox(LLFloaterSnapshotBase* floater, bool enable) { LLPanelSnapshot* active_panel = getActivePanel(floater); if (active_panel) @@ -118,7 +118,7 @@ void LLFloaterSnapshot::Impl::enableAspectRatioCheckbox(LLFloaterSnapshotBase* f } } -void LLFloaterSnapshot::Impl::setAspectRatioCheckboxValue(LLFloaterSnapshotBase* floater, BOOL checked) +void LLFloaterSnapshot::Impl::setAspectRatioCheckboxValue(LLFloaterSnapshotBase* floater, bool checked) { LLPanelSnapshot* active_panel = getActivePanel(floater); if (active_panel) @@ -158,8 +158,8 @@ LLSnapshotModel::ESnapshotLayerType LLFloaterSnapshot::Impl::getLayerType(LLFloa void LLFloaterSnapshot::Impl::setResolution(LLFloaterSnapshotBase* floater, const std::string& comboname) { LLComboBox* combo = floater->getChild(comboname); - combo->setVisible(TRUE); - updateResolution(combo, floater, FALSE); // to sync spinners with combo + combo->setVisible(true); + updateResolution(combo, floater, false); // to sync spinners with combo } //virtual @@ -193,7 +193,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate //thumbnail_placeholder->reshape(panel_width, thumbnail_placeholder->getRect().getHeight()); //floaterp->getChild("image_res_text")->setVisible(advanced); //floaterp->getChild("file_size_label")->setVisible(advanced); - //if (floaterp->hasChild("360_label", TRUE)) + //if (floaterp->hasChild("360_label", true)) //{ // floaterp->getChild("360_label")->setVisible(mAdvanced); //} @@ -210,7 +210,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate LLUICtrl* thumbnail_placeholder = floaterp->getChild("thumbnail_placeholder"); floaterp->getChild("image_res_text")->setVisible(mAdvanced); floaterp->getChild("file_size_label")->setVisible(mAdvanced); - if (floaterp->hasChild("360_label", TRUE)) + if (floaterp->hasChild("360_label", true)) { floaterp->getChild("360_label")->setVisible(mAdvanced); } @@ -263,7 +263,7 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate if (use_freeze_frame) { // stop all mouse events at fullscreen preview layer - floaterp->getParent()->setMouseOpaque(TRUE); + floaterp->getParent()->setMouseOpaque(true); // shrink to smaller layout // *TODO: unneeded? @@ -272,8 +272,8 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate // can see and interact with fullscreen preview now if (previewp) { - previewp->setVisible(TRUE); - previewp->setEnabled(TRUE); + previewp->setVisible(true); + previewp->setEnabled(true); } //RN: freeze all avatars @@ -296,13 +296,13 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate } else // turning off freeze frame mode { - floaterp->getParent()->setMouseOpaque(FALSE); + floaterp->getParent()->setMouseOpaque(false); // *TODO: unneeded? floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getRect().getHeight()); if (previewp) { - previewp->setVisible(FALSE); - previewp->setEnabled(FALSE); + previewp->setVisible(false); + previewp->setEnabled(false); } //RN: thaw all avatars @@ -403,8 +403,8 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater) } LLSnapshotLivePreview* previewp = getPreviewView(); - BOOL got_bytes = previewp && previewp->getDataSize() > 0; - BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); + bool got_bytes = previewp && previewp->getDataSize() > 0; + bool got_snap = previewp && previewp->getSnapshotUpToDate(); // *TODO: Separate maximum size for Web images from postcards LL_DEBUGS() << "Is snapshot up-to-date? " << got_snap << LL_ENDL; @@ -519,11 +519,11 @@ void LLFloaterSnapshotBase::ImplBase::setNeedRefresh(bool need) } // virtual -void LLFloaterSnapshotBase::ImplBase::checkAutoSnapshot(LLSnapshotLivePreview* previewp, BOOL update_thumbnail) +void LLFloaterSnapshotBase::ImplBase::checkAutoSnapshot(LLSnapshotLivePreview* previewp, bool update_thumbnail) { if (previewp) { - BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot"); + bool autosnap = gSavedSettings.getBOOL("AutoSnapshot"); LL_DEBUGS() << "updating " << (autosnap ? "snapshot" : "thumbnail") << LL_ENDL; previewp->updateSnapshot(autosnap, update_thumbnail, autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); } @@ -538,7 +538,7 @@ void LLFloaterSnapshotBase::ImplBase::onClickNewSnapshot(void* data) { floater->impl->setStatus(ImplBase::STATUS_READY); LL_DEBUGS() << "updating snapshot" << LL_ENDL; - previewp->mForceUpdateSnapshot = TRUE; + previewp->mForceUpdateSnapshot = true; } } @@ -559,11 +559,11 @@ void LLFloaterSnapshotBase::ImplBase::onClickAutoSnap(LLUICtrl *ctrl, void* data // static void LLFloaterSnapshotBase::ImplBase::onClickNoPost(LLUICtrl *ctrl, void* data) { - BOOL no_post = ((LLCheckBoxCtrl*)ctrl)->get(); + bool no_post = ((LLCheckBoxCtrl*)ctrl)->get(); gSavedSettings.setBOOL("RenderSnapshotNoPost", no_post); LLFloaterSnapshotBase* view = (LLFloaterSnapshotBase*)data; - view->getPreviewView()->updateSnapshot(TRUE, TRUE); + view->getPreviewView()->updateSnapshot(true, true); view->impl->updateControls(view); } @@ -582,7 +582,7 @@ void LLFloaterSnapshotBase::ImplBase::onClickFilter(LLUICtrl *ctrl, void* data) LLComboBox* filterbox = static_cast(view->getChild("filters_combobox")); std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : ""); previewp->setFilter(filter_name); - previewp->updateSnapshot(TRUE); + previewp->updateSnapshot(true); } } } @@ -599,7 +599,7 @@ void LLFloaterSnapshotBase::ImplBase::onClickUICheck(LLUICtrl *ctrl, void* data) LLSnapshotLivePreview* previewp = view->getPreviewView(); if(previewp) { - previewp->updateSnapshot(TRUE, TRUE); + previewp->updateSnapshot(true, true); } view->impl->updateControls(view); } @@ -617,7 +617,7 @@ void LLFloaterSnapshotBase::ImplBase::onClickHUDCheck(LLUICtrl *ctrl, void* data LLSnapshotLivePreview* previewp = view->getPreviewView(); if(previewp) { - previewp->updateSnapshot(TRUE, TRUE); + previewp->updateSnapshot(true, true); } view->impl->updateControls(view); } @@ -633,14 +633,14 @@ void LLFloaterSnapshotBase::ImplBase::onClickCurrencyCheck(LLUICtrl *ctrl, void* LLSnapshotLivePreview* previewp = view->getPreviewView(); if (previewp) { - previewp->updateSnapshot(TRUE, TRUE); + previewp->updateSnapshot(true, true); } view->impl->updateControls(view); } } // -void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshotBase* view, BOOL checked) +void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshotBase* view, bool checked) { gSavedSettings.setBOOL("KeepAspectForSnapshot", checked); @@ -660,12 +660,12 @@ void LLFloaterSnapshot::Impl::applyKeepAspectCheck(LLFloaterSnapshotBase* view, S32 w, h ; previewp->getSize(w, h) ; - updateSpinners(view, previewp, w, h, TRUE); // may change w and h + updateSpinners(view, previewp, w, h, true); // may change w and h LL_DEBUGS() << "updating thumbnail" << LL_ENDL; previewp->setSize(w, h) ; - previewp->updateSnapshot(TRUE); - checkAutoSnapshot(previewp, TRUE); + previewp->updateSnapshot(true); + checkAutoSnapshot(previewp, true); } } } @@ -699,26 +699,26 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshotBase *view, S32 // Don't round texture sizes; textures are commonly stretched in world, profiles, etc and need to be "squashed" during upload, not cropped here if (LLSnapshotModel::SNAPSHOT_TEXTURE == getActiveSnapshotType(view)) { - previewp->mKeepAspectRatio = FALSE ; + previewp->mKeepAspectRatio = false ; return ; } - BOOL keep_aspect = FALSE, enable_cb = FALSE; + bool keep_aspect = false, enable_cb = false; if (0 == index) // current window size { - enable_cb = FALSE; - keep_aspect = TRUE; + enable_cb = false; + keep_aspect = true; } else if (-1 == index) // custom { - enable_cb = TRUE; + enable_cb = true; keep_aspect = gSavedSettings.getBOOL("KeepAspectForSnapshot"); } else // predefined resolution { - enable_cb = FALSE; - keep_aspect = FALSE; + enable_cb = false; + keep_aspect = false; } view->impl->mAspectRatioCheckOff = !enable_cb; @@ -790,7 +790,7 @@ void LLFloaterSnapshot::Impl::setFinished(bool finished, bool ok, const std::str } // Apply a new resolution selected from the given combobox. -void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update) +void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, bool do_update) { LLComboBox* combobox = (LLComboBox*)ctrl; LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; @@ -902,10 +902,10 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL previewp->setSize(width, height); // hide old preview as the aspect ratio could be wrong - checkAutoSnapshot(previewp, FALSE); + checkAutoSnapshot(previewp, false); LL_DEBUGS() << "updating thumbnail" << LL_ENDL; // Don't update immediately, give window chance to redraw - getPreviewView()->updateSnapshot(TRUE, FALSE, 1.f); + getPreviewView()->updateSnapshot(true, false, 1.f); if(do_update) { LL_DEBUGS() << "Will update controls" << LL_ENDL; @@ -929,8 +929,8 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data) { previewp->setSnapshotBufferType((LLSnapshotModel::ESnapshotLayerType)combobox->getCurrentIndex()); } - view->impl->checkAutoSnapshot(previewp, TRUE); - previewp->updateSnapshot(TRUE, TRUE); + view->impl->checkAutoSnapshot(previewp, true); + previewp->updateSnapshot(true, true); } } @@ -949,7 +949,7 @@ void LLFloaterSnapshot::Impl::onImageFormatChange(LLFloaterSnapshotBase* view) { gSavedSettings.setS32("SnapshotFormat", getImageFormat(view)); LL_DEBUGS() << "image format changed, updating snapshot" << LL_ENDL; - getPreviewView()->updateSnapshot(TRUE); + getPreviewView()->updateSnapshot(true); updateControls(view); } } @@ -963,7 +963,7 @@ void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshotBase* floater, con } // Update supplied width and height according to the constrain proportions flag; limit them by max_val. -BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value) +bool LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, bool isWidthChanged, S32 max_value) { S32 w = width ; S32 h = height ; @@ -972,7 +972,7 @@ BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S3 { if(gViewerWindow->getWindowWidthRaw() < 1 || gViewerWindow->getWindowHeightRaw() < 1) { - return FALSE ; + return false ; } //aspect ratio of the current window @@ -1018,7 +1018,7 @@ void LLFloaterSnapshot::Impl::setImageSizeSpinnersValues(LLFloaterSnapshotBase* } } -void LLFloaterSnapshot::Impl::updateSpinners(LLFloaterSnapshotBase* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL is_width_changed) +void LLFloaterSnapshot::Impl::updateSpinners(LLFloaterSnapshotBase* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, bool is_width_changed) { getWidthSpinner(view)->resetDirty(); getHeightSpinner(view)->resetDirty(); @@ -1045,7 +1045,7 @@ void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshotBase* view, previewp->setMaxImageSize((S32) getWidthSpinner(view)->getMaxValue()) ; previewp->setSize(w,h); - checkAutoSnapshot(previewp, FALSE); + checkAutoSnapshot(previewp, false); // Store settings at logout //comboSetCustom(view, "profile_size_combo"); //comboSetCustom(view, "postcard_size_combo"); @@ -1053,7 +1053,7 @@ void LLFloaterSnapshot::Impl::applyCustomResolution(LLFloaterSnapshotBase* view, //comboSetCustom(view, "local_size_combo"); // LL_DEBUGS() << "applied custom resolution, updating thumbnail" << LL_ENDL; - previewp->updateSnapshot(TRUE); + previewp->updateSnapshot(true); } } } @@ -1137,7 +1137,7 @@ bool LLFloaterSnapshot::postBuild() childSetCommitCallback("layer_types", Impl::onCommitLayerTypes, this); getChild("layer_types")->setValue("colors"); - getChildView("layer_types")->setEnabled(FALSE); + getChildView("layer_types")->setEnabled(false); getChild("freeze_frame_check")->setValue(gSavedSettings.getBOOL("UseFreezeFrame")); childSetCommitCallback("freeze_frame_check", ImplBase::onCommitFreezeFrame, this); @@ -1265,13 +1265,13 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) if(preview) { LL_DEBUGS() << "opened, updating snapshot" << LL_ENDL; - preview->setAllowFullScreenPreview(TRUE); - preview->updateSnapshot(TRUE); + preview->setAllowFullScreenPreview(true); + preview->updateSnapshot(true); } - focusFirstItem(FALSE); - gSnapshotFloaterView->setEnabled(TRUE); - gSnapshotFloaterView->setVisible(TRUE); - gSnapshotFloaterView->adjustToFitScreen(this, FALSE); + focusFirstItem(false); + gSnapshotFloaterView->setEnabled(true); + gSnapshotFloaterView->setVisible(true); + gSnapshotFloaterView->adjustToFitScreen(this, false); impl->updateControls(this); impl->setAdvanced(gSavedSettings.getBOOL("AdvanceSnapshot")); @@ -1292,8 +1292,8 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) std::string last_snapshot_panel = gSavedSettings.getString("FSLastSnapshotPanel"); panel_container->selectTabByName(last_snapshot_panel.empty() ? "panel_snapshot_options" : last_snapshot_panel); panel_container->getCurrentPanel()->onOpen(LLSD()); - mSucceessLblPanel->setVisible(FALSE); - mFailureLblPanel->setVisible(FALSE); + mSucceessLblPanel->setVisible(false); + mFailureLblPanel->setVisible(false); // // FIRE-9621 @@ -1306,17 +1306,17 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) LLLayoutPanel* panel_snapshot_profile = stackcontainer->findChild("lp_profile"); if (panel_snapshot_profile) { - panel_snapshot_profile->setVisible(FALSE); + panel_snapshot_profile->setVisible(false); } LLLayoutPanel* panel_snapshot_facebook = stackcontainer->findChild("lp_facebook"); if (panel_snapshot_facebook) { - panel_snapshot_facebook->setVisible(FALSE); + panel_snapshot_facebook->setVisible(false); } LLLayoutPanel* panel_snapshot_twitter = stackcontainer->findChild("lp_twitter"); if (panel_snapshot_twitter) { - panel_snapshot_twitter->setVisible(FALSE); + panel_snapshot_twitter->setVisible(false); } } } @@ -1352,15 +1352,15 @@ void LLFloaterSnapshot::onClose(bool app_quitting) //virtual void LLFloaterSnapshotBase::onClose(bool app_quitting) { - getParent()->setMouseOpaque(FALSE); + getParent()->setMouseOpaque(false); //unfreeze everything, hide fullscreen preview LLSnapshotLivePreview* previewp = getPreviewView(); if (previewp) { - previewp->setAllowFullScreenPreview(FALSE); - previewp->setVisible(FALSE); - previewp->setEnabled(FALSE); + previewp->setAllowFullScreenPreview(false); + previewp->setVisible(false); + previewp->setEnabled(false); } gSavedSettings.setBOOL("FreezeTime", false); @@ -1462,21 +1462,21 @@ S32 LLFloaterSnapshot::notify(const LLSD& info) return 0; } -BOOL LLFloaterSnapshot::isWaitingState() +bool LLFloaterSnapshot::isWaitingState() { return (impl->getStatus() == ImplBase::STATUS_WORKING); } -BOOL LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized) +bool LLFloaterSnapshotBase::ImplBase::updatePreviewList(bool initialized) { // Share to Flickr //if (!initialized) LLFloaterFlickr* floater_flickr = LLFloaterReg::findTypedInstance("flickr"); if (!initialized && !floater_flickr) // - return FALSE; + return false; - BOOL changed = FALSE; + bool changed = false; LL_DEBUGS() << "npreviews: " << LLSnapshotLivePreview::sList.size() << LL_ENDL; for (std::set::iterator iter = LLSnapshotLivePreview::sList.begin(); iter != LLSnapshotLivePreview::sList.end(); ++iter) diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index f68ce7f5aa..5fbd22a423 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -121,13 +121,13 @@ public: virtual EStatus getStatus() const { return mStatus; } virtual void setNeedRefresh(bool need); - static BOOL updatePreviewList(bool initialized); + static bool updatePreviewList(bool initialized); void setAdvanced(bool advanced) { mAdvanced = advanced; } void setSkipReshaping(bool skip) { mSkipReshaping = skip; } virtual LLSnapshotModel::ESnapshotLayerType getLayerType(LLFloaterSnapshotBase* floater) = 0; - virtual void checkAutoSnapshot(LLSnapshotLivePreview* floater, BOOL update_thumbnail = FALSE); + virtual void checkAutoSnapshot(LLSnapshotLivePreview* floater, bool update_thumbnail = false); void setWorking(bool working); virtual void setFinished(bool finished, bool ok = true, const std::string& msg = LLStringUtil::null) = 0; @@ -170,7 +170,7 @@ public: void saveLocal(const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb); static void setAgentEmail(const std::string& email); - BOOL isWaitingState(); + bool isWaitingState(); class Impl; friend class Impl; @@ -194,24 +194,24 @@ public: ~Impl() {} - void applyKeepAspectCheck(LLFloaterSnapshotBase* view, BOOL checked); - void updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update = TRUE); + void applyKeepAspectCheck(LLFloaterSnapshotBase* view, bool checked); + void updateResolution(LLUICtrl* ctrl, void* data, bool do_update = true); static void onCommitLayerTypes(LLUICtrl* ctrl, void*data); void onImageQualityChange(LLFloaterSnapshotBase* view, S32 quality_val); void onImageFormatChange(LLFloaterSnapshotBase* view); void applyCustomResolution(LLFloaterSnapshotBase* view, S32 w, S32 h); static void onSendingPostcardFinished(LLFloaterSnapshotBase* floater, bool status); - BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value); + bool checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, bool isWidthChanged, S32 max_value); void setImageSizeSpinnersValues(LLFloaterSnapshotBase *view, S32 width, S32 height); - void updateSpinners(LLFloaterSnapshotBase* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL is_width_changed); + void updateSpinners(LLFloaterSnapshotBase* view, LLSnapshotLivePreview* previewp, S32& width, S32& height, bool is_width_changed); static void onSnapshotUploadFinished(LLFloaterSnapshotBase* floater, bool status); /*virtual*/ LLPanelSnapshot* getActivePanel(LLFloaterSnapshotBase* floater, bool ok_if_not_found = true); /*virtual*/ LLSnapshotModel::ESnapshotFormat getImageFormat(LLFloaterSnapshotBase* floater); LLSpinCtrl* getWidthSpinner(LLFloaterSnapshotBase* floater); LLSpinCtrl* getHeightSpinner(LLFloaterSnapshotBase* floater); - void enableAspectRatioCheckbox(LLFloaterSnapshotBase* floater, BOOL enable); - void setAspectRatioCheckboxValue(LLFloaterSnapshotBase* floater, BOOL checked); + void enableAspectRatioCheckbox(LLFloaterSnapshotBase* floater, bool enable); + void setAspectRatioCheckboxValue(LLFloaterSnapshotBase* floater, bool checked); /*virtual*/ std::string getSnapshotPanelPrefix(); void setResolution(LLFloaterSnapshotBase* floater, const std::string& comboname); diff --git a/indra/newview/llfloatertelehub.cpp b/indra/newview/llfloatertelehub.cpp index 86bf57887e..99e737efb5 100644 --- a/indra/newview/llfloatertelehub.cpp +++ b/indra/newview/llfloatertelehub.cpp @@ -104,7 +104,7 @@ void LLFloaterTelehub::refresh() LLViewerObject* object = mObjectSelection->getFirstRootObject(children_ok); bool have_selection = (object != NULL); - BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); + bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); getChildView("connect_btn")->setEnabled(have_selection && all_volume); bool have_telehub = mTelehubObjectID.notNull(); @@ -122,7 +122,7 @@ void LLFloaterTelehub::refresh() } // static -BOOL LLFloaterTelehub::renderBeacons() +bool LLFloaterTelehub::renderBeacons() { // only render if we've got a telehub LLFloaterTelehub* floater = LLFloaterReg::findTypedInstance("telehubs"); diff --git a/indra/newview/llfloatertelehub.h b/indra/newview/llfloatertelehub.h index 4024c8254e..1c71daa6a9 100644 --- a/indra/newview/llfloatertelehub.h +++ b/indra/newview/llfloatertelehub.h @@ -46,7 +46,7 @@ public: void draw() override; - static BOOL renderBeacons(); + static bool renderBeacons(); static void addBeacons(); void refresh() override; diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 399ee46182..fdfc6d4608 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -258,13 +258,13 @@ bool LLFloaterTools::postBuild() // mCheckSelectIndividual = getChild("checkbox edit linked parts"); - getChild("checkbox edit linked parts")->setValue((BOOL)gSavedSettings.getBOOL("EditLinkedParts")); + getChild("checkbox edit linked parts")->setValue((bool)gSavedSettings.getBOOL("EditLinkedParts")); mCheckSnapToGrid = getChild("checkbox snap to grid"); - getChild("checkbox snap to grid")->setValue((BOOL)gSavedSettings.getBOOL("SnapEnabled")); + getChild("checkbox snap to grid")->setValue((bool)gSavedSettings.getBOOL("SnapEnabled")); mCheckStretchUniform = getChild("checkbox uniform"); - getChild("checkbox uniform")->setValue((BOOL)gSavedSettings.getBOOL("ScaleUniform")); + getChild("checkbox uniform")->setValue((bool)gSavedSettings.getBOOL("ScaleUniform")); mCheckStretchTexture = getChild("checkbox stretch textures"); - getChild("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures")); + getChild("checkbox stretch textures")->setValue((bool)gSavedSettings.getBOOL("ScaleStretchTextures")); mComboGridMode = getChild("combobox grid mode"); // show highlight @@ -292,13 +292,13 @@ bool LLFloaterTools::postBuild() } } mCheckCopySelection = getChild("checkbox copy selection"); - getChild("checkbox copy selection")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolCopySelection")); + getChild("checkbox copy selection")->setValue((bool)gSavedSettings.getBOOL("CreateToolCopySelection")); mCheckSticky = getChild("checkbox sticky"); - getChild("checkbox sticky")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolKeepSelected")); + getChild("checkbox sticky")->setValue((bool)gSavedSettings.getBOOL("CreateToolKeepSelected")); mCheckCopyCenters = getChild("checkbox copy centers"); - getChild("checkbox copy centers")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolCopyCenters")); + getChild("checkbox copy centers")->setValue((bool)gSavedSettings.getBOOL("CreateToolCopyCenters")); mCheckCopyRotates = getChild("checkbox copy rotates"); - getChild("checkbox copy rotates")->setValue((BOOL)gSavedSettings.getBOOL("CreateToolCopyRotates")); + getChild("checkbox copy rotates")->setValue((bool)gSavedSettings.getBOOL("CreateToolCopyRotates")); mRadioGroupLand = getChild("land_radio_group"); mBtnApplyToSelection = getChild("button apply to selection"); @@ -316,7 +316,7 @@ bool LLFloaterTools::postBuild() if(mTab) { //mTab->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT); - //mTab->setBorderVisible(FALSE); + //mTab->setBorderVisible(false); mTab->selectFirstTab(); } @@ -356,7 +356,7 @@ bool LLFloaterTools::postBuild() // Aurora Sim void LLFloaterTools::updateToolsSizeLimits() { - mPanelObject->updateLimits(FALSE); + mPanelObject->updateLimits(false); } // Aurora Sim @@ -438,12 +438,12 @@ LLFloaterTools::LLFloaterTools(const LLSD& key) mLandImpactsObserver(NULL), - mDirty(TRUE), - mHasSelection(TRUE) + mDirty(true), + mHasSelection(true) { gFloaterTools = this; - setAutoFocus(FALSE); + setAutoFocus(false); mFactoryMap["General"] = LLCallbackMap(createPanelPermissions, this);//LLPanelPermissions mFactoryMap["Object"] = LLCallbackMap(createPanelObject, this);//LLPanelObject mFactoryMap["Features"] = LLCallbackMap(createPanelVolume, this);//LLPanelVolume @@ -515,7 +515,7 @@ void LLFloaterTools::refresh() const S32 INFO_WIDTH = getRect().getWidth(); const S32 INFO_HEIGHT = 384; LLRect object_info_rect(0, 0, INFO_WIDTH, -INFO_HEIGHT); - BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); + bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); S32 idx_features = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FEATURES]); S32 idx_face = mTab->getPanelIndexByTitle(PANEL_NAMES[PANEL_FACE]); @@ -763,17 +763,17 @@ void LLFloaterTools::refresh() void LLFloaterTools::draw() { - BOOL has_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty(); + bool has_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty(); if(!has_selection && (mHasSelection != has_selection)) { - mDirty = TRUE; + mDirty = true; } mHasSelection = has_selection; if (mDirty) { refresh(); - mDirty = FALSE; + mDirty = false; } // mCheckSelectIndividual->set(gSavedSettings.getBOOL("EditLinkedParts")); @@ -782,7 +782,7 @@ void LLFloaterTools::draw() void LLFloaterTools::dirty() { - mDirty = TRUE; + mDirty = true; LLFloaterOpenObject* instance = LLFloaterReg::findTypedInstance("openobject"); if (instance) instance->dirty(); } @@ -791,12 +791,12 @@ void LLFloaterTools::dirty() // floater is closed. void LLFloaterTools::resetToolState() { - gCameraBtnZoom = TRUE; - gCameraBtnOrbit = FALSE; - gCameraBtnPan = FALSE; + gCameraBtnZoom = true; + gCameraBtnOrbit = false; + gCameraBtnPan = false; - gGrabBtnSpin = FALSE; - gGrabBtnVertical = FALSE; + gGrabBtnSpin = false; + gGrabBtnVertical = false; } void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) @@ -816,7 +816,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) } // Focus buttons - BOOL focus_visible = ( tool == LLToolCamera::getInstance() ); + bool focus_visible = ( tool == LLToolCamera::getInstance() ); mBtnFocus ->setToggleState( focus_visible ); @@ -850,7 +850,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) getChild("slider zoom")->setValue(gAgentCamera.getCameraZoomFraction() * 0.5f); // Move buttons - BOOL move_visible = (tool == LLToolGrab::getInstance()); + bool move_visible = (tool == LLToolGrab::getInstance()); if (mBtnMove) mBtnMove ->setToggleState( move_visible ); @@ -875,7 +875,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) } // Edit buttons - BOOL edit_visible = tool == LLToolCompTranslate::getInstance() || + bool edit_visible = tool == LLToolCompTranslate::getInstance() || tool == LLToolCompRotate::getInstance() || tool == LLToolCompScale::getInstance() || tool == LLToolFace::getInstance() || @@ -972,7 +972,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // // Create buttons - BOOL create_visible = (tool == LLToolCompCreate::getInstance()); + bool create_visible = (tool == LLToolCompCreate::getInstance()); // FIRE-7802: Grass and tree selection in build tool if (mTreeGrassCombo) mTreeGrassCombo->setVisible(create_visible); @@ -986,7 +986,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // don't highlight any placer button for (std::vector::size_type i = 0; i < mButtons.size(); i++) { - mButtons[i]->setToggleState(FALSE); + mButtons[i]->setToggleState(false); mButtons[i]->setVisible( create_visible ); } } @@ -997,7 +997,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) { LLPCode pcode = LLToolPlacer::getObjectType(); LLPCode button_pcode = toolData[t]; - BOOL state = (pcode == button_pcode); + bool state = (pcode == button_pcode); mButtons[t]->setToggleState( state ); mButtons[t]->setVisible( create_visible ); } @@ -1012,7 +1012,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mCheckCopyRotates && mCheckCopySelection) mCheckCopyRotates->setEnabled( mCheckCopySelection->get() ); // Land buttons - BOOL land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() ); + bool land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() ); mCostTextBorder->setVisible(!land_visible); @@ -1070,7 +1070,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) } // - static LLCachedControl sFSToolboxExpanded(gSavedSettings, "FSToolboxExpanded", TRUE); + static LLCachedControl sFSToolboxExpanded(gSavedSettings, "FSToolboxExpanded", true); mTab->setVisible(!land_visible && sFSToolboxExpanded); mPanelLandInfo->setVisible(land_visible && sFSToolboxExpanded); // @@ -1108,7 +1108,7 @@ void LLFloaterTools::onOpen(const LLSD& key) // this function runs on selection change if (!mOpen) { - mOpen = TRUE; + mOpen = true; mCheckShowHighlight->setValue(gSavedSettings.getBOOL("RenderHighlightSelections")); } // @@ -1127,17 +1127,17 @@ void LLFloaterTools::onOpen(const LLSD& key) // so it won't be getting any layout or visibility updates, update once // further updates will come from updateLayout() LLCoordGL select_center_screen; - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); updatePopup(select_center_screen, mask); } - //gMenuBarView->setItemVisible("BuildTools", TRUE); + //gMenuBarView->setItemVisible("BuildTools", true); } // virtual void LLFloaterTools::onClose(bool app_quitting) { - mTab->setVisible(FALSE); + mTab->setVisible(false); LLViewerJoystick::getInstance()->moveAvatar(false); @@ -1155,7 +1155,7 @@ void LLFloaterTools::onClose(bool app_quitting) // LLSelectMgr::instance().setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_NORMAL); - mOpen = FALSE; //hack cause onOpen runs on every selection change but onClose doesnt. + mOpen = false; //hack cause onOpen runs on every selection change but onClose doesnt. // gViewerWindow->showCursor(); @@ -1185,7 +1185,7 @@ void LLFloaterTools::onClose(bool app_quitting) } // - //gMenuBarView->setItemVisible("BuildTools", FALSE); + //gMenuBarView->setItemVisible("BuildTools", false); LLFloaterReg::hideInstance("media_settings"); // hide the advanced object weights floater @@ -1200,7 +1200,7 @@ void LLFloaterTools::onClose(bool app_quitting) if(sPreviousFocusOnAvatar) { sPreviousFocusOnAvatar = false; - gAgentCamera.setAllowChangeToFollow(TRUE); + gAgentCamera.setAllowChangeToFollow(true); } } @@ -1219,18 +1219,18 @@ void commit_radio_group_move(LLUICtrl* ctrl) std::string selected = group->getValue().asString(); if (selected == "radio move") { - gGrabBtnVertical = FALSE; - gGrabBtnSpin = FALSE; + gGrabBtnVertical = false; + gGrabBtnSpin = false; } else if (selected == "radio lift") { - gGrabBtnVertical = TRUE; - gGrabBtnSpin = FALSE; + gGrabBtnVertical = true; + gGrabBtnSpin = false; } else if (selected == "radio spin") { - gGrabBtnVertical = FALSE; - gGrabBtnSpin = TRUE; + gGrabBtnVertical = false; + gGrabBtnSpin = true; } } @@ -1240,21 +1240,21 @@ void commit_radio_group_focus(LLUICtrl* ctrl) std::string selected = group->getValue().asString(); if (selected == "radio zoom") { - gCameraBtnZoom = TRUE; - gCameraBtnOrbit = FALSE; - gCameraBtnPan = FALSE; + gCameraBtnZoom = true; + gCameraBtnOrbit = false; + gCameraBtnPan = false; } else if (selected == "radio orbit") { - gCameraBtnZoom = FALSE; - gCameraBtnOrbit = TRUE; - gCameraBtnPan = FALSE; + gCameraBtnZoom = false; + gCameraBtnOrbit = true; + gCameraBtnPan = false; } else if (selected == "radio pan") { - gCameraBtnZoom = FALSE; - gCameraBtnOrbit = FALSE; - gCameraBtnPan = TRUE; + gCameraBtnZoom = false; + gCameraBtnOrbit = false; + gCameraBtnPan = true; } } @@ -1343,7 +1343,7 @@ void commit_select_component(void *data) gFocusMgr.setKeyboardFocus(NULL); } - BOOL select_individuals = floaterp->mCheckSelectIndividual->get(); + bool select_individuals = floaterp->mCheckSelectIndividual->get(); gSavedSettings.setBOOL("EditLinkedParts", select_individuals); floaterp->dirty(); @@ -1361,7 +1361,7 @@ void commit_select_component(void *data) void commit_show_highlight(void *data) { LLFloaterTools* floaterp = (LLFloaterTools*)data; - BOOL show_highlight = floaterp->mCheckShowHighlight->get(); + bool show_highlight = floaterp->mCheckShowHighlight->get(); if (show_highlight) { LLSelectMgr::getInstance()->setFSShowHideHighlight(FS_SHOW_HIDE_HIGHLIGHT_SHOW); @@ -1499,7 +1499,7 @@ void LLFloaterTools::onClickBtnCopyKeys() { std::string separator = gSavedSettings.getString("FSCopyObjKeySeparator"); std::string stringKeys; - MASK mask = gKeyboard->currentMask(FALSE); + MASK mask = gKeyboard->currentMask(false); LLFloaterToolsCopyKeysFunctor copy_keys(stringKeys, separator); bool copied = false; if (mask == MASK_SHIFT) @@ -1517,20 +1517,20 @@ void LLFloaterTools::onClickBtnCopyKeys() void LLFloaterTools::onClickExpand() { - BOOL show_more = !gSavedSettings.getBOOL("FSToolboxExpanded"); + bool show_more = !gSavedSettings.getBOOL("FSToolboxExpanded"); gSavedSettings.setBOOL("FSToolboxExpanded", show_more); LLButton* btnExpand = getChild("btnExpand"); if (show_more) { - mTab->setVisible(TRUE); + mTab->setVisible(true); reshape(getRect().getWidth(), mExpandedHeight); translate(0, mCollapsedHeight - mExpandedHeight); btnExpand->setImageOverlay("Arrow_Up", btnExpand->getImageOverlayHAlign()); } else { - mTab->setVisible(FALSE); + mTab->setVisible(false); reshape(getRect().getWidth(), mCollapsedHeight); translate(0, mExpandedHeight - mCollapsedHeight); btnExpand->setImageOverlay("Arrow_Down", btnExpand->getImageOverlayHAlign()); diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 1c1f41e9a4..dabc2d27c9 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -206,9 +206,9 @@ public: LLObjectSelectionHandle mObjectSelection; private: - BOOL mDirty; - BOOL mHasSelection; - BOOL mOpen; //Phoenix:KC + bool mDirty; + bool mHasSelection; + bool mOpen; //Phoenix:KC //Phoenix:KC S32 mCollapsedHeight; diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index b24d74f0c2..58ca3cd94b 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -78,7 +78,7 @@ void LLFloaterTopObjects::show() */ LLFloaterTopObjects::LLFloaterTopObjects(const LLSD& key) : LLFloater(key), - mInitialized(FALSE), + mInitialized(false), mtotalScore(0.f) { mCommitCallbackRegistrar.add("TopObjects.ShowBeacon", boost::bind(&LLFloaterTopObjects::onClickShowBeacon, this)); @@ -110,9 +110,9 @@ LLFloaterTopObjects::~LLFloaterTopObjects() bool LLFloaterTopObjects::postBuild() { mObjectsScrollList = getChild("objects_list"); - mObjectsScrollList->setFocus(TRUE); + mObjectsScrollList->setFocus(true); mObjectsScrollList->setDoubleClickCallback(onDoubleClickObjectsList, this); - mObjectsScrollList->setCommitOnSelectionChange(TRUE); + mObjectsScrollList->setCommitOnSelectionChange(true); mObjectsScrollList->setCommitCallback(boost::bind(&LLFloaterTopObjects::onSelectionChanged, this)); setDefaultBtn("show_beacon_btn"); @@ -143,7 +143,7 @@ void LLFloaterTopObjects::handle_land_reply(LLMessageSystem* msg, void** data) if (!instance->mObjectListIDs.size() && !instance->mInitialized) { instance->onRefresh(); - instance->mInitialized = TRUE; + instance->mInitialized = true; } } else @@ -338,8 +338,8 @@ void LLFloaterTopObjects::updateSelectionInfo() } else { - getChild("profile_btn")->setEnabled(FALSE); - getChild("estate_kick_btn")->setEnabled(FALSE); + getChild("profile_btn")->setEnabled(false); + getChild("estate_kick_btn")->setEnabled(false); LLAvatarNameCache::get(object_id, boost::bind(&LLFloaterTopObjects::onAvatarCheck, this, _1, _2)); } // diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h index 3e870ae27e..96aa2c7d04 100644 --- a/indra/newview/llfloatertopobjects.h +++ b/indra/newview/llfloatertopobjects.h @@ -118,7 +118,7 @@ private: U32 mFlags; std::string mFilter; - BOOL mInitialized; + bool mInitialized; F32 mtotalScore; diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp index 33e712f0f2..0ded1ae459 100644 --- a/indra/newview/llfloatertranslationsettings.cpp +++ b/indra/newview/llfloatertranslationsettings.cpp @@ -116,8 +116,8 @@ bool LLFloaterTranslationSettings::postBuild() void LLFloaterTranslationSettings::onOpen(const LLSD& key) { mMachineTranslationCB->setValue(gSavedSettings.getBOOL("TranslateChat")); - mLanguageCombo->setSelectedByValue(gSavedSettings.getString("TranslateLanguage"), TRUE); - mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), TRUE); + mLanguageCombo->setSelectedByValue(gSavedSettings.getString("TranslateLanguage"), true); + mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), true); LLSD azure_key = gSavedSettings.getLLSD("AzureTranslateAPIKey"); if (azure_key.isMap() && !azure_key["id"].asString().empty()) @@ -138,22 +138,22 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key) } else { - mAzureAPIKeyEditor->setTentative(TRUE); + mAzureAPIKeyEditor->setTentative(true); mAzureAPIRegionEditor->setTentative(true); - mAzureKeyVerified = FALSE; + mAzureKeyVerified = false; } std::string google_key = gSavedSettings.getString("GoogleTranslateAPIKey"); if (!google_key.empty()) { mGoogleAPIKeyEditor->setText(google_key); - mGoogleAPIKeyEditor->setTentative(FALSE); + mGoogleAPIKeyEditor->setTentative(false); verifyKey(LLTranslate::SERVICE_GOOGLE, google_key, false); } else { - mGoogleAPIKeyEditor->setTentative(TRUE); - mGoogleKeyVerified = FALSE; + mGoogleAPIKeyEditor->setTentative(true); + mGoogleKeyVerified = false; } LLSD deepl_key = gSavedSettings.getLLSD("DeepLTranslateAPIKey"); @@ -166,8 +166,8 @@ void LLFloaterTranslationSettings::onOpen(const LLSD& key) } else { - mDeepLAPIKeyEditor->setTentative(TRUE); - mDeepLKeyVerified = FALSE; + mDeepLAPIKeyEditor->setTentative(true); + mDeepLKeyVerified = false; } updateControlsEnabledState(); @@ -343,7 +343,7 @@ void LLFloaterTranslationSettings::onEditorFocused(LLFocusableElement* control) if (editor->getTentative()) { editor->setText(LLStringUtil::null); - editor->setTentative(FALSE); + editor->setTentative(false); } } } diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp index 54fd22cc05..c3ccc917ca 100644 --- a/indra/newview/llfloateruipreview.cpp +++ b/indra/newview/llfloateruipreview.cpp @@ -139,7 +139,7 @@ public: virtual ~LLFloaterUIPreview(); std::string getLocStr(S32 ID); // fetches the localization string based on what is selected in the drop-down menu - void displayFloater(BOOL click, S32 ID); // needs to be public so live file can call it when it finds an update + void displayFloater(bool click, S32 ID); // needs to be public so live file can call it when it finds an update /*virtual*/ bool postBuild(); /*virtual*/ void onClose(bool app_quitting); @@ -147,15 +147,15 @@ public: void refreshList(); // refresh list (empty it out and fill it up from scratch) void addFloaterEntry(const std::string& path); // add a single file's entry to the list of floaters - static BOOL containerType(LLView* viewp); // check if the element is a container type and tree traverses need to look at its children + static bool containerType(LLView* viewp); // check if the element is a container type and tree traverses need to look at its children public: LLPreviewedFloater* mDisplayedFloater; // the floater which is currently being displayed LLPreviewedFloater* mDisplayedFloater_2; // the floater which is currently being displayed LLGUIPreviewLiveFile* mLiveFile; // live file for checking for updates to the currently-displayed XML file LLOverlapPanel* mOverlapPanel; // custom overlapping elements panel - // BOOL mHighlightingDiffs; // bool for whether localization diffs are being highlighted or not - BOOL mHighlightingOverlaps; // bool for whether overlapping elements are being highlighted + // bool mHighlightingDiffs; // bool for whether localization diffs are being highlighted or not + bool mHighlightingOverlaps; // bool for whether overlapping elements are being highlighted // typedef std::map,std::list > > DiffMap; // this version copies the lists etc., and thus is bad memory-wise typedef std::list StringList; @@ -198,11 +198,11 @@ private: void highlightChangedElements(); // look up the list of elements to highlight and highlight them in the current floater void highlightChangedFiles(); // look up the list of changed files to highlight and highlight them in the scroll list void findOverlapsInChildren(LLView* parent); // fill the map below with element overlap information - static BOOL overlapIgnorable(LLView* viewp); // check it the element can be ignored for overlap/localization purposes + static bool overlapIgnorable(LLView* viewp); // check it the element can be ignored for overlap/localization purposes // check if two elements overlap using their rectangles // used instead of llrect functions because by adding a few pixels of leeway I can cut down drastically on the number of overlaps - BOOL elementOverlap(LLView* view1, LLView* view2); + bool elementOverlap(LLView* view1, LLView* view2); // Button/drop-down action listeners (self explanatory) void onClickDisplayFloater(S32 id); @@ -278,7 +278,7 @@ public: virtual void draw(); bool handleRightMouseDown(S32 x, S32 y, MASK mask); bool handleToolTip(S32 x, S32 y, MASK mask); - BOOL selectElement(LLView* parent, int x, int y, int depth); // select element to display its overlappers + bool selectElement(LLView* parent, int x, int y, int depth); // select element to display its overlappers LLFloaterUIPreview* mFloaterUIPreview; @@ -338,8 +338,8 @@ LLGUIPreviewLiveFile::~LLGUIPreviewLiveFile() // Live file load bool LLGUIPreviewLiveFile::loadFile() { - mParent->displayFloater(FALSE,1); // redisplay the floater - if(mFirstFade) // only fade if it wasn't just clicked on; can't use "clicked" BOOL below because of an oddity with setting LLLiveFile initial state + mParent->displayFloater(false,1); // redisplay the floater + if(mFirstFade) // only fade if it wasn't just clicked on; can't use "clicked" bool below because of an oddity with setting LLLiveFile initial state { mFirstFade = false; } @@ -406,8 +406,8 @@ LLFloaterUIPreview::LLFloaterUIPreview(const LLSD& key) mDisplayedFloater(NULL), mDisplayedFloater_2(NULL), mLiveFile(NULL), - // sHighlightingDiffs(FALSE), - mHighlightingOverlaps(FALSE), + // sHighlightingDiffs(false), + mHighlightingOverlaps(false), mLastDisplayedX(0), mLastDisplayedY(0) { @@ -551,7 +551,7 @@ void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl) if(mDisplayedFloater) { onClickCloseDisplayedFloater(PRIMARY_FLOATER); - displayFloater(TRUE,1); + displayFloater(true,1); } } else @@ -559,7 +559,7 @@ void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl) if(mDisplayedFloater_2) { onClickCloseDisplayedFloater(PRIMARY_FLOATER); - displayFloater(TRUE,2); // *TODO: make take an arg + displayFloater(true,2); // *TODO: make take an arg } } @@ -651,7 +651,7 @@ void LLFloaterUIPreview::refreshList() // Note: the mask doesn't seem to accept regular expressions, so there need to be two directory searches here mFileList->clearRows(); // empty list std::string name; - BOOL found = TRUE; + bool found = true; // Floaters from Exodus while(found) // for every firestorm custom file that matches the pattern @@ -661,7 +661,7 @@ void LLFloaterUIPreview::refreshList() addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) } } - found = TRUE; + found = true; // Floaters from Exodus LLDirIterator floater_iter(getLocalizedDirectory(), "floater_*.xml"); @@ -673,7 +673,7 @@ void LLFloaterUIPreview::refreshList() } } // ## Zi: Firestorm custom floaters - found = TRUE; + found = true; while(found) // for every firestorm custom file that matches the pattern { if((found = gDirUtilp->getNextFileInDir(getLocalizedDirectory(), "fs_*.xml", name))) // get next file matching pattern @@ -682,7 +682,7 @@ void LLFloaterUIPreview::refreshList() } } // ## Zi: Firestorm custom floaters - found = TRUE; + found = true; LLDirIterator inspect_iter(getLocalizedDirectory(), "inspect_*.xml"); while(found) // for every inspector file that matches the pattern @@ -692,7 +692,7 @@ void LLFloaterUIPreview::refreshList() addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) } } - found = TRUE; + found = true; LLDirIterator menu_iter(getLocalizedDirectory(), "menu_*.xml"); while(found) // for every menu file that matches the pattern @@ -702,7 +702,7 @@ void LLFloaterUIPreview::refreshList() addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) } } - found = TRUE; + found = true; LLDirIterator panel_iter(getLocalizedDirectory(), "panel_*.xml"); while(found) // for every panel file that matches the pattern @@ -712,7 +712,7 @@ void LLFloaterUIPreview::refreshList() addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path) } } - found = TRUE; + found = true; LLDirIterator sidepanel_iter(getLocalizedDirectory(), "sidepanel_*.xml"); while(found) // for every sidepanel file that matches the pattern @@ -745,7 +745,7 @@ void LLFloaterUIPreview::addFloaterEntry(const std::string& path) // Get name of floater: LLXmlTree xml_tree; std::string full_path = getLocalizedDirectory() + path; // get full path - BOOL success = xml_tree.parseFile(full_path.c_str(), TRUE); // parse xml + bool success = xml_tree.parseFile(full_path.c_str(), true); // parse xml std::string entry_name; std::string entry_title; if(success) @@ -802,13 +802,13 @@ void LLFloaterUIPreview::addFloaterEntry(const std::string& path) // Respond to button click to display/refresh currently-selected floater void LLFloaterUIPreview::onClickDisplayFloater(S32 caller_id) { - displayFloater(TRUE, caller_id); + displayFloater(true, caller_id); } // Saves the current floater/panel void LLFloaterUIPreview::onClickSaveFloater(S32 caller_id) { - displayFloater(TRUE, caller_id); + displayFloater(true, caller_id); popupAndPrintWarning("Save-floater functionality removed, use XML schema to clean up XUI files"); } @@ -820,7 +820,7 @@ void LLFloaterUIPreview::onClickSaveAll(S32 caller_id) for (int index = 0; index < listSize; index++) { mFileList->selectNthItem(index); - displayFloater(TRUE, caller_id); + displayFloater(true, caller_id); } popupAndPrintWarning("Save-floater functionality removed, use XML schema to clean up XUI files"); } @@ -828,7 +828,7 @@ void LLFloaterUIPreview::onClickSaveAll(S32 caller_id) // Actually display the floater // Only set up a new live file if this came from a click (at which point there should be no existing live file), rather than from the live file's update itself; // otherwise, we get an infinite loop as the live file keeps recreating itself. That means this function is generally called twice. -void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID) +void LLFloaterUIPreview::displayFloater(bool click, S32 ID) { // Convince UI that we're in a different language (the one selected on the drop-down menu) LLLocalizationResetForcer reset_forcer(this, ID); // save old language in reset forcer object (to be reset upon destruction when it falls out of scope) @@ -836,7 +836,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID) LLPreviewedFloater** floaterp = (ID == 1 ? &(mDisplayedFloater) : &(mDisplayedFloater_2)); if(ID == 1) { - BOOL floater_already_open = mDisplayedFloater != NULL; + bool floater_already_open = mDisplayedFloater != NULL; if(floater_already_open) // if we are already displaying a floater { mLastDisplayedX = mDisplayedFloater->calcScreenRect().mLeft; // save floater's last known position to put the new one there @@ -890,7 +890,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID) panel->buildFromFile(path); // build it panel->setOrigin(2,2); // reset its origin point so it's not offset by -left or other XUI attributes (*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute - panel->setUseBoundingRect(TRUE); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements) + panel->setUseBoundingRect(true); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements) panel->updateBoundingRect(); // update bounding rect LLRect bounding_rect = panel->getBoundingRect(); // get the bounding rect LLRect new_rect = panel->getRect(); // get the panel's rect @@ -910,15 +910,15 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID) // *HACK: Remove ability to close it; if you close it, its destructor gets called, but we don't know it's null and try to delete it again, // resulting in a double free - (*floaterp)->setCanClose(FALSE); + (*floaterp)->setCanClose(false); if(ID == 1) { - mCloseOtherButton->setEnabled(TRUE); // enable my floater's close button + mCloseOtherButton->setEnabled(true); // enable my floater's close button } else { - mCloseOtherButton_2->setEnabled(TRUE); + mCloseOtherButton_2->setEnabled(true); } // Add localization to title so user knows whether it's localized or defaulted to en @@ -951,7 +951,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID) if(ID == 1) { - mToggleOverlapButton->setEnabled(TRUE); + mToggleOverlapButton->setEnabled(true); } if(LLView::sHighlightingDiffs && click && ID == 1) @@ -1078,7 +1078,7 @@ void LLFloaterUIPreview::getExecutablePath(const std::vector& filen #if LL_DARWIN // on Mac, if it's an application bundle, figure out the actual path from the Info.plist file CFStringRef path_cfstr = CFStringCreateWithCString(kCFAllocatorDefault, chosen_path.c_str(), kCFStringEncodingMacRoman); // get path as a CFStringRef - CFURLRef path_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path_cfstr, kCFURLPOSIXPathStyle, TRUE); // turn it into a CFURLRef + CFURLRef path_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path_cfstr, kCFURLPOSIXPathStyle, true); // turn it into a CFURLRef CFBundleRef chosen_bundle = CFBundleCreate(kCFAllocatorDefault, path_url); // get a handle for the bundle CFRelease(path_url); // [FS:CR] Don't leave a mess clean up our objects after we use them if(NULL != chosen_bundle) @@ -1159,13 +1159,13 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting() { // Get the file and make sure it exists std::string path_in_textfield = mDiffPathTextBox->getText(); // get file path - BOOL error = FALSE; + bool error = false; if(std::string("") == path_in_textfield) // check for blank file { std::string warning = "Unable to highlight differences because no file was provided; fill in the relevant text field"; popupAndPrintWarning(warning); - error = TRUE; + error = true; } llstat dummy; @@ -1173,13 +1173,13 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting() { std::string warning = std::string("Unable to highlight differences because an invalid path to a difference file was provided:\"") + path_in_textfield + "\""; popupAndPrintWarning(warning); - error = TRUE; + error = true; } // Build a list of changed elements as given by the XML std::list changed_element_names; LLXmlTree xml_tree; - BOOL success = xml_tree.parseFile(path_in_textfield.c_str(), TRUE); + bool success = xml_tree.parseFile(path_in_textfield.c_str(), true); if(success && !error) { @@ -1209,7 +1209,7 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting() { std::string warning = std::string("Child was neither a file or an error, but rather the following:\"") + std::string(child->getName()) + "\""; popupAndPrintWarning(warning); - error = TRUE; + error = true; break; } } @@ -1218,19 +1218,19 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting() { std::string warning = std::string("Root node not named XuiDelta:\"") + path_in_textfield + "\""; popupAndPrintWarning(warning); - error = TRUE; + error = true; } } else if(!error) { std::string warning = std::string("Unable to create tree from XML:\"") + path_in_textfield + "\""; popupAndPrintWarning(warning); - error = TRUE; + error = true; } if(error) // if we encountered an error, reset the button to off { - mToggleHighlightButton->setToggleState(FALSE); + mToggleHighlightButton->setToggleState(false); } else // only toggle if we didn't encounter an error { @@ -1304,17 +1304,17 @@ void LLFloaterUIPreview::highlightChangedElements() boost::char_separator sep("."); tokenizer tokens(*iter, sep); tokenizer::iterator token_iter; - BOOL failed = FALSE; + bool failed = false; for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) { - element = element->findChild(*token_iter,FALSE); // try to find element: don't recur, and don't create if missing + element = element->findChild(*token_iter,false); // try to find element: don't recur, and don't create if missing // if we still didn't find it... if(NULL == element) { LL_INFOS() << "Unable to find element in XuiDelta file named \"" << *iter << "\" in file \"" << mLiveFile->mFileName << "\". The element may no longer exist, the path may be incorrect, or it may not be a non-displayable element (not an LLView) such as a \"string\" type." << LL_ENDL; - failed = TRUE; + failed = true; break; } } @@ -1347,10 +1347,10 @@ void LLFloaterUIPreview::highlightChangedFiles() { for(DiffMap::iterator iter = mDiffsMap.begin(); iter != mDiffsMap.end(); ++iter) // for every file listed in diffs { - LLScrollListItem* item = mFileList->getItemByLabel(std::string(iter->first), FALSE, 1); + LLScrollListItem* item = mFileList->getItemByLabel(std::string(iter->first), false, 1); if(item) { - item->setHighlighted(TRUE); + item->setHighlighted(true); } } } @@ -1360,8 +1360,8 @@ void LLFloaterUIPreview::onClickCloseDisplayedFloater(S32 caller_id) { if(caller_id == PRIMARY_FLOATER) { - mCloseOtherButton->setEnabled(FALSE); - mToggleOverlapButton->setEnabled(FALSE); + mCloseOtherButton->setEnabled(false); + mToggleOverlapButton->setEnabled(false); if(mDisplayedFloater) { @@ -1388,7 +1388,7 @@ void LLFloaterUIPreview::onClickCloseDisplayedFloater(S32 caller_id) } else { - mCloseOtherButton_2->setEnabled(FALSE); + mCloseOtherButton_2->setEnabled(false); delete mDisplayedFloater_2; mDisplayedFloater_2 = NULL; } @@ -1473,15 +1473,15 @@ bool LLPreviewedFloater::handleRightMouseDown(S32 x, S32 y, MASK mask) // what you've really selected is a list of elements: the one you clicked on and everything that overlaps it. // -The user then selects one of the elements from this list the overlap panel (click handling to the overlap panel would have to be added). // This becomes the final selection (as opposed to the intermediate selection that was just made). -// -Everything else that is currently displayed on the overlap panel should be hidden from view in the previewed floater itself (setVisible(FALSE)). +// -Everything else that is currently displayed on the overlap panel should be hidden from view in the previewed floater itself (setVisible(false)). // -Subsequent clicks on other elements in the overlap panel (they should still be there) should make other elements the final selection. // -On close or on the click of a new button, everything should be shown again and all selection state should be cleared. // ~Jacob, 8/08 -BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth) +bool LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth) { if(getVisible()) { - BOOL handled = FALSE; + bool handled = false; if(LLFloaterUIPreview::containerType(parent)) { for(child_list_const_iter_t child_it = parent->getChildList()->begin(); child_it != parent->getChildList()->end(); ++child_it) @@ -1493,7 +1493,7 @@ BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth) child->getVisible() && selectElement(child, x, y, ++depth)) { - handled = TRUE; + handled = true; break; } } @@ -1503,11 +1503,11 @@ BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth) { LLView::sPreviewClickedElement = parent; } - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -1518,7 +1518,7 @@ void LLPreviewedFloater::draw() // Set and unset sDrawPreviewHighlights flag so as to avoid using two flags if(mFloaterUIPreview->mHighlightingOverlaps) { - LLView::sDrawPreviewHighlights = TRUE; + LLView::sDrawPreviewHighlights = true; } // If we're looking for truncations, draw debug rects for the displayed @@ -1538,7 +1538,7 @@ void LLPreviewedFloater::draw() if(mFloaterUIPreview->mHighlightingOverlaps) { - LLView::sDrawPreviewHighlights = FALSE; + LLView::sDrawPreviewHighlights = false; } } } @@ -1564,7 +1564,7 @@ void LLFloaterUIPreview::onClickToggleOverlapping() else { mHighlightingOverlaps = !mHighlightingOverlaps; - displayFloater(FALSE,1); + displayFloater(false,1); setRect(LLRect(getRect().mLeft,getRect().mTop,getRect().mRight + mOverlapPanel->getRect().getWidth(),getRect().mBottom)); setResizeLimits(width + mOverlapPanel->getRect().getWidth(), height); } @@ -1609,7 +1609,7 @@ void LLFloaterUIPreview::findOverlapsInChildren(LLView* parent) // *HACK: don't overlap with the drag handle and various other elements // This is using dynamic casts because there is no object-oriented way to tell which elements contain localizable text. These are a few that are ignorable. // *NOTE: If a list of elements which have localizable content were created, this function should return false if viewp's class is in that list. -BOOL LLFloaterUIPreview::overlapIgnorable(LLView* viewp) +bool LLFloaterUIPreview::overlapIgnorable(LLView* viewp) { return NULL != dynamic_cast(viewp) || NULL != dynamic_cast(viewp) || @@ -1618,13 +1618,13 @@ BOOL LLFloaterUIPreview::overlapIgnorable(LLView* viewp) // *HACK: these are the only two container types as of 8/08, per Richard // This is using dynamic casts because there is no object-oriented way to tell which elements are containers. -BOOL LLFloaterUIPreview::containerType(LLView* viewp) +bool LLFloaterUIPreview::containerType(LLView* viewp) { return NULL != dynamic_cast(viewp) || NULL != dynamic_cast(viewp); } // Check if two llview's rectangles overlap, with some tolerance -BOOL LLFloaterUIPreview::elementOverlap(LLView* view1, LLView* view2) +bool LLFloaterUIPreview::elementOverlap(LLView* view1, LLView* view2) { LLSD rec1 = view1->getRect().getValue(); LLSD rec2 = view2->getRect().getValue(); @@ -1645,9 +1645,9 @@ void LLOverlapPanel::draw() if(!LLView::sPreviewClickedElement) { LLUI::translate(5,getRect().getHeight()-20); // translate to top-5,left-5 - LLView::sDrawPreviewHighlights = FALSE; + LLView::sDrawPreviewHighlights = false; LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection_text, 0, 0, 0, text_color, - LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE); + LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false); } else { @@ -1661,11 +1661,11 @@ void LLOverlapPanel::draw() if(overlappers.size() == 0) { LLUI::translate(5,getRect().getHeight()-20); // translate to top-5,left-5 - LLView::sDrawPreviewHighlights = FALSE; + LLView::sDrawPreviewHighlights = false; std::string current_selection = std::string(current_selection_text + LLView::sPreviewClickedElement->getName() + " (no elements overlap)"); S32 text_width = LLFontGL::getFontSansSerifSmall()->getWidth(current_selection) + 10; LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection, 0, 0, 0, text_color, - LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE); + LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false); // widen panel enough to fit this text LLRect rect = getRect(); setRect(LLRect(rect.mLeft,rect.mTop,rect.getWidth() < text_width ? rect.mLeft + text_width : rect.mRight,rect.mTop)); @@ -1673,10 +1673,10 @@ void LLOverlapPanel::draw() } // recalculate required with and height; otherwise use cached - BOOL need_to_recalculate_bounds = FALSE; + bool need_to_recalculate_bounds = false; if(mLastClickedElement == NULL) { - need_to_recalculate_bounds = TRUE; + need_to_recalculate_bounds = true; } if(NULL == mLastClickedElement) @@ -1726,12 +1726,12 @@ void LLOverlapPanel::draw() } LLUI::translate(5,getRect().getHeight()-10); // translate to top left - LLView::sDrawPreviewHighlights = FALSE; + LLView::sDrawPreviewHighlights = false; // draw currently-selected element at top of overlappers LLUI::translate(0,-mSpacing); LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection_text + LLView::sPreviewClickedElement->getName(), 0, 0, 0, text_color, - LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE); + LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false); LLUI::translate(0,-mSpacing-LLView::sPreviewClickedElement->getRect().getHeight()); // skip spacing distance + height LLView::sPreviewClickedElement->draw(); @@ -1746,7 +1746,7 @@ void LLOverlapPanel::draw() // draw name LLUI::translate(0,-mSpacing); LLFontGL::getFontSansSerifSmall()->renderUTF8(overlapper_text + viewp->getName(), 0, 0, 0, text_color, - LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE); + LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false); // draw element LLUI::translate(0,-mSpacing-viewp->getRect().getHeight()); // skip spacing distance + height diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index fdeeb0fc24..494ecedba1 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -236,7 +236,7 @@ public: //Get the ID LLUUID id; - if (!id.set( params[0], FALSE )) + if (!id.set( params[0], false )) { return false; } @@ -348,9 +348,9 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key) mFriendObserver(NULL), mCompletingRegionName(), mCompletingRegionPos(), - mWaitingForTracker(FALSE), - mIsClosing(FALSE), - mSetToUserPosition(TRUE), + mWaitingForTracker(false), + mIsClosing(false), + mSetToUserPosition(true), mTrackedLocation(0,0,0), mTrackedStatus(LLTracker::TRACKING_NOTHING), mListFriendCombo(NULL), @@ -468,7 +468,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) bool center_on_target = (key.asString() == "center"); - mIsClosing = FALSE; + mIsClosing = false; mMapView->clearLastClick(); @@ -494,7 +494,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); LLInventoryModelBackgroundFetch::instance().start(landmark_folder_id); - getChild("location")->setFocus( TRUE); + getChild("location")->setFocus( true); gFocusMgr.triggerFocusFlash(); buildAvatarIDList(); @@ -506,7 +506,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) if (center_on_target) { - centerOnTarget(FALSE); + centerOnTarget(false); } } @@ -651,29 +651,29 @@ void LLFloaterWorldMap::draw() // check for completion of tracking data if (mWaitingForTracker) { - centerOnTarget(TRUE); + centerOnTarget(true); } // Performance improvement -// getChildView("Teleport")->setEnabled((BOOL)tracking_status); -// // getChildView("Clear")->setEnabled((BOOL)tracking_status); -// getChildView("Show Destination")->setEnabled((BOOL)tracking_status || LLWorldMap::getInstance()->isTracking()); +// getChildView("Teleport")->setEnabled((bool)tracking_status); +// // getChildView("Clear")->setEnabled((bool)tracking_status); +// getChildView("Show Destination")->setEnabled((bool)tracking_status || LLWorldMap::getInstance()->isTracking()); // getChildView("copy_slurl")->setEnabled((mSLURL.isValid()) ); //// [RLVa:KB] - Checked: 2010-08-22 (RLVa-1.2.1a) | Added: RLVa-1.2.1a // childSetEnabled("Go Home", // (!rlv_handler_t::isEnabled()) || !(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC))); //// [/RLVa:KB] - teleport_btn->setEnabled((BOOL)tracking_status); - //clear_btn->setEnabled((BOOL)tracking_status); - show_destination_btn->setEnabled((BOOL)tracking_status || LLWorldMap::getInstance()->isTracking()); + teleport_btn->setEnabled((bool)tracking_status); + //clear_btn->setEnabled((bool)tracking_status); + show_destination_btn->setEnabled((bool)tracking_status || LLWorldMap::getInstance()->isTracking()); copy_slurl_btn->setEnabled((mSLURL.isValid()) ); go_home_btn->setEnabled((!rlv_handler_t::isEnabled()) || !(gRlvHandler.hasBehaviour(RLV_BHVR_TPLM) && gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC))); // Performance improvement // Alchemy region tracker - getChild("track_region")->setEnabled((BOOL) tracking_status || LLWorldMap::getInstance()->isTracking()); + getChild("track_region")->setEnabled((bool) tracking_status || LLWorldMap::getInstance()->isTracking()); - setMouseOpaque(TRUE); - getDragHandle()->setMouseOpaque(TRUE); + setMouseOpaque(true); + getDragHandle()->setMouseOpaque(true); mMapView->zoom((F32)getChild("zoom slider")->getValue().asReal()); @@ -798,7 +798,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string& mTrackedStatus = LLTracker::TRACKING_AVATAR; mTrackedAvatarID = avatar_id; LLTracker::trackAvatar(avatar_id, name); - centerOnTarget(TRUE); + centerOnTarget(true); } } else @@ -815,13 +815,13 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id ) if (!iface) return; buildLandmarkIDLists(); - BOOL found = FALSE; + bool found = false; S32 idx; for (idx = 0; idx < mLandmarkItemIDList.size(); idx++) { if ( mLandmarkItemIDList.at(idx) == landmark_item_id) { - found = TRUE; + found = true; break; } } @@ -1021,7 +1021,7 @@ void LLFloaterWorldMap::updateLocation() // [RLVa:KB] - Checked: 2012-02-08 (RLVa-1.4.5) | Added: RLVa-1.4.5 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { - mSetToUserPosition = FALSE; + mSetToUserPosition = false; // Fill out the location field getChild("location")->setValue(RlvStrings::getString(RlvStringKeys::Hidden::Region)); @@ -1035,7 +1035,7 @@ void LLFloaterWorldMap::updateLocation() // [/RLVa:KB] // if ( gotSimName ) { - mSetToUserPosition = FALSE; + mSetToUserPosition = false; // Fill out the location field getChild("location")->setValue(agent_sim_name); @@ -1292,7 +1292,7 @@ void LLFloaterWorldMap::buildLandmarkIDLists() // Filter duplicate landmarks on world map std::set used_landmarks; - BOOL filterLandmarks = gSavedSettings.getBOOL("WorldmapFilterDuplicateLandmarks"); + bool filterLandmarks = gSavedSettings.getBOOL("WorldmapFilterDuplicateLandmarks"); // S32 count = items.size(); for(S32 i = 0; i < count; ++i) @@ -1332,7 +1332,7 @@ F32 LLFloaterWorldMap::getDistanceToDestination(const LLVector3d &destination, } -void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui, BOOL dest_reached) +void LLFloaterWorldMap::clearLocationSelection(bool clear_ui, bool dest_reached) { LLCtrlListInterface *list = mListSearchResults; if (list && (!dest_reached || (list->getItemCount() == 1))) @@ -1344,7 +1344,7 @@ void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui, BOOL dest_reached) } -void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui) +void LLFloaterWorldMap::clearLandmarkSelection(bool clear_ui) { if (clear_ui || !childHasKeyboardFocus("landmark combo")) { @@ -1357,7 +1357,7 @@ void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui) } -void LLFloaterWorldMap::clearAvatarSelection(BOOL clear_ui) +void LLFloaterWorldMap::clearAvatarSelection(bool clear_ui) { if (clear_ui || !childHasKeyboardFocus("friend combo")) { @@ -1585,7 +1585,7 @@ void LLFloaterWorldMap::onLocationCommit() return; } - clearLocationSelection(FALSE); + clearLocationSelection(false); mCompletingRegionName = ""; mLastRegionName = ""; @@ -1641,12 +1641,12 @@ void LLFloaterWorldMap::onClearBtn() LLTracker::stopTracking(true); LLWorldMap::getInstance()->cancelTracking(); mSLURL = LLSLURL(); // Clear the SLURL since it's invalid - mSetToUserPosition = TRUE; // Revert back to the current user position + mSetToUserPosition = true; // Revert back to the current user position } void LLFloaterWorldMap::onShowTargetBtn() { - centerOnTarget(TRUE); + centerOnTarget(true); } void LLFloaterWorldMap::onShowAgentBtn() @@ -1722,7 +1722,7 @@ void LLFloaterWorldMap::onTrackRegion() // // protected -void LLFloaterWorldMap::centerOnTarget(BOOL animate) +void LLFloaterWorldMap::centerOnTarget(bool animate) { LLVector3d pos_global; if(LLTracker::getTrackingStatus() != LLTracker::TRACKING_NOTHING) @@ -1732,7 +1732,7 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate) // absolute zero, and keep trying in the draw loop if (tracked_position.isExactlyZero()) { - mWaitingForTracker = TRUE; + mWaitingForTracker = true; return; } else @@ -1759,7 +1759,7 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate) mMapView->setPanWithInterpTime(-llfloor((F32)(pos_global.mdV[VX] * map_scale / REGION_WIDTH_METERS)), -llfloor((F32)(pos_global.mdV[VY] * map_scale / REGION_WIDTH_METERS)), !animate, 0.1f); - mWaitingForTracker = FALSE; + mWaitingForTracker = false; } // protected @@ -1784,7 +1784,7 @@ void LLFloaterWorldMap::fly() // protected void LLFloaterWorldMap::teleport() { - BOOL teleport_home = FALSE; + bool teleport_home = false; LLVector3d pos_global; LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); @@ -1799,7 +1799,7 @@ void LLFloaterWorldMap::teleport() { if( LLTracker::getTrackedLandmarkAssetID() == sHomeID ) { - teleport_home = TRUE; + teleport_home = true; } else { @@ -1858,12 +1858,12 @@ void LLFloaterWorldMap::flyToLandmark() void LLFloaterWorldMap::teleportToLandmark() { - BOOL has_destination = FALSE; + bool has_destination = false; LLUUID destination_id; // Null means "home" if( LLTracker::getTrackedLandmarkAssetID() == sHomeID ) { - has_destination = TRUE; + has_destination = true; } else { @@ -1872,7 +1872,7 @@ void LLFloaterWorldMap::teleportToLandmark() if(landmark && landmark->getGlobalPos(global_pos)) { destination_id = LLTracker::getTrackedLandmarkAssetID(); - has_destination = TRUE; + has_destination = true; } else if(landmark) { @@ -1966,7 +1966,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) if (num_results > 0) { // Ansariel: Let's sort the list to make it more user-friendly - list->sortByColumn("sim_name", TRUE); + list->sortByColumn("sim_name", true); // if match found, highlight it and go if (!match.isUndefined()) @@ -1978,7 +1978,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) { list->selectFirstItem(); } - getChild("search_results")->setFocus(TRUE); + getChild("search_results")->setFocus(true); onCommitSearchResult(); } else @@ -1993,7 +1993,7 @@ void LLFloaterWorldMap::onTeleportFinished() { if(isInVisibleChain()) { - mMapView->setPan(0, 0, TRUE); + mMapView->setPan(0, 0, true); } } diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index dd9236276e..ed3b6ad790 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -114,9 +114,9 @@ public: // A z_attenuation of 0.0f collapses the distance into the X-Y plane F32 getDistanceToDestination(const LLVector3d& pos_global, F32 z_attenuation = 0.5f) const; - void clearLocationSelection(BOOL clear_ui = FALSE, BOOL dest_reached = FALSE); - void clearAvatarSelection(BOOL clear_ui = FALSE); - void clearLandmarkSelection(BOOL clear_ui = FALSE); + void clearLocationSelection(bool clear_ui = false, bool dest_reached = false); + void clearAvatarSelection(bool clear_ui = false); + void clearLandmarkSelection(bool clear_ui = false); // Adjust the maximally zoomed out limit of the zoom slider so you can // see the whole world, plus a little. @@ -159,7 +159,7 @@ protected: // Use own expand/collapse function //void onExpandCollapseBtn(); - void centerOnTarget(BOOL animate); + void centerOnTarget(bool animate); void updateLocation(); // fly to the tracked item, if there is one @@ -213,10 +213,10 @@ private: LLVector3 mCompletingRegionPos; std::string mLastRegionName; - BOOL mWaitingForTracker; + bool mWaitingForTracker; - BOOL mIsClosing; - BOOL mSetToUserPosition; + bool mIsClosing; + bool mSetToUserPosition; LLVector3d mTrackedLocation; LLTracker::ETrackingStatus mTrackedStatus; diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h index 1649b2eed7..1ee8d3bb3b 100644 --- a/indra/newview/llfolderviewmodelinventory.h +++ b/indra/newview/llfolderviewmodelinventory.h @@ -45,10 +45,10 @@ public: virtual PermissionMask getPermissionMask() const = 0; virtual LLFolderType::EType getPreferredType() const = 0; virtual void showProperties(void) = 0; - virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual. + virtual bool isItemInTrash( void) const { return false; } // TODO: make into pure virtual. virtual bool isItemInOutfits() const { return false; } - virtual BOOL isAgentInventory() const { return FALSE; } - virtual BOOL isUpToDate() const = 0; + virtual bool isAgentInventory() const { return false; } + virtual bool isUpToDate() const = 0; virtual void addChild(LLFolderViewModelItem* child); virtual bool hasChildren() const = 0; virtual LLInventoryType::EType getInventoryType() const = 0; @@ -62,7 +62,7 @@ public: virtual bool filter( LLFolderViewFilter& filter); virtual bool filterChildItem( LLFolderViewModelItem* item, LLFolderViewFilter& filter); - virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const = 0; + virtual bool startDrag(EDragAndDropType* type, LLUUID* id) const = 0; virtual LLToolDragAndDrop::ESource getDragSource() const = 0; protected: bool mPrevPassedAllFilters; diff --git a/indra/newview/llfollowcam.cpp b/indra/newview/llfollowcam.cpp index 4a65e8c2dc..7878df5616 100644 --- a/indra/newview/llfollowcam.cpp +++ b/indra/newview/llfollowcam.cpp @@ -445,9 +445,9 @@ void LLFollowCam::update() //------------------------------------------------------------------------------------- -BOOL LLFollowCam::updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_position) +bool LLFollowCam::updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_position) { - BOOL constraint_active = FALSE; + bool constraint_active = false; // only apply this stuff if the behindness angle is something other than opened up all the way if ( mBehindnessMaxAngle < FOLLOW_CAM_MAX_BEHINDNESS_ANGLE - FOLLOW_CAM_BEHINDNESS_EPSILON ) { @@ -488,7 +488,7 @@ BOOL LLFollowCam::updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_pos F32 fraction = ((cameraOffsetAngle - mBehindnessMaxAngle) / cameraOffsetAngle) * LLSmoothInterpolation::getInterpolant(mBehindnessLag); cam_position = focus + horizontalSubjectBack * (slerp(fraction, camera_offset_rotation, LLQuaternion::DEFAULT)); cam_position.mV[VZ] = cameraZ; // clamp z value back to what it was before we started messing with it - constraint_active = TRUE; + constraint_active = true; } } return constraint_active; @@ -843,7 +843,7 @@ void LLFollowCamMgr::setCameraActive( const LLUUID& source, bool active ) void LLFollowCamMgr::removeFollowCamParams(const LLUUID& source) { - setCameraActive(source, FALSE); + setCameraActive(source, false); LLFollowCamParams* params = getParamsForID(source); mParamMap.erase(source); delete params; diff --git a/indra/newview/llfollowcam.h b/indra/newview/llfollowcam.h index 7995848160..fa1740741d 100644 --- a/indra/newview/llfollowcam.h +++ b/indra/newview/llfollowcam.h @@ -188,7 +188,7 @@ protected: //------------------------------------------ protected: void calculatePitchSineAndCosine(); - BOOL updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_position); + bool updateBehindnessConstraint(LLVector3 focus, LLVector3& cam_position); };// end of FollowCam class diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 9c55c94499..14f1f491b9 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -303,7 +303,7 @@ bool LLFriendCardsManager::isCategoryInFriendFolder(const LLViewerInventoryCateg { if (NULL == cat) return false; - return TRUE == gInventory.isObjectDescendentOf(cat->getUUID(), findFriendFolderUUIDImpl()); + return true == gInventory.isObjectDescendentOf(cat->getUUID(), findFriendFolderUUIDImpl()); } bool LLFriendCardsManager::isAnyFriendCategory(const LLUUID& catID) const @@ -312,7 +312,7 @@ bool LLFriendCardsManager::isAnyFriendCategory(const LLUUID& catID) const if (catID == friendFolderID) return true; - return TRUE == gInventory.isObjectDescendentOf(catID, friendFolderID); + return true == gInventory.isObjectDescendentOf(catID, friendFolderID); } void LLFriendCardsManager::syncFriendCardsFolders() diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 125fcbcf38..78d23082d4 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -71,7 +71,7 @@ const F32 MAX_WAIT_ANIM_SECS = 60.f; // Lightweight constructor. // init() does the heavy lifting. LLGestureMgr::LLGestureMgr() -: mValid(FALSE), +: mValid(false), mPlaying(), mActive(), mLoadingCount(0) @@ -151,8 +151,8 @@ void LLGestureMgr::activateGesture(const LLUUID& item_id) mLoadingCount = 1; mDeactivateSimilarNames.clear(); - const BOOL inform_server = TRUE; - const BOOL deactivate_similar = FALSE; + const bool inform_server = true; + const bool deactivate_similar = false; activateGestureWithAsset(item_id, asset_id, inform_server, deactivate_similar); } @@ -191,8 +191,8 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items) } // Don't inform server, we'll do that in bulk - const BOOL no_inform_server = FALSE; - const BOOL deactivate_similar = TRUE; + const bool no_inform_server = false; + const bool deactivate_similar = true; activateGestureWithAsset(item->getUUID(), item->getAssetUUID(), no_inform_server, deactivate_similar); @@ -201,7 +201,7 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items) // Inform the database of this change LLMessageSystem* msg = gMessageSystem; - BOOL start_message = TRUE; + bool start_message = true; for (it = items.begin(); it != items.end(); ++it) { @@ -219,7 +219,7 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items) msg->addUUID("AgentID", gAgent.getID()); msg->addUUID("SessionID", gAgent.getSessionID()); msg->addU32("Flags", 0x0); - start_message = FALSE; + start_message = false; } msg->nextBlock("Data"); @@ -230,7 +230,7 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items) if (msg->getCurrentSendTotal() > MTUBYTES) { gAgent.sendReliableMessage(); - start_message = TRUE; + start_message = true; } } @@ -244,8 +244,8 @@ void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items) struct LLLoadInfo { LLUUID mItemID; - BOOL mInformServer; - BOOL mDeactivateSimilar; + bool mInformServer; + bool mDeactivateSimilar; }; // If inform_server is true, will send a message upstream to update @@ -255,8 +255,8 @@ struct LLLoadInfo */ void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id, const LLUUID& asset_id, - BOOL inform_server, - BOOL deactivate_similar) + bool inform_server, + bool deactivate_similar) { const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id); @@ -290,7 +290,7 @@ void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id, info->mInformServer = inform_server; info->mDeactivateSimilar = deactivate_similar; - const BOOL high_priority = TRUE; + const bool high_priority = true; gAssetStorage->getAssetData(asset_id, LLAssetType::AT_GESTURE, onLoadComplete, @@ -397,7 +397,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i // Inform database of the change LLMessageSystem* msg = gMessageSystem; - BOOL start_message = TRUE; + bool start_message = true; uuid_vec_t::const_iterator vit = gest_item_ids.begin(); while (vit != gest_item_ids.end()) { @@ -408,7 +408,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i msg->addUUID("AgentID", gAgent.getID()); msg->addUUID("SessionID", gAgent.getSessionID()); msg->addU32("Flags", 0x0); - start_message = FALSE; + start_message = false; } msg->nextBlock("Data"); @@ -418,7 +418,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i if (msg->getCurrentSendTotal() > MTUBYTES) { gAgent.sendReliableMessage(); - start_message = TRUE; + start_message = true; } ++vit; @@ -443,7 +443,7 @@ void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& i } -BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id) +bool LLGestureMgr::isGestureActive(const LLUUID& item_id) { const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id); item_map_t::iterator it = mActive.find(base_item_id); @@ -451,24 +451,24 @@ BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id) } -BOOL LLGestureMgr::isGesturePlaying(const LLUUID& item_id) +bool LLGestureMgr::isGesturePlaying(const LLUUID& item_id) { const LLUUID& base_item_id = gInventory.getLinkedItemID(item_id); item_map_t::iterator it = mActive.find(base_item_id); - if (it == mActive.end()) return FALSE; + if (it == mActive.end()) return false; LLMultiGesture* gesture = (*it).second; - if (!gesture) return FALSE; + if (!gesture) return false; return gesture->mPlaying; } -BOOL LLGestureMgr::isGesturePlaying(LLMultiGesture* gesture) +bool LLGestureMgr::isGesturePlaying(LLMultiGesture* gesture) { if(!gesture) { - return FALSE; + return false; } return gesture->mPlaying; @@ -507,10 +507,10 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_ges LLLoadInfo* info = new LLLoadInfo; info->mItemID = base_item_id; - info->mInformServer = TRUE; - info->mDeactivateSimilar = FALSE; + info->mInformServer = true; + info->mDeactivateSimilar = false; - const BOOL high_priority = TRUE; + const bool high_priority = true; gAssetStorage->getAssetData(asset_id, LLAssetType::AT_GESTURE, onLoadComplete, @@ -552,7 +552,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture) gesture->reset(); // Add to list of playing - gesture->mPlaying = TRUE; + gesture->mPlaying = true; mPlaying.push_back(gesture); // Load all needed assets to minimize the delays @@ -581,7 +581,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture) LLAssetType::AT_ANIMATION, onAssetLoadComplete, (void *)id, - TRUE); + true); } break; } @@ -598,7 +598,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture) LLAssetType::AT_SOUND, onAssetLoadComplete, NULL, - TRUE); + true); } break; } @@ -640,12 +640,12 @@ void LLGestureMgr::playGesture(const LLUUID& item_id) // 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 LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::string* revised_string) +bool LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::string* revised_string) { std::string tokenized = utf8str; - BOOL found_gestures = FALSE; - BOOL first_token = TRUE; + bool found_gestures = false; + bool first_token = true; typedef boost::tokenizer > tokenizer; boost::char_separator sep(" "); @@ -709,7 +709,7 @@ BOOL LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::strin revised_string->append( gesture->mReplaceText ); } } - found_gestures = TRUE; + found_gestures = true; } } } @@ -726,14 +726,14 @@ BOOL LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::strin revised_string->append( cur_token ); } - first_token = FALSE; + first_token = false; gesture = NULL; } return found_gestures; } -BOOL LLGestureMgr::triggerGesture(KEY key, MASK mask) +bool LLGestureMgr::triggerGesture(KEY key, MASK mask) { std::vector matching; item_map_t::iterator it; @@ -761,9 +761,9 @@ BOOL LLGestureMgr::triggerGesture(KEY key, MASK mask) LLMultiGesture* gesture = matching[random]; playGesture(gesture); - return TRUE; + return true; } - return FALSE; + return false; } @@ -876,7 +876,7 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture) } // Run the current steps - BOOL waiting = FALSE; + bool waiting = false; while (!waiting && gesture->mPlaying) { // Get the current step, if there is one. @@ -890,7 +890,7 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture) else { // step stays null, we're off the end - gesture->mWaitingAtEnd = TRUE; + gesture->mWaitingAtEnd = true; } @@ -905,12 +905,12 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture) && gesture->mPlayingAnimIDs.empty())) { // all animations are done playing - gesture->mWaitingAtEnd = FALSE; - gesture->mPlaying = FALSE; + gesture->mWaitingAtEnd = false; + gesture->mPlaying = false; } else { - waiting = TRUE; + waiting = true; } continue; } @@ -925,7 +925,7 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture) && gesture->mPlayingAnimIDs.empty())) { // all animations are done playing - gesture->mWaitingAnimations = FALSE; + gesture->mWaitingAnimations = false; gesture->mCurrentStep++; } else if (gesture->mWaitTimer.getElapsedTimeF32() > MAX_WAIT_ANIM_SECS) @@ -933,12 +933,12 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture) // we've waited too long for an animation LL_INFOS("GestureMgr") << "Waited too long for animations to stop, continuing gesture." << LL_ENDL; - gesture->mWaitingAnimations = FALSE; + gesture->mWaitingAnimations = false; gesture->mCurrentStep++; } else { - waiting = TRUE; + waiting = true; } continue; } @@ -954,13 +954,13 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture) if (elapsed > wait_step->mWaitSeconds) { // wait is done, continue execution - gesture->mWaitingTimer = FALSE; + gesture->mWaitingTimer = false; gesture->mCurrentStep++; } else { // we're waiting, so execution is done for now - waiting = TRUE; + waiting = true; } continue; } @@ -1028,7 +1028,7 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step) } // - const BOOL animate = FALSE; + const bool animate = false; // [FS Communication UI] //(LLFloaterReg::getTypedInstance("nearby_chat"))-> @@ -1044,12 +1044,12 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step) LLGestureStepWait* wait_step = (LLGestureStepWait*)step; if (wait_step->mFlags & WAIT_FLAG_TIME) { - gesture->mWaitingTimer = TRUE; + gesture->mWaitingTimer = true; gesture->mWaitTimer.reset(); } else if (wait_step->mFlags & WAIT_FLAG_ALL_ANIM) { - gesture->mWaitingAnimations = TRUE; + gesture->mWaitingAnimations = true; // Use the wait timer as a deadlock breaker for animation // waits. gesture->mWaitTimer.reset(); @@ -1077,8 +1077,8 @@ void LLGestureMgr::onLoadComplete(const LLUUID& asset_uuid, LLLoadInfo* info = (LLLoadInfo*)user_data; LLUUID item_id = info->mItemID; - BOOL inform_server = info->mInformServer; - BOOL deactivate_similar = info->mDeactivateSimilar; + bool inform_server = info->mInformServer; + bool deactivate_similar = info->mDeactivateSimilar; delete info; info = NULL; @@ -1099,7 +1099,7 @@ void LLGestureMgr::onLoadComplete(const LLUUID& asset_uuid, LLMultiGesture* gesture = new LLMultiGesture(); LLDataPackerAsciiBuffer dp(&buffer[0], size+1); - BOOL ok = gesture->deserialize(dp); + bool ok = gesture->deserialize(dp); if (ok) { @@ -1422,7 +1422,7 @@ void LLGestureMgr::notifyObservers() } } -BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str) +bool LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str) { S32 in_len = in_str.length(); @@ -1437,7 +1437,7 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str) if (!LLStringUtil::compareInsensitive(in_str, trigger)) { *out_str = trigger; - return TRUE; + return true; } } } @@ -1488,7 +1488,7 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str) } if (rest_of_match.compare("") == 0) { - return TRUE; + return true; } if (buf.compare("") != 0) { @@ -1502,10 +1502,10 @@ BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str) if (rest_of_match.compare("") != 0) { *out_str = in_str+rest_of_match; - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h index 7c8e8279c2..05b9417ff4 100644 --- a/indra/newview/llgesturemgr.h +++ b/indra/newview/llgesturemgr.h @@ -80,11 +80,11 @@ public: // Load gesture into in-memory active form. // Can be called even if the inventory item isn't loaded yet. - // inform_server TRUE will send message upstream to update database + // inform_server true will send message upstream to update database // user_gesture_active table, which isn't necessary on login. // deactivate_similar will cause other gestures with the same trigger phrase // or keybinding to be deactivated. - void activateGestureWithAsset(const LLUUID& item_id, const LLUUID& asset_id, BOOL inform_server, BOOL deactivate_similar); + void activateGestureWithAsset(const LLUUID& item_id, const LLUUID& asset_id, bool inform_server, bool deactivate_similar); // Takes gesture out of active list and deletes it. void deactivateGesture(const LLUUID& item_id); @@ -93,11 +93,11 @@ public: // or this hot key. void deactivateSimilarGestures(LLMultiGesture* gesture, const LLUUID& in_item_id); - BOOL isGestureActive(const LLUUID& item_id); + bool isGestureActive(const LLUUID& item_id); - BOOL isGesturePlaying(const LLUUID& item_id); + bool isGesturePlaying(const LLUUID& item_id); - BOOL isGesturePlaying(LLMultiGesture* gesture); + bool isGesturePlaying(LLMultiGesture* gesture); const item_map_t& getActiveGestures() const { return mActive; } // Force a gesture to be played, for example, if it is being @@ -119,14 +119,14 @@ public: mCallbackMap[inv_item_id] = cb; } // Trigger the first gesture that matches this key. - // Returns TRUE if it finds a gesture bound to that key. - BOOL triggerGesture(KEY key, MASK mask); + // Returns true if it finds a gesture bound to that key. + bool triggerGesture(KEY key, MASK mask); // Trigger all gestures referenced as substrings in this string - BOOL triggerAndReviseString(const std::string &str, std::string *revised_string = NULL); + bool triggerAndReviseString(const std::string &str, std::string *revised_string = NULL); // Does some gesture have this key bound? - BOOL isKeyBound(KEY key, MASK mask); + bool isKeyBound(KEY key, MASK mask); S32 getPlayingCount() const; @@ -137,7 +137,7 @@ public: // Overriding so we can update active gesture names and notify observers void changed(U32 mask); - BOOL matchPrefix(const std::string& in_str, std::string* out_str); + bool matchPrefix(const std::string& in_str, std::string* out_str); // Copy item ids into the vector void getItemIDs(uuid_vec_t* ids); @@ -180,7 +180,7 @@ private: std::vector mObservers; callback_map_t mCallbackMap; std::vector mPlaying; - BOOL mValid; + bool mValid; std::set mLoadingAssets; diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp index c1563ac89f..203c85ecbf 100644 --- a/indra/newview/llgiveinventory.cpp +++ b/indra/newview/llgiveinventory.cpp @@ -87,7 +87,7 @@ bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item) !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { - allowed = FALSE; + allowed = false; } if (allowed && !item->getPermissions().allowCopyBy(gAgent.getID())) @@ -451,7 +451,7 @@ bool LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, pack_instant_message( gMessageSystem, gAgentID, - FALSE, + false, gAgentSessionID, to_agent, name, @@ -471,7 +471,7 @@ bool LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent, // Make the particle effect optional if (gSavedSettings.getBOOL("FSCreateGiveInventoryParticleEffect")) { - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(gObjectList.findObject(to_agent)); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -647,7 +647,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, pack_instant_message( gMessageSystem, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), to_agent, name, @@ -668,7 +668,7 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent, // Make the particle effect optional if (gSavedSettings.getBOOL("FSCreateGiveInventoryParticleEffect")) { - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(gObjectList.findObject(to_agent)); effectp->setDuration(LL_HUD_DUR_SHORT); diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 09c9464cff..aff5d30901 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -100,7 +100,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) F32 select_dist_squared = maxSelectDistance * maxSelectDistance; // - BOOL deselect = (mask == MASK_CONTROL); + bool deselect = (mask == MASK_CONTROL); S32 left = llmin(x, mDragStartX); S32 right = llmax(x, mDragStartX); S32 top = llmax(y, mDragStartY); @@ -121,16 +121,16 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) S32 width = right - left + 1; S32 height = top - bottom + 1; - BOOL grow_selection = FALSE; - BOOL shrink_selection = FALSE; + bool grow_selection = false; + bool shrink_selection = false; if (height > mDragLastHeight || width > mDragLastWidth) { - grow_selection = TRUE; + grow_selection = true; } if (height < mDragLastHeight || width < mDragLastWidth) { - shrink_selection = TRUE; + shrink_selection = true; } if (!grow_selection && !shrink_selection) @@ -150,8 +150,8 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) gGL.pushMatrix(); // Use faster LLCachedControls - //BOOL limit_select_distance = gSavedSettings.getBOOL("LimitSelectDistance"); - BOOL limit_select_distance = (BOOL)limitSelectDistance; + //bool limit_select_distance = gSavedSettings.getBOOL("LimitSelectDistance"); + bool limit_select_distance = limitSelectDistance(); // if (limit_select_distance) { @@ -190,7 +190,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) camera.setNear(new_near); // Usurp these two - limit_select_distance = TRUE; + limit_select_distance = true; select_dist_squared = s_nFartouchDist * s_nFartouchDist; } // [/RLVa:KB] @@ -244,7 +244,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) LLSpatialPartition* part = region->getSpatialPartition(i); if (part) { - part->cull(camera, &potentials, TRUE); + part->cull(camera, &potentials, true); } } } @@ -746,7 +746,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi } -void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLViewerRegion* regionp) +void LLViewerParcelMgr::renderCollisionSegments(U8* segments, bool use_pass, LLViewerRegion* regionp) { S32 x, y; @@ -888,7 +888,7 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV void LLViewerParcelMgr::resetCollisionTimer() { mCollisionTimer.reset(); - mRenderCollision = TRUE; + mRenderCollision = true; } void draw_line_cube(F32 width, const LLVector3& center) @@ -1019,7 +1019,7 @@ void LLViewerObjectList::renderObjectBeacons() } LLHUDText *hud_textp = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT); - hud_textp->setZCompare(FALSE); + hud_textp->setZCompare(false); LLColor4 color; color = debug_beacon.mTextColor; color.mV[3] *= 1.f; diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 9c1b45c23a..6c8c3ba8d4 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -152,7 +152,7 @@ public: } LLUUID group_id; - if (!group_id.set(tokens[0], FALSE)) + if (!group_id.set(tokens[0], false)) { return false; } @@ -220,7 +220,7 @@ public: } else if (!gdatap->isMemberDataComplete()) { - LL_WARNS() << "LLGroupMgr::getInstance()->getGroupData()->isMemberDataComplete() was FALSE" << LL_ENDL; + LL_WARNS() << "LLGroupMgr::getInstance()->getGroupData()->isMemberDataComplete() was false" << LL_ENDL; processGroupData(); mRequestProcessed = true; } @@ -484,7 +484,7 @@ void LLGroupActions::show(const LLUUID& group_id) //LLFloater *floater = LLFloaterReg::getTypedInstance("people"); //if (!floater->isFrontmost()) //{ - // floater->setVisibleAndFrontmost(TRUE, params); + // floater->setVisibleAndFrontmost(true, params); //} LLFloater* floater = NULL; if (gSavedSettings.getBOOL("FSUseStandaloneGroupFloater")) @@ -509,11 +509,11 @@ void LLGroupActions::show(const LLUUID& group_id) { if (floater->isMinimized()) { - floater->setMinimized(FALSE); + floater->setMinimized(false); } if (!floater->hasFocus()) { - floater->setFocus(TRUE); + floater->setFocus(true); } } // @@ -552,7 +552,7 @@ void LLGroupActions::show(const LLUUID& group_id, const std::string& tab_name) if (floater && floater->isMinimized()) { - floater->setMinimized(FALSE); + floater->setMinimized(false); } // } diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 54b03cce33..1d550dc844 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -555,7 +555,7 @@ void LLGroupListItem::setGroupIconID(const LLUUID& group_icon_id) void LLGroupListItem::setGroupIconVisible(bool visible) { // Already done? Then do nothing. - if (mGroupIcon->getVisible() == (BOOL)visible) + if (mGroupIcon->getVisible() == (bool)visible) return; // Show/hide the group icon. diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 68928c8ddb..00618402fa 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -111,7 +111,7 @@ LLGroupMemberData::LLGroupMemberData(const LLUUID& id, U64 agent_powers, const std::string& title, const std::string& online_status, - BOOL is_owner) : + bool is_owner) : mID(id), mContribution(contribution), mAgentPowers(agent_powers), @@ -155,7 +155,7 @@ LLGroupRoleData::LLGroupRoleData(const LLUUID& role_id, const S32 member_count) : mRoleID(role_id), mMemberCount(member_count), - mMembersNeedsSort(FALSE) + mMembersNeedsSort(false) { mRoleData.mRoleName = role_name; mRoleData.mRoleTitle = role_title; @@ -170,7 +170,7 @@ LLGroupRoleData::LLGroupRoleData(const LLUUID& role_id, mRoleID(role_id), mRoleData(role_data), mMemberCount(member_count), - mMembersNeedsSort(FALSE) + mMembersNeedsSort(false) { } @@ -180,7 +180,7 @@ LLGroupRoleData::~LLGroupRoleData() } S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members, - BOOL needs_sort) + bool needs_sort) { if (mRoleID.isNull()) { @@ -193,7 +193,7 @@ S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members, if (mMembersNeedsSort) { std::sort(mMemberIDs.begin(), mMemberIDs.end()); - mMembersNeedsSort = FALSE; + mMembersNeedsSort = false; } if (needs_sort) { @@ -213,7 +213,7 @@ S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members, void LLGroupRoleData::addMember(const LLUUID& member) { - mMembersNeedsSort = TRUE; + mMembersNeedsSort = true; mMemberIDs.push_back(member); } @@ -223,7 +223,7 @@ bool LLGroupRoleData::removeMember(const LLUUID& member) if (it != mMemberIDs.end()) { - mMembersNeedsSort = TRUE; + mMembersNeedsSort = true; mMemberIDs.erase(it); return true; } @@ -233,7 +233,7 @@ bool LLGroupRoleData::removeMember(const LLUUID& member) void LLGroupRoleData::clearMembers() { - mMembersNeedsSort = FALSE; + mMembersNeedsSort = false; mMemberIDs.clear(); } @@ -244,13 +244,13 @@ void LLGroupRoleData::clearMembers() LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) : mID(id), - mShowInList(TRUE), - mOpenEnrollment(FALSE), + mShowInList(true), + mOpenEnrollment(false), mMembershipFee(0), - mAllowPublish(FALSE), - mListInProfile(FALSE), - mMaturePublish(FALSE), - mChanged(FALSE), + mAllowPublish(false), + mListInProfile(false), + mMaturePublish(false), + mChanged(false), mMemberCount(0), mRoleCount(0), mReceivedRoleMemberPairs(0), @@ -270,7 +270,7 @@ void LLGroupMgrGroupData::setAccessed() mAccessTime = (F32)LLFrameTimer::getTotalSeconds(); } -BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data) +bool LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_data) { role_data_map_t::const_iterator it; @@ -278,10 +278,10 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da it = mRoleChanges.find(role_id); if (it != mRoleChanges.end()) { - if ((*it).second.mChangeType == RC_DELETE) return FALSE; + if ((*it).second.mChangeType == RC_DELETE) return false; role_data = (*it).second; - return TRUE; + return true; } // Ok, no changes, hasn't been deleted, isn't a new role, just find the role. @@ -289,11 +289,11 @@ BOOL LLGroupMgrGroupData::getRoleData(const LLUUID& role_id, LLRoleData& role_da if (rit != mRoles.end()) { role_data = (*rit).second->getRoleData(); - return TRUE; + return true; } // This role must not exist. - return FALSE; + return false; } @@ -355,7 +355,7 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat } } -BOOL LLGroupMgrGroupData::pendingRoleChanges() +bool LLGroupMgrGroupData::pendingRoleChanges() { return (!mRoleChanges.empty()); } @@ -535,7 +535,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, //TODO move this into addrole function //see if they added someone to the owner role and update isOwner - gmd->mIsOwner = (role_id == mOwnerRole) ? TRUE : gmd->mIsOwner; + gmd->mIsOwner = (role_id == mOwnerRole) ? true : gmd->mIsOwner; } else if (RMC_REMOVE == rmc) { @@ -544,7 +544,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, gmd->removeRole(role_id); //see if they removed someone from the owner role and update isOwner - gmd->mIsOwner = (role_id == mOwnerRole) ? FALSE : gmd->mIsOwner; + gmd->mIsOwner = (role_id == mOwnerRole) ? false : gmd->mIsOwner; } lluuid_pair role_member; @@ -586,7 +586,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, recalcAgentPowers(member_id); - mChanged = TRUE; + mChanged = true; return true; } @@ -1067,7 +1067,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) } } - group_datap->mChanged = TRUE; + group_datap->mChanged = true; LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA); } @@ -1140,7 +1140,7 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data) group_datap->mRoleCount = num_group_roles + 1; // Add the everyone role. group_datap->mGroupPropertiesDataComplete = true; - group_datap->mChanged = TRUE; + group_datap->mChanged = true; properties_request_map_t::iterator request = LLGroupMgr::getInstance()->mPropRequests.find(group_id); if (request != LLGroupMgr::getInstance()->mPropRequests.end()) @@ -1237,7 +1237,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) } } - group_datap->mChanged = TRUE; + group_datap->mChanged = true; LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_DATA); } @@ -1347,7 +1347,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) group_datap->mRoleMembersRequestID.setNull(); } - group_datap->mChanged = TRUE; + group_datap->mChanged = true; LLGroupMgr::getInstance()->notifyObservers(GC_ROLE_MEMBER_DATA); if (group_datap->mPendingBanRequest) @@ -1397,7 +1397,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) } } - group_datap->mChanged = TRUE; + group_datap->mChanged = true; LLGroupMgr::getInstance()->notifyObservers(GC_TITLES); } @@ -1478,8 +1478,8 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data) // This is so when we go to modify the group we will be able to do so. // This isn't actually too bad because real data will come down in 2 or 3 miliseconds and replace this. LLGroupData gd; - gd.mAcceptNotices = TRUE; - gd.mListInProfile = TRUE; + gd.mAcceptNotices = true; + gd.mListInProfile = true; gd.mContribution = 0; gd.mID = group_id; gd.mName = "new group"; @@ -1564,7 +1564,7 @@ void LLGroupMgr::notifyObservers(LLGroupChange gc) { oi->second->changed(gc); } - gi->second->mChanged = FALSE; + gi->second->mChanged = false; // notify LLParticularGroupObserver @@ -1766,11 +1766,11 @@ void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& titl { if (iter->mRoleID == title_role_id) { - iter->mSelected = TRUE; + iter->mSelected = true; } else if (iter->mSelected) { - iter->mSelected = FALSE; + iter->mSelected = false; } } } @@ -1781,9 +1781,9 @@ void LLGroupMgr::sendCreateGroupRequest(const std::string& name, U8 show_in_list, const LLUUID& insignia, S32 membership_fee, - BOOL open_enrollment, - BOOL allow_publish, - BOOL mature_publish) + bool open_enrollment, + bool allow_publish, + bool mature_publish) { LLMessageSystem* msg = gMessageSystem; msg->newMessage("CreateGroupRequest"); @@ -1829,7 +1829,7 @@ void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id) gAgent.sendReliableMessage(); // Not expecting a response, so let anyone else watching know the data has changed. - group_datap->mChanged = TRUE; + group_datap->mChanged = true; notifyObservers(GC_PROPERTIES); } @@ -1875,7 +1875,7 @@ void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id) group_datap->mRoleMemberChanges.clear(); // Not expecting a response, so let anyone else watching know the data has changed. - group_datap->mChanged = TRUE; + group_datap->mChanged = true; notifyObservers(GC_ROLE_MEMBER_DATA); } @@ -2190,7 +2190,7 @@ void LLGroupMgr::processGroupBanRequest(const LLSD& content) gdatap->createBanEntry(ban_id, ban_data); } - gdatap->mChanged = TRUE; + gdatap->mChanged = true; LLGroupMgr::getInstance()->notifyObservers(GC_BANLIST); } @@ -2294,7 +2294,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) LL_INFOS("GrpMgr") << "Received empty group members list for group id: " << group_id.asString() << LL_ENDL; // Set mMemberDataComplete for correct handling of empty responses. See MAINT-5237 group_datap->mMemberDataComplete = true; - group_datap->mChanged = TRUE; + group_datap->mChanged = true; LLGroupMgr::getInstance()->notifyObservers(GC_MEMBER_DATA); return; } @@ -2310,7 +2310,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) S32 contribution; U64 member_powers; // If this is changed to a bool, make sure to change the LLGroupMemberData constructor - BOOL is_owner; + bool is_owner; // Compute this once, rather than every time. U64 default_powers = llstrtou64(defaults["default_powers"].asString().c_str(), NULL, 16); @@ -2398,7 +2398,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) sendGroupRoleMembersRequest(group_id); } - group_datap->mChanged = TRUE; + group_datap->mChanged = true; notifyObservers(GC_MEMBER_DATA); } @@ -2414,7 +2414,7 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id) group_datap->sendRoleChanges(); // Not expecting a response, so let anyone else watching know the data has changed. - group_datap->mChanged = TRUE; + group_datap->mChanged = true; notifyObservers(GC_ROLE_DATA); } } @@ -2432,7 +2432,7 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename) { LLXMLNodePtr root; - BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); + bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); if (!success || !root || !root->hasName( "role_actions" )) { diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 462a061980..3bceb2e13d 100644 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -84,14 +84,14 @@ public: U64 agent_powers, const std::string& title, const std::string& online_status, - BOOL is_owner); + bool is_owner); ~LLGroupMemberData(); const LLUUID& getID() const { return mID; } S32 getContribution() const { return mContribution; } U64 getAgentPowers() const { return mAgentPowers; } - BOOL isOwner() const { return mIsOwner; } + bool isOwner() const { return mIsOwner; } const std::string& getTitle() const { return mTitle; } const std::string& getOnlineStatus() const { return mOnlineStatus; } void addRole(const LLUUID& role, LLGroupRoleData* rd); @@ -104,7 +104,7 @@ public: role_list_t::const_iterator roleEnd() const { return mRolesList.end(); } // [/SL:KB] - BOOL isInRole(const LLUUID& role_id) { return (mRolesList.find(role_id) != mRolesList.end()); } + bool isInRole(const LLUUID& role_id) { return (mRolesList.find(role_id) != mRolesList.end()); } private: LLUUID mID; @@ -112,7 +112,7 @@ private: U64 mAgentPowers; std::string mTitle; std::string mOnlineStatus; - BOOL mIsOwner; + bool mIsOwner; role_list_t mRolesList; }; @@ -154,7 +154,7 @@ public: const LLUUID& getID() const { return mRoleID; } const uuid_vec_t& getRoleMembers() const { return mMemberIDs; } - S32 getMembersInRole(uuid_vec_t members, BOOL needs_sort = TRUE); + S32 getMembersInRole(uuid_vec_t members, bool needs_sort = true); S32 getTotalMembersInRole() { return mMemberCount ? mMemberCount : mMemberIDs.size(); } //FIXME: Returns 0 for Everyone role when Member list isn't yet loaded, see MAINT-5225 LLRoleData getRoleData() const { return mRoleData; } @@ -173,7 +173,7 @@ public: protected: LLGroupRoleData() - : mMemberCount(0), mMembersNeedsSort(FALSE) {} + : mMemberCount(0), mMembersNeedsSort(false) {} LLUUID mRoleID; LLRoleData mRoleData; @@ -182,7 +182,7 @@ protected: S32 mMemberCount; private: - BOOL mMembersNeedsSort; + bool mMembersNeedsSort; }; struct LLRoleMemberChange @@ -238,11 +238,11 @@ public: const LLUUID& getID() { return mID; } - BOOL getRoleData(const LLUUID& role_id, LLRoleData& role_data); + bool getRoleData(const LLUUID& role_id, LLRoleData& role_data); void setRoleData(const LLUUID& role_id, LLRoleData role_data); void createRole(const LLUUID& role_id, LLRoleData role_data); void deleteRole(const LLUUID& role_id); - BOOL pendingRoleChanges(); + bool pendingRoleChanges(); void addRolePower(const LLUUID& role_id, U64 power); void removeRolePower(const LLUUID& role_id, U64 power); @@ -307,15 +307,15 @@ public: LLUUID mOwnerRole; std::string mName; std::string mCharter; - BOOL mShowInList; + bool mShowInList; LLUUID mInsigniaID; LLUUID mFounderID; - BOOL mOpenEnrollment; + bool mOpenEnrollment; S32 mMembershipFee; - BOOL mAllowPublish; - BOOL mListInProfile; - BOOL mMaturePublish; - BOOL mChanged; + bool mAllowPublish; + bool mListInProfile; + bool mMaturePublish; + bool mChanged; S32 mMemberCount; S32 mRoleCount; @@ -408,9 +408,9 @@ public: U8 show_in_list, const LLUUID& insignia, S32 membership_fee, - BOOL open_enrollment, - BOOL allow_publish, - BOOL mature_publish); + bool open_enrollment, + bool allow_publish, + bool mature_publish); static void sendGroupMemberJoin(const LLUUID& group_id); static void sendGroupMemberInvites(const LLUUID& group_id, std::map& role_member_pairs); diff --git a/indra/newview/llhudeffect.cpp b/indra/newview/llhudeffect.cpp index eff5587610..eb57cc0d24 100644 --- a/indra/newview/llhudeffect.cpp +++ b/indra/newview/llhudeffect.cpp @@ -42,9 +42,9 @@ LLHUDEffect::LLHUDEffect(const U8 type) mDuration(1.f), mColor() { - mNeedsSendToSim = FALSE; - mOriginatedHere = FALSE; - mDead = FALSE; + mNeedsSendToSim = false; + mOriginatedHere = false; + mDead = false; } LLHUDEffect::~LLHUDEffect() @@ -94,23 +94,23 @@ void LLHUDEffect::setDuration(const F32 duration) mDuration = duration; } -void LLHUDEffect::setNeedsSendToSim(const BOOL send_to_sim) +void LLHUDEffect::setNeedsSendToSim(const bool send_to_sim) { mNeedsSendToSim = send_to_sim; } -BOOL LLHUDEffect::getNeedsSendToSim() const +bool LLHUDEffect::getNeedsSendToSim() const { return mNeedsSendToSim; } -void LLHUDEffect::setOriginatedHere(const BOOL orig_here) +void LLHUDEffect::setOriginatedHere(const bool orig_here) { mOriginatedHere = orig_here; } -BOOL LLHUDEffect::getOriginatedHere() const +bool LLHUDEffect::getOriginatedHere() const { return mOriginatedHere; } @@ -122,7 +122,7 @@ void LLHUDEffect::getIDType(LLMessageSystem *mesgsys, S32 blocknum, LLUUID &id, mesgsys->getU8Fast(_PREHASH_Effect, _PREHASH_Type, type, blocknum); } -BOOL LLHUDEffect::isDead() const +bool LLHUDEffect::isDead() const { return mDead; } diff --git a/indra/newview/llhudeffect.h b/indra/newview/llhudeffect.h index 7c825e3f3d..809ccbcfc7 100644 --- a/indra/newview/llhudeffect.h +++ b/indra/newview/llhudeffect.h @@ -40,17 +40,17 @@ class LLMessageSystem; class LLHUDEffect : public LLHUDObject { public: - void setNeedsSendToSim(const BOOL send_to_sim); - BOOL getNeedsSendToSim() const; - void setOriginatedHere(const BOOL orig_here); - BOOL getOriginatedHere() const; + void setNeedsSendToSim(const bool send_to_sim); + bool getNeedsSendToSim() const; + void setOriginatedHere(const bool orig_here); + bool getOriginatedHere() const; void setDuration(const F32 duration); void setColor(const LLColor4U &color); void setID(const LLUUID &id); const LLUUID &getID() const; - BOOL isDead() const; + bool isDead() const; friend class LLHUDManager; protected: @@ -70,8 +70,8 @@ protected: F32 mDuration; LLColor4U mColor; - BOOL mNeedsSendToSim; - BOOL mOriginatedHere; + bool mNeedsSendToSim; + bool mOriginatedHere; }; #endif // LL_LLHUDEFFECT_H diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp index c80e05e574..735eb4cc75 100644 --- a/indra/newview/llhudeffectbeam.cpp +++ b/indra/newview/llhudeffectbeam.cpp @@ -136,7 +136,7 @@ void LLHUDEffectBeam::packData(LLMessageSystem *mesgsys) void LLHUDEffectBeam::unpackData(LLMessageSystem *mesgsys, S32 blocknum) { LL_ERRS() << "Got beam!" << LL_ENDL; - BOOL use_target_object; + bool use_target_object; LLVector3d new_target; U8 packed_data[41]; diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 56a7b0383c..4bab58a5c2 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -50,7 +50,7 @@ #include "rlvhandler.h" // [/RLVa:KC] -//BOOL LLHUDEffectLookAt::sDebugLookAt = FALSE; +//bool LLHUDEffectLookAt::sDebugLookAt = false; // packet layout const S32 SOURCE_AVATAR = 0; @@ -146,11 +146,11 @@ static LLAttentionSet gGirlAttentions(GIRL_ATTS); -static BOOL loadGender(LLXmlTreeNode* gender) +static bool loadGender(LLXmlTreeNode* gender) { if( !gender) { - return FALSE; + return false; } std::string str; gender->getAttributeString("name", str); @@ -170,7 +170,7 @@ static BOOL loadGender(LLXmlTreeNode* gender) else if(str == "select") attention = &attentions[LOOKAT_TARGET_SELECT]; else if(str == "focus") attention = &attentions[LOOKAT_TARGET_FOCUS]; else if(str == "mouselook") attention = &attentions[LOOKAT_TARGET_MOUSELOOK]; - else return FALSE; + else return false; F32 priority, timeout; attention_node->getAttributeF32("priority", priority); @@ -179,30 +179,30 @@ static BOOL loadGender(LLXmlTreeNode* gender) attention->mPriority = priority; attention->mTimeout = timeout; } - return TRUE; + return true; } -static BOOL loadAttentions() +static bool loadAttentions() { - static BOOL first_time = TRUE; + static bool first_time = true; if( ! first_time) { - return TRUE; // maybe not ideal but otherwise it can continue to fail forever. + return true; // maybe not ideal but otherwise it can continue to fail forever. } - first_time = FALSE; + first_time = false; std::string filename; filename = gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"attentions.xml"); LLXmlTree xml_tree; - BOOL success = xml_tree.parseFile( filename, FALSE ); + bool success = xml_tree.parseFile( filename, false ); if( !success ) { - return FALSE; + return false; } LLXmlTreeNode* root = xml_tree.getRoot(); if( !root ) { - return FALSE; + return false; } //------------------------------------------------------------------------- @@ -211,7 +211,7 @@ static BOOL loadAttentions() if( !root->hasName( "linden_attentions" ) ) { LL_WARNS() << "Invalid linden_attentions file header: " << filename << LL_ENDL; - return FALSE; + return false; } std::string version; @@ -219,7 +219,7 @@ static BOOL loadAttentions() if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) { LL_WARNS() << "Invalid linden_attentions file version: " << version << LL_ENDL; - return FALSE; + return false; } //------------------------------------------------------------------------- @@ -231,11 +231,11 @@ static BOOL loadAttentions() { if( !loadGender( child ) ) { - return FALSE; + return false; } } - return TRUE; + return true; } @@ -249,8 +249,8 @@ LLHUDEffectLookAt::LLHUDEffectLookAt(const U8 type) : mKillTime(0.f), mLastSendTime(0.f), // - //mDebugLookAt( LLCachedControl(gSavedPerAccountSettings, "DebugLookAt", FALSE)) - mDebugLookAt( LLCachedControl(gSavedPerAccountSettings, "DebugLookAt", FALSE)) + //mDebugLookAt( LLCachedControl(gSavedPerAccountSettings, "DebugLookAt", false)) + mDebugLookAt( LLCachedControl(gSavedPerAccountSettings, "DebugLookAt", false)) // { clearLookAtTarget(); @@ -455,30 +455,30 @@ void LLHUDEffectLookAt::setTargetPosGlobal(const LLVector3d &target_pos_global) // setLookAt() // called by agent logic to set look at behavior locally, and propagate to sim //----------------------------------------------------------------------------- -BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position) +bool LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position) { if (!mSourceObject) { - return FALSE; + return false; } if (target_type >= LOOKAT_NUM_TARGETS) { LL_WARNS() << "Bad target_type " << (int)target_type << " - ignoring." << LL_ENDL; - return FALSE; + return false; } // must be same or higher priority than existing effect if ((*mAttentions)[target_type].mPriority < (*mAttentions)[mTargetType].mPriority) { - return FALSE; + return false; } F32 current_time = mTimer.getElapsedTimeF32(); // FIRE-23524 Option to limit look at target to a sphere around the avatar's head. //// type of lookat behavior or target object has changed - //BOOL lookAtChanged = (target_type != mTargetType) || (object != mTargetObject); + //bool lookAtChanged = (target_type != mTargetType) || (object != mTargetObject); //// lookat position has moved a certain amount and we haven't just sent an update //lookAtChanged = lookAtChanged || ((dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE_SQUARED) && @@ -489,7 +489,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec // mLastSentOffsetGlobal = position; // F32 timeout = (*mAttentions)[target_type].mTimeout; // setDuration(timeout); - // setNeedsSendToSim(TRUE); + // setNeedsSendToSim(true); //} // //if (target_type == LOOKAT_TARGET_CLEAR) @@ -534,7 +534,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec mLastSentOffsetGlobal = position; F32 timeout = (*mAttentions)[target_type].mTimeout; setDuration(timeout); - setNeedsSendToSim(TRUE); + setNeedsSendToSim(true); } } @@ -608,7 +608,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec mLastSentOffsetGlobal = gAgent.getPosAgentFromGlobal(mTargetOffsetGlobal); F32 timeout = (*mAttentions)[target_type].mTimeout; setDuration(timeout); - setNeedsSendToSim(TRUE); + setNeedsSendToSim(true); } } // FIRE-23524 Option to limit look at target to a sphere around the avatar's head. @@ -617,7 +617,7 @@ BOOL LLHUDEffectLookAt::setLookAt(ELookAtType target_type, LLViewerObject *objec update(); } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -705,7 +705,7 @@ void LLHUDEffectLookAt::render() } gGL.pushMatrix(); - hud_render_utf8text(name, position, *fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -0.5f * fontp->getWidthF32(name), 3.0f, lookAtColor, FALSE); + hud_render_utf8text(name, position, *fontp, LLFontGL::NORMAL, LLFontGL::DROP_SHADOW, -0.5f * fontp->getWidthF32(name), 3.0f, lookAtColor, false); gGL.popMatrix(); } @@ -784,7 +784,7 @@ void LLHUDEffectLookAt::update() { clearLookAtTarget(); // look at timed out (only happens on own avatar), so tell everyone - setNeedsSendToSim(TRUE); + setNeedsSendToSim(true); } } @@ -843,7 +843,7 @@ bool LLHUDEffectLookAt::calcTargetPosition() { LLVOAvatar *target_av = (LLVOAvatar *)target_obj; - BOOL looking_at_self = source_avatar->isSelf() && target_av->isSelf(); + bool looking_at_self = source_avatar->isSelf() && target_av->isSelf(); // if selecting self, stare forward if (looking_at_self && mTargetOffsetGlobal.magVecSquared() < MIN_TARGET_OFFSET_SQUARED) diff --git a/indra/newview/llhudeffectlookat.h b/indra/newview/llhudeffectlookat.h index aaea997e1e..4b9c4b8160 100644 --- a/indra/newview/llhudeffectlookat.h +++ b/indra/newview/llhudeffectlookat.h @@ -58,7 +58,7 @@ public: /*virtual*/ void markDead(); /*virtual*/ void setSourceObject(LLViewerObject* objectp); - BOOL setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position); + bool setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position); void clearLookAtTarget(); ELookAtType getLookAtType() { return mTargetType; } @@ -80,7 +80,7 @@ protected: void setTargetPosGlobal(const LLVector3d &target_pos_global); public: - //static BOOL sDebugLookAt; + //static bool sDebugLookAt; // // LLCachedControl mDebugLookAt; LLCachedControl mDebugLookAt; diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index a71b7dac8f..790692fc5f 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -72,7 +72,7 @@ const S32 POINTAT_PRIORITIES[POINTAT_NUM_TARGETS] = // statics -BOOL LLHUDEffectPointAt::sDebugPointAt; +bool LLHUDEffectPointAt::sDebugPointAt; //----------------------------------------------------------------------------- @@ -243,39 +243,39 @@ void LLHUDEffectPointAt::setTargetPosGlobal(const LLVector3d &target_pos_global) // setPointAt() // called by agent logic to set look at behavior locally, and propagate to sim //----------------------------------------------------------------------------- -BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position) +bool LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position) { if (!mSourceObject) { - return FALSE; + return false; } if (target_type >= POINTAT_NUM_TARGETS) { LL_WARNS() << "Bad target_type " << (int)target_type << " - ignoring." << LL_ENDL; - return FALSE; + return false; } // must be same or higher priority than existing effect if (POINTAT_PRIORITIES[target_type] < POINTAT_PRIORITIES[mTargetType]) { - return FALSE; + return false; } F32 current_time = mTimer.getElapsedTimeF32(); // type of pointat behavior or target object has changed - BOOL targetTypeChanged = (target_type != mTargetType) || + bool targetTypeChanged = (target_type != mTargetType) || (object != mTargetObject); - BOOL targetPosChanged = (dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE_SQUARED) && + bool targetPosChanged = (dist_vec_squared(position, mLastSentOffsetGlobal) > MIN_DELTAPOS_FOR_UPDATE_SQUARED) && ((current_time - mLastSendTime) > (1.f / MAX_SENDS_PER_SEC)); if (targetTypeChanged || targetPosChanged) { mLastSentOffsetGlobal = position; setDuration(POINTAT_TIMEOUTS[target_type]); - setNeedsSendToSim(TRUE); + setNeedsSendToSim(true); // LL_INFOS() << "Sending pointat data" << LL_ENDL; } @@ -302,7 +302,7 @@ BOOL LLHUDEffectPointAt::setPointAt(EPointAtType target_type, LLViewerObject *ob update(); } - return TRUE; + return true; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llhudeffectpointat.h b/indra/newview/llhudeffectpointat.h index 6200b68cbc..8ce7b33c6f 100644 --- a/indra/newview/llhudeffectpointat.h +++ b/indra/newview/llhudeffectpointat.h @@ -50,7 +50,7 @@ public: /*virtual*/ void markDead(); /*virtual*/ void setSourceObject(LLViewerObject* objectp); - BOOL setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position); + bool setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position); void clearPointAtTarget(); EPointAtType getPointAtType() { return mTargetType; } @@ -70,7 +70,7 @@ protected: bool calcTargetPosition(); void update(); public: - static BOOL sDebugPointAt; + static bool sDebugPointAt; private: EPointAtType mTargetType; LLVector3d mTargetOffsetGlobal; diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp index 403041ad1d..591bee2d80 100644 --- a/indra/newview/llhudeffecttrail.cpp +++ b/indra/newview/llhudeffecttrail.cpp @@ -42,7 +42,7 @@ #include "llvoavatar.h" #include "llworld.h" -LLHUDEffectSpiral::LLHUDEffectSpiral(const U8 type) : LLHUDEffect(type), mbInit(FALSE) +LLHUDEffectSpiral::LLHUDEffectSpiral(const U8 type) : LLHUDEffect(type), mbInit(false) { mKillTime = 10.f; mVMag = 1.f; @@ -167,7 +167,7 @@ void LLHUDEffectSpiral::triggerLocal() { mKillTime = mTimer.getElapsedTimeF32() + mDuration; - BOOL show_beam = gSavedSettings.getBOOL("ShowSelectionBeam"); + bool show_beam = gSavedSettings.getBOOL("ShowSelectionBeam"); LLColor4 color; color.setVec(mColor); @@ -247,7 +247,7 @@ void LLHUDEffectSpiral::triggerLocal() } } - mbInit = TRUE; + mbInit = true; } void LLHUDEffectSpiral::setTargetObject(LLViewerObject *objp) diff --git a/indra/newview/llhudeffecttrail.h b/indra/newview/llhudeffecttrail.h index 6f5a328c63..102e42c975 100644 --- a/indra/newview/llhudeffecttrail.h +++ b/indra/newview/llhudeffecttrail.h @@ -76,7 +76,7 @@ private: F32 mOffset[NUM_TRAIL_POINTS]; */ - BOOL mbInit; + bool mbInit; LLPointer mPartSourcep; F32 mKillTime; diff --git a/indra/newview/llhudicon.cpp b/indra/newview/llhudicon.cpp index 7b843a8b0d..b77e48a577 100644 --- a/indra/newview/llhudicon.cpp +++ b/indra/newview/llhudicon.cpp @@ -69,7 +69,7 @@ LLHUDIcon::LLHUDIcon(const U8 type) : LLHUDObject(type), mImagep(NULL), mScale(0.1f), - mHidden(FALSE), + mHidden(false), mScriptError(false) // Mark script error icons { sIconInstances.push_back(this); @@ -210,15 +210,15 @@ void LLHUDIcon::markDead() LLHUDObject::markDead(); } -BOOL LLHUDIcon::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection) +bool LLHUDIcon::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection) { if (mHidden) - return FALSE; + return false; if (mSourceObject.isNull() || mImagep.isNull()) { markDead(); - return FALSE; + return false; } LLVector3 obj_position = mSourceObject->getRenderPosition(); @@ -257,7 +257,7 @@ BOOL LLHUDIcon::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& if (time_elapsed > MAX_VISIBLE_TIME) { markDead(); - return FALSE; + return false; } F32 image_aspect = (F32)mImagep->getFullWidth() / (F32)mImagep->getFullHeight() ; @@ -296,10 +296,10 @@ BOOL LLHUDIcon::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& dir.mul(t); intersection->setAdd(start, dir); } - return TRUE; + return true; } - return FALSE; + return false; } //static @@ -336,7 +336,7 @@ void LLHUDIcon::updateAll() } //static -BOOL LLHUDIcon::iconsNearby() +bool LLHUDIcon::iconsNearby() { return !sIconInstances.empty(); } @@ -393,7 +393,7 @@ void LLHUDIcon::setScriptError() } //static -BOOL LLHUDIcon::scriptIconsNearby() +bool LLHUDIcon::scriptIconsNearby() { return !sScriptErrorIconInstances.empty(); } diff --git a/indra/newview/llhudicon.h b/indra/newview/llhudicon.h index 1581d80245..a513bbd797 100644 --- a/indra/newview/llhudicon.h +++ b/indra/newview/llhudicon.h @@ -62,17 +62,17 @@ public: static void cleanupDeadIcons(); static S32 getNumInstances(); - static BOOL iconsNearby(); + static bool iconsNearby(); - BOOL getHidden() const { return mHidden; } - void setHidden( BOOL hide ) { mHidden = hide; } + bool getHidden() const { return mHidden; } + void setHidden( bool hide ) { mHidden = hide; } - BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection); + bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection); // Mark script error icons void setScriptError(); bool getScriptError() const { return mScriptError; } - static BOOL scriptIconsNearby(); + static bool scriptIconsNearby(); // Mark script error icons protected: @@ -85,7 +85,7 @@ private: LLFrameTimer mLifeTimer; F32 mDistance; F32 mScale; - BOOL mHidden; + bool mHidden; typedef std::vector > icon_instance_t; static icon_instance_t sIconInstances; diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp index 6affafdb43..d5fde709f2 100644 --- a/indra/newview/llhudmanager.cpp +++ b/indra/newview/llhudmanager.cpp @@ -96,7 +96,7 @@ void LLHUDManager::sendEffects() msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_Effect); hep->packData(msg); - hep->setNeedsSendToSim(FALSE); + hep->setNeedsSendToSim(false); if (!hep->isDead()) //packData(msg) might have invalidated the effect gAgent.sendMessage(); } @@ -126,7 +126,7 @@ void LLHUDManager::cleanupEffects() } } -LLHUDEffect *LLHUDManager::createViewerEffect(const U8 type, BOOL send_to_sim, BOOL originated_here) +LLHUDEffect *LLHUDManager::createViewerEffect(const U8 type, bool send_to_sim, bool originated_here) { // SJB: DO NOT USE addHUDObject!!! Not all LLHUDObjects are LLHUDEffects! LLHUDEffect *hep = LLHUDObject::addHUDEffect(type); @@ -192,7 +192,7 @@ void LLHUDManager::processViewerEffect(LLMessageSystem *mesgsys, void **user_dat { if (!effectp) { - effectp = LLHUDManager::getInstance()->createViewerEffect(effect_type, FALSE, FALSE); + effectp = LLHUDManager::getInstance()->createViewerEffect(effect_type, false, false); } if (effectp) diff --git a/indra/newview/llhudmanager.h b/indra/newview/llhudmanager.h index 7782739690..0c454dc4b9 100644 --- a/indra/newview/llhudmanager.h +++ b/indra/newview/llhudmanager.h @@ -40,7 +40,7 @@ class LLHUDManager : public LLSingleton ~LLHUDManager(); public: - LLHUDEffect *createViewerEffect(const U8 type, BOOL send_to_sim = TRUE, BOOL originated_here = TRUE); + LLHUDEffect *createViewerEffect(const U8 type, bool send_to_sim = true, bool originated_here = true); void updateEffects(); void sendEffects(); diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp index a5e701b831..fe1ddb6d9f 100644 --- a/indra/newview/llhudnametag.cpp +++ b/indra/newview/llhudnametag.cpp @@ -65,7 +65,7 @@ const F32 LOD_2_SCREEN_COVERAGE = 0.40f; std::set > LLHUDNameTag::sTextObjects; std::vector > LLHUDNameTag::sVisibleTextObjects; -BOOL LLHUDNameTag::sDisplayText = TRUE ; +bool LLHUDNameTag::sDisplayText = true ; const F32 LLHUDNameTag::NAMETAG_MAX_WIDTH = 298.f; const F32 LLHUDNameTag::HUD_TEXT_MAX_WIDTH = 190.f; @@ -77,13 +77,13 @@ bool llhudnametag_further_away::operator()(const LLPointer& lhs, c LLHUDNameTag::LLHUDNameTag(const U8 type) : LLHUDObject(type), - mDoFade(TRUE), + mDoFade(true), mFadeDistance(8.f), mFadeRange(4.f), mLastDistance(0.f), - mZCompare(TRUE), - mVisibleOffScreen(FALSE), - mOffscreen(FALSE), + mZCompare(true), + mVisibleOffScreen(false), + mOffscreen(false), mColor(1.f, 1.f, 1.f, 1.f), // mScale(), mWidth(0.f), @@ -102,7 +102,7 @@ LLHUDNameTag::LLHUDNameTag(const U8 type) mTextAlignment(ALIGN_TEXT_CENTER), mVertAlignment(ALIGN_VERT_CENTER), mLOD(0), - mHidden(FALSE) + mHidden(false) { LLPointer ptr(this); sTextObjects.insert(ptr); @@ -116,17 +116,17 @@ LLHUDNameTag::~LLHUDNameTag() } -BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, BOOL debug_render) +bool LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, bool debug_render) { if (!mVisible || mHidden) { - return FALSE; + return false; } // don't pick text that isn't bound to a viewerobject if (!mSourceObject || mSourceObject->mDrawable.isNull()) { - return FALSE; + return false; } F32 alpha_factor = 1.f; @@ -141,7 +141,7 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4 } if (text_color.mV[3] < 0.01f) { - return FALSE; + return false; } mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f)); @@ -176,7 +176,7 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4 LLVector3 height_vec = mHeight * y_pixel_vec; LLCoordGL screen_pos; - LLViewerCamera::getInstance()->projectPosAgentToScreen(position, screen_pos, FALSE); + LLViewerCamera::getInstance()->projectPosAgentToScreen(position, screen_pos, false); LLVector2 screen_offset; screen_offset = updateScreenPos(mPositionOffset); @@ -216,11 +216,11 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4 { dir.mul(t); intersection.setAdd(start, dir); - return TRUE; + return true; } } - return FALSE; + return false; } void LLHUDNameTag::render() @@ -230,11 +230,11 @@ void LLHUDNameTag::render() { LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); //LLGLDisable gls_stencil(GL_STENCIL_TEST); - renderText(FALSE); + renderText(false); } } -void LLHUDNameTag::renderText(BOOL for_select) +void LLHUDNameTag::renderText(bool for_select) { if (!mVisible || mHidden) { @@ -257,7 +257,7 @@ void LLHUDNameTag::renderText(BOOL for_select) gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); } - LLGLState gls_blend(GL_BLEND, for_select ? FALSE : TRUE); + LLGLState gls_blend(GL_BLEND, for_select ? false : true); LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f); F32 alpha_factor = 1.f; @@ -303,7 +303,7 @@ void LLHUDNameTag::renderText(BOOL for_select) mRadius = (width_vec + height_vec).magVec() * 0.5f; LLCoordGL screen_pos; - LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, FALSE); + LLViewerCamera::getInstance()->projectPosAgentToScreen(mPositionAgent, screen_pos, false); LLVector2 screen_offset = updateScreenPos(mPositionOffset); @@ -352,7 +352,7 @@ void LLHUDNameTag::renderText(BOOL for_select) LLColor4 label_color(0.f, 0.f, 0.f, 1.f); label_color.mV[VALPHA] = alpha_factor; - hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, FALSE); + hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false); } } @@ -397,7 +397,7 @@ void LLHUDNameTag::renderText(BOOL for_select) text_color = segment_iter->mColor; text_color.mV[VALPHA] *= alpha_factor; - hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, FALSE); + hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, false); } } /// Reset the default color to white. The renderer expects this to be the default. @@ -532,7 +532,7 @@ void LLHUDNameTag::addLabel(const std::string& label_utf8, F32 max_pixels) } } -void LLHUDNameTag::setZCompare(const BOOL zcompare) +void LLHUDNameTag::setZCompare(const bool zcompare) { mZCompare = zcompare; } @@ -564,7 +564,7 @@ void LLHUDNameTag::setAlpha(F32 alpha) } -void LLHUDNameTag::setDoFade(const BOOL do_fade) +void LLHUDNameTag::setDoFade(const bool do_fade) { mDoFade = do_fade; } @@ -581,7 +581,7 @@ void LLHUDNameTag::updateVisibility() if (!mSourceObject) { //LL_WARNS() << "LLHUDNameTag::updateScreenPos -- mSourceObject is NULL!" << LL_ENDL; - mVisible = TRUE; + mVisible = true; sVisibleTextObjects.push_back(LLPointer (this)); return; } @@ -589,7 +589,7 @@ void LLHUDNameTag::updateVisibility() // Not visible if parent object is dead if (mSourceObject->isDead()) { - mVisible = FALSE; + mVisible = false; return; } @@ -600,7 +600,7 @@ void LLHUDNameTag::updateVisibility() if (dir_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= 0.f) { //text is behind camera, don't render - mVisible = FALSE; + mVisible = false; return; } @@ -617,7 +617,7 @@ void LLHUDNameTag::updateVisibility() if (mLOD >= 3 || !mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange))) { - mVisible = FALSE; + mVisible = false; return; } @@ -630,21 +630,21 @@ void LLHUDNameTag::updateVisibility() (x_pixel_vec * mPositionOffset.mV[VX]) + (y_pixel_vec * mPositionOffset.mV[VY]); - mOffscreen = FALSE; + mOffscreen = false; if (!LLViewerCamera::getInstance()->sphereInFrustum(render_position, mRadius)) { if (!mVisibleOffScreen) { - mVisible = FALSE; + mVisible = false; return; } else { - mOffscreen = TRUE; + mOffscreen = true; } } - mVisible = TRUE; + mVisible = true; sVisibleTextObjects.push_back(LLPointer (this)); } @@ -656,7 +656,7 @@ LLVector2 LLHUDNameTag::updateScreenPos(LLVector2 &offset) LLVector3 y_pixel_vec; LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec); LLVector3 world_pos = mPositionAgent + (offset.mV[VX] * x_pixel_vec) + (offset.mV[VY] * y_pixel_vec); - if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, FALSE) && mVisibleOffScreen) + if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, false) && mVisibleOffScreen) { // bubble off-screen, so find a spot for it along screen edge LLViewerCamera::getInstance()->projectPosAgentToScreenEdge(world_pos, screen_pos); diff --git a/indra/newview/llhudnametag.h b/indra/newview/llhudnametag.h index 361e4d4f4b..6bd483bcb7 100644 --- a/indra/newview/llhudnametag.h +++ b/indra/newview/llhudnametag.h @@ -111,9 +111,9 @@ public: void setFont(const LLFontGL* font); void setColor(const LLColor4 &color); void setAlpha(F32 alpha); - void setZCompare(const BOOL zcompare); - void setDoFade(const BOOL do_fade); - void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; } + void setZCompare(const bool zcompare); + void setDoFade(const bool do_fade); + void setVisibleOffScreen(bool visible) { mVisibleOffScreen = visible; } // mMaxLines of -1 means unlimited lines. void setMaxLines(S32 max_lines) { mMaxLines = max_lines; } @@ -128,36 +128,36 @@ public: friend class LLHUDObject; /*virtual*/ F32 getDistance() const { return mLastDistance; } S32 getLOD() { return mLOD; } - BOOL getVisible() { return mVisible; } - BOOL getHidden() const { return mHidden; } - void setHidden( BOOL hide ) { mHidden = hide; } + bool getVisible() { return mVisible; } + bool getHidden() const { return mHidden; } + void setHidden( bool hide ) { mHidden = hide; } void shift(const LLVector3& offset); - BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, BOOL debug_render = FALSE); + bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, bool debug_render = false); static void shiftAll(const LLVector3& offset); static void addPickable(std::set &pick_list); static void reshape(); - static void setDisplayText(BOOL flag) { sDisplayText = flag ; } + static void setDisplayText(bool flag) { sDisplayText = flag ; } protected: LLHUDNameTag(const U8 type); /*virtual*/ void render(); - void renderText(BOOL for_select); + void renderText(bool for_select); static void updateAll(); void setLOD(S32 lod); S32 getMaxLines(); private: ~LLHUDNameTag(); - BOOL mDoFade; + bool mDoFade; F32 mFadeRange; F32 mFadeDistance; F32 mLastDistance; - BOOL mZCompare; - BOOL mVisibleOffScreen; - BOOL mOffscreen; + bool mZCompare; + bool mVisibleOffScreen; + bool mOffscreen; LLColor4 mColor; // LLVector3 mScale; F32 mWidth; @@ -179,11 +179,11 @@ private: ETextAlignment mTextAlignment; EVertAlignment mVertAlignment; S32 mLOD; - BOOL mHidden; + bool mHidden; LLPointer mRoundedRectImgp; LLPointer mRoundedRectTopImgp; - static BOOL sDisplayText ; + static bool sDisplayText ; static std::set > sTextObjects; static std::vector > sVisibleTextObjects; // static std::vector > sVisibleHUDTextObjects; diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 292045f25d..08a763bcec 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -61,9 +61,9 @@ LLHUDObject::LLHUDObject(const U8 type) : mSourceObject(NULL), mTargetObject(NULL) { - mVisible = TRUE; + mVisible = true; mType = type; - mDead = FALSE; + mDead = false; } LLHUDObject::~LLHUDObject() @@ -72,8 +72,8 @@ LLHUDObject::~LLHUDObject() void LLHUDObject::markDead() { - mVisible = FALSE; - mDead = TRUE; + mVisible = false; + mDead = true; mSourceObject = NULL; mTargetObject = NULL; } diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index ce128519ea..d6b355e336 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -58,7 +58,7 @@ public: void setPositionGlobal(const LLVector3d &position_global); void setPositionAgent(const LLVector3 &position_agent); - BOOL isVisible() const { return mVisible; } + bool isVisible() const { return mVisible; } U8 getType() const { return mType; } @@ -109,8 +109,8 @@ protected: protected: U8 mType; - BOOL mDead; - BOOL mVisible; + bool mDead; + bool mVisible; LLVector3d mPositionGlobal; LLPointer mSourceObject; LLPointer mTargetObject; diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index dff310ecf9..b48bfe223f 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -44,7 +44,7 @@ void hud_render_utf8text(const std::string &str, const LLVector3 &pos_agent, const LLFontGL::ShadowType shadow, const F32 x_offset, const F32 y_offset, const LLColor4& color, - const BOOL orthographic) + const bool orthographic) { LLWString wstr(utf8str_to_wstring(str)); hud_render_text(wstr, pos_agent, font, style, shadow, x_offset, y_offset, color, orthographic); @@ -56,7 +56,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, const LLFontGL::ShadowType shadow, const F32 x_offset, const F32 y_offset, const LLColor4& color, - const BOOL orthographic) + const bool orthographic) { LLViewerCamera* camera = LLViewerCamera::getInstance(); // Do cheap plane culling diff --git a/indra/newview/llhudrender.h b/indra/newview/llhudrender.h index b541cd5036..4d8f36c25c 100644 --- a/indra/newview/llhudrender.h +++ b/indra/newview/llhudrender.h @@ -41,7 +41,7 @@ void hud_render_text(const LLWString &wstr, const F32 x_offset, const F32 y_offset, const LLColor4& color, - const BOOL orthographic); + const bool orthographic); // Legacy, slower void hud_render_utf8text(const std::string &str, @@ -52,7 +52,7 @@ void hud_render_utf8text(const std::string &str, const F32 x_offset, const F32 y_offset, const LLColor4& color, - const BOOL orthographic); + const bool orthographic); #endif //LL_LLHUDRENDER_H diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index a081901eb5..87e2b89c43 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -61,7 +61,7 @@ const F32 MAX_DRAW_DISTANCE = 300.f; std::set > LLHUDText::sTextObjects; std::vector > LLHUDText::sVisibleTextObjects; std::vector > LLHUDText::sVisibleHUDTextObjects; -BOOL LLHUDText::sDisplayText = TRUE ; +bool LLHUDText::sDisplayText = true ; bool lltextobject_further_away::operator()(const LLPointer& lhs, const LLPointer& rhs) const { @@ -71,8 +71,8 @@ bool lltextobject_further_away::operator()(const LLPointer& lhs, cons LLHUDText::LLHUDText(const U8 type) : LLHUDObject(type), - mOnHUDAttachment(FALSE), -// mVisibleOffScreen(FALSE), + mOnHUDAttachment(false), +// mVisibleOffScreen(false), mWidth(0.f), mHeight(0.f), mFontp(LLFontGL::getFontSansSerifSmall()), @@ -83,18 +83,18 @@ LLHUDText::LLHUDText(const U8 type) : mTextAlignment(ALIGN_TEXT_CENTER), mVertAlignment(ALIGN_VERT_CENTER), // mLOD(0), - mHidden(FALSE) + mHidden(false) { mColor = LLColor4(1.f, 1.f, 1.f, 1.f); - mDoFade = TRUE; + mDoFade = true; // FIRE-17393: Control HUD text fading by options //mFadeDistance = 8.f; //mFadeRange = 4.f; mFadeDistance = gSavedSettings.getF32("FSHudTextFadeDistance"); mFadeRange = gSavedSettings.getF32("FSHudTextFadeRange"); // - mZCompare = TRUE; - mOffscreen = FALSE; + mZCompare = true; + mOffscreen = false; mRadius = 0.1f; LLPointer ptr(this); sTextObjects.insert(ptr); @@ -123,7 +123,7 @@ void LLHUDText::renderText() gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); - LLGLState gls_blend(GL_BLEND, TRUE); + LLGLState gls_blend(GL_BLEND, true); LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f); F32 alpha_factor = 1.f; @@ -326,7 +326,7 @@ void LLHUDText::addLine(const std::string &text_utf8, } } -void LLHUDText::setZCompare(const BOOL zcompare) +void LLHUDText::setZCompare(const bool zcompare) { mZCompare = zcompare; } @@ -358,7 +358,7 @@ void LLHUDText::setAlpha(F32 alpha) } -void LLHUDText::setDoFade(const BOOL do_fade) +void LLHUDText::setDoFade(const bool do_fade) { mDoFade = do_fade; } @@ -375,7 +375,7 @@ void LLHUDText::updateVisibility() if (!mSourceObject) { // Beacons - mVisible = TRUE; + mVisible = true; if (mOnHUDAttachment) { sVisibleHUDTextObjects.push_back(LLPointer (this)); @@ -390,14 +390,14 @@ void LLHUDText::updateVisibility() // Not visible if parent object is dead if (mSourceObject->isDead()) { - mVisible = FALSE; + mVisible = false; return; } // for now, all text on hud objects is visible if (mOnHUDAttachment) { - mVisible = TRUE; + mVisible = true; sVisibleHUDTextObjects.push_back(LLPointer (this)); mLastDistance = mPositionAgent.mV[VX]; return; @@ -410,7 +410,7 @@ void LLHUDText::updateVisibility() if (dir_from_camera * LLViewerCamera::getInstance()->getAtAxis() <= 0.f) { //text is behind camera, don't render - mVisible = FALSE; + mVisible = false; return; } @@ -427,7 +427,7 @@ void LLHUDText::updateVisibility() if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange))) { - mVisible = FALSE; + mVisible = false; return; } @@ -448,7 +448,7 @@ void LLHUDText::updateVisibility() if(last_distance_center > max_draw_distance) { - mVisible = FALSE; + mVisible = false; return; } @@ -462,21 +462,21 @@ void LLHUDText::updateVisibility() (x_pixel_vec * mPositionOffset.mV[VX]) + (y_pixel_vec * mPositionOffset.mV[VY]); - mOffscreen = FALSE; + mOffscreen = false; if (!LLViewerCamera::getInstance()->sphereInFrustum(render_position, mRadius)) { // if (!mVisibleOffScreen) // { - mVisible = FALSE; + mVisible = false; return; // } // else // { -// mOffscreen = TRUE; +// mOffscreen = true; // } } - mVisible = TRUE; + mVisible = true; sVisibleTextObjects.push_back(LLPointer (this)); } @@ -488,7 +488,7 @@ LLVector2 LLHUDText::updateScreenPos(LLVector2 &offset) LLVector3 y_pixel_vec; LLViewerCamera::getInstance()->getPixelVectors(mPositionAgent, y_pixel_vec, x_pixel_vec); // LLVector3 world_pos = mPositionAgent + (offset.mV[VX] * x_pixel_vec) + (offset.mV[VY] * y_pixel_vec); -// if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, FALSE) && mVisibleOffScreen) +// if (!LLViewerCamera::getInstance()->projectPosAgentToScreen(world_pos, screen_pos, false) && mVisibleOffScreen) // { // // bubble off-screen, so find a spot for it along screen edge // LLViewerCamera::getInstance()->projectPosAgentToScreenEdge(world_pos, screen_pos); diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index b11bdcbbc6..514370be05 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -97,9 +97,9 @@ public: void setFont(const LLFontGL* font); void setColor(const LLColor4 &color); void setAlpha(F32 alpha); - void setZCompare(const BOOL zcompare); - void setDoFade(const BOOL do_fade); -// void setVisibleOffScreen(BOOL visible) { mVisibleOffScreen = visible; } + void setZCompare(const bool zcompare); + void setDoFade(const bool do_fade); +// void setVisibleOffScreen(bool visible) { mVisibleOffScreen = visible; } // mMaxLines of -1 means unlimited lines. void setMaxLines(S32 max_lines) { mMaxLines = max_lines; } @@ -113,16 +113,16 @@ public: /*virtual*/ void markDead(); friend class LLHUDObject; /*virtual*/ F32 getDistance() const { return mLastDistance; } - BOOL getVisible() { return mVisible; } - BOOL getHidden() const { return mHidden; } - void setHidden( BOOL hide ) { mHidden = hide; } - void setOnHUDAttachment(BOOL on_hud) { mOnHUDAttachment = on_hud; } + bool getVisible() { return mVisible; } + bool getHidden() const { return mHidden; } + void setHidden( bool hide ) { mHidden = hide; } + void setOnHUDAttachment(bool on_hud) { mOnHUDAttachment = on_hud; } void shift(const LLVector3& offset); static void shiftAll(const LLVector3& offset); static void renderAllHUD(); static void reshape(); - static void setDisplayText(BOOL flag) { sDisplayText = flag ; } + static void setDisplayText(bool flag) { sDisplayText = flag ; } // [RLVa:KB] - Checked: RLVa-2.0.3 const std::string& getObjectText() const { return mObjText; } @@ -145,14 +145,14 @@ protected: private: ~LLHUDText(); - BOOL mOnHUDAttachment; - BOOL mDoFade; + bool mOnHUDAttachment; + bool mDoFade; F32 mFadeRange; F32 mFadeDistance; F32 mLastDistance; - BOOL mZCompare; -// BOOL mVisibleOffScreen; - BOOL mOffscreen; + bool mZCompare; +// bool mVisibleOffScreen; + bool mOffscreen; LLColor4 mColor; LLVector3 mScale; F32 mWidth; @@ -171,12 +171,12 @@ private: std::vector mTextSegments; ETextAlignment mTextAlignment; EVertAlignment mVertAlignment; - BOOL mHidden; + bool mHidden; // [RLVa:KB] - Checked: RLVa-1.0.0 std::string mObjText; // [/RLVa:KB] - static BOOL sDisplayText ; + static bool sDisplayText ; static std::set > sTextObjects; static std::vector > sVisibleTextObjects; static std::vector > sVisibleHUDTextObjects; diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 6f9e88468b..13cf3bf641 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -142,7 +142,7 @@ static std::string clean_name_from_im(const std::string& name, EInstantMessage t } static std::string clean_name_from_task_im(const std::string& msg, - BOOL from_group) + bool from_group) { boost::smatch match; static const boost::regex returned_exp( @@ -297,7 +297,7 @@ void inventory_offer_handler(LLOfferInfo* info) // faked for toast one. payload["object_id"] = object_id; // Flag indicating that this notification is faked for toast. - payload["give_inventory_notification"] = FALSE; + payload["give_inventory_notification"] = false; args["OBJECTFROMNAME"] = info->mFromName; args["NAME"] = info->mFromName; if (info->mFromGroup) @@ -323,7 +323,7 @@ void inventory_offer_handler(LLOfferInfo* info) // Only filter if the object owner is a nearby agent if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, info->mFromID)) && (RlvUtil::isNearbyAgent(info->mFromID)) ) { - payload["rlv_shownames"] = TRUE; + payload["rlv_shownames"] = true; args["NAME_SLURL"] = LLSLURL("agent", info->mFromID, "rlvanonym").getSLURLString(); } // [/RLVa:KB] @@ -338,7 +338,7 @@ void inventory_offer_handler(LLOfferInfo* info) p.name = info->mFromID == gAgentID ? "OwnObjectGiveItem" : "ObjectGiveItem"; // Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory. - LLPostponedNotification::add(p, info->mFromID, info->mFromGroup == TRUE); + LLPostponedNotification::add(p, info->mFromID, info->mFromGroup == true); } else // Agent -> Agent Inventory Offer { @@ -348,7 +348,7 @@ void inventory_offer_handler(LLOfferInfo* info) (RlvActions::canShowName(RlvActions::SNC_DEFAULT, info->mFromID)) || (!RlvUtil::isNearbyAgent(info->mFromID)) || (RlvUIEnabler::hasOpenIM(info->mFromID)) || (RlvUIEnabler::hasOpenProfile(info->mFromID)); if (!fRlvCanShowName) { - payload["rlv_shownames"] = TRUE; + payload["rlv_shownames"] = true; LLAvatarName av_name; if (LLAvatarNameCache::get(info->mFromID, &av_name)) { @@ -405,7 +405,7 @@ void inventory_offer_handler(LLOfferInfo* info) if (!bAutoAccept) // if we auto accept, do not pester the user { // Inform user that there is a script floater via toast system - payload["give_inventory_notification"] = TRUE; + payload["give_inventory_notification"] = true; p.payload = payload; LLPostponedNotification::add(p, info->mFromID, false); } @@ -631,7 +631,7 @@ static void notification_display_name_callback(const LLUUID& id, } void LLIMProcessing::processNewMessage(LLUUID from_id, - BOOL from_group, + bool from_group, LLUUID to_id, U8 offline, EInstantMessage dialog, // U8 @@ -677,28 +677,28 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, // IDEVO convert new-style "Resident" names for display name = clean_name_from_im(name, dialog); - BOOL is_do_not_disturb = gAgent.isDoNotDisturb(); - BOOL is_autorespond = gAgent.getAutorespond(); - BOOL is_autorespond_nonfriends = gAgent.getAutorespondNonFriends(); + bool is_do_not_disturb = gAgent.isDoNotDisturb(); + bool is_autorespond = gAgent.getAutorespond(); + bool is_autorespond_nonfriends = gAgent.getAutorespondNonFriends(); // FIRE-1245: Option to block/reject teleport offers - BOOL is_rejecting_tp_offers = gAgent.getRejectTeleportOffers(); + bool is_rejecting_tp_offers = gAgent.getRejectTeleportOffers(); static LLCachedControl FSDontRejectTeleportOffersFromFriends(gSavedPerAccountSettings, "FSDontRejectTeleportOffersFromFriends"); // - BOOL is_rejecting_group_invites = gAgent.getRejectAllGroupInvites(); // Option to block/reject all group invites - BOOL is_rejecting_friendship_requests = gAgent.getRejectFriendshipRequests(); // FIRE-15233: Automatic friendship request refusal - BOOL is_autorespond_muted = gSavedPerAccountSettings.getBOOL("FSSendMutedAvatarResponse"); - BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat) + bool is_rejecting_group_invites = gAgent.getRejectAllGroupInvites(); // Option to block/reject all group invites + bool is_rejecting_friendship_requests = gAgent.getRejectFriendshipRequests(); // FIRE-15233: Automatic friendship request refusal + bool is_autorespond_muted = gSavedPerAccountSettings.getBOOL("FSSendMutedAvatarResponse"); + bool is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat) // object IMs contain sender object id in session_id (STORM-1209) || (dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id)); - BOOL is_owned_by_me = FALSE; - BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true; + bool is_owned_by_me = false; + bool is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true; static LLCachedControl accept_im_from_only_friend(gSavedPerAccountSettings, "VoiceCallsFriendsOnly"); - //BOOL is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && + //bool is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT && // LLMuteList::isLinden(name); <:FS:TM> Bear compile fix - is_linden not referenced // FIRE-10500: Autoresponse for (Away) static LLCachedControl FSSendAwayAvatarResponse(gSavedPerAccountSettings, "FSSendAwayAvatarResponse"); - BOOL is_afk = gAgent.getAFK(); + bool is_afk = gAgent.getAFK(); // chat.mMuted = is_muted; @@ -829,7 +829,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, pack_instant_message( gMessageSystem, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), from_id, my_name, @@ -1050,7 +1050,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, pack_instant_message( gMessageSystem, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), from_id, my_name, @@ -1101,8 +1101,8 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, { // aux_id contains group id, binary bucket contains name and asset type group_id = aux_id; - has_inventory = binary_bucket_size > 1 ? TRUE : FALSE; - from_group = TRUE; // inaccurate value correction + has_inventory = binary_bucket_size > 1 ? true : false; + from_group = true; // inaccurate value correction if (has_inventory) { std::string str_bucket = ll_safe_string((char*)binary_bucket, binary_bucket_size); @@ -1395,7 +1395,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0]; info->mType = (LLAssetType::EType) bucketp->asset_type; info->mObjectID = bucketp->object_id; - info->mFromObject = FALSE; + info->mFromObject = false; } else // IM_TASK_INVENTORY_OFFERED { @@ -1424,7 +1424,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, LL_WARNS("Messaging") << "Malformed inventory offer from object, type might be " << info->mType << LL_ENDL; } info->mObjectID = LLUUID::null; - info->mFromObject = TRUE; + info->mFromObject = true; } info->mIM = dialog; @@ -1577,7 +1577,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, // NOTE: the chat message itself will be filtered in LLNearbyChatHandler::processChat() if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) && (!from_group) && (RlvUtil::isNearbyAgent(from_id)) ) { - query_string["rlv_shownames"] = TRUE; + query_string["rlv_shownames"] = true; RlvUtil::filterNames(name); chat.mFromName = name; @@ -1844,7 +1844,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, pack_instant_message( gMessageSystem, gAgentID, - FALSE, + false, gAgentSessionID, from_id, my_name, @@ -1944,7 +1944,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, LLSD payload; payload["from_id"] = from_id; payload["lure_id"] = session_id; - payload["godlike"] = FALSE; + payload["godlike"] = false; payload["region_maturity"] = region_access; // FIRE-6786: Always show teleport location in teleport offer @@ -2074,7 +2074,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, LLSD payload; payload["from_id"] = from_id; payload["lure_id"] = session_id; - payload["godlike"] = TRUE; + payload["godlike"] = true; payload["region_maturity"] = region_access; if (!canUserAccessDstRegion) @@ -2229,7 +2229,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, void LLIMProcessing::requestOfflineMessages() { - static BOOL requested = FALSE; + static bool requested = false; if (!requested && gMessageSystem && !gDisconnected @@ -2263,7 +2263,7 @@ void LLIMProcessing::requestOfflineMessages() LLCoros::instance().launch("LLIMProcessing::requestOfflineMessagesCoro", boost::bind(&LLIMProcessing::requestOfflineMessagesCoro, cap_url)); } - requested = TRUE; + requested = true; } } @@ -2363,7 +2363,7 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) } // Todo: once drtsim-451 releases, remove the string option - BOOL from_group; + bool from_group; if (message_data["from_group"].isInteger()) { from_group = message_data["from_group"].asInteger(); diff --git a/indra/newview/llimprocessing.h b/indra/newview/llimprocessing.h index 4d20b963a4..030d28b198 100644 --- a/indra/newview/llimprocessing.h +++ b/indra/newview/llimprocessing.h @@ -34,7 +34,7 @@ class LLIMProcessing public: // Pre-process message for IM manager static void processNewMessage(LLUUID from_id, - BOOL from_group, + bool from_group, LLUUID to_id, U8 offline, EInstantMessage dialog, // U8 diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 413746692a..2f229a5eb3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -245,7 +245,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) if (msg["source_type"].asInteger() == CHAT_SOURCE_OBJECT) { user_preferences = gSavedSettings.getString("NotificationObjectIMOptions"); - if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM") == TRUE)) + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM") == true)) { make_ui_sound("UISndNewIncomingIMSession"); } @@ -253,7 +253,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) else { user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions"); - if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM") == TRUE)) + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM") == true)) { make_ui_sound("UISndNewIncomingIMSession"); } @@ -264,7 +264,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) if (LLAvatarTracker::instance().isBuddy(participant_id)) { user_preferences = gSavedSettings.getString("NotificationFriendIMOptions"); - if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM") == TRUE)) + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM") == true)) { make_ui_sound("UISndNewIncomingIMSession"); } @@ -272,7 +272,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) else { user_preferences = gSavedSettings.getString("NotificationNonFriendIMOptions"); - if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM") == TRUE)) + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM") == true)) { make_ui_sound("UISndNewIncomingIMSession"); } @@ -281,7 +281,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) else if(session->isAdHocSessionType()) { user_preferences = gSavedSettings.getString("NotificationConferenceIMOptions"); - if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM") == TRUE)) + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM") == true)) { make_ui_sound("UISndNewIncomingIMSession"); } @@ -289,7 +289,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) else if(session->isGroupSessionType()) { user_preferences = gSavedSettings.getString("NotificationGroupChatOptions"); - if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM") == TRUE)) + if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM") == true)) { make_ui_sound("UISndNewIncomingIMSession"); } @@ -853,7 +853,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& } else { - //tick returns TRUE - timer will be deleted after the tick + //tick returns true - timer will be deleted after the tick new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT); } @@ -1072,7 +1072,7 @@ void LLIMModel::LLIMSession::addMessage(const std::string& from, if (mSpeakers && from_id.notNull()) { mSpeakers->speakerChatted(from_id); - mSpeakers->setSpeakerTyping(from_id, FALSE); + mSpeakers->setSpeakerTyping(from_id, false); } } @@ -1443,7 +1443,7 @@ bool LLIMModel::LLIMSession::isOutgoingAdHoc() const bool LLIMModel::LLIMSession::isAdHoc() { - return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID, TRUE)); + return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID, true)); } bool LLIMModel::LLIMSession::isP2P() @@ -1453,7 +1453,7 @@ bool LLIMModel::LLIMSession::isP2P() bool LLIMModel::LLIMSession::isGroupChat() { - return IM_SESSION_GROUP_START == mType || (IM_SESSION_INVITE == mType && gAgent.isInGroup(mSessionID, TRUE)); + return IM_SESSION_GROUP_START == mType || (IM_SESSION_INVITE == mType && gAgent.isInGroup(mSessionID, true)); } LLUUID LLIMModel::LLIMSession::generateOutgoingAdHocHash() const @@ -1985,7 +1985,7 @@ const std::string& LLIMModel::getHistoryFileName(const LLUUID& session_id) const // TODO get rid of other participant ID -void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing) +void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, bool typing) { static LLCachedControl fsSendTypingState(gSavedSettings, "FSSendTypingState"); if (!fsSendTypingState) @@ -1999,7 +1999,7 @@ void LLIMModel::sendTypingState(LLUUID session_id, LLUUID other_participant_id, pack_instant_message( gMessageSystem, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), other_participant_id, name, @@ -2019,7 +2019,7 @@ void LLIMModel::sendLeaveSession(const LLUUID& session_id, const LLUUID& other_p pack_instant_message( gMessageSystem, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), other_participant_id, name, @@ -2069,7 +2069,7 @@ void deliverMessage(const std::string& utf8_text, pack_instant_message( gMessageSystem, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), other_participant_id, name.c_str(), @@ -2186,7 +2186,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, if (speaker_mgr) { speaker_mgr->speakerChatted(gAgentID); - speaker_mgr->setSpeakerTyping(gAgentID, FALSE); + speaker_mgr->setSpeakerTyping(gAgentID, false); } } @@ -2252,7 +2252,7 @@ void session_starter_helper( msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_MessageBlock); - msg->addBOOLFast(_PREHASH_FromGroup, FALSE); + msg->addBOOLFast(_PREHASH_FromGroup, false); msg->addUUIDFast(_PREHASH_ToAgentID, other_participant_id); msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); msg->addU8Fast(_PREHASH_Dialog, im_type); @@ -2406,7 +2406,7 @@ LLUUID LLIMMgr::computeSessionID( } } - if (gAgent.isInGroup(session_id, TRUE) && (session_id != other_participant_id)) + if (gAgent.isInGroup(session_id, true) && (session_id != other_participant_id)) { LL_WARNS() << "Group session id different from group id: IM type = " << dialog << ", session id = " << session_id << ", group id = " << other_participant_id << LL_ENDL; } @@ -2492,7 +2492,7 @@ LLIMMgr::onConfirmForceCloseError( // [FS communication UI] if ( floater ) { - floater->closeFloater(FALSE); + floater->closeFloater(false); } return false; } @@ -2641,7 +2641,7 @@ LLCallDialog::LLCallDialog(const LLSD& payload) mPayload(payload), mLifetime(DEFAULT_LIFETIME) { - setAutoFocus(FALSE); + setAutoFocus(false); // force docked state since this floater doesn't save it between recreations setDocked(true); } @@ -2732,7 +2732,7 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) { bool participant_is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); - bool is_group = participant_is_avatar && gAgent.isInGroup(session_id, TRUE); + bool is_group = participant_is_avatar && gAgent.isInGroup(session_id, true); LLAvatarIconCtrl* avatar_icon = getChild("avatar_icon"); LLGroupIconCtrl* group_icon = getChild("group_icon"); @@ -3010,7 +3010,7 @@ bool LLIncomingCallDialog::postBuild() } std::string call_type; - if (gAgent.isInGroup(session_id, TRUE)) + if (gAgent.isInGroup(session_id, true)) { LLStringUtil::format_map_t args; LLGroupData data; @@ -3184,7 +3184,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response, const LLSD &payload case IM_SESSION_CONFERENCE_START: case IM_SESSION_GROUP_START: case IM_SESSION_INVITE: - if (gAgent.isInGroup(session_id, TRUE)) + if (gAgent.isInGroup(session_id, true)) { LLGroupData data; if (!gAgent.getGroupData(session_id, data)) break; @@ -3362,7 +3362,7 @@ LLIMMgr::LLIMMgr() LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&FSFloaterIM::sRemoveTypingIndicator, _1)); // [FS communication UI] - gSavedPerAccountSettings.declareBOOL("FetchGroupChatHistory", TRUE, "Fetch recent messages from group chat servers when a group window opens", LLControlVariable::PERSIST_ALWAYS); + gSavedPerAccountSettings.declareBOOL("FetchGroupChatHistory", true, "Fetch recent messages from group chat servers when a group window opens", LLControlVariable::PERSIST_ALWAYS); } // Add a message to a session. @@ -3533,7 +3533,7 @@ void LLIMMgr::addMessage( // Configurable IM sounds // //Play sound for new conversations - // if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation") == TRUE)) + // if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation") == true)) // Option to automatically ignore and leave all conference (ad-hoc) chats static LLCachedControl ignoreAdHocSessions(gSavedSettings, "FSIgnoreAdHocSessions"); @@ -3945,7 +3945,7 @@ void LLIMMgr::inviteToSession( // voice invite question is different from default only for group call (EXT-7118) std::string question_type = "VoiceInviteQuestionDefault"; - BOOL voice_invite = FALSE; + bool voice_invite = false; bool is_linden = LLMuteList::isLinden(caller_name); @@ -3953,21 +3953,21 @@ void LLIMMgr::inviteToSession( { //P2P is different...they only have voice invitations notify_box_type = "VoiceInviteP2P"; - voice_invite = TRUE; + voice_invite = true; } - else if ( gAgent.isInGroup(session_id, TRUE) ) + else if ( gAgent.isInGroup(session_id, true) ) { //only really old school groups have voice invitations notify_box_type = "VoiceInviteGroup"; question_type = "VoiceInviteQuestionGroup"; - voice_invite = TRUE; + voice_invite = true; } else if ( inv_type == INVITATION_TYPE_VOICE ) { //else it's an ad-hoc //and a voice ad-hoc notify_box_type = "VoiceInviteAdHoc"; - voice_invite = TRUE; + voice_invite = true; } else if ( inv_type == INVITATION_TYPE_IMMEDIATE ) { @@ -4064,7 +4064,7 @@ void LLIMMgr::inviteToSession( } else { - LLFloaterReg::showInstance("incoming_call", payload, FALSE); + LLFloaterReg::showInstance("incoming_call", payload, false); } // Add the caller to the Recent List here (at this point @@ -4086,7 +4086,7 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarN std::string notify_box_type = payload["notify_box_type"].asString(); - LLFloaterReg::showInstance("incoming_call", payload, FALSE); + LLFloaterReg::showInstance("incoming_call", payload, false); } //*TODO disconnects all sessions @@ -4095,7 +4095,7 @@ void LLIMMgr::disconnectAllSessions() //*TODO disconnects all IM sessions } -BOOL LLIMMgr::hasSession(const LLUUID& session_id) +bool LLIMMgr::hasSession(const LLUUID& session_id) { return LLIMModel::getInstance()->findIMSession(session_id) != NULL; } @@ -4328,7 +4328,7 @@ bool LLIMMgr::endCall(const LLUUID& session_id) if (im_session) { // need to update speakers' state - im_session->mSpeakers->update(FALSE); + im_session->mSpeakers->update(false); } return true; } @@ -4458,12 +4458,12 @@ void LLIMMgr::noteMutedUsers(const LLUUID& session_id, void LLIMMgr::processIMTypingStart(const LLUUID& from_id, const EInstantMessage im_type) { - processIMTypingCore(from_id, im_type, TRUE); + processIMTypingCore(from_id, im_type, true); } void LLIMMgr::processIMTypingStop(const LLUUID& from_id, const EInstantMessage im_type) { - processIMTypingCore(from_id, im_type, FALSE); + processIMTypingCore(from_id, im_type, false); } // Announce incoming IMs @@ -4472,7 +4472,7 @@ void typingNameCallback(const LLUUID& av_id, const LLAvatarName& av_name, const LLStringUtil::format_map_t args; args["[NAME]"] = av_name.getCompleteName(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(av_id, av_name.getCompleteName(), LLMute::flagTextChat); + bool is_muted = LLMuteList::getInstance()->isMuted(av_id, av_name.getCompleteName(), LLMute::flagTextChat); bool is_friend = (LLAvatarTracker::instance().getBuddyInfo(av_id) == NULL) ? false : true; static LLCachedControl VoiceCallsFriendsOnly(gSavedPerAccountSettings, "VoiceCallsFriendsOnly"); @@ -4500,12 +4500,12 @@ void typingNameCallback(const LLUUID& av_id, const LLAvatarName& av_name, const // incoming IM announcement. // The logic was originally copied from process_improved_im() in llviewermessage.cpp bool is_busy = gAgent.isDoNotDisturb(); - BOOL is_autorespond = gAgent.getAutorespond(); - BOOL is_autorespond_nonfriends = gAgent.getAutorespondNonFriends(); - BOOL is_autorespond_muted = gSavedPerAccountSettings.getBOOL("FSSendMutedAvatarResponse"); - BOOL is_linden = LLMuteList::getInstance()->isLinden(av_name.getAccountName()); + bool is_autorespond = gAgent.getAutorespond(); + bool is_autorespond_nonfriends = gAgent.getAutorespondNonFriends(); + bool is_autorespond_muted = gSavedPerAccountSettings.getBOOL("FSSendMutedAvatarResponse"); + bool is_linden = LLMuteList::getInstance()->isLinden(av_name.getAccountName()); static LLCachedControl FSSendAwayAvatarResponse(gSavedPerAccountSettings, "FSSendAwayAvatarResponse"); - BOOL is_afk = gAgent.getAFK(); + bool is_afk = gAgent.getAFK(); if (RlvActions::canReceiveIM(av_id) && !is_linden && (!VoiceCallsFriendsOnly || is_friend) && @@ -4538,7 +4538,7 @@ void typingNameCallback(const LLUUID& av_id, const LLAvatarName& av_name, const pack_instant_message( gMessageSystem, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), av_id, my_name, @@ -4595,7 +4595,7 @@ void typingNameCallback(const LLUUID& av_id, const LLAvatarName& av_name, const } // -void LLIMMgr::processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, BOOL typing) +void LLIMMgr::processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, bool typing) { LLUUID session_id = computeSessionID(im_type, from_id); @@ -4810,7 +4810,7 @@ public: time_t timestamp = (time_t) message_params["timestamp"].asInteger(); - BOOL is_do_not_disturb = gAgent.isDoNotDisturb(); + bool is_do_not_disturb = gAgent.isDoNotDisturb(); //don't return if user is muted b/c proper way to ignore a muted user who //initiated an adhoc/group conference is to create then leave the session (see STORM-1731) @@ -4836,8 +4836,8 @@ public: // Mute group chat port from Phoenix if (from_id != gAgentID) // FIRE-14222: OpenSim routes agent's chat through here - don't mute it! { - BOOL FSMuteAllGroups = gSavedSettings.getBOOL("FSMuteAllGroups"); - BOOL FSMuteGroupWhenNoticesDisabled = gSavedSettings.getBOOL("FSMuteGroupWhenNoticesDisabled"); + bool FSMuteAllGroups = gSavedSettings.getBOOL("FSMuteAllGroups"); + bool FSMuteGroupWhenNoticesDisabled = gSavedSettings.getBOOL("FSMuteGroupWhenNoticesDisabled"); LLGroupData group_data; if (gAgent.getGroupData(session_id, group_data)) { @@ -4858,7 +4858,7 @@ public: pack_instant_message( gMessageSystem, gAgentID, - FALSE, + false, gAgentSessionID, from_id, aname, diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 0c77cb74dc..79c58a8de3 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -339,7 +339,7 @@ public: static void sendLeaveSession(const LLUUID& session_id, const LLUUID& other_participant_id); static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id, const uuid_vec_t& ids, EInstantMessage dialog); - static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing); + static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, bool typing); static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id, const LLUUID& other_participant_id, EInstantMessage dialog); @@ -375,7 +375,7 @@ class LLIMSessionObserver { public: virtual ~LLIMSessionObserver() {} - virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) = 0; + virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) = 0; virtual void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) = 0; virtual void sessionVoiceOrIMStarted(const LLUUID& session_id) = 0; virtual void sessionRemoved(const LLUUID& session_id) = 0; @@ -487,7 +487,7 @@ public: // good connection. void disconnectAllSessions(); - BOOL hasSession(const LLUUID& session_id); + bool hasSession(const LLUUID& session_id); // [SL:KB] - Patch: Chat-GroupSnooze | Checked: 2012-06-16 (Catznip-3.3) bool checkSnoozeExpiration(const LLUUID& session_id) const; @@ -553,7 +553,7 @@ private: void noteOfflineUsers(const LLUUID& session_id, const std::vector& ids); void noteMutedUsers(const LLUUID& session_id, const std::vector& ids); - void processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, BOOL typing); + void processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, bool typing); static void onInviteNameLookup(LLSD payload, const LLUUID& id, const LLAvatarName& name); diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index b71e79cb3a..1a87ebb786 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -316,7 +316,7 @@ void LLInspectAvatar::onOpen(const LLSD& data) mAvatarID = data["avatar_id"]; // Undo CHUI-90 and make avatar inspector useful again - BOOL self = mAvatarID == gAgentID; + bool self = mAvatarID == gAgentID; getChild("gear_btn")->setVisible(!self); LLMenuButton* gear_self_btn = getChild("gear_self_btn"); diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 6ad614a388..ed72f261e1 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -224,14 +224,14 @@ void LLInspectObject::onOpen(const LLSD& data) LLViewerMediaFocus::getInstance()->clearFocus(); LLSelectMgr::instance().deselectAll(); - mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,FALSE,TRUE); + mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,false,true); // Mark this as a transient selection struct SetTransient : public LLSelectedNodeFunctor { bool apply(LLSelectNode* node) { - node->setTransient(TRUE); + node->setTransient(true); return true; } } functor; @@ -382,7 +382,7 @@ void LLInspectObject::updateButtons(LLSelectNode* nodep) } // No flash - focusFirstItem(FALSE, FALSE); + focusFirstItem(false, false); } void LLInspectObject::updateSitLabel(LLSelectNode* nodep) diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp index 3efbbd1003..6f8ddf86b2 100644 --- a/indra/newview/llinspecttexture.cpp +++ b/indra/newview/llinspecttexture.cpp @@ -143,7 +143,7 @@ void LLTexturePreviewView::draw() if (4 == m_Image->getComponents()) { const LLColor4 color(.098f, .098f, .098f); - gl_rect_2d(rctClient, color, TRUE); + gl_rect_2d(rctClient, color, true); } gl_draw_scaled_image(rctClient.mLeft, rctClient.mBottom, rctClient.getWidth(), rctClient.getHeight(), m_Image); diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp index 1fa336446e..38272098a3 100644 --- a/indra/newview/llinspecttoast.cpp +++ b/indra/newview/llinspecttoast.cpp @@ -96,14 +96,14 @@ void LLInspectToast::onOpen(const LLSD& notification_id) LL_WARNS() << "Could not get toast's panel." << LL_ENDL; return; } - panel->setVisible(TRUE); - panel->setMouseOpaque(FALSE); + panel->setVisible(true); + panel->setMouseOpaque(false); if(mPanel != NULL && mPanel->getParent() == this) { LLInspect::removeChild(mPanel); } addChild(panel); - panel->setFocus(TRUE); + panel->setFocus(true); mPanel = panel; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index aba0bd83f9..a1e0a0c9c3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -146,7 +146,7 @@ bool isMarketplaceSendAction(const std::string& action) bool isPanelActive(const std::string& panel_name) { - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(false); return (active_panel && (active_panel->getName() == panel_name)); } @@ -229,7 +229,7 @@ public: panel->getRootFolder()->update(); has_elements = true; } - panel->getRootFolder()->changeSelection(item, TRUE); + panel->getRootFolder()->changeSelection(item, true); } } } @@ -254,7 +254,7 @@ LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory, mUUID(uuid), mRoot(root), mInvType(LLInventoryType::IT_NONE), - mIsLink(FALSE), + mIsLink(false), LLFolderViewModelItemInventory(inventory->getRootViewModel()) { mInventoryPanel = inventory->getInventoryPanelHandle(); @@ -360,12 +360,12 @@ bool LLInvFVBridge::isItemMovable() const return true; } -BOOL LLInvFVBridge::isLink() const +bool LLInvFVBridge::isLink() const { return mIsLink; } -BOOL LLInvFVBridge::isLibraryItem() const +bool LLInvFVBridge::isLibraryItem() const { return gInventory.isObjectDescendentOf(getUUID(),gInventory.getLibraryRootFolderID()); } @@ -380,13 +380,13 @@ bool LLInvFVBridge::cutToClipboard() if (obj && isItemMovable() && isItemRemovable()) { const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); - const BOOL cut_from_marketplacelistings = gInventory.isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool cut_from_marketplacelistings = gInventory.isObjectDescendentOf(mUUID, marketplacelistings_id); if (cut_from_marketplacelistings && (LLMarketplaceData::instance().isInActiveFolder(mUUID) || LLMarketplaceData::instance().isListedAndActive(mUUID))) { LLUUID parent_uuid = obj->getParentUUID(); - BOOL result = perform_cutToClipboard(); + bool result = perform_cutToClipboard(); gInventory.addChangedMask(LLInventoryObserver::STRUCTURE, parent_uuid); return result; } @@ -410,17 +410,17 @@ bool LLInvFVBridge::isCutToClipboard() } // Callback for cutToClipboard if DAMA required... -BOOL LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD& response) +bool LLInvFVBridge::callback_cutToClipboard(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) // YES { return perform_cutToClipboard(); } - return FALSE; + return false; } -BOOL LLInvFVBridge::perform_cutToClipboard() +bool LLInvFVBridge::perform_cutToClipboard() { const LLInventoryObject* obj = gInventory.getObject(mUUID); if (obj && isItemMovable() && isItemRemovable()) @@ -428,7 +428,7 @@ BOOL LLInvFVBridge::perform_cutToClipboard() LLClipboard::instance().setCutMode(true); return LLClipboard::instance().addToClipboard(mUUID); } - return FALSE; + return false; } bool LLInvFVBridge::copyToClipboard() const @@ -448,7 +448,7 @@ void LLInvFVBridge::showProperties() { if (isMarketplaceListingsFolder()) { - LLFloaterReg::showInstance("item_properties", LLSD().with("id",mUUID),TRUE); + LLFloaterReg::showInstance("item_properties", LLSD().with("id",mUUID),true); // Force it to show on top as this floater has a tendency to hide when confirmation dialog shows up LLFloater* floater_properties = LLFloaterReg::findInstance("item_properties", LLSD().with("id",mUUID)); if (floater_properties) @@ -519,7 +519,7 @@ void LLInvFVBridge::removeBatch(std::vector& batch) cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID()); if (cat) { - gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, FALSE ); + gInventory.collectDescendents( cat->getUUID(), descendent_categories, descendent_items, false ); for (j=0; jgetType()) @@ -585,7 +585,7 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector& ba msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addBOOLFast(_PREHASH_Stamp, TRUE); + msg->addBOOLFast(_PREHASH_Stamp, true); } msg->nextBlockFast(_PREHASH_InventoryData); msg->addUUIDFast(_PREHASH_ItemID, item->getUUID()); @@ -626,7 +626,7 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector& ba msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addBOOL("Stamp", TRUE); + msg->addBOOL("Stamp", true); } msg->nextBlockFast(_PREHASH_InventoryData); msg->addUUIDFast(_PREHASH_FolderID, cat->getUUID()); @@ -665,7 +665,7 @@ void LLInvFVBridge::removeBatchNoCheck(std::vector& ba bool LLInvFVBridge::isClipboardPasteable() const { - // Return FALSE on degenerated cases: empty clipboard, no inventory, no agent + // Return false on degenerated cases: empty clipboard, no inventory, no agent if (!LLClipboard::instance().hasContents() || !isAgentInventory()) { return false; @@ -711,16 +711,16 @@ bool LLInvFVBridge::isClipboardPasteable() const return true; } -BOOL LLInvFVBridge::isClipboardPasteableAsLink() const +bool LLInvFVBridge::isClipboardPasteableAsLink() const { if (!LLClipboard::instance().hasContents() || !isAgentInventory()) { - return FALSE; + return false; } const LLInventoryModel* model = getInventoryModel(); if (!model) { - return FALSE; + return false; } std::vector objects; @@ -733,21 +733,21 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const { if (!LLAssetType::lookupCanLink(item->getActualType())) { - return FALSE; + return false; } if (gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID())) { - return FALSE; + return false; } } const LLViewerInventoryCategory *cat = model->getCategory(objects.at(i)); if (cat && LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { - return FALSE; + return false; } } - return TRUE; + return true; } void disable_context_entries_if_present(LLMenuGL& menu, @@ -781,12 +781,12 @@ void disable_context_entries_if_present(LLMenuGL& menu, if (found) { - menu_item->setVisible(TRUE); + menu_item->setVisible(true); // A bit of a hack so we can remember that some UI element explicitly set this to be visible // so that some other UI element from multi-select doesn't later set this invisible. - menu_item->pushVisible(TRUE); + menu_item->pushVisible(true); - menu_item->setEnabled(FALSE); + menu_item->setEnabled(false); } } } @@ -838,7 +838,7 @@ void hide_context_entries(LLMenuGL& menu, { if (!menu_item->getLastVisible()) { - menu_item->setVisible(FALSE); + menu_item->setVisible(false); } if (menu_item->getEnabled()) @@ -853,16 +853,16 @@ void hide_context_entries(LLMenuGL& menu, menuentry_vec_t::const_iterator itor2 = std::find(exceptions.begin(), exceptions.end(), name); if (itor2 == exceptions.end()) { - menu_item->setEnabled(FALSE); + menu_item->setEnabled(false); } } } else { - menu_item->setVisible(TRUE); + menu_item->setVisible(true); // A bit of a hack so we can remember that some UI element explicitly set this to be visible // so that some other UI element from multi-select doesn't later set this invisible. - menu_item->pushVisible(TRUE); + menu_item->pushVisible(true); bool enabled = true; for (itor2 = disabled_entries.begin(); enabled && (itor2 != disabled_entries.end()); ++itor2) @@ -1160,7 +1160,7 @@ void LLInvFVBridge::addDeleteContextMenuOptions(menuentry_vec_t &items, void LLInvFVBridge::addOpenRightClickMenuOption(menuentry_vec_t &items) { const LLInventoryObject *obj = getInventoryObject(); - const BOOL is_link = (obj && obj->getIsLinkType()); + const bool is_link = (obj && obj->getIsLinkType()); if (is_link) items.push_back(std::string("Open Original")); @@ -1272,7 +1272,7 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, LLUUID local_version_folder_id = nested_parent_id(mUUID,depth-1); LLInventoryModel::cat_array_t categories; LLInventoryModel::item_array_t items; - gInventory.collectDescendents(local_version_folder_id, categories, items, FALSE); + gInventory.collectDescendents(local_version_folder_id, categories, items, false); LLCachedControl max_depth(gSavedSettings, "InventoryOutboxMaxFolderDepth", 4); LLCachedControl max_count(gSavedSettings, "InventoryOutboxMaxFolderCount", 20); if (categories.size() >= max_count @@ -1326,9 +1326,9 @@ void LLInvFVBridge::addMoveToDefaultFolderMenuOption(menuentry_vec_t& items) // // *TODO: remove this -BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const +bool LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { - BOOL rv = FALSE; + bool rv = false; const LLInventoryObject* obj = getInventoryObject(); @@ -1337,7 +1337,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const *type = LLViewerAssetType::lookupDragAndDropType(obj->getActualType()); if(*type == DAD_NONE) { - return FALSE; + return false; } *id = obj->getUUID(); @@ -1348,7 +1348,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const LLInventoryModelBackgroundFetch::instance().start(obj->getUUID()); } - rv = TRUE; + rv = true; } return rv; @@ -1377,27 +1377,27 @@ LLInventoryFilter* LLInvFVBridge::getInventoryFilter() const return panel ? &(panel->getFilter()) : NULL; } -BOOL LLInvFVBridge::isItemInTrash() const +bool LLInvFVBridge::isItemInTrash() const { LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); return model->isObjectDescendentOf(mUUID, trash_id); } -BOOL LLInvFVBridge::isLinkedObjectInTrash() const +bool LLInvFVBridge::isLinkedObjectInTrash() const { - if (isItemInTrash()) return TRUE; + if (isItemInTrash()) return true; const LLInventoryObject *obj = getInventoryObject(); if (obj && obj->getIsLinkType()) { LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); return model->isObjectDescendentOf(obj->getLinkedUUID(), trash_id); } - return FALSE; + return false; } bool LLInvFVBridge::isItemInOutfits() const @@ -1410,118 +1410,118 @@ bool LLInvFVBridge::isItemInOutfits() const return isCOFFolder() || (my_outfits_cat == mUUID) || model->isObjectDescendentOf(mUUID, my_outfits_cat); } -BOOL LLInvFVBridge::isLinkedObjectMissing() const +bool LLInvFVBridge::isLinkedObjectMissing() const { const LLInventoryObject *obj = getInventoryObject(); if (!obj) { - return TRUE; + return true; } if (obj->getIsLinkType() && LLAssetType::lookupIsLinkType(obj->getType())) { - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLInvFVBridge::isAgentInventory() const +bool LLInvFVBridge::isAgentInventory() const { const LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; - if(gInventory.getRootFolderID() == mUUID) return TRUE; + if(!model) return false; + if(gInventory.getRootFolderID() == mUUID) return true; return model->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()); } // [SL:KB] - Patch: Inventory-Misc | Checked: 2011-05-28 (Catznip-2.6.0a) | Added: Catznip-2.6.0a -BOOL LLInvFVBridge::isLibraryInventory() const +bool LLInvFVBridge::isLibraryInventory() const { const LLInventoryModel* model = getInventoryModel(); - if (!model) return FALSE; - if (gInventory.getLibraryRootFolderID() == mUUID) return TRUE; + if (!model) return false; + if (gInventory.getLibraryRootFolderID() == mUUID) return true; return model->isObjectDescendentOf(mUUID, gInventory.getLibraryRootFolderID()); } -BOOL LLInvFVBridge::isLostInventory() const +bool LLInvFVBridge::isLostInventory() const { return (!isAgentInventory()) && (!isLibraryInventory()); } // [/SL:KB] -BOOL LLInvFVBridge::isCOFFolder() const +bool LLInvFVBridge::isCOFFolder() const { return LLAppearanceMgr::instance().getIsInCOF(mUUID); } // Client LSL Bridge (also for #AO) -BOOL LLInvFVBridge::isLockedFolder(bool ignore_setting /*= false*/) const +bool LLInvFVBridge::isLockedFolder(bool ignore_setting /*= false*/) const { const LLInventoryModel* model = getInventoryModel(); if (!model) { - return FALSE; + return false; } if ((mUUID == FSLSLBridge::instance().getBridgeFolder() || model->isObjectDescendentOf(mUUID, FSLSLBridge::instance().getBridgeFolder())) && (gSavedPerAccountSettings.getBOOL("LockBridgeFolder") || ignore_setting)) { - return TRUE; + return true; } if ((mUUID == AOEngine::instance().getAOFolder() || model->isObjectDescendentOf(mUUID, AOEngine::instance().getAOFolder())) && (gSavedPerAccountSettings.getBOOL("LockAOFolders") || ignore_setting)) { - return TRUE; + return true; } if ((mUUID == FSFloaterWearableFavorites::getFavoritesFolder() || model->isObjectDescendentOf(mUUID, FSFloaterWearableFavorites::getFavoritesFolder())) && gSavedPerAccountSettings.getBOOL("LockWearableFavoritesFolders")) { - return TRUE; + return true; } - return FALSE; + return false; } // // *TODO : Suppress isInboxFolder() once Merchant Outbox is fully deprecated -BOOL LLInvFVBridge::isInboxFolder() const +bool LLInvFVBridge::isInboxFolder() const { const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX); if (inbox_id.isNull()) { - return FALSE; + return false; } return gInventory.isObjectDescendentOf(mUUID, inbox_id); } -BOOL LLInvFVBridge::isMarketplaceListingsFolder() const +bool LLInvFVBridge::isMarketplaceListingsFolder() const { const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); if (folder_id.isNull()) { - return FALSE; + return false; } return gInventory.isObjectDescendentOf(mUUID, folder_id); } -BOOL LLInvFVBridge::isItemPermissive() const +bool LLInvFVBridge::isItemPermissive() const { - return FALSE; + return false; } // static void LLInvFVBridge::changeItemParent(LLInventoryModel* model, LLViewerInventoryItem* item, const LLUUID& new_parent_id, - BOOL restamp) + bool restamp) { model->changeItemParent(item, new_parent_id, restamp); } @@ -1530,7 +1530,7 @@ void LLInvFVBridge::changeItemParent(LLInventoryModel* model, void LLInvFVBridge::changeCategoryParent(LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& new_parent_id, - BOOL restamp) + bool restamp) { model->changeCategoryParent(cat, new_parent_id, restamp); } @@ -1929,7 +1929,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) } else if ("show_in_main_panel" == action) { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true); return; } else if ("cut" == action) @@ -2055,7 +2055,7 @@ void LLItemBridge::restoreItem() const LLUUID new_parent = model->findCategoryUUIDForType(is_snapshot? LLFolderType::FT_SNAPSHOT_CATEGORY : LLFolderType::assetTypeToFolderType(item->getType())); // do not restamp on restore. - LLInvFVBridge::changeItemParent(model, item, new_parent, FALSE); + LLInvFVBridge::changeItemParent(model, item, new_parent, false); } } @@ -2245,29 +2245,29 @@ std::string LLItemBridge::getLabelSuffix() const if(item) { // Any type can have the link suffix... - BOOL broken_link = LLAssetType::lookupIsLinkType(item->getType()); + bool broken_link = LLAssetType::lookupIsLinkType(item->getType()); if (broken_link) return BROKEN_LINK; - BOOL link = item->getIsLinkType(); + bool link = item->getIsLinkType(); if (link) return LINK; // ...but it's a bit confusing to put nocopy/nomod/etc suffixes on calling cards. if(LLAssetType::AT_CALLINGCARD != item->getType() && item->getPermissions().getOwner() == gAgent.getID()) { - BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); + bool copy = item->getPermissions().allowCopyBy(gAgent.getID()); if (!copy) { //suffix += " "; // Keep it the old way please suffix += NO_COPY; } - BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); + bool mod = item->getPermissions().allowModifyBy(gAgent.getID()); if (!mod) { //suffix += suffix.empty() ? " " : ","; // Keep it the old way please suffix += NO_MOD; } - BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, + bool xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); if (!xfer) { @@ -2315,7 +2315,7 @@ bool LLItemBridge::isItemRenameable() const // [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g if ( (rlv_handler_t::isEnabled()) && (!RlvFolderLocks::instance().canRenameItem(mUUID)) ) { - return FALSE; + return false; } // [/RLVa:KB] @@ -2359,7 +2359,7 @@ bool LLItemBridge::removeItem() if (!item) return false; if (item->getType() != LLAssetType::AT_LSL_TEXT) { - LLPreview::hide(mUUID, TRUE); + LLPreview::hide(mUUID, true); } // Already in trash if (model->isObjectDescendentOf(mUUID, trash_id)) return false; @@ -2395,27 +2395,27 @@ bool LLItemBridge::removeItem() return true; } -BOOL LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response) +bool LLItemBridge::confirmRemoveItem(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - if (option != 0) return FALSE; + if (option != 0) return false; LLInventoryModel* model = getInventoryModel(); - if (!model) return FALSE; + if (!model) return false; LLViewerInventoryItem* item = getItem(); - if (!item) return FALSE; + if (!item) return false; const LLUUID& trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); // if item is not already in trash if(item && !model->isObjectDescendentOf(mUUID, trash_id)) { // move to trash, and restamp - LLInvFVBridge::changeItemParent(model, item, trash_id, TRUE); + LLInvFVBridge::changeItemParent(model, item, trash_id, true); // delete was successful - return TRUE; + return true; } - return FALSE; + return false; } bool LLItemBridge::isItemCopyable(bool can_copy_as_link) const @@ -2447,7 +2447,7 @@ bool LLItemBridge::isItemCopyable(bool can_copy_as_link) const // User can copy the item if: // - the item (or its target in the case of a link) is "copy" - // NOTE: we do *not* want to return TRUE on everything like LL seems to do in SL-2.1.0 because not all types are "linkable" + // NOTE: we do *not* want to return true on everything like LL seems to do in SL-2.1.0 because not all types are "linkable" return (item->getPermissions().allowCopyBy(gAgent.getID())); // [/SL:KB] // static LLCachedControl inventory_linking(gSavedSettings, "InventoryLinking", true); @@ -2491,14 +2491,14 @@ const LLUUID& LLItemBridge::getThumbnailUUID() const return LLUUID::null; } -BOOL LLItemBridge::isItemPermissive() const +bool LLItemBridge::isItemPermissive() const { LLViewerInventoryItem* item = getItem(); if(item) { return item->getIsFullPerm(); } - return FALSE; + return false; } // +=================================================+ @@ -2618,7 +2618,7 @@ std::string LLFolderBridge::getLabelSuffix() const { LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(getUUID(), cat_array, item_array, TRUE); + gInventory.collectDescendents(getUUID(), cat_array, item_array, true); // Fix item count formatting //S32 count = item_array.size(); //if(count > 0) @@ -2708,7 +2708,7 @@ bool LLFolderBridge::isItemRemovable() const // FIRE-29342: Protected folder option if (isProtected()) { - return FALSE; + return false; } // @@ -2732,14 +2732,14 @@ bool LLFolderBridge::isItemRemovable() const return true; } -BOOL LLFolderBridge::isUpToDate() const +bool LLFolderBridge::isUpToDate() const { LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID); if( !category ) { - return FALSE; + return false; } return category->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN; @@ -2828,24 +2828,24 @@ bool LLFolderBridge::isClipboardPasteable() const return true; } -BOOL LLFolderBridge::isClipboardPasteableAsLink() const +bool LLFolderBridge::isClipboardPasteableAsLink() const { // Check normal paste-as-link permissions if (!LLInvFVBridge::isClipboardPasteableAsLink()) { - return FALSE; + return false; } const LLInventoryModel* model = getInventoryModel(); if (!model) { - return FALSE; + return false; } const LLViewerInventoryCategory *current_cat = getCategory(); if (current_cat) { - const BOOL is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder( current_cat ); + const bool is_in_friend_folder = LLFriendCardsManager::instance().isCategoryInFriendFolder( current_cat ); const LLUUID ¤t_cat_id = current_cat->getUUID(); std::vector objects; LLClipboard::instance().pasteFromClipboard(objects); @@ -2861,7 +2861,7 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const if ((cat_id == current_cat_id) || model->isObjectDescendentOf(current_cat_id, cat_id)) { - return FALSE; + return false; } } // Don't allow pasting duplicates to the Calling Card/Friends subfolders, see bug EXT-1599 @@ -2872,32 +2872,32 @@ BOOL LLFolderBridge::isClipboardPasteableAsLink() const // in case type of obj_id is LLInventoryItem. if ( LLFriendCardsManager::instance().isObjDirectDescendentOfCategory(model->getObject(obj_id), current_cat) ) { - return FALSE; + return false; } } } } - return TRUE; + return true; } -BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, - BOOL drop, +bool LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, + bool drop, std::string& tooltip_msg, - BOOL is_link, - BOOL user_confirm, + bool is_link, + bool user_confirm, LLPointer cb) { LLInventoryModel* model = getInventoryModel(); - if (!inv_cat) return FALSE; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL - if (!model) return FALSE; - if (!isAgentAvatarValid()) return FALSE; - if (!isAgentInventory()) return FALSE; // cannot drag categories into library + if (!inv_cat) return false; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL + if (!model) return false; + if (!isAgentAvatarValid()) return false; + if (!isAgentInventory()) return false; // cannot drag categories into library // Client LSL Bridge (also for #AO) - if (isLockedFolder()) return FALSE; + if (isLockedFolder()) return false; // LLInventoryPanel* destination_panel = mInventoryPanel.get(); @@ -2911,18 +2911,18 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); const LLUUID from_folder_uuid = inv_cat->getParentUUID(); - const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id); + const bool move_is_into_current_outfit = (mUUID == current_outfit_id); + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id); // check to make sure source is agent inventory, and is represented there. LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); - const BOOL is_agent_inventory = (model->getCategory(cat_id) != NULL) + const bool is_agent_inventory = (model->getCategory(cat_id) != NULL) && (LLToolDragAndDrop::SOURCE_AGENT == source); - BOOL accept = FALSE; + bool accept = false; U64 filter_types = filter->getFilterTypes(); - BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); + bool use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); if (is_agent_inventory) { @@ -2932,45 +2932,45 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); - const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); - const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); - const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); - const BOOL move_is_into_current_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT); + const bool move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); + const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); + const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const bool move_is_into_current_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT); // FIRE-1392: Allow dragging all asset types into Landmarks folder - //const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); - const BOOL move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id); + //const bool move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); + const bool move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id); //-------------------------------------------------------------------------------- // Determine if folder can be moved. // - BOOL is_movable = TRUE; + bool is_movable = true; if (is_movable && (marketplacelistings_id == cat_id)) { - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipOutboxCannotMoveRoot"); } if (is_movable && move_is_from_marketplacelistings && LLMarketplaceData::instance().getActivationState(cat_id)) { // If the incoming folder is listed and active (and is therefore either the listing or the version folder), // then moving is *not* allowed - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipOutboxDragActive"); } if (is_movable && (mUUID == cat_id)) { - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipDragOntoSelf"); } if (is_movable && (model->isObjectDescendentOf(mUUID, cat_id))) { - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipDragOntoOwnChild"); } if (is_movable && LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())) { - is_movable = FALSE; + is_movable = false; // tooltip? } @@ -3005,21 +3005,21 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } if(is_movable && move_is_into_current_outfit && is_link) { - is_movable = FALSE; + is_movable = false; } if (is_movable && move_is_into_lost_and_found) { - is_movable = FALSE; + is_movable = false; } if (is_movable && (mUUID == model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE))) { - is_movable = FALSE; + is_movable = false; // tooltip? } if (is_movable && (getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK)) { // One cannot move a folder into a stock folder - is_movable = FALSE; + is_movable = false; // tooltip? } @@ -3027,14 +3027,14 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, LLInventoryModel::item_array_t descendent_items; if (is_movable) { - model->collectDescendents(cat_id, descendent_categories, descendent_items, FALSE); + model->collectDescendents(cat_id, descendent_categories, descendent_items, false); for (S32 i=0; i < descendent_categories.size(); ++i) { LLInventoryCategory* category = descendent_categories[i]; if(LLFolderType::lookupIsProtectedType(category->getPreferredType())) { // Can't move "special folders" (e.g. Textures Folder). - is_movable = FALSE; + is_movable = false; break; } } @@ -3055,7 +3055,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (items.size() > max_items_to_wear) { // Can't move 'large' folders into current outfit: MAINT-4086 - is_movable = FALSE; + is_movable = false; LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", max_items_to_wear); tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args); @@ -3068,7 +3068,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, LLInventoryItem* item = descendent_items[i]; if (get_is_item_worn(item->getUUID())) { - is_movable = FALSE; + is_movable = false; break; // It's generally movable, but not into the trash. } } @@ -3084,7 +3084,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // // We use getType() instead of getActua;Type() to allow links to landmarks and folders. // if (LLAssetType::AT_LANDMARK != item->getType() && LLAssetType::AT_CATEGORY != item->getType()) // { - // is_movable = FALSE; + // is_movable = false; // break; // It's generally movable, but not into Landmarks. // } // } @@ -3101,7 +3101,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (is_movable) { - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false); is_movable = active_panel != NULL; // For a folder to pass the filter all its descendants are required to pass. @@ -3216,7 +3216,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, inv_cat->getPreferredType() == LLFolderType::FT_OUTFIT)) { // traverse category and add all contents to currently worn. - BOOL append = true; + bool append = true; LLAppearanceMgr::instance().wearInventoryCategory(inv_cat, false, append); if (cb) cb->fire(inv_cat->getUUID()); } @@ -3281,7 +3281,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else { @@ -3308,7 +3308,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else { @@ -3368,9 +3368,9 @@ void warn_move_inventory(LLViewerObject* object, boost::shared_ptr mo // Move/copy all inventory items from the Contents folder of an in-world // object to the agent's inventory, inside a given category. -BOOL move_inv_category_world_to_agent(const LLUUID& object_id, +bool move_inv_category_world_to_agent(const LLUUID& object_id, const LLUUID& category_id, - BOOL drop, + bool drop, std::function callback, void* user_data, LLInventoryFilter* filter) @@ -3383,7 +3383,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, if(!object) { LL_INFOS() << "Object not found for drop." << LL_ENDL; - return FALSE; + return false; } // this folder is coming from an object, as there is only one folder in an object, the root, @@ -3394,12 +3394,12 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, if (inventory_objects.empty()) { LL_INFOS() << "Object contents not found for drop." << LL_ENDL; - return FALSE; + return false; } - BOOL accept = FALSE; - BOOL is_move = FALSE; - BOOL use_filter = FALSE; + bool accept = false; + bool is_move = false; + bool use_filter = false; if (filter) { U64 filter_types = filter->getFilterTypes(); @@ -3426,15 +3426,15 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, && perm.allowTransferTo(gAgent.getID()))) // || gAgent.isGodlike()) { - accept = TRUE; + accept = true; } else if(object->permYouOwner()) { // If the object cannot be copied, but the object the // inventory is owned by the agent, then the item can be // moved from the task to agent inventory. - is_move = TRUE; - accept = TRUE; + is_move = true; + accept = true; } if (accept && use_filter) @@ -3631,7 +3631,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) { if ((*id_it) == mCatID) { - mFolderAdded = TRUE; + mFolderAdded = true; break; } } @@ -3651,7 +3651,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) mContentsCount) { gInventory.removeObserver(this); - LLAppearanceMgr::instance().wearInventoryCategory(category, FALSE, !mReplace); + LLAppearanceMgr::instance().wearInventoryCategory(category, false, !mReplace); delete this; } } @@ -3697,12 +3697,12 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) } else if ("replaceoutfit" == action) { - modifyOutfit(FALSE); + modifyOutfit(false); return; } else if ("addtooutfit" == action) { - modifyOutfit(TRUE); + modifyOutfit(true); return; } // Patch: ReplaceWornItemsOnly @@ -3719,7 +3719,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) // else if ("show_in_main_panel" == action) { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true); return; } else if ("cut" == action) @@ -3911,7 +3911,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) return; LLInventoryModel* model = &gInventory; - model->changeCategoryParent(pCat,gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND),FALSE); + model->changeCategoryParent(pCat,gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND), false); gInventory.addChangedMask(LLInventoryObserver::REBUILD, mUUID); gInventory.notifyObservers(); @@ -4086,7 +4086,7 @@ void LLFolderBridge::restoreItem() LLInventoryModel* model = getInventoryModel(); const LLUUID new_parent = model->findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(cat->getType())); // do not restamp children on restore - LLInvFVBridge::changeCategoryParent(model, cat, new_parent, FALSE); + LLInvFVBridge::changeCategoryParent(model, cat, new_parent, false); } } @@ -4117,15 +4117,15 @@ LLFolderType::EType LLFolderBridge::getPreferredType() const // Icons for folders are based on the preferred type LLUIImagePtr LLFolderBridge::getIcon() const { - return getFolderIcon(FALSE); + return getFolderIcon(false); } LLUIImagePtr LLFolderBridge::getIconOpen() const { - return getFolderIcon(TRUE); + return getFolderIcon(true); } -LLUIImagePtr LLFolderBridge::getFolderIcon(BOOL is_open) const +LLUIImagePtr LLFolderBridge::getFolderIcon(bool is_open) const { LLFolderType::EType preferred_type = getPreferredType(); return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, is_open)); @@ -4134,7 +4134,7 @@ LLUIImagePtr LLFolderBridge::getFolderIcon(BOOL is_open) const // static : use by LLLinkFolderBridge to get the closed type icons LLUIImagePtr LLFolderBridge::getIcon(LLFolderType::EType preferred_type) { - return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, FALSE)); + return LLUI::getUIImage(LLViewerFolderType::lookupIconName(preferred_type, false)); } LLUIImagePtr LLFolderBridge::getIconOverlay() const @@ -4178,12 +4178,12 @@ bool LLFolderBridge::removeItem() } -BOOL LLFolderBridge::removeSystemFolder() +bool LLFolderBridge::removeSystemFolder() { const LLViewerInventoryCategory *cat = getCategory(); if (!LLFolderType::lookupIsProtectedType(cat->getPreferredType())) { - return FALSE; + return false; } LLSD payload; @@ -4195,7 +4195,7 @@ BOOL LLFolderBridge::removeSystemFolder() { LLNotifications::instance().add(params); } - return TRUE; + return true; } bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& response) @@ -4208,9 +4208,9 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re // move it to the trash LLPreview::hide(mUUID); getInventoryModel()->removeCategory(mUUID); - return TRUE; + return true; } - return FALSE; + return false; } //Recursively update the folder's creation date @@ -4232,9 +4232,9 @@ void LLFolderBridge::pasteFromClipboard() if (model && isClipboardPasteable()) { const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); - const BOOL paste_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool paste_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - BOOL cut_from_marketplacelistings = FALSE; + bool cut_from_marketplacelistings = false; if (LLClipboard::instance().isCutMode()) { //Items are not removed from folder on "cut", so we need update listing folder on "paste" operation @@ -4246,7 +4246,7 @@ void LLFolderBridge::pasteFromClipboard() if(gInventory.isObjectDescendentOf(item_id, marketplacelistings_id) && (LLMarketplaceData::instance().isInActiveFolder(item_id) || LLMarketplaceData::instance().isListedAndActive(item_id))) { - cut_from_marketplacelistings = TRUE; + cut_from_marketplacelistings = true; break; } } @@ -4298,12 +4298,12 @@ void LLFolderBridge::perform_pasteFromClipboard() const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); - const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); - const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); - const BOOL move_is_into_outfit = /*move_is_into_my_outfits ||*/ (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); // Unable to copy&paste into outfits anymore - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - const BOOL move_is_into_favorites = (mUUID == favorites_id); - const BOOL move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id); + const bool move_is_into_current_outfit = (mUUID == current_outfit_id); + const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); + const bool move_is_into_outfit = /*move_is_into_my_outfits ||*/ (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); // Unable to copy&paste into outfits anymore + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool move_is_into_favorites = (mUUID == favorites_id); + const bool move_is_into_lost_and_found = model->isObjectDescendentOf(mUUID, lost_and_found_id); std::vector objects; LLClipboard::instance().pasteFromClipboard(objects); @@ -4446,7 +4446,7 @@ void LLFolderBridge::perform_pasteFromClipboard() if (viitem) { //changeItemParent() implicity calls dirtyFilter - changeItemParent(model, viitem, parent_id, FALSE); + changeItemParent(model, viitem, parent_id, false); if (cb) cb->fire(item_id); } } @@ -4478,7 +4478,7 @@ void LLFolderBridge::perform_pasteFromClipboard() else { //changeCategoryParent() implicity calls dirtyFilter - changeCategoryParent(model, vicat, parent_id, FALSE); + changeCategoryParent(model, vicat, parent_id, false); } if (cb) cb->fire(item_id); } @@ -4500,7 +4500,7 @@ void LLFolderBridge::perform_pasteFromClipboard() else { //changeItemParent() implicity calls dirtyFilter - changeItemParent(model, viitem, parent_id, FALSE); + changeItemParent(model, viitem, parent_id, false); } if (cb) cb->fire(item_id); } @@ -4593,10 +4593,10 @@ void LLFolderBridge::pasteLinkFromClipboard() const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); - const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); - const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); - const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool move_is_into_current_outfit = (mUUID == current_outfit_id); + const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); + const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); if (move_is_into_marketplacelistings) { @@ -4649,7 +4649,7 @@ void LLFolderBridge::staticFolderOptionsMenu() } } -BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type) +bool LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& is_type) { LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; @@ -4658,7 +4658,7 @@ BOOL LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv item_array, LLInventoryModel::EXCLUDE_TRASH, is_type); - return ((item_array.size() > 0) ? TRUE : FALSE ); + return ((item_array.size() > 0) ? true : false ); } void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items) @@ -4864,12 +4864,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items } //Added by aura to force inventory pull on right-click to display folder options correctly. 07-17-06 - mCallingCards = mWearables = FALSE; + mCallingCards = mWearables = false; LLIsType is_callingcard(LLAssetType::AT_CALLINGCARD); if (checkFolderForContentsOfType(model, is_callingcard)) { - mCallingCards=TRUE; + mCallingCards=true; } LLFindWearables is_wearable; @@ -4880,7 +4880,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items checkFolderForContentsOfType(model, is_object) || checkFolderForContentsOfType(model, is_gesture) ) { - mWearables=TRUE; + mWearables=true; } } // [SL:KB] - Patch: Inventory-Misc | Checked: 2011-05-28 (Catznip-2.6.0a) | Added: Catznip-2.6.0a @@ -4909,7 +4909,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items checkFolderForContentsOfType(model, is_object) || checkFolderForContentsOfType(model, is_gesture)) { - mWearables = TRUE; + mWearables = true; } if (!is_system_folder) @@ -5170,7 +5170,7 @@ void LLFolderBridge::addOpenFolderMenuOptions(U32 flags, menuentry_vec_t& items) bool LLFolderBridge::hasChildren() const { LLInventoryModel* model = getInventoryModel(); - if(!model) return FALSE; + if(!model) return false; LLInventoryModel::EHasChildren has_children; has_children = gInventory.categoryHasChildren(mUUID); return has_children != LLInventoryModel::CHILDREN_NO; @@ -5213,7 +5213,7 @@ bool LLFolderBridge::dragOrDrop(MASK mask, bool drop, case DAD_MESH: case DAD_SETTINGS: case DAD_MATERIAL: - accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, TRUE, drop_cb); + accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, true, drop_cb); break; case DAD_LINK: // DAD_LINK type might mean one of two asset types: AT_LINK or AT_LINK_FOLDER. @@ -5227,12 +5227,12 @@ bool LLFolderBridge::dragOrDrop(MASK mask, bool drop, LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID()); if (linked_category) { - accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg, TRUE, TRUE, drop_cb); + accept = dragCategoryIntoFolder((LLInventoryCategory*)linked_category, drop, tooltip_msg, true, true, drop_cb); } } else { - accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, TRUE, drop_cb); + accept = dragItemIntoFolder(inv_item, drop, tooltip_msg, true, drop_cb); } break; case DAD_CATEGORY: @@ -5242,7 +5242,7 @@ bool LLFolderBridge::dragOrDrop(MASK mask, bool drop, } else { - accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data, drop, tooltip_msg, FALSE, TRUE, drop_cb); + accept = dragCategoryIntoFolder((LLInventoryCategory*)cargo_data, drop, tooltip_msg, false, true, drop_cb); } break; case DAD_ROOT_CATEGORY: @@ -5386,7 +5386,7 @@ void LLFolderBridge::createWearable(LLFolderBridge* bridge, LLWearableType::ETyp LLAgentWearables::createWearable(type, false, parent_id); } -void LLFolderBridge::modifyOutfit(BOOL append) +void LLFolderBridge::modifyOutfit(bool append) { LLInventoryModel* model = getInventoryModel(); if(!model) return; @@ -5414,12 +5414,12 @@ void LLFolderBridge::modifyOutfit(BOOL append) if (isAgentInventory()) { - LLAppearanceMgr::instance().wearInventoryCategory(cat, FALSE, append); + LLAppearanceMgr::instance().wearInventoryCategory(cat, false, append); } else { // Library, we need to copy content first - LLAppearanceMgr::instance().wearInventoryCategory(cat, TRUE, append); + LLAppearanceMgr::instance().wearInventoryCategory(cat, true, append); } } @@ -5453,15 +5453,15 @@ LLFolderBridge(inventory, root, uuid) LLUIImagePtr LLMarketplaceFolderBridge::getIcon() const { - return getMarketplaceFolderIcon(FALSE); + return getMarketplaceFolderIcon(false); } LLUIImagePtr LLMarketplaceFolderBridge::getIconOpen() const { - return getMarketplaceFolderIcon(TRUE); + return getMarketplaceFolderIcon(true); } -LLUIImagePtr LLMarketplaceFolderBridge::getMarketplaceFolderIcon(BOOL is_open) const +LLUIImagePtr LLMarketplaceFolderBridge::getMarketplaceFolderIcon(bool is_open) const { LLFolderType::EType preferred_type = getPreferredType(); if (!LLMarketplaceData::instance().isUpdating(getUUID())) @@ -5627,7 +5627,7 @@ void LLFolderBridge::dropToFavorites(LLInventoryItem* inv_item, LLPointer cb) +void LLFolderBridge::dropToOutfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit, LLPointer cb) { if((inv_item->getInventoryType() == LLInventoryType::IT_TEXTURE) || (inv_item->getInventoryType() == LLInventoryType::IT_SNAPSHOT)) { @@ -5709,7 +5709,7 @@ void LLFolderBridge::callback_dropItemIntoFolder(const LLSD& notification, const if (option == 0) // YES { std::string tooltip_msg; - dragItemIntoFolder(inv_item, TRUE, tooltip_msg, FALSE); + dragItemIntoFolder(inv_item, true, tooltip_msg, false); } } @@ -5720,26 +5720,26 @@ void LLFolderBridge::callback_dropCategoryIntoFolder(const LLSD& notification, c if (option == 0) // YES { std::string tooltip_msg; - dragCategoryIntoFolder(inv_category, TRUE, tooltip_msg, FALSE, FALSE); + dragCategoryIntoFolder(inv_category, true, tooltip_msg, false, false); } } // This is used both for testing whether an item can be dropped // into the folder, as well as performing the actual drop, depending -// if drop == TRUE. -BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, - BOOL drop, +// if drop == true. +bool LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, + bool drop, std::string& tooltip_msg, - BOOL user_confirm, + bool user_confirm, LLPointer cb) { LLInventoryModel* model = getInventoryModel(); - if (!model || !inv_item) return FALSE; - if (!isAgentInventory()) return FALSE; // cannot drag into library - if (!isAgentAvatarValid()) return FALSE; + if (!model || !inv_item) return false; + if (!isAgentInventory()) return false; // cannot drag into library + if (!isAgentAvatarValid()) return false; // Client LSL Bridge (also for #AO) - if (isLockedFolder()) return FALSE; + if (isLockedFolder()) return false; // LLInventoryPanel* destination_panel = mInventoryPanel.get(); @@ -5756,34 +5756,34 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID from_folder_uuid = inv_item->getParentUUID(); - const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); - const BOOL move_is_into_favorites = (mUUID == favorites_id); - const BOOL move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); - const BOOL move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); + const bool move_is_into_current_outfit = (mUUID == current_outfit_id); + const bool move_is_into_favorites = (mUUID == favorites_id); + const bool move_is_into_my_outfits = (mUUID == my_outifts_id) || model->isObjectDescendentOf(mUUID, my_outifts_id); + const bool move_is_into_outfit = move_is_into_my_outfits || (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); // FIRE-1392: Allow dragging all asset types into Landmarks folder - //const BOOL move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); - const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id); + //const bool move_is_into_landmarks = (mUUID == landmarks_id) || model->isObjectDescendentOf(mUUID, landmarks_id); + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(mUUID, marketplacelistings_id); + const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id); LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); - BOOL accept = FALSE; + bool accept = false; U64 filter_types = filter->getFilterTypes(); // We shouldn't allow to drop non recent items into recent tab (or some similar transactions) // while we are allowing to interact with regular filtered inventory - BOOL use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); + bool use_filter = filter_types && (filter_types&LLInventoryFilter::FILTERTYPE_DATE || (filter_types&LLInventoryFilter::FILTERTYPE_OBJECT)==0); LLViewerObject* object = NULL; if(LLToolDragAndDrop::SOURCE_AGENT == source) { const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); - const BOOL move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); - const BOOL move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID()); + const bool move_is_into_trash = (mUUID == trash_id) || model->isObjectDescendentOf(mUUID, trash_id); + const bool move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID()); //-------------------------------------------------------------------------------- // Determine if item can be moved. // - BOOL is_movable = TRUE; + bool is_movable = true; switch (inv_item->getActualType()) { @@ -5796,7 +5796,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // Can't explicitly drag things out of the COF. if (move_is_outof_current_outfit) { - is_movable = FALSE; + is_movable = false; } // [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g @@ -5837,15 +5837,15 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // Determine if item can be moved & dropped // Note: if user_confirm is false, we already went through those accept logic test and can skip them - accept = TRUE; + accept = true; if (user_confirm && !is_movable) { - accept = FALSE; + accept = false; } else if (user_confirm && (mUUID == inv_item->getParentUUID()) && !move_is_into_favorites) { - accept = FALSE; + accept = false; } else if (user_confirm && (move_is_into_current_outfit || move_is_into_outfit)) { @@ -5872,7 +5872,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, accept = dest_folder->acceptItem(inv_item); } - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false); // Check whether the item being dragged from active inventory panel // passes the filter of the destination panel. @@ -6003,26 +6003,26 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (!object) { LL_INFOS() << "Object not found for drop." << LL_ENDL; - return FALSE; + return false; } // coming from a task. Need to figure out if the person can // move/copy this item. LLPermissions perm(inv_item->getPermissions()); - BOOL is_move = FALSE; + bool is_move = false; if ((perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID()))) // || gAgent.isGodlike()) { - accept = TRUE; + accept = true; } else if(object->permYouOwner()) { // If the object cannot be copied, but the object the // inventory is owned by the agent, then the item can be // moved from the task to agent inventory. - is_move = TRUE; - accept = TRUE; + is_move = true; + accept = true; } // Don't allow placing an original item into Current Outfit or an outfit folder @@ -6030,7 +6030,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // *TODO: Probably we should create a link to an item if it was dragged to outfit or COF. if (move_is_into_current_outfit || move_is_into_outfit) { - accept = FALSE; + accept = false; } // Don't allow to move a single item to Favorites or Landmarks // if it is not a landmark or a link to a landmark. @@ -6040,12 +6040,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // && !can_move_to_landmarks(inv_item)) { - accept = FALSE; + accept = false; } else if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } // Check whether the item being dragged from in world @@ -6090,12 +6090,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else if ((inv_item->getActualType() == LLAssetType::AT_SETTINGS) && !LLEnvironment::instance().isInventoryEnabled()) { tooltip_msg = LLTrans::getString("NoEnvironmentSettings"); - accept = FALSE; + accept = false; } else { @@ -6126,12 +6126,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, LLViewerInventoryItem* item = (LLViewerInventoryItem*)inv_item; if(item && item->isFinished()) { - accept = TRUE; + accept = true; if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else if (move_is_into_current_outfit || move_is_into_outfit) { @@ -6147,7 +6147,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, accept = can_move_to_landmarks(inv_item); } - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false); // Check whether the item being dragged from the library // passes the filter of the destination panel. @@ -6211,7 +6211,7 @@ bool check_category(LLInventoryModel* model, LLInventoryModel::cat_array_t descendent_categories; LLInventoryModel::item_array_t descendent_items; - model->collectDescendents(cat_id, descendent_categories, descendent_items, TRUE); + model->collectDescendents(cat_id, descendent_categories, descendent_items, true); S32 num_descendent_categories = descendent_categories.size(); S32 num_descendent_items = descendent_items.size(); @@ -6499,16 +6499,16 @@ LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory, U32 flags/* = 0x00*/) : LLItemBridge(inventory, root, uuid) { - mVisited = FALSE; + mVisited = false; if (flags & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED) { - mVisited = TRUE; + mVisited = true; } } LLUIImagePtr LLLandmarkBridge::getIcon() const { - return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, mVisited, false); } void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -6785,13 +6785,13 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act LLUIImagePtr LLCallingCardBridge::getIcon() const { - BOOL online = FALSE; + bool online = false; LLViewerInventoryItem* item = getItem(); if(item) { online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()); } - return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, online, false); } std::string LLCallingCardBridge::getLabelSuffix() const @@ -6860,10 +6860,10 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); LLInventoryItem* item = getItem(); - BOOL good_card = (item + bool good_card = (item && (LLUUID::null != item->getCreatorUUID()) && (item->getCreatorUUID() != gAgent.getID())); - BOOL user_online = FALSE; + bool user_online = false; if (item) { user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID())); @@ -7076,8 +7076,8 @@ void LLGestureBridge::performAction(LLInventoryModel* model, std::string action) if(!LLGestureMgr::instance().isGestureActive(mUUID)) { // we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList. - BOOL inform_server = TRUE; - BOOL deactivate_similar = FALSE; + bool inform_server = true; + bool deactivate_similar = false; LLGestureMgr::instance().setGestureLoadedCallback(mUUID, boost::bind(&LLGestureBridge::playGesture, mUUID)); LLViewerInventoryItem* item = gInventory.getItem(mUUID); llassert(item); @@ -7107,7 +7107,7 @@ void LLGestureBridge::openItem() if (item) { LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); - preview->setFocus(TRUE); + preview->setFocus(true); } */ } @@ -7313,7 +7313,7 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory, LLItemBridge(inventory, root, uuid) { mAttachPt = (flags & 0xff); // low bye of inventory flags - mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE; + mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? true: false; mInvType = type; } @@ -7547,7 +7547,7 @@ bool confirm_attachment_rez(const LLSD& notification, const LLSD& response) // attachments are batched up all into one message versus each attachment // being sent in its own separate attachments message. U8 attachment_pt = notification["payload"]["attachment_point"].asInteger(); - BOOL is_add = notification["payload"]["is_add"].asBoolean(); + bool is_add = notification["payload"]["is_add"].asBoolean(); LL_DEBUGS("Avatar") << "ATT calling addAttachmentRequest " << (itemp ? itemp->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; LLAttachmentsMgr::instance().addAttachmentRequest(item_id, attachment_pt, is_add); @@ -7648,8 +7648,8 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } // [/RLVa:KB] - LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", TRUE); - LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", TRUE); + LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", true); + LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", true); if (attach_menu && (attach_menu->getChildCount() == 0) && attach_hud_menu @@ -7734,13 +7734,13 @@ bool LLObjectBridge::renameItem(const std::string& new_name) if(obj) { LLSelectMgr::getInstance()->deselectAll(); - LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, FALSE ); + LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, false ); LLSelectMgr::getInstance()->selectionSetObjectName( new_name ); LLSelectMgr::getInstance()->deselectAll(); } } } - // return FALSE because we either notified observers (& therefore + // return false because we either notified observers (& therefore // rebuilt) or we didn't update. return false; } @@ -7800,7 +7800,7 @@ std::string LLWearableBridge::getLabelSuffix() const LLUIImagePtr LLWearableBridge::getIcon() const { - return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, FALSE); + return LLInventoryIcon::getIcon(mAssetType, mInvType, mWearableType, false); } // virtual @@ -7860,7 +7860,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { // FWIW, it looks like SUPPRESS_OPEN_ITEM is not set anywhere - BOOL can_open = ((flags & SUPPRESS_OPEN_ITEM) != SUPPRESS_OPEN_ITEM); + bool can_open = ((flags & SUPPRESS_OPEN_ITEM) != SUPPRESS_OPEN_ITEM); // If we have clothing, don't add "Open" as it's the same action as "Wear" SL-18976 LLViewerInventoryItem* item = getItem(); @@ -7871,7 +7871,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } if (isLinkedObjectMissing()) { - can_open = FALSE; + can_open = false; } items.push_back(std::string("Share")); if (!canShare()) @@ -7969,14 +7969,14 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // Called from menus // static -BOOL LLWearableBridge::canWearOnAvatar(void* user_data) +bool LLWearableBridge::canWearOnAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; - if(!self) return FALSE; + if(!self) return false; if(!self->isAgentInventory()) { LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem(); - if(!item || !item->isFinished()) return FALSE; + if(!item || !item->isFinished()) return false; } return (!get_is_item_worn(self->mUUID)); } @@ -8065,10 +8065,10 @@ void LLWearableBridge::wearAddOnAvatar() //} // static -BOOL LLWearableBridge::canEditOnAvatar(void* user_data) +bool LLWearableBridge::canEditOnAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; - if(!self) return FALSE; + if(!self) return false; return (get_is_item_worn(self->mUUID)); } @@ -8089,14 +8089,14 @@ void LLWearableBridge::editOnAvatar() } // static -BOOL LLWearableBridge::canRemoveFromAvatar(void* user_data) +bool LLWearableBridge::canRemoveFromAvatar(void* user_data) { LLWearableBridge* self = (LLWearableBridge*)user_data; if( self && (LLAssetType::AT_BODYPART != self->mAssetType) ) { return get_is_item_worn( self->mUUID ); } - return FALSE; + return false; } void LLWearableBridge::removeFromAvatar() @@ -8154,7 +8154,7 @@ LLSettingsBridge::LLSettingsBridge(LLInventoryPanel* inventory, LLUIImagePtr LLSettingsBridge::getIcon() const { - return LLInventoryIcon::getIcon(LLAssetType::AT_SETTINGS, LLInventoryType::IT_SETTINGS, mSettingsType, FALSE); + return LLInventoryIcon::getIcon(LLAssetType::AT_SETTINGS, LLInventoryType::IT_SETTINGS, mSettingsType, false); } void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action) @@ -8385,7 +8385,7 @@ void LLLinkFolderBridge::gotoItem() LLFolderViewItem *base_folder = LLInventoryPanel::getActiveInventoryPanel()->getItemByID(cat_uuid); if (base_folder) { - base_folder->setOpen(TRUE); + base_folder->setOpen(true); } } } @@ -8572,7 +8572,7 @@ public: if (item) { LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); - preview->setFocus(TRUE); + preview->setFocus(true); } LLInvFVBridgeAction::doIt(); } @@ -8657,24 +8657,24 @@ public: virtual ~LLWearableBridgeAction(){} protected: LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} - BOOL isItemInTrash() const; + bool isItemInTrash() const; // return true if the item is in agent inventory. if false, it // must be lost or in the inventory library. - BOOL isAgentInventory() const; + bool isAgentInventory() const; void wearOnAvatar(); }; -BOOL LLWearableBridgeAction::isItemInTrash() const +bool LLWearableBridgeAction::isItemInTrash() const { - if(!mModel) return FALSE; + if(!mModel) return false; const LLUUID trash_id = mModel->findCategoryUUIDForType(LLFolderType::FT_TRASH); return mModel->isObjectDescendentOf(mUUID, trash_id); } -BOOL LLWearableBridgeAction::isAgentInventory() const +bool LLWearableBridgeAction::isAgentInventory() const { - if(!mModel) return FALSE; - if(gInventory.getRootFolderID() == mUUID) return TRUE; + if(!mModel) return false; + if(gInventory.getRootFolderID() == mUUID) return true; return mModel->isObjectDescendentOf(mUUID, gInventory.getRootFolderID()); } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 54315dbaf1..0ef26cee3a 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -113,15 +113,15 @@ public: virtual void navigateToFolder(bool new_window = false, bool change_mode = false); virtual void showProperties(); virtual bool isItemRenameable() const { return true; } - virtual BOOL isMultiPreviewAllowed() { return TRUE; } + virtual bool isMultiPreviewAllowed() { return true; } //virtual bool renameItem(const std::string& new_name) {} virtual bool isItemRemovable() const; virtual bool isItemMovable() const; - virtual BOOL isItemInTrash() const; + virtual bool isItemInTrash() const; virtual bool isItemInOutfits() const; - virtual BOOL isLink() const; - virtual BOOL isLibraryItem() const; - //virtual BOOL removeItem() = 0; + virtual bool isLink() const; + virtual bool isLibraryItem() const; + //virtual bool removeItem() = 0; virtual void removeBatch(std::vector& batch); virtual void move(LLFolderViewModelItem* new_parent_bridge) {} virtual bool isItemCopyable(bool can_copy_as_link = true) const { return false; } @@ -132,18 +132,18 @@ public: virtual bool cutToClipboard(); virtual bool isCutToClipboard(); virtual bool isClipboardPasteable() const; - virtual BOOL isClipboardPasteableAsLink() const; + virtual bool isClipboardPasteableAsLink() const; virtual void pasteFromClipboard() {} virtual void pasteLinkFromClipboard() {} void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items, menuentry_vec_t &disabled_items, U32 flags); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual LLToolDragAndDrop::ESource getDragSource() const; - virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; + virtual bool startDrag(EDragAndDropType* type, LLUUID* id) const; virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, - std::string& tooltip_msg) { return FALSE; } + std::string& tooltip_msg) { return false; } virtual LLInventoryType::EType getInventoryType() const { return mInvType; } virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } virtual LLSettingsType::type_e getSettingsType() const { return LLSettingsType::ST_NONE; } @@ -175,36 +175,36 @@ protected: LLInventoryModel* getInventoryModel() const; LLInventoryFilter* getInventoryFilter() const; - BOOL isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash? - BOOL isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory? + bool isLinkedObjectInTrash() const; // Is this obj or its baseobj in the trash? + bool isLinkedObjectMissing() const; // Is this a linked obj whose baseobj is not in inventory? - BOOL isAgentInventory() const; // false if lost or in the inventory library - BOOL isCOFFolder() const; // true if COF or descendant of - BOOL isInboxFolder() const; // true if COF or descendant of marketplace inbox + bool isAgentInventory() const; // false if lost or in the inventory library + bool isCOFFolder() const; // true if COF or descendant of + bool isInboxFolder() const; // true if COF or descendant of marketplace inbox - BOOL isMarketplaceListingsFolder() const; // true if descendant of Marketplace listings folder + bool isMarketplaceListingsFolder() const; // true if descendant of Marketplace listings folder // [SL:KB] - Patch: Inventory-Misc | Checked: 2011-05-28 (Catznip-2.6.0a) | Added: Catznip-2.6.0a - BOOL isLibraryInventory() const; - BOOL isLostInventory() const; + bool isLibraryInventory() const; + bool isLostInventory() const; // [/SL:KB] // Client LSL Bridge - BOOL isLockedFolder(bool ignore_setting = false) const; + bool isLockedFolder(bool ignore_setting = false) const; // - virtual BOOL isItemPermissive() const; + virtual bool isItemPermissive() const; static void changeItemParent(LLInventoryModel* model, LLViewerInventoryItem* item, const LLUUID& new_parent, - BOOL restamp); + bool restamp); static void changeCategoryParent(LLInventoryModel* model, LLViewerInventoryCategory* item, const LLUUID& new_parent, - BOOL restamp); + bool restamp); void removeBatchNoCheck(std::vector& batch); - BOOL callback_cutToClipboard(const LLSD& notification, const LLSD& response); - BOOL perform_cutToClipboard(); + bool callback_cutToClipboard(const LLSD& notification, const LLSD& response); + bool perform_cutToClipboard(); LLHandle mInventoryPanel; LLFolderView* mRoot; @@ -268,16 +268,16 @@ public: // [SL:KB] - Patch: Inventory-Links | Checked: 2013-09-19 (Catznip-3.6) /*virtual*/ bool isItemLinkable() const; // [/SL:KB] - virtual bool hasChildren() const { return FALSE; } - virtual BOOL isUpToDate() const { return TRUE; } + virtual bool hasChildren() const { return false; } + virtual bool isUpToDate() const { return true; } virtual LLUIImagePtr getIconOverlay() const; LLViewerInventoryItem* getItem() const; virtual const LLUUID& getThumbnailUUID() const; protected: - BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response); - virtual BOOL isItemPermissive() const; + bool confirmRemoveItem(const LLSD& notification, const LLSD& response); + virtual bool isItemPermissive() const; virtual void buildDisplayName() const; void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb); @@ -292,14 +292,14 @@ public: LLFolderView* root, const LLUUID& uuid) : LLInvFVBridge(inventory, root, uuid), - mCallingCards(FALSE), - mWearables(FALSE), + mCallingCards(false), + mWearables(false), mIsLoading(false), mShowDescendantsCount(false) {} - BOOL dragItemIntoFolder(LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm = TRUE, LLPointer cb = NULL); - BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop, std::string& tooltip_msg, BOOL is_link = FALSE, BOOL user_confirm = TRUE, LLPointer cb = NULL); + bool dragItemIntoFolder(LLInventoryItem* inv_item, bool drop, std::string& tooltip_msg, bool user_confirm = true, LLPointer cb = NULL); + bool dragCategoryIntoFolder(LLInventoryCategory* inv_category, bool drop, std::string& tooltip_msg, bool is_link = false, bool user_confirm = true, LLPointer cb = NULL); void callback_dropItemIntoFolder(const LLSD& notification, const LLSD& response, LLInventoryItem* inv_item); void callback_dropCategoryIntoFolder(const LLSD& notification, const LLSD& response, LLInventoryCategory* inv_category); @@ -326,7 +326,7 @@ public: virtual bool renameItem(const std::string& new_name); virtual bool removeItem(); - BOOL removeSystemFolder(); + bool removeSystemFolder(); bool removeItemResponse(const LLSD& notification, const LLSD& response); void updateHierarchyCreationDate(time_t date); @@ -341,13 +341,13 @@ public: virtual bool isItemRemovable() const; virtual bool isItemMovable() const ; - virtual BOOL isUpToDate() const; + virtual bool isUpToDate() const; virtual bool isItemCopyable(bool can_copy_as_link = true) const; // [SL:KB] - Patch: Inventory-Links | Checked: 2013-09-19 (Catznip-3.6) /*virtual*/ bool isItemLinkable() const; // [/SL:KB] virtual bool isClipboardPasteable() const; - virtual BOOL isClipboardPasteableAsLink() const; + virtual bool isClipboardPasteableAsLink() const; EInventorySortGroup getSortGroup() const; virtual void update(); @@ -388,14 +388,14 @@ protected: static void createNewHair(void* user_data); static void createNewEyes(void* user_data); - BOOL checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); + bool checkFolderForContentsOfType(LLInventoryModel* model, LLInventoryCollectFunctor& typeToCheck); - void modifyOutfit(BOOL append); + void modifyOutfit(bool append); void copyOutfitToClipboard(); void determineFolderType(); void dropToFavorites(LLInventoryItem* inv_item, LLPointer cb = NULL); - void dropToOutfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit, LLPointer cb = NULL); + void dropToOutfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit, LLPointer cb = NULL); void dropToMyOutfits(LLInventoryCategory* inv_cat, LLPointer cb = NULL); //-------------------------------------------------------------------- @@ -410,7 +410,7 @@ protected: void callback_pasteFromClipboard(const LLSD& notification, const LLSD& response); void perform_pasteFromClipboard(); void gatherMessage(std::string& message, S32 depth, LLError::ELevel log_level); - LLUIImagePtr getFolderIcon(BOOL is_open) const; + LLUIImagePtr getFolderIcon(bool is_open) const; bool mCallingCards; bool mWearables; @@ -467,7 +467,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); protected: - BOOL mVisited; + bool mVisited; }; class LLCallingCardBridge : public LLItemBridge @@ -554,7 +554,7 @@ public: protected: static LLUUID sContextMenuItemID; // Only valid while the context menu is open. U32 mAttachPt; - BOOL mIsMultiObject; + bool mIsMultiObject; }; class LLLSLTextBridge : public LLItemBridge @@ -586,18 +586,18 @@ public: virtual LLWearableType::EType getWearableType() const { return mWearableType; } static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu - static BOOL canWearOnAvatar( void* userdata ); + static bool canWearOnAvatar( void* userdata ); // static void onWearOnAvatarArrived( LLViewerWearable* wearable, void* userdata ); void wearOnAvatar(); // static void onWearAddOnAvatarArrived( LLViewerWearable* wearable, void* userdata ); void wearAddOnAvatar(); - static BOOL canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu + static bool canEditOnAvatar( void* userdata ); // Access to editOnAvatar() from menu static void onEditOnAvatar( void* userdata ); void editOnAvatar(); - static BOOL canRemoveFromAvatar( void* userdata ); + static bool canRemoveFromAvatar( void* userdata ); void removeFromAvatar(); protected: LLAssetType::EType mAssetType; @@ -656,7 +656,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); - virtual BOOL isMultiPreviewAllowed() { return FALSE; } + virtual bool isMultiPreviewAllowed() { return false; } virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool renameItem(const std::string& new_name); virtual bool isItemRenameable() const; @@ -805,7 +805,7 @@ public: virtual LLFontGL::StyleFlags getLabelStyle() const; private: - LLUIImagePtr getMarketplaceFolderIcon(BOOL is_open) const; + LLUIImagePtr getMarketplaceFolderIcon(bool is_open) const; // Those members are mutable because they are cached variablse to speed up display, not a state variables mutable S32 m_depth; mutable S32 m_stockCountCache; @@ -818,9 +818,9 @@ void rez_attachment(LLViewerInventoryItem* item, // Move items from an in-world object's "Contents" folder to a specified // folder in agent inventory. -BOOL move_inv_category_world_to_agent(const LLUUID& object_id, +bool move_inv_category_world_to_agent(const LLUUID& object_id, const LLUUID& category_id, - BOOL drop, + bool drop, std::function callback = NULL, void* user_data = NULL, LLInventoryFilter* filter = NULL); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index e2b867a1b3..c09586cb56 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -105,7 +105,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item) const LLFolderViewModelItemInventory* listener = dynamic_cast(item); // If it's a folder and we're showing all folders, return automatically. - const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY; + const bool is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY; if (is_folder && (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS)) { return true; @@ -318,7 +318,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInventory* listener) const { - if (!listener) return FALSE; + if (!listener) return false; LLInventoryType::EType object_type = listener->getInventoryType(); const LLUUID object_id = listener->getUUID(); @@ -337,7 +337,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent // If it has no type, pass it, unless it's a link. if (object && object->getIsLinkType()) { - return FALSE; + return false; } break; case LLInventoryType::IT_UNKNOWN: @@ -346,7 +346,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent // Unknows are 255 and won't fit in 64 bits. if (mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL) { - return FALSE; + return false; } break; } @@ -368,7 +368,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) { - return FALSE; + return false; } break; } @@ -379,7 +379,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent //{ // if (!get_is_item_worn(object_id)) // { - // return FALSE; + // return false; // } //} //////////////////////////////////////////////////////////////////////////////// @@ -389,7 +389,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent { if (!object) { - return FALSE; + return false; } const LLUUID& cat_id = object->getParentUUID(); const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); @@ -405,10 +405,10 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent // Pass if this item is the target UUID or if it links to the target UUID if (filterTypes & FILTERTYPE_UUID) { - if (!object) return FALSE; + if (!object) return false; if (object->getLinkedUUID() != mFilterOps.mFilterUUID) - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -432,13 +432,13 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent { if (listener->getCreationDate() < earliest || listener->getCreationDate() > mFilterOps.mMaxDate) - return FALSE; + return false; } else { if (listener->getCreationDate() > earliest || listener->getCreationDate() > mFilterOps.mMaxDate) - return FALSE; + return false; } } @@ -451,7 +451,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent if ((object_type == LLInventoryType::IT_WEARABLE) && (((0x1LL << type) & mFilterOps.mFilterWearableTypes) == 0)) { - return FALSE; + return false; } } @@ -464,7 +464,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent if ((object_type == LLInventoryType::IT_SETTINGS) && (((0x1LL << type) & mFilterOps.mFilterSettingsTypes) == 0)) { - return FALSE; + return false; } } @@ -495,13 +495,13 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent } if (descendents_actual == 0) { - return FALSE; + return false; } } } } - return TRUE; + return true; } bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) const @@ -521,7 +521,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) cons // If it has no type, pass it, unless it's a link. if (item && item->getIsLinkType()) { - return FALSE; + return false; } break; case LLInventoryType::IT_UNKNOWN: @@ -530,14 +530,14 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) cons // Unknows are 255 and won't fit in 64 bits. if (mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL) { - return FALSE; + return false; } break; } default: if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) { - return FALSE; + return false; } break; } @@ -594,7 +594,7 @@ bool LLInventoryFilter::checkAgainstClipboard(const LLUUID& object_id) const bool LLInventoryFilter::checkAgainstPermissions(const LLFolderViewModelItemInventory* listener) const { - if (!listener) return FALSE; + if (!listener) return false; PermissionMask perm = listener->getPermissionMask(); const LLInvFVBridge *bridge = dynamic_cast(listener); @@ -621,18 +621,18 @@ bool LLInventoryFilter::checkAgainstPermissions(const LLInventoryItem* item) con bool LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewModelItemInventory* listener) const { - if (!listener) return TRUE; + if (!listener) return true; const LLUUID object_id = listener->getUUID(); const LLInventoryObject *object = gInventory.getObject(object_id); - if (!object) return TRUE; + if (!object) return true; - const BOOL is_link = object->getIsLinkType(); + const bool is_link = object->getIsLinkType(); if (is_link && (mFilterOps.mFilterLinks == FILTERLINK_EXCLUDE_LINKS)) - return FALSE; + return false; if (!is_link && (mFilterOps.mFilterLinks == FILTERLINK_ONLY_LINKS)) - return FALSE; - return TRUE; + return false; + return true; } bool LLInventoryFilter::checkAgainstFilterThumbnails(const LLUUID& object_id) const @@ -650,47 +650,47 @@ bool LLInventoryFilter::checkAgainstFilterThumbnails(const LLUUID& object_id) co bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory* listener) const { - if (!listener) return TRUE; - const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY; + if (!listener) return true; + const bool is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY; switch (mFilterOps.mFilterCreatorType) { case FILTERCREATOR_SELF: - if(is_folder) return FALSE; + if(is_folder) return false; return (listener->getSearchableCreatorName() == mUsername); case FILTERCREATOR_OTHERS: - if(is_folder) return FALSE; + if(is_folder) return false; return (listener->getSearchableCreatorName() != mUsername); case FILTERCREATOR_ALL: default: - return TRUE; + return true; } } bool LLInventoryFilter::checkAgainstSearchVisibility(const LLFolderViewModelItemInventory* listener) const { - if (!listener || !hasFilterString()) return TRUE; + if (!listener || !hasFilterString()) return true; const LLUUID object_id = listener->getUUID(); const LLInventoryObject *object = gInventory.getObject(object_id); - if (!object) return TRUE; + if (!object) return true; - const BOOL is_link = object->getIsLinkType(); + const bool is_link = object->getIsLinkType(); if (is_link && ((mFilterOps.mSearchVisibility & VISIBILITY_LINKS) == 0)) - return FALSE; + return false; if (listener->isItemInOutfits() && ((mFilterOps.mSearchVisibility & VISIBILITY_OUTFITS) == 0)) - return FALSE; + return false; if (listener->isItemInTrash() && ((mFilterOps.mSearchVisibility & VISIBILITY_TRASH) == 0)) - return FALSE; + return false; if (!listener->isAgentInventory() && ((mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY) == 0)) - return FALSE; + return false; - return TRUE; + return true; } -const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const +const std::string& LLInventoryFilter::getFilterSubString(bool trim) const { return mFilterSubString; } @@ -1047,11 +1047,11 @@ void LLInventoryFilter::setFilterSubString(const std::string& string) } // hitting BACKSPACE, for example - const BOOL less_restrictive = mFilterSubString.size() >= filter_sub_string_new.size() + const bool less_restrictive = mFilterSubString.size() >= filter_sub_string_new.size() && !mFilterSubString.substr(0, filter_sub_string_new.size()).compare(filter_sub_string_new); // appending new characters - const BOOL more_restrictive = mFilterSubString.size() < filter_sub_string_new.size() + const bool more_restrictive = mFilterSubString.size() < filter_sub_string_new.size() && !filter_sub_string_new.substr(0, mFilterSubString.size()).compare(mFilterSubString); mFilterSubString = filter_sub_string_new; @@ -1107,8 +1107,8 @@ void LLInventoryFilter::setSearchVisibilityTypes(U32 types) if (mFilterOps.mSearchVisibility != types) { // keep current items only if no perm bits getting turned off - BOOL fewer_bits_set = (mFilterOps.mSearchVisibility & ~types); - BOOL more_bits_set = (~mFilterOps.mSearchVisibility & types); + bool fewer_bits_set = (mFilterOps.mSearchVisibility & ~types); + bool more_bits_set = (~mFilterOps.mSearchVisibility & types); mFilterOps.mSearchVisibility = types; if (more_bits_set && fewer_bits_set) @@ -1145,8 +1145,8 @@ void LLInventoryFilter::setFilterPermissions(PermissionMask perms) if (mFilterOps.mPermissions != perms) { // keep current items only if no perm bits getting turned off - BOOL fewer_bits_set = (mFilterOps.mPermissions & ~perms); - BOOL more_bits_set = (~mFilterOps.mPermissions & perms); + bool fewer_bits_set = (mFilterOps.mPermissions & ~perms); + bool more_bits_set = (~mFilterOps.mPermissions & perms); mFilterOps.mPermissions = perms; if (more_bits_set && fewer_bits_set) @@ -1189,7 +1189,7 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date) } } -void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl) +void LLInventoryFilter::setDateRangeLastLogoff(bool sl) { static LLCachedControl s_last_logoff(gSavedPerAccountSettings, "LastLogoff", 0); if (sl && !isSinceLogoff()) @@ -1238,8 +1238,8 @@ void LLInventoryFilter::setHoursAgo(U32 hours) bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo && !isSinceLogoff(); // *NOTE: need to cache last filter time, in case filter goes stale - BOOL less_restrictive; - BOOL more_restrictive; + bool less_restrictive; + bool more_restrictive; if (FILTERDATEDIRECTION_NEWER == mFilterOps.mDateSearchDirection) { less_restrictive = ((are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo))) || !hours); @@ -1428,8 +1428,8 @@ const std::string& LLInventoryFilter::getFilterText() std::string filtered_types; std::string not_filtered_types; - BOOL filtered_by_type = FALSE; - BOOL filtered_by_all_types = TRUE; + bool filtered_by_type = false; + bool filtered_by_all_types = true; S32 num_filter_types = 0; mFilterText.clear(); @@ -1437,158 +1437,158 @@ const std::string& LLInventoryFilter::getFilterText() if (isFilterObjectTypesWith(LLInventoryType::IT_ANIMATION)) { filtered_types += LLTrans::getString("Animations"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Animations"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_CALLINGCARD)) { filtered_types += LLTrans::getString("Calling Cards"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Calling Cards"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_WEARABLE)) { filtered_types += LLTrans::getString("Clothing"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Clothing"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_GESTURE)) { filtered_types += LLTrans::getString("Gestures"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Gestures"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_LANDMARK)) { filtered_types += LLTrans::getString("Landmarks"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Landmarks"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_MATERIAL)) { filtered_types += LLTrans::getString("Materials"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Materials"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_NOTECARD)) { filtered_types += LLTrans::getString("Notecards"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Notecards"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_OBJECT) && isFilterObjectTypesWith(LLInventoryType::IT_ATTACHMENT)) { filtered_types += LLTrans::getString("Objects"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Objects"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_LSL)) { filtered_types += LLTrans::getString("Scripts"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Scripts"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_SOUND)) { filtered_types += LLTrans::getString("Sounds"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Sounds"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_TEXTURE)) { filtered_types += LLTrans::getString("Textures"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Textures"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_SNAPSHOT)) { filtered_types += LLTrans::getString("Snapshots"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Snapshots"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (isFilterObjectTypesWith(LLInventoryType::IT_SETTINGS)) { filtered_types += LLTrans::getString("Settings"); - filtered_by_type = TRUE; + filtered_by_type = true; num_filter_types++; } else { not_filtered_types += LLTrans::getString("Settings"); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!LLInventoryModelBackgroundFetch::instance().folderFetchActive() diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index b84a768025..014898021b 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -253,7 +253,7 @@ public: void setSearchVisibilityTypes(const Params& params); void setFilterSubString(const std::string& string); - const std::string& getFilterSubString(BOOL trim = FALSE) const; + const std::string& getFilterSubString(bool trim = false) const; const std::string& getFilterSubStringOrig() const { return mFilterSubStringOrig; } bool hasFilterString() const; @@ -270,7 +270,7 @@ public: PermissionMask getFilterPermissions() const; void setDateRange(time_t min_date, time_t max_date); - void setDateRangeLastLogoff(BOOL sl); + void setDateRangeLastLogoff(bool sl); time_t getMinDate() const; time_t getMaxDate() const; @@ -286,7 +286,7 @@ public: void setFindAllLinksMode(const std::string &search_name, const LLUUID& search_id); // - BOOL getFilterWorn() const { return mFilterOps.mFilterTypes & FILTERTYPE_WORN; } + bool getFilterWorn() const { return mFilterOps.mFilterTypes & FILTERTYPE_WORN; } // FIRE-31369: Add inventory filter for coalesced objects void setFilterCoalescedObjects(bool coalesced); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 85035492c3..9399b72d22 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -105,7 +105,7 @@ #include "llfloatermarketplacelistings.h" #include "llfloaterproperties.h" -BOOL LLInventoryState::sWearNewClothing = FALSE; +bool LLInventoryState::sWearNewClothing = false; LLUUID LLInventoryState::sWearNewClothingTransactionID; std::list LLInventoryAction::sMarketplaceFolders; //bool LLInventoryAction::sDeleteConfirmationDisplayed = false; // Undo delete item confirmation per-session annoyance @@ -554,12 +554,12 @@ public: } }; -BOOL get_is_parent_to_worn_item(const LLUUID& id) +bool get_is_parent_to_worn_item(const LLUUID& id) { const LLViewerInventoryCategory* cat = gInventory.getCategory(id); if (!cat) { - return FALSE; + return false; } LLInventoryModel::cat_array_t cats; @@ -586,7 +586,7 @@ BOOL get_is_parent_to_worn_item(const LLUUID& id) if (cat == parent_cat) { - return TRUE; + return true; } parent_id = parent_cat->getParentUUID(); @@ -594,25 +594,25 @@ BOOL get_is_parent_to_worn_item(const LLUUID& id) } } - return FALSE; + return false; } -BOOL get_is_item_worn(const LLUUID& id) +bool get_is_item_worn(const LLUUID& id) { const LLViewerInventoryItem* item = gInventory.getItem(id); if (!item) - return FALSE; + return false; if (item->getIsLinkType() && !gInventory.getItem(item->getLinkedUUID())) { - return FALSE; + return false; } // Consider the item as worn if it has links in COF. // [SL:KB] - The code below causes problems across the board so it really just needs to go // if (LLAppearanceMgr::instance().isLinkedInCOF(id)) // { -// return TRUE; +// return true; // } switch(item->getType()) @@ -620,40 +620,40 @@ BOOL get_is_item_worn(const LLUUID& id) case LLAssetType::AT_OBJECT: { if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getLinkedUUID())) - return TRUE; + return true; break; } case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: if(gAgentWearables.isWearingItem(item->getLinkedUUID())) - return TRUE; + return true; break; case LLAssetType::AT_GESTURE: if (LLGestureMgr::instance().isGestureActive(item->getLinkedUUID())) - return TRUE; + return true; break; default: break; } - return FALSE; + return false; } -BOOL get_can_item_be_worn(const LLUUID& id) +bool get_can_item_be_worn(const LLUUID& id) { const LLViewerInventoryItem* item = gInventory.getItem(id); if (!item) - return FALSE; + return false; if (LLAppearanceMgr::instance().isLinkedInCOF(item->getLinkedUUID())) { // an item having links in COF (i.e. a worn item) - return FALSE; + return false; } if (gInventory.isObjectDescendentOf(id, LLAppearanceMgr::instance().getCOF())) { // a non-link object in COF (should not normally happen) - return FALSE; + return false; } const LLUUID trash_id = gInventory.findCategoryUUIDForType( @@ -673,12 +673,12 @@ BOOL get_can_item_be_worn(const LLUUID& id) if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getLinkedUUID())) { // Already being worn - return FALSE; + return false; } else { // Not being worn yet. - return TRUE; + return true; } break; } @@ -687,31 +687,31 @@ BOOL get_can_item_be_worn(const LLUUID& id) if(gAgentWearables.isWearingItem(item->getLinkedUUID())) { // Already being worn - return FALSE; + return false; } else { // Not being worn yet. - return TRUE; + return true; } break; default: break; } - return FALSE; + return false; } -BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id) +bool get_is_item_removable(const LLInventoryModel* model, const LLUUID& id) { if (!model) { - return FALSE; + return false; } // Can't delete an item that's in the library. if (!model->isObjectDescendentOf(id, gInventory.getRootFolderID())) { - return FALSE; + return false; } // Locked Folders @@ -726,7 +726,7 @@ BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id) && gSavedPerAccountSettings.getBOOL("LockWearableFavoritesFolders")) ) { - return FALSE; + return false; } // Locked Folders @@ -736,7 +736,7 @@ BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id) { if (get_is_item_worn(id)) { - return FALSE; + return false; } } @@ -744,20 +744,20 @@ BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id) if ( (RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveItem(id)) ) { - return FALSE; + return false; } // [/RLVa:KB] const LLInventoryObject *obj = model->getItem(id); if (obj && obj->getIsLinkType()) { - return TRUE; + return true; } if (get_is_item_worn(id)) { - return FALSE; + return false; } - return TRUE; + return true; } bool get_is_item_editable(const LLUUID& inv_item_id) @@ -807,7 +807,7 @@ void handle_item_edit(const LLUUID& inv_item_id) } } -BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id) +bool get_is_category_removable(const LLInventoryModel* model, const LLUUID& id) { // NOTE: This function doesn't check the folder's children. // See LLFolderBridge::isItemRemovable for a function that does @@ -815,19 +815,19 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id) if (!model) { - return FALSE; + return false; } if (!model->isObjectDescendentOf(id, gInventory.getRootFolderID())) { - return FALSE; + return false; } // [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g if ( ((RlvActions::isRlvEnabled()) && (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveFolder(id))) ) { - return FALSE; + return false; } // [/RLVa:KB] @@ -843,23 +843,23 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id) && gSavedPerAccountSettings.getBOOL("LockWearableFavoritesFolders")) ) { - return FALSE; + return false; } // Locked Folders - if (!isAgentAvatarValid()) return FALSE; + if (!isAgentAvatarValid()) return false; const LLInventoryCategory* category = model->getCategory(id); if (!category) { - return FALSE; + return false; } const LLFolderType::EType folder_type = category->getPreferredType(); if (LLFolderType::lookupIsProtectedType(folder_type)) { - return FALSE; + return false; } // Can't delete the outfit that is currently being worn. @@ -868,24 +868,24 @@ BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id) const LLViewerInventoryItem *base_outfit_link = LLAppearanceMgr::instance().getBaseOutfitLink(); if (base_outfit_link && (category == base_outfit_link->getLinkedCategory())) { - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) +bool get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) { if (!model) { - return FALSE; + return false; } // [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g if ( (RlvActions::isRlvEnabled()) && (model == &gInventory) && (!RlvFolderLocks::instance().canRenameFolder(id)) ) { - return FALSE; + return false; } // [/RLVa:KB] @@ -901,7 +901,7 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) && gSavedPerAccountSettings.getBOOL("LockWearableFavoritesFolders")) ) { - return FALSE; + return false; } // Locked Folders @@ -910,9 +910,9 @@ BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id) if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) && cat->getOwnerID() == gAgent.getID()) { - return TRUE; + return true; } - return FALSE; + return false; } void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id) @@ -1386,7 +1386,7 @@ bool can_move_item_to_marketplace(const LLInventoryCategory* root_folder, LLInve LLInventoryModel::cat_array_t existing_categories; LLInventoryModel::item_array_t existing_items; - gInventory.collectDescendents(version_folder->getUUID(), existing_categories, existing_items, FALSE); + gInventory.collectDescendents(version_folder->getUUID(), existing_categories, existing_items, false); existing_item_count += count_copyable_items(existing_items) + count_stock_folders(existing_categories); existing_stock_count += count_stock_items(existing_items); @@ -1460,7 +1460,7 @@ bool can_move_folder_to_marketplace(const LLInventoryCategory* root_folder, LLIn { LLInventoryModel::cat_array_t descendent_categories; LLInventoryModel::item_array_t descendent_items; - gInventory.collectDescendents(inv_cat->getUUID(), descendent_categories, descendent_items, FALSE); + gInventory.collectDescendents(inv_cat->getUUID(), descendent_categories, descendent_items, false); int dragged_folder_count = descendent_categories.size() + bundle_size; // Note: We assume that we're moving a bunch of folders in. That might be wrong... int dragged_item_count = count_copyable_items(descendent_items) + count_stock_folders(descendent_categories); @@ -1482,7 +1482,7 @@ bool can_move_folder_to_marketplace(const LLInventoryCategory* root_folder, LLIn // Tally the total number of categories and items inside the root folder LLInventoryModel::cat_array_t existing_categories; LLInventoryModel::item_array_t existing_items; - gInventory.collectDescendents(version_folder->getUUID(), existing_categories, existing_items, FALSE); + gInventory.collectDescendents(version_folder->getUUID(), existing_categories, existing_items, false); existing_folder_count += existing_categories.size(); existing_item_count += count_copyable_items(existing_items) + count_stock_folders(existing_categories); @@ -2237,7 +2237,7 @@ void move_items_to_folder(const LLUUID& new_cat_uuid, const uuid_vec_t& selected LLFolderViewItem* fv_folder = sidepanel_inventory->getActivePanel()->getItemByID(new_cat_uuid); if (fv_folder) { - fv_folder->setOpen(TRUE); + fv_folder->setOpen(true); } } } @@ -2283,7 +2283,7 @@ void move_items_to_new_subfolder(const uuid_vec_t& selected_uuids, const std::st } // Returns true if the item can be moved to Current Outfit or any outfit folder. -bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit) +bool can_move_to_outfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit) { // FIRE-8434/BUG-988 Viewer crashes when copying and pasting an empty outfit folder if (!inv_item) @@ -2320,7 +2320,7 @@ bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_out return true; } -// Returns TRUE if item is a landmark or a link to a landmark +// Returns true if item is a landmark or a link to a landmark // and can be moved to Favorites or Landmarks folder. bool can_move_to_landmarks(LLInventoryItem* inv_item) { @@ -2672,40 +2672,40 @@ bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) { - if(cat) return TRUE; + if(cat) return true; } if(item) { - if(item->getType() == mType) return TRUE; + if(item->getType() == mType) return true; } - return FALSE; + return false; } bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) { - if(cat) return FALSE; + if(cat) return false; } if(item) { - if(item->getType() == mType) return FALSE; - else return TRUE; + if(item->getType() == mType) return false; + else return true; } - return TRUE; + return true; } bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) { - if(cat) return TRUE; + if(cat) return true; } if(item) { - if(item->getActualType() == mType) return TRUE; + if(item->getActualType() == mType) return true; } - return FALSE; + return false; } bool LLIsValidItemLink::operator()(LLInventoryCategory* cat, LLInventoryItem* item) @@ -2721,7 +2721,7 @@ bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryIt { if(cat) { - return TRUE; + return true; } } if(item) @@ -2731,11 +2731,11 @@ bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryIt LLPermissions perm = item->getPermissions(); if ((perm.getMaskBase() & mPerm) == mPerm) { - return TRUE; + return true; } } } - return FALSE; + return false; } bool LLBuddyCollector::operator()(LLInventoryCategory* cat, @@ -2779,10 +2779,10 @@ bool LLParticularBuddyCollector::operator()(LLInventoryCategory* cat, if((LLAssetType::AT_CALLINGCARD == item->getType()) && (item->getCreatorUUID() == mBuddyID)) { - return TRUE; + return true; } } - return FALSE; + return false; } @@ -2834,9 +2834,9 @@ bool LLFindBrokenLinks::operator()(LLInventoryCategory* cat, // it is linked too if (item && LLAssetType::lookupIsLinkType(item->getType())) { - return TRUE; + return true; } - return FALSE; + return false; } bool LLFindWearables::operator()(LLInventoryCategory* cat, @@ -2847,10 +2847,10 @@ bool LLFindWearables::operator()(LLInventoryCategory* cat, if((item->getType() == LLAssetType::AT_CLOTHING) || (item->getType() == LLAssetType::AT_BODYPART)) { - return TRUE; + return true; } } - return FALSE; + return false; } LLFindWearablesEx::LLFindWearablesEx(bool is_worn, bool include_body_parts) @@ -2994,7 +2994,7 @@ void LLSaveFolderState::doFolder(LLFolderViewFolder* folder) { if (!folder->isOpen()) { - folder->setOpen(TRUE); + folder->setOpen(true); } } else @@ -3002,7 +3002,7 @@ void LLSaveFolderState::doFolder(LLFolderViewFolder* folder) // keep selected filter in its current state, this is less jarring to user if (!folder->isSelected() && folder->isOpen()) { - folder->setOpen(FALSE); + folder->setOpen(false); } } } @@ -3020,7 +3020,7 @@ void LLOpenFilteredFolders::doItem(LLFolderViewItem *item) { if (item->passedFilter()) { - item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); + item->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP); } } @@ -3028,12 +3028,12 @@ void LLOpenFilteredFolders::doFolder(LLFolderViewFolder* folder) { if (folder->LLFolderViewItem::passedFilter() && folder->getParentFolder()) { - folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); + folder->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP); } // if this folder didn't pass the filter, and none of its descendants did else if (!folder->getViewModelItem()->passedFilter() && !folder->getViewModelItem()->descendantsPassedFilter()) { - folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_NO); + folder->setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_NO); } } @@ -3041,12 +3041,12 @@ void LLSelectFirstFilteredItem::doItem(LLFolderViewItem *item) { if (item->passedFilter() && !mItemSelected) { - item->getRoot()->setSelection(item, FALSE, FALSE); + item->getRoot()->setSelection(item, false, false); if (item->getParentFolder()) { - item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); + item->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP); } - mItemSelected = TRUE; + mItemSelected = true; } } @@ -3055,9 +3055,9 @@ void LLSelectFirstFilteredItem::doFolder(LLFolderViewFolder* folder) // Skip if folder or item already found, if not filtered or if no parent (root folder is not selectable) if (!mFolderSelected && !mItemSelected && folder->LLFolderViewItem::passedFilter() && folder->getParentFolder()) { - folder->getRoot()->setSelection(folder, FALSE, FALSE); - folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); - mFolderSelected = TRUE; + folder->getRoot()->setSelection(folder, false, false); + folder->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP); + mFolderSelected = true; } } @@ -3065,7 +3065,7 @@ void LLOpenFoldersWithSelection::doItem(LLFolderViewItem *item) { if (item->getParentFolder() && item->isSelected()) { - item->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); + item->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP); } } @@ -3073,7 +3073,7 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder) { if (folder->getParentFolder() && folder->isSelected()) { - folder->getParentFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); + folder->getParentFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP); } } @@ -3083,7 +3083,7 @@ void LLInventoryAction::callback_doToSelected(const LLSD& notification, const LL S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) // YES { - doToSelected(model, root, action, FALSE); + doToSelected(model, root, action, false); } } @@ -3092,11 +3092,11 @@ void LLInventoryAction::callback_copySelected(const LLSD& notification, const LL S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) // YES, Move no copy item(s) { - doToSelected(model, root, "copy_or_move_to_marketplace_listings", FALSE); + doToSelected(model, root, "copy_or_move_to_marketplace_listings", false); } else if (option == 1) // NO, Don't move no copy item(s) (leave them behind) { - doToSelected(model, root, "copy_to_marketplace_listings", FALSE); + doToSelected(model, root, "copy_to_marketplace_listings", false); } } @@ -3129,7 +3129,7 @@ bool get_selection_object_uuids(LLFolderView *root, uuid_vec_t& ids) } -void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm) +void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, bool user_confirm) { std::set selected_items = root->getSelectionList(); @@ -3256,7 +3256,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - model->collectDescendents(cat->getUUID(), cats, items, TRUE); + model->collectDescendents(cat->getUUID(), cats, items, true); total_count += (S32)(cats.size() + items.size()); } } @@ -3366,11 +3366,11 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - model->collectDescendents(obj->getUUID(), cats, items, FALSE); + model->collectDescendents(obj->getUUID(), cats, items, false); LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); - BOOL old_setting = gSavedPerAccountSettings.getBOOL("LockAOFolders"); - gSavedPerAccountSettings.setBOOL("LockAOFolders", FALSE); + bool old_setting = gSavedPerAccountSettings.getBOOL("LockAOFolders"); + gSavedPerAccountSettings.setBOOL("LockAOFolders", false); for (LLInventoryModel::item_array_t::iterator it = items.begin(); it != items.end(); ++it) { if ((*it)->getIsLinkType() && LLAssetType::lookupIsLinkType((*it)->getType())) diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index db10b7288e..c1e195b491 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -47,23 +47,23 @@ const S32 COMPUTE_STOCK_NOT_EVALUATED = -2; **/ // Is this a parent folder to a worn item -BOOL get_is_parent_to_worn_item(const LLUUID& id); +bool get_is_parent_to_worn_item(const LLUUID& id); // Is this item or its baseitem is worn, attached, etc... -BOOL get_is_item_worn(const LLUUID& id); +bool get_is_item_worn(const LLUUID& id); // Could this item be worn (correct type + not already being worn) -BOOL get_can_item_be_worn(const LLUUID& id); +bool get_can_item_be_worn(const LLUUID& id); -BOOL get_is_item_removable(const LLInventoryModel* model, const LLUUID& id); +bool get_is_item_removable(const LLInventoryModel* model, const LLUUID& id); // Performs the appropiate edit action (if one exists) for this item bool get_is_item_editable(const LLUUID& inv_item_id); void handle_item_edit(const LLUUID& inv_item_id); -BOOL get_is_category_removable(const LLInventoryModel* model, const LLUUID& id); +bool get_is_category_removable(const LLInventoryModel* model, const LLUUID& id); -BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id); +bool get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id); void show_item_profile(const LLUUID& item_uuid); void show_task_item_profile(const LLUUID& item_uuid, const LLUUID& object_id); @@ -114,7 +114,7 @@ void move_items_to_folder(const LLUUID& new_cat_uuid, const uuid_vec_t& selected bool is_only_cats_selected(const uuid_vec_t& selected_uuids); bool is_only_items_selected(const uuid_vec_t& selected_uuids); -bool can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); +bool can_move_to_outfit(LLInventoryItem* inv_item, bool move_is_into_current_outfit); bool can_move_to_landmarks(LLInventoryItem* inv_item); bool can_move_to_my_outfits(LLInventoryModel* model, LLInventoryCategory* inv_cat, U32 wear_limit); std::string get_localized_folder_name(LLUUID cat_uuid); @@ -184,7 +184,7 @@ private: // Base class for LLInventoryModel::collectDescendentsIf() method // which accepts an instance of one of these objects to use as the // function to determine if it should be added. Derive from this class -// and override the () operator to return TRUE if you want to collect +// and override the () operator to return true if you want to collect // the category or item passed in. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLInventoryCollectFunctor @@ -234,7 +234,7 @@ protected: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIsType // -// Implementation of a LLInventoryCollectFunctor which returns TRUE if +// Implementation of a LLInventoryCollectFunctor which returns true if // the type is the type passed in during construction. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -252,7 +252,7 @@ protected: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIsNotType // -// Implementation of a LLInventoryCollectFunctor which returns FALSE if the +// Implementation of a LLInventoryCollectFunctor which returns false if the // type is the type passed in during construction, otherwise false. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLIsNotType : public LLInventoryCollectFunctor @@ -269,7 +269,7 @@ protected: //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLIsOfAssetType // -// Implementation of a LLInventoryCollectFunctor which returns TRUE if +// Implementation of a LLInventoryCollectFunctor which returns true if // the item or category is of asset type passed in during construction. // Link types are treated as links, not as the types they point to. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -570,13 +570,13 @@ class LLInventoryState { public: // HACK: Until we can route this info through the instant message hierarchy - static BOOL sWearNewClothing; + static bool sWearNewClothing; static LLUUID sWearNewClothingTransactionID; // wear all clothing in this transaction }; struct LLInventoryAction { - static void doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, BOOL user_confirm = TRUE); + static void doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, bool user_confirm = true); static void callback_doToSelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); static void callback_copySelected(const LLSD& notification, const LLSD& response, class LLInventoryModel* model, class LLFolderView* root, const std::string& action); static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle root); diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp index 793a014cff..d021601fe3 100644 --- a/indra/newview/llinventorygallery.cpp +++ b/indra/newview/llinventorygallery.cpp @@ -61,8 +61,8 @@ const S32 GALLERY_ITEMS_PER_ROW_MIN = 2; const S32 FAST_LOAD_THUMBNAIL_TRSHOLD = 50; // load folders below this value immediately // Helper dnd functions -BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, BOOL drop, std::string& tooltip_msg, BOOL is_link); -BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm); +bool dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, bool drop, std::string& tooltip_msg, bool is_link); +bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop, std::string& tooltip_msg, bool user_confirm); void dropToMyOutfits(LLInventoryCategory* inv_cat); class LLGalleryPanel: public LLPanel @@ -223,7 +223,7 @@ void LLInventoryGallery::setRootFolder(const LLUUID cat_id) { if (mItemMap[id]) { - mItemMap[id]->setSelected(FALSE); + mItemMap[id]->setSelected(false); } } @@ -1188,7 +1188,7 @@ void LLInventoryGallery::moveUp(MASK mask) { changeItemSelection(item_id, true); } - item->setFocus(TRUE); + item->setFocus(true); claimEditHandler(); } } @@ -1200,7 +1200,7 @@ void LLInventoryGallery::moveUp(MASK mask) { item = mIndexToItemMap[target]; toggleSelectionRangeFromLast(item->getUUID()); - item->setFocus(TRUE); + item->setFocus(true); claimEditHandler(); } } @@ -1233,7 +1233,7 @@ void LLInventoryGallery::moveDown(MASK mask) { changeItemSelection(item_id, true); } - item->setFocus(TRUE); + item->setFocus(true); claimEditHandler(); } } @@ -1245,7 +1245,7 @@ void LLInventoryGallery::moveDown(MASK mask) { item = mIndexToItemMap[target]; toggleSelectionRangeFromLast(item->getUUID()); - item->setFocus(TRUE); + item->setFocus(true); claimEditHandler(); } } @@ -1295,7 +1295,7 @@ void LLInventoryGallery::moveLeft(MASK mask) { changeItemSelection(item_id, true); } - item->setFocus(TRUE); + item->setFocus(true); claimEditHandler(); } } @@ -1338,7 +1338,7 @@ void LLInventoryGallery::moveRight(MASK mask) { changeItemSelection(item_id, true); } - item->setFocus(TRUE); + item->setFocus(true); claimEditHandler(); } } @@ -1443,7 +1443,7 @@ void LLInventoryGallery::onFocusReceived() } if (focus_item) { - focus_item->setFocus(TRUE); + focus_item->setFocus(true); } } else if (mIndexToItemMap.size() > 0 && mItemsToSelect.empty()) @@ -1455,7 +1455,7 @@ void LLInventoryGallery::onFocusReceived() LLInventoryGalleryItem* focus_item = mIndexToItemMap[n]; changeItemSelection(focus_item->getUUID(), true); - focus_item->setFocus(TRUE); + focus_item->setFocus(true); } LLPanel::onFocusReceived(); @@ -1480,7 +1480,7 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_ { if (mItemMap[id]) { - mItemMap[id]->setSelected(FALSE); + mItemMap[id]->setSelected(false); } } mSelectedItemIDs.clear(); @@ -1501,7 +1501,7 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_ if (mItemMap[item_id]) { - mItemMap[item_id]->setSelected(TRUE); + mItemMap[item_id]->setSelected(true); } mSelectedItemIDs.push_back(item_id); signalSelectionItemID(item_id); @@ -1529,7 +1529,7 @@ void LLInventoryGallery::addItemSelection(const LLUUID& item_id, bool scroll_to_ if (mItemMap[item_id]) { - mItemMap[item_id]->setSelected(TRUE); + mItemMap[item_id]->setSelected(true); } mSelectedItemIDs.push_back(item_id); signalSelectionItemID(item_id); @@ -1554,7 +1554,7 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_ { if (mItemMap[item_id]) { - mItemMap[item_id]->setSelected(FALSE); + mItemMap[item_id]->setSelected(false); } mSelectedItemIDs.erase(found); result = false; @@ -1563,7 +1563,7 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_ { if (mItemMap[item_id]) { - mItemMap[item_id]->setSelected(TRUE); + mItemMap[item_id]->setSelected(true); } mSelectedItemIDs.push_back(item_id); signalSelectionItemID(item_id); @@ -1731,7 +1731,7 @@ void LLInventoryGallery::paste() { if (mItemMap[id]) { - mItemMap[id]->setSelected(FALSE); + mItemMap[id]->setSelected(false); } } mSelectedItemIDs.clear(); @@ -1830,7 +1830,7 @@ void LLInventoryGallery::paste(const LLUUID& dest, bool LLInventoryGallery::canPaste() const { - // Return FALSE on degenerated cases: empty clipboard, no inventory, no agent + // Return false on degenerated cases: empty clipboard, no inventory, no agent if (!LLClipboard::instance().hasContents()) { return false; @@ -1973,7 +1973,7 @@ void LLInventoryGallery::pasteAsLink() { if (mItemMap[id]) { - mItemMap[id]->setSelected(FALSE); + mItemMap[id]->setSelected(false); } } mSelectedItemIDs.clear(); @@ -1990,9 +1990,9 @@ void LLInventoryGallery::pasteAsLink(const LLUUID& dest, const LLUUID& marketplacelistings_id, const LLUUID& my_outifts_id) { - const BOOL move_is_into_current_outfit = (dest == current_outfit_id); - const BOOL move_is_into_my_outfits = (dest == my_outifts_id) || gInventory.isObjectDescendentOf(dest, my_outifts_id); - const BOOL move_is_into_marketplacelistings = gInventory.isObjectDescendentOf(dest, marketplacelistings_id); + const bool move_is_into_current_outfit = (dest == current_outfit_id); + const bool move_is_into_my_outfits = (dest == my_outifts_id) || gInventory.isObjectDescendentOf(dest, my_outifts_id); + const bool move_is_into_marketplacelistings = gInventory.isObjectDescendentOf(dest, marketplacelistings_id); if (move_is_into_marketplacelistings || move_is_into_current_outfit || move_is_into_my_outfits) { @@ -2299,7 +2299,7 @@ void LLInventoryGallery::deselectItem(const LLUUID& category_id) LLInventoryGalleryItem* item = mItemMap[category_id]; if (item && item->isSelected()) { - mItemMap[category_id]->setSelected(FALSE); + mItemMap[category_id]->setSelected(false); setFocus(true); // Todo: support multiselect // signalSelectionItemID(LLUUID::null); @@ -2318,7 +2318,7 @@ void LLInventoryGallery::clearSelection() { if (mItemMap[id]) { - mItemMap[id]->setSelected(FALSE); + mItemMap[id]->setSelected(false); } } if (!mSelectedItemIDs.empty()) @@ -2714,7 +2714,7 @@ void LLInventoryGalleryItem::draw() LLRect border = mThumbnailCtrl->getRect(); border.mRight = border.mRight + 1; border.mTop = border.mTop + 1; - gl_rect_2d(border, border_color.get(), FALSE); + gl_rect_2d(border, border_color.get(), false); } } @@ -2755,7 +2755,7 @@ bool LLInventoryGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask) { mGallery->changeItemSelection(mUUID, false); } - setFocus(TRUE); + setFocus(true); mGallery->claimEditHandler(); gFocusMgr.setMouseCapture(this); @@ -2777,7 +2777,7 @@ bool LLInventoryGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask) // refresh last interacted mGallery->addItemSelection(mUUID, false); } - setFocus(TRUE); + setFocus(true); mGallery->claimEditHandler(); mGallery->showContextMenu(this, x, y, mUUID); @@ -3005,7 +3005,7 @@ void LLThumbnailsObserver::removeItem(const LLUUID& obj_id) // Helper drag&drop functions //----------------------------- -BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, +bool LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -3018,7 +3018,7 @@ BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, clearSelection(); } - BOOL accepted = FALSE; + bool accepted = false; switch(cargo_type) { case DAD_TEXTURE: @@ -3050,12 +3050,12 @@ BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, LLInventoryCategory* linked_category = gInventory.getCategory(inv_item->getLinkedUUID()); if (linked_category) { - accepted = dragCategoryIntoFolder(dest_id, (LLInventoryCategory*)linked_category, drop, tooltip_msg, TRUE); + accepted = dragCategoryIntoFolder(dest_id, (LLInventoryCategory*)linked_category, drop, tooltip_msg, true); } } else { - accepted = dragItemIntoFolder(dest_id, inv_item, drop, tooltip_msg, TRUE); + accepted = dragItemIntoFolder(dest_id, inv_item, drop, tooltip_msg, true); } if (accepted && drop && inv_item) { @@ -3065,12 +3065,12 @@ BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, case DAD_CATEGORY: if (LLFriendCardsManager::instance().isAnyFriendCategory(dest_id)) { - accepted = FALSE; + accepted = false; } else { LLInventoryCategory* cat_ptr = (LLInventoryCategory*)cargo_data; - accepted = dragCategoryIntoFolder(dest_id, cat_ptr, drop, tooltip_msg, FALSE); + accepted = dragCategoryIntoFolder(dest_id, cat_ptr, drop, tooltip_msg, false); if (accepted && drop) { mItemsToSelect.push_back(cat_ptr->getUUID()); @@ -3096,23 +3096,23 @@ BOOL LLInventoryGallery::baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, } // copy of LLFolderBridge::dragItemIntoFolder -BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, std::string& tooltip_msg, BOOL user_confirm) +bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop, std::string& tooltip_msg, bool user_confirm) { LLViewerInventoryCategory * cat = gInventory.getCategory(folder_id); if (!cat) { - return FALSE; + return false; } LLInventoryModel* model = &gInventory; - if (!model || !inv_item) return FALSE; + if (!model || !inv_item) return false; // cannot drag into library if((gInventory.getRootFolderID() != folder_id) && !model->isObjectDescendentOf(folder_id, gInventory.getRootFolderID())) { - return FALSE; + return false; } - if (!isAgentAvatarValid()) return FALSE; + if (!isAgentAvatarValid()) return false; const LLUUID ¤t_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); const LLUUID &favorites_id = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE); @@ -3120,29 +3120,29 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); - const BOOL move_is_into_current_outfit = (folder_id == current_outfit_id); - const BOOL move_is_into_favorites = (folder_id == favorites_id); - const BOOL move_is_into_my_outfits = (folder_id == my_outifts_id) || model->isObjectDescendentOf(folder_id, my_outifts_id); - const BOOL move_is_into_outfit = move_is_into_my_outfits || (cat && cat->getPreferredType()==LLFolderType::FT_OUTFIT); - const BOOL move_is_into_landmarks = (folder_id == landmarks_id) || model->isObjectDescendentOf(folder_id, landmarks_id); - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(folder_id, marketplacelistings_id); - const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id); + const bool move_is_into_current_outfit = (folder_id == current_outfit_id); + const bool move_is_into_favorites = (folder_id == favorites_id); + const bool move_is_into_my_outfits = (folder_id == my_outifts_id) || model->isObjectDescendentOf(folder_id, my_outifts_id); + const bool move_is_into_outfit = move_is_into_my_outfits || (cat && cat->getPreferredType()==LLFolderType::FT_OUTFIT); + const bool move_is_into_landmarks = (folder_id == landmarks_id) || model->isObjectDescendentOf(folder_id, landmarks_id); + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(folder_id, marketplacelistings_id); + const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(inv_item->getUUID(), marketplacelistings_id); LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); - BOOL accept = FALSE; + bool accept = false; LLViewerObject* object = NULL; if(LLToolDragAndDrop::SOURCE_AGENT == source) { const LLUUID &trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); - const BOOL move_is_into_trash = (folder_id == trash_id) || model->isObjectDescendentOf(folder_id, trash_id); - const BOOL move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID()); + const bool move_is_into_trash = (folder_id == trash_id) || model->isObjectDescendentOf(folder_id, trash_id); + const bool move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID()); //-------------------------------------------------------------------------------- // Determine if item can be moved. // - BOOL is_movable = TRUE; + bool is_movable = true; switch (inv_item->getActualType()) { @@ -3155,7 +3155,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, // Can't explicitly drag things out of the COF. if (move_is_outof_current_outfit) { - is_movable = FALSE; + is_movable = false; } if (move_is_into_trash) { @@ -3178,15 +3178,15 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, // Determine if item can be moved & dropped // Note: if user_confirm is false, we already went through those accept logic test and can skip them - accept = TRUE; + accept = true; if (user_confirm && !is_movable) { - accept = FALSE; + accept = false; } else if (user_confirm && (folder_id == inv_item->getParentUUID()) && !move_is_into_favorites) { - accept = FALSE; + accept = false; } else if (user_confirm && (move_is_into_current_outfit || move_is_into_outfit)) { @@ -3199,7 +3199,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, else if (user_confirm && move_is_into_marketplacelistings) { //disable dropping in or out of marketplace for now - return FALSE; + return false; /*const LLViewerInventoryCategory * master_folder = model->getFirstDescendantOf(marketplacelistings_id, folder_id); LLViewerInventoryCategory * dest_folder = cat; @@ -3213,7 +3213,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, accept = dest_folder->acceptItem(inv_item); } - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false); if (accept && drop) { @@ -3234,7 +3234,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, if (user_confirm && (move_is_from_marketplacelistings || move_is_into_marketplacelistings)) { //disable dropping in or out of marketplace for now - return FALSE; + return false; } //-------------------------------------------------------------------------------- @@ -3272,7 +3272,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, else if (move_is_into_marketplacelistings) { //move_item_to_marketplacelistings(inv_item, mUUID); - return FALSE; + return false; } // NORMAL or TRASH folder // (move the item, restamp if into trash) @@ -3303,7 +3303,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, } }); }*/ - return FALSE; + return false; } // @@ -3319,7 +3319,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, if (!object) { LL_INFOS() << "Object not found for drop." << LL_ENDL; - return FALSE; + return false; } // coming from a task. Need to figure out if the person can @@ -3330,7 +3330,7 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, && perm.allowTransferTo(gAgent.getID()))) // || gAgent.isGodlike()) { - accept = TRUE; + accept = true; } else if(object->permYouOwner()) { @@ -3338,26 +3338,26 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, // inventory is owned by the agent, then the item can be // moved from the task to agent inventory. is_move = true; - accept = TRUE; + accept = true; } // Don't allow placing an original item into Current Outfit or an outfit folder // because they must contain only links to wearable items. if (move_is_into_current_outfit || move_is_into_outfit) { - accept = FALSE; + accept = false; } // Don't allow to move a single item to Favorites or Landmarks // if it is not a landmark or a link to a landmark. else if ((move_is_into_favorites || move_is_into_landmarks) && !can_move_to_landmarks(inv_item)) { - accept = FALSE; + accept = false; } else if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } if (accept && drop) @@ -3388,12 +3388,12 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else if ((inv_item->getActualType() == LLAssetType::AT_SETTINGS) && !LLEnvironment::instance().isInventoryEnabled()) { tooltip_msg = LLTrans::getString("NoEnvironmentSettings"); - accept = FALSE; + accept = false; } else { @@ -3415,12 +3415,12 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, LLViewerInventoryItem* item = (LLViewerInventoryItem*)inv_item; if(item && item->isFinished()) { - accept = TRUE; + accept = true; if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else if (move_is_into_current_outfit || move_is_into_outfit) { @@ -3482,24 +3482,24 @@ BOOL dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, BOOL drop, } // copy of LLFolderBridge::dragCategoryIntoFolder -BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, - BOOL drop, std::string& tooltip_msg, BOOL is_link) +bool dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, + bool drop, std::string& tooltip_msg, bool is_link) { - BOOL user_confirm = TRUE; + bool user_confirm = true; LLInventoryModel* model = &gInventory; LLViewerInventoryCategory * dest_cat = gInventory.getCategory(dest_id); if (!dest_cat) { - return FALSE; + return false; } - if (!inv_cat) return FALSE; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL + if (!inv_cat) return false; // shouldn't happen, but in case item is incorrectly parented in which case inv_cat will be NULL - if (!isAgentAvatarValid()) return FALSE; + if (!isAgentAvatarValid()) return false; // cannot drag into library if((gInventory.getRootFolderID() != dest_id) && !model->isObjectDescendentOf(dest_id, gInventory.getRootFolderID())) { - return FALSE; + return false; } const LLUUID &cat_id = inv_cat->getUUID(); @@ -3507,16 +3507,16 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS); //const LLUUID from_folder_uuid = inv_cat->getParentUUID(); - const BOOL move_is_into_current_outfit = (dest_id == current_outfit_id); - const BOOL move_is_into_marketplacelistings = model->isObjectDescendentOf(dest_id, marketplacelistings_id); - const BOOL move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id); + const bool move_is_into_current_outfit = (dest_id == current_outfit_id); + const bool move_is_into_marketplacelistings = model->isObjectDescendentOf(dest_id, marketplacelistings_id); + const bool move_is_from_marketplacelistings = model->isObjectDescendentOf(cat_id, marketplacelistings_id); // check to make sure source is agent inventory, and is represented there. LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); - const BOOL is_agent_inventory = (model->getCategory(cat_id) != NULL) + const bool is_agent_inventory = (model->getCategory(cat_id) != NULL) && (LLToolDragAndDrop::SOURCE_AGENT == source); - BOOL accept = FALSE; + bool accept = false; if (is_agent_inventory) { @@ -3525,22 +3525,22 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, const LLUUID &my_outifts_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); - const BOOL move_is_into_trash = (dest_id == trash_id) || model->isObjectDescendentOf(dest_id, trash_id); - const BOOL move_is_into_my_outfits = (dest_id == my_outifts_id) || model->isObjectDescendentOf(dest_id, my_outifts_id); - const BOOL move_is_into_outfit = move_is_into_my_outfits || (dest_cat && dest_cat->getPreferredType()==LLFolderType::FT_OUTFIT); - const BOOL move_is_into_current_outfit = (dest_cat && dest_cat->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT); - const BOOL move_is_into_landmarks = (dest_id == landmarks_id) || model->isObjectDescendentOf(dest_id, landmarks_id); - const BOOL move_is_into_lost_and_found = model->isObjectDescendentOf(dest_id, lost_and_found_id); + const bool move_is_into_trash = (dest_id == trash_id) || model->isObjectDescendentOf(dest_id, trash_id); + const bool move_is_into_my_outfits = (dest_id == my_outifts_id) || model->isObjectDescendentOf(dest_id, my_outifts_id); + const bool move_is_into_outfit = move_is_into_my_outfits || (dest_cat && dest_cat->getPreferredType()==LLFolderType::FT_OUTFIT); + const bool move_is_into_current_outfit = (dest_cat && dest_cat->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT); + const bool move_is_into_landmarks = (dest_id == landmarks_id) || model->isObjectDescendentOf(dest_id, landmarks_id); + const bool move_is_into_lost_and_found = model->isObjectDescendentOf(dest_id, lost_and_found_id); //-------------------------------------------------------------------------------- // Determine if folder can be moved. // - BOOL is_movable = TRUE; + bool is_movable = true; if (is_movable && (marketplacelistings_id == cat_id)) { - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipOutboxCannotMoveRoot"); } if (is_movable && move_is_from_marketplacelistings) @@ -3548,22 +3548,22 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, { // If the incoming folder is listed and active (and is therefore either the listing or the version folder), // then moving is *not* allowed - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipOutboxDragActive"); } if (is_movable && (dest_id == cat_id)) { - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipDragOntoSelf"); } if (is_movable && (model->isObjectDescendentOf(dest_id, cat_id))) { - is_movable = FALSE; + is_movable = false; tooltip_msg = LLTrans::getString("TooltipDragOntoOwnChild"); } if (is_movable && LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())) { - is_movable = FALSE; + is_movable = false; // tooltip? } @@ -3598,21 +3598,21 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, } if(is_movable && move_is_into_current_outfit && is_link) { - is_movable = FALSE; + is_movable = false; } if (is_movable && move_is_into_lost_and_found) { - is_movable = FALSE; + is_movable = false; } if (is_movable && (dest_id == model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE))) { - is_movable = FALSE; + is_movable = false; // tooltip? } if (is_movable && (dest_cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK)) { // One cannot move a folder into a stock folder - is_movable = FALSE; + is_movable = false; // tooltip? } @@ -3620,14 +3620,14 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, LLInventoryModel::item_array_t descendent_items; if (is_movable) { - model->collectDescendents(cat_id, descendent_categories, descendent_items, FALSE); + model->collectDescendents(cat_id, descendent_categories, descendent_items, false); for (S32 i=0; i < descendent_categories.size(); ++i) { LLInventoryCategory* category = descendent_categories[i]; if(LLFolderType::lookupIsProtectedType(category->getPreferredType())) { // Can't move "special folders" (e.g. Textures Folder). - is_movable = FALSE; + is_movable = false; break; } } @@ -3648,7 +3648,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, if (items.size() > max_items_to_wear) { // Can't move 'large' folders into current outfit: MAINT-4086 - is_movable = FALSE; + is_movable = false; LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", max_items_to_wear); tooltip_msg = LLTrans::getString("TooltipTooManyWearables",args); @@ -3661,7 +3661,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, LLInventoryItem* item = descendent_items[i]; if (get_is_item_worn(item->getUUID())) { - is_movable = FALSE; + is_movable = false; break; // It's generally movable, but not into the trash. } } @@ -3676,7 +3676,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, // We use getType() instead of getActua;Type() to allow links to landmarks and folders. if (LLAssetType::AT_LANDMARK != item->getType() && LLAssetType::AT_CATEGORY != item->getType()) { - is_movable = FALSE; + is_movable = false; break; // It's generally movable, but not into Landmarks. } } @@ -3701,7 +3701,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, if (user_confirm && (move_is_from_marketplacelistings || move_is_into_marketplacelistings)) { //disable dropping in or out of marketplace for now - return FALSE; + return false; } // Look for any gestures and deactivate them if (move_is_into_trash) @@ -3729,7 +3729,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, inv_cat->getPreferredType() == LLFolderType::FT_OUTFIT)) { // traverse category and add all contents to currently worn. - BOOL append = true; + bool append = true; LLAppearanceMgr::instance().wearInventoryCategory(inv_cat, false, append); } else if (move_is_into_marketplacelistings) @@ -3753,7 +3753,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, if (move_is_from_marketplacelistings) { //disable dropping in or out of marketplace for now - return FALSE; + return false; // If we are moving a folder at the listing folder level (i.e. its parent is the marketplace listings folder) /*if (from_folder_uuid == marketplacelistings_id) @@ -3792,7 +3792,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else { @@ -3804,7 +3804,7 @@ BOOL dragCategoryIntoFolder(LLUUID dest_id, LLInventoryCategory* inv_cat, if (move_is_into_marketplacelistings) { tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); - accept = FALSE; + accept = false; } else { diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h index 72aaaa2ade..fac1c1f6ae 100644 --- a/indra/newview/llinventorygallery.h +++ b/indra/newview/llinventorygallery.h @@ -175,7 +175,7 @@ public: void resetEditHandler(); static bool isItemCopyable(const LLUUID & item_id); - BOOL baseHandleDragAndDrop(LLUUID dest_id, BOOL drop, EDragAndDropType cargo_type, + bool baseHandleDragAndDrop(LLUUID dest_id, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); void showContextMenu(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& item_id); diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index e6d90c6430..af4007aa7a 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -51,7 +51,7 @@ #include "llvoavatarself.h" -void modify_outfit(BOOL append, const LLUUID& cat_id, LLInventoryModel* model) +void modify_outfit(bool append, const LLUUID& cat_id, LLInventoryModel* model) { LLViewerInventoryCategory* cat = model->getCategory(cat_id); if (!cat) return; @@ -76,12 +76,12 @@ void modify_outfit(BOOL append, const LLUUID& cat_id, LLInventoryModel* model) } if (model->isObjectDescendentOf(cat_id, gInventory.getRootFolderID())) { - LLAppearanceMgr::instance().wearInventoryCategory(cat, FALSE, append); + LLAppearanceMgr::instance().wearInventoryCategory(cat, false, append); } else { // Library, we need to copy content first - LLAppearanceMgr::instance().wearInventoryCategory(cat, TRUE, append); + LLAppearanceMgr::instance().wearInventoryCategory(cat, true, append); } } @@ -251,11 +251,11 @@ void LLInventoryGalleryContextMenu::doToSelected(const LLSD& userdata) } else if ("replaceoutfit" == action) { - modify_outfit(FALSE, mUUIDs.front(), &gInventory); + modify_outfit(false, mUUIDs.front(), &gInventory); } else if ("addtooutfit" == action) { - modify_outfit(TRUE, mUUIDs.front(), &gInventory); + modify_outfit(true, mUUIDs.front(), &gInventory); } else if ("removefromoutfit" == action) { diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp index 76d7162640..e382ecbb86 100644 --- a/indra/newview/llinventoryicon.cpp +++ b/indra/newview/llinventoryicon.cpp @@ -110,7 +110,7 @@ LLIconDictionary::LLIconDictionary() LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type, U32 misc_flag, - BOOL item_is_multi) + bool item_is_multi) { const std::string& icon_name = getIconName(asset_type, inventory_type, misc_flag, item_is_multi); return LLUI::getUIImage(icon_name); @@ -124,7 +124,7 @@ LLUIImagePtr LLInventoryIcon::getIcon(LLInventoryType::EIconName idx) const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type, U32 misc_flag, - BOOL item_is_multi) + bool item_is_multi) { LLInventoryType::EIconName idx = LLInventoryType::ICONNAME_OBJECT; if (item_is_multi) diff --git a/indra/newview/llinventoryicon.h b/indra/newview/llinventoryicon.h index b8637c4e33..6ead98d7de 100644 --- a/indra/newview/llinventoryicon.h +++ b/indra/newview/llinventoryicon.h @@ -37,13 +37,13 @@ public: static const std::string& getIconName(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, U32 misc_flag = 0, // different meanings depending on item type - BOOL item_is_multi = FALSE); + bool item_is_multi = false); static const std::string& getIconName(LLInventoryType::EIconName idx); static LLPointer getIcon(LLAssetType::EType asset_type, LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE, U32 misc_flag = 0, // different meanings depending on item type - BOOL item_is_multi = FALSE); + bool item_is_multi = false); static LLPointer getIcon(LLInventoryType::EIconName idx); protected: diff --git a/indra/newview/llinventorylistitem.cpp b/indra/newview/llinventorylistitem.cpp index 4dde506f97..64ae1f22c4 100644 --- a/indra/newview/llinventorylistitem.cpp +++ b/indra/newview/llinventorylistitem.cpp @@ -168,7 +168,7 @@ bool LLPanelInventoryListItemBase::postBuild() LLViewerInventoryItem* inv_item = getItem(); if (inv_item) { - mIconImage = LLInventoryIcon::getIcon(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), FALSE); + mIconImage = LLInventoryIcon::getIcon(inv_item->getType(), inv_item->getInventoryType(), inv_item->getFlags(), false); updateItem(inv_item->getName()); } @@ -445,7 +445,7 @@ bool LLPanelInventoryListItemBase::handleToolTip( S32 x, S32 y, MASK mask) .delay_time(tooltipDelay) .create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1)) .create_params(params)); - return TRUE; + return true; } } } diff --git a/indra/newview/llinventorylistitem.h b/indra/newview/llinventorylistitem.h index 275c190e3d..a97617b6b0 100644 --- a/indra/newview/llinventorylistitem.h +++ b/indra/newview/llinventorylistitem.h @@ -155,7 +155,7 @@ public: LLViewerInventoryItem* getItem() const; void setSeparatorVisible(bool visible) { mSeparatorVisible = visible; } - void resetHighlight() { mHovered = FALSE; } + void resetHighlight() { mHovered = false; } virtual ~LLPanelInventoryListItemBase(){} diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index e26c1c1cea..64538dc249 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -95,7 +95,7 @@ // Increment this if the inventory contents change in a non-backwards-compatible way. // For viewer 2, the addition of link items makes a pre-viewer-2 cache incorrect. const S32 LLInventoryModel::sCurrentInvCacheVersion = 3; -BOOL LLInventoryModel::sFirstTimeInViewer2 = TRUE; +bool LLInventoryModel::sFirstTimeInViewer2 = true; S32 LLInventoryModel::sPendingSystemFolders = 0; @@ -103,7 +103,7 @@ S32 LLInventoryModel::sPendingSystemFolders = 0; /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- -//BOOL decompress_file(const char* src_filename, const char* dst_filename); +//bool decompress_file(const char* src_filename, const char* dst_filename); static const char PRODUCTION_CACHE_FORMAT_STRING[] = "%s.inv.llsd"; static const char GRID_CACHE_FORMAT_STRING[] = "%s.%s.inv.llsd"; static const char * const LOG_INV("Inventory"); @@ -332,7 +332,7 @@ public: if (LLInventoryState::sWearNewClothing) { LLInventoryState::sWearNewClothingTransactionID = tid; - LLInventoryState::sWearNewClothing = FALSE; + LLInventoryState::sWearNewClothing = false; } if (tid.notNull() && tid == LLInventoryState::sWearNewClothingTransactionID) @@ -349,7 +349,7 @@ public: if (LLInventoryState::sWearNewClothing && wearable_ids.size() > 0) { - LLInventoryState::sWearNewClothing = FALSE; + LLInventoryState::sWearNewClothing = false; size_t count = wearable_ids.size(); for (S32 i = 0; i < count; ++i) @@ -457,7 +457,7 @@ LLInventoryModel::LLInventoryModel() mParentChildCategoryTree(), mParentChildItemTree(), mLastItem(NULL), - mIsNotifyObservers(FALSE), + mIsNotifyObservers(false), mModifyMask(LLInventoryObserver::ALL), mChangedItemIDs(), mBulkFecthCallbackSlot(), @@ -517,10 +517,10 @@ void LLInventoryModel::cleanupInventory() // This is a convenience function to check if one object has a parent // chain up to the category specified by UUID. -BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id, +bool LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const { - if (obj_id == cat_id) return TRUE; + if (obj_id == cat_id) return true; const LLInventoryObject* obj = getObject(obj_id); while(obj) @@ -528,17 +528,17 @@ BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& parent_id = obj->getParentUUID(); if( parent_id.isNull() ) { - return FALSE; + return false; } if(parent_id == cat_id) { - return TRUE; + return true; } // Since we're scanning up the parents, we only need to check // in the category list. obj = getCategory(parent_id); } - return FALSE; + return false; } const LLViewerInventoryCategory *LLInventoryModel::getFirstNondefaultParent(const LLUUID& obj_id) const @@ -850,7 +850,7 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E for (std::vector::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it) { LLViewerInventoryItem* item = getItem(*it); - changeItemParent(item, main_id, TRUE); + changeItemParent(item, main_id, true); } // Move all folders to the main folder @@ -862,7 +862,7 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E for (std::vector::const_iterator it = list_uuids.begin(); it != list_uuids.end(); ++it) { LLViewerInventoryCategory* cat = getCategory(*it); - changeCategoryParent(cat, main_id, TRUE); + changeCategoryParent(cat, main_id, true); } // Purge the emptied folder @@ -873,7 +873,7 @@ void LLInventoryModel::consolidateForType(const LLUUID& main_id, LLFolderType::E const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH); if (trash_id.notNull()) { - changeCategoryParent(cat, trash_id, TRUE); + changeCategoryParent(cat, trash_id, true); } } remove_inventory_category(folder_id, NULL); @@ -1343,14 +1343,14 @@ public: virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) { - return TRUE; + return true; } }; void LLInventoryModel::collectDescendents(const LLUUID& id, cat_array_t& cats, item_array_t& items, - BOOL include_trash) + bool include_trash) { LLAlwaysCollect always; collectDescendentsIf(id, cats, items, include_trash, always); @@ -1359,13 +1359,13 @@ void LLInventoryModel::collectDescendents(const LLUUID& id, //void LLInventoryModel::collectDescendentsIf(const LLUUID& id, // cat_array_t& cats, // item_array_t& items, -// BOOL include_trash, +// bool include_trash, // LLInventoryCollectFunctor& add) // [RLVa:KB] - Checked: 2013-04-15 (RLVa-1.4.8) void LLInventoryModel::collectDescendentsIf(const LLUUID& id, cat_array_t& cats, item_array_t& items, - BOOL include_trash, + bool include_trash, LLInventoryCollectFunctor& add, bool follow_folder_links) // [/RLVa:KB] @@ -1418,7 +1418,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, // it has already collected all items from it the way the code was originally laid out) // This breaks the "finish collecting all folders before collecting items (top to bottom and then bottom to top)" // assumption but no functor is (currently) relying on it (and likely never should since it's an implementation detail?) - // [Only LLAppearanceMgr actually ever passes in 'follow_folder_links == TRUE'] + // [Only LLAppearanceMgr actually ever passes in 'follow_folder_links == true'] // Follow folder links recursively. Currently never goes more // than one level deep (for current outfit support) // Note: if making it fully recursive, need more checking against infinite loops. @@ -1704,7 +1704,7 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) // Target ID is stored in the description field of the card. LLUUID id; std::string desc = new_item->getDescription(); - BOOL isId = desc.empty() ? FALSE : id.set(desc, FALSE); + bool isId = desc.empty() ? false : id.set(desc, false); if (isId) { // Valid UUID; set the item UUID and rename it @@ -1879,7 +1879,7 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id) // Migrated from llinventoryfunctions void LLInventoryModel::changeItemParent(LLViewerInventoryItem* item, const LLUUID& new_parent_id, - BOOL restamp) + bool restamp) { if (item->getParentUUID() == new_parent_id) { @@ -1922,7 +1922,7 @@ void LLInventoryModel::changeItemParent(LLViewerInventoryItem* item, // Migrated from llinventoryfunctions void LLInventoryModel::changeCategoryParent(LLViewerInventoryCategory* cat, const LLUUID& new_parent_id, - BOOL restamp) + bool restamp) { if (!cat) { @@ -2162,7 +2162,7 @@ void LLInventoryModel::onObjectDeletedFromServer(const LLUUID& object_id, bool f LLViewerInventoryItem *item = getItem(object_id); if (item && (item->getType() != LLAssetType::AT_LSL_TEXT)) { - LLPreview::hide(object_id, TRUE); + LLPreview::hide(object_id, true); } deleteObject(object_id, fix_broken_links, do_notify_observers); } @@ -2281,7 +2281,7 @@ void LLInventoryModel::removeObserver(LLInventoryObserver* observer) mObservers.erase(observer); } -BOOL LLInventoryModel::containsObserver(LLInventoryObserver* observer) const +bool LLInventoryModel::containsObserver(LLInventoryObserver* observer) const { return mObservers.find(observer) != mObservers.end(); } @@ -2327,7 +2327,7 @@ void LLInventoryModel::notifyObservers(const LLUUID& transaction_id) return; } - mIsNotifyObservers = TRUE; + mIsNotifyObservers = true; // [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5 mTransactionId = transaction_id; // [/SL:KB] @@ -2356,7 +2356,7 @@ void LLInventoryModel::notifyObservers(const LLUUID& transaction_id) // [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5 mTransactionId.setNull(); // [/SL:KB] - mIsNotifyObservers = FALSE; + mIsNotifyObservers = false; } // store flag for change @@ -3296,7 +3296,7 @@ void LLInventoryModel::buildParentChildMap() } } - const BOOL COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT) != LLUUID::null); + const bool COF_exists = (findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT) != LLUUID::null); sFirstTimeInViewer2 = !COF_exists || gAgent.isFirstLogin(); @@ -3352,18 +3352,18 @@ void LLInventoryModel::buildParentChildMap() { LL_WARNS(LOG_INV) << "Found " << lost << " lost items." << LL_ENDL; LLMessageSystem* msg = gMessageSystem; - BOOL start_new_message = TRUE; + bool start_new_message = true; const LLUUID lnf = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); for(uuid_vec_t::iterator it = lost_item_ids.begin() ; it < lost_item_ids.end(); ++it) { if(start_new_message) { - start_new_message = FALSE; + start_new_message = false; msg->newMessageFast(_PREHASH_MoveInventoryItem); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->addBOOLFast(_PREHASH_Stamp, FALSE); + msg->addBOOLFast(_PREHASH_Stamp, false); } msg->nextBlockFast(_PREHASH_InventoryData); msg->addUUIDFast(_PREHASH_ItemID, (*it)); @@ -3371,7 +3371,7 @@ void LLInventoryModel::buildParentChildMap() msg->addString("NewName", NULL); if(msg->isSendFull(NULL)) { - start_new_message = TRUE; + start_new_message = true; gAgent.sendReliableMessage(); } } @@ -4243,7 +4243,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) if (LLInventoryState::sWearNewClothing) { LLInventoryState::sWearNewClothingTransactionID = tid; - LLInventoryState::sWearNewClothing = FALSE; + LLInventoryState::sWearNewClothing = false; } if (tid.notNull() && tid == LLInventoryState::sWearNewClothingTransactionID) @@ -4378,7 +4378,7 @@ void LLInventoryModel::removeItem(const LLUUID& item_id) if (new_parent.notNull()) { LL_INFOS("Inventory") << "Moving to Trash (" << new_parent << "):" << LL_ENDL; - changeItemParent(item, new_parent, TRUE); + changeItemParent(item, new_parent, true); } } } @@ -4393,7 +4393,7 @@ void LLInventoryModel::removeCategory(const LLUUID& category_id) // Look for any gestures and deactivate them LLInventoryModel::cat_array_t descendent_categories; LLInventoryModel::item_array_t descendent_items; - collectDescendents(category_id, descendent_categories, descendent_items, FALSE); + collectDescendents(category_id, descendent_categories, descendent_items, false); for (LLInventoryModel::item_array_t::const_iterator iter = descendent_items.begin(); iter != descendent_items.end(); @@ -4414,7 +4414,7 @@ void LLInventoryModel::removeCategory(const LLUUID& category_id) const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH); if (trash_id.notNull()) { - changeCategoryParent(cat, trash_id, TRUE); + changeCategoryParent(cat, trash_id, true); } } @@ -4525,13 +4525,13 @@ void LLInventoryModel::setLibraryOwnerID(const LLUUID& val) } // static -BOOL LLInventoryModel::getIsFirstTimeInViewer2() +bool LLInventoryModel::getIsFirstTimeInViewer2() { // Do not call this before parentchild map is built. if (!gInventory.mIsAgentInvUsable) { LL_WARNS() << "Parent Child Map not yet built; guessing as first time in viewer2." << LL_ENDL; - return TRUE; + return true; } return sFirstTimeInViewer2; @@ -5480,9 +5480,9 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**) #if 0 -BOOL decompress_file(const char* src_filename, const char* dst_filename) +bool decompress_file(const char* src_filename, const char* dst_filename) { - BOOL rv = FALSE; + bool rv = false; gzFile src = NULL; U8* buffer = NULL; LLFILE* dst = NULL; @@ -5510,7 +5510,7 @@ BOOL decompress_file(const char* src_filename, const char* dst_filename) } while(gzeof(src) == 0); // success - rv = TRUE; + rv = true; err_decompress: if(src != NULL) gzclose(src); diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index e194bfc9a8..2b7216e94b 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -236,11 +236,11 @@ private: // Login //-------------------------------------------------------------------- public: - static BOOL getIsFirstTimeInViewer2(); + static bool getIsFirstTimeInViewer2(); static bool isSysFoldersReady() { return (sPendingSystemFolders == 0); } private: - static BOOL sFirstTimeInViewer2; + static bool sFirstTimeInViewer2; const static S32 sCurrentInvCacheVersion; // expected inventory cache version static S32 sPendingSystemFolders; @@ -283,8 +283,8 @@ public: // Do not store a copy of the pointers collected - use them, and // collect them again later if you need to reference the same objects. enum { - EXCLUDE_TRASH = FALSE, - INCLUDE_TRASH = TRUE + EXCLUDE_TRASH = false, + INCLUDE_TRASH = true }; // Simpler existence test if matches don't actually need to be collected. bool hasMatchingDirectDescendent(const LLUUID& cat_id, @@ -292,19 +292,19 @@ public: void collectDescendents(const LLUUID& id, cat_array_t& categories, item_array_t& items, - BOOL include_trash); + bool include_trash); // [RLVa:KB] - Checked: 2013-04-15 (RLVa-1.4.8) void collectDescendentsIf(const LLUUID& id, cat_array_t& categories, item_array_t& items, - BOOL include_trash, + bool include_trash, LLInventoryCollectFunctor& add, bool follow_folder_links = false); // [/RLVa:KB] // void collectDescendentsIf(const LLUUID& id, // cat_array_t& categories, // item_array_t& items, -// BOOL include_trash, +// bool include_trash, // LLInventoryCollectFunctor& add); // Collect all items in inventory that are linked to item_id. @@ -312,7 +312,7 @@ public: item_array_t collectLinksTo(const LLUUID& item_id); // Check if one object has a parent chain up to the category specified by UUID. - BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const; + bool isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const; enum EAncestorResult{ ANCESTOR_OK = 0, @@ -454,12 +454,12 @@ public: // Migrated from llinventoryfunctions void changeItemParent(LLViewerInventoryItem* item, const LLUUID& new_parent_id, - BOOL restamp); + bool restamp); // Migrated from llinventoryfunctions void changeCategoryParent(LLViewerInventoryCategory* cat, const LLUUID& new_parent_id, - BOOL restamp); + bool restamp); // Marks links from a "possibly" broken list for a rebuild // clears the list @@ -632,7 +632,7 @@ protected: private: // Flag set when notifyObservers is being called, to look for bugs // where it's called recursively. - BOOL mIsNotifyObservers; + bool mIsNotifyObservers; // Variables used to track what has changed since the last notify. U32 mModifyMask; changed_items_t mChangedItemIDs; @@ -658,7 +658,7 @@ public: // If the observer is destroyed, be sure to remove it. void addObserver(LLInventoryObserver* observer); void removeObserver(LLInventoryObserver* observer); - BOOL containsObserver(LLInventoryObserver* observer) const; + bool containsObserver(LLInventoryObserver* observer) const; private: typedef std::set observer_list_t; observer_list_t mObservers; diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index 264bab74b4..9a0bd54504 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -250,7 +250,7 @@ bool LLInventoryModelBackgroundFetch::isEverythingFetched() const return mAllRecursiveFoldersFetched; } -BOOL LLInventoryModelBackgroundFetch::folderFetchActive() const +bool LLInventoryModelBackgroundFetch::folderFetchActive() const { return mFolderFetchActive; } @@ -518,7 +518,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f); LL_DEBUGS(LOG_INV) << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; // fetch is no longer considered "timely" although we will wait for full time-out. - mTimelyFetchPending = FALSE; + mTimelyFetchPending = false; } while(1) @@ -556,7 +556,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() if (cat->fetch()) { mFetchTimer.reset(); - mTimelyFetchPending = TRUE; + mTimelyFetchPending = true; } else { @@ -592,7 +592,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() LL_DEBUGS(LOG_INV) << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << LL_ENDL; } - mTimelyFetchPending = FALSE; + mTimelyFetchPending = false; continue; } else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) @@ -606,7 +606,7 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() // push on back of queue mFetchFolderQueue.push_back(info); } - mTimelyFetchPending = FALSE; + mTimelyFetchPending = false; mFetchTimer.reset(); break; } @@ -628,17 +628,17 @@ void LLInventoryModelBackgroundFetch::backgroundFetch() { itemp->fetchFromServer(); mFetchTimer.reset(); - mTimelyFetchPending = TRUE; + mTimelyFetchPending = true; } else if (itemp->mIsComplete) { - mTimelyFetchPending = FALSE; + mTimelyFetchPending = false; } else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) { mFetchFolderQueue.push_back(info); mFetchTimer.reset(); - mTimelyFetchPending = FALSE; + mTimelyFetchPending = false; } // Not enough time has elapsed to do a new fetch break; @@ -1220,8 +1220,8 @@ void LLInventoryModelBackgroundFetch::bulkFetch() folder_sd["folder_id"] = cat->getUUID(); folder_sd["owner_id"] = cat->getOwnerID(); folder_sd["sort_order"] = LLSD::Integer(sort_order); - folder_sd["fetch_folders"] = LLSD::Boolean(TRUE); //(LLSD::Boolean)sFullFetchStarted; - folder_sd["fetch_items"] = LLSD::Boolean(TRUE); + folder_sd["fetch_folders"] = LLSD::Boolean(true); //(LLSD::Boolean)sFullFetchStarted; + folder_sd["fetch_items"] = LLSD::Boolean(true); // correct library owner for OpenSim (Rye) //if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) @@ -1681,7 +1681,7 @@ void BGFolderHttpHandler::processFailure(LLCore::HttpStatus status, LLCore::Http { LLSD folder_sd(*folder_it); LLUUID folder_id(folder_sd["folder_id"].asUUID()); - const BOOL recursive = getIsRecursive(folder_id); + const bool recursive = getIsRecursive(folder_id); fetcher->addRequestAtFront(folder_id, recursive, true); } } @@ -1725,7 +1725,7 @@ void BGFolderHttpHandler::processFailure(const char * const reason, LLCore::Http { LLSD folder_sd(*folder_it); LLUUID folder_id(folder_sd["folder_id"].asUUID()); - const BOOL recursive = getIsRecursive(folder_id); + const bool recursive = getIsRecursive(folder_id); fetcher->addRequestAtFront(folder_id, recursive, true); } } diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h index 5af0e84e8c..39f5e5f17d 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.h +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -60,7 +60,7 @@ public: // AIS3 only void fetchCOF(nullary_func_t callback); - BOOL folderFetchActive() const; + bool folderFetchActive() const; bool isEverythingFetched() const; // completing the fetch once per session should be sufficient bool libraryFetchStarted() const; @@ -138,7 +138,7 @@ private: fetch_queue_t mFetchItemQueue; std::list mExpectedFolderIds; // for debug, should this track time? // For legacy inventory - BOOL mTimelyFetchPending; + bool mTimelyFetchPending; S32 mNumFetchRetries; F32 mMaxTimeBetweenFetches; // diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index de30b31076..a9f618f48e 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -87,7 +87,7 @@ LLInventoryFetchObserver::LLInventoryFetchObserver(const uuid_vec_t& ids) setFetchIDs(ids); } -BOOL LLInventoryFetchObserver::isFinished() const +bool LLInventoryFetchObserver::isFinished() const { return mIncomplete.empty(); } @@ -264,13 +264,13 @@ void fetch_items_from_llsd(const LLSD& items_llsd) if (!LLGridManager::instance().isInSecondLife()) { LLMessageSystem* msg = gMessageSystem; - BOOL start_new_message = TRUE; + bool start_new_message = true; for (S32 j = 0; j < body[i]["items"].size(); j++) { LLSD item_entry = body[i]["items"][j]; if (start_new_message) { - start_new_message = FALSE; + start_new_message = false; msg->newMessageFast(_PREHASH_FetchInventory); msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); @@ -281,7 +281,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd) msg->addUUIDFast(_PREHASH_ItemID, item_entry["item_id"].asUUID()); if (msg->isSendFull(NULL)) { - start_new_message = TRUE; + start_new_message = true; gAgent.sendReliableMessage(); } } @@ -492,14 +492,14 @@ void LLInventoryFetchDescendentsObserver::startFetch() } } -BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInventoryCategory* cat) const +bool LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInventoryCategory* cat) const { const S32 version = cat->getVersion(); const S32 expected_num_descendents = cat->getDescendentCount(); if ((version == LLViewerInventoryCategory::VERSION_UNKNOWN) || (expected_num_descendents == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN)) { - return FALSE; + return false; } // it might be complete - check known descendents against // currently available. @@ -513,14 +513,14 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven // that the cat just doesn't have any items or subfolders). // Unrecoverable, so just return done so that this observer can be cleared // from memory. - return TRUE; + return true; } const S32 current_num_known_descendents = cats->size() + items->size(); // Got the number of descendents that we were expecting, so we're done. if (current_num_known_descendents == expected_num_descendents) { - return TRUE; + return true; } // Error condition, but recoverable. This happens if something was added to the @@ -530,9 +530,9 @@ BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInven { LL_WARNS() << "Category '" << cat->getName() << "' expected descendentcount:" << expected_num_descendents << " descendents but got descendentcount:" << current_num_known_descendents << LL_ENDL; const_cast(cat)->setDescendentCount(current_num_known_descendents); - return TRUE; + return true; } - return FALSE; + return false; } LLInventoryFetchComboObserver::LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids, diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index bec08d2cdf..8088ff0bb3 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -80,7 +80,7 @@ public: void setFetchID(const LLUUID& id); void setFetchIDs(const uuid_vec_t& ids); - BOOL isFinished() const; + bool isFinished() const; virtual void startFetch() = 0; virtual void changed(U32 mask) = 0; @@ -131,7 +131,7 @@ public: virtual void startFetch(); /*virtual*/ void changed(U32 mask); protected: - BOOL isCategoryComplete(const LLViewerInventoryCategory* cat) const; + bool isCategoryComplete(const LLViewerInventoryCategory* cat) const; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 517abbe7c8..2d24611f4a 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -513,7 +513,7 @@ U32 LLInventoryPanel::getSortOrder() const return getFolderViewModel()->getSorter().getSortOrder(); } -void LLInventoryPanel::setSinceLogoff(BOOL sl) +void LLInventoryPanel::setSinceLogoff(bool sl) { getFilter().setDateRangeLastLogoff(sl); } @@ -713,7 +713,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve // Select any newly created object that has the auto rename at top of folder root set. if(mFolderRoot.get()->getRoot()->needsAutoRename()) { - setSelection(item_id, FALSE); + setSelection(item_id, false); } updateFolderLabel(model_item->getParentUUID()); } @@ -742,7 +742,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve const LLUUID trash_id = mInventory->findCategoryUUIDForType(LLFolderType::FT_TRASH); if (trash_id != model_item->getParentUUID() && (mask & LLInventoryObserver::INTERNAL) && new_parent->isOpen()) { - setSelection(item_id, FALSE); + setSelection(item_id, false); } } updateFolderLabel(model_item->getParentUUID()); @@ -951,16 +951,16 @@ void LLInventoryPanel::idle(void* user_data) EAcceptance last_accept = LLToolDragAndDrop::getInstance()->getLastAccept(); if (last_accept == ACCEPT_YES_SINGLE || last_accept == ACCEPT_YES_COPY_SINGLE) { - panel->mFolderRoot.get()->setShowSingleSelection(TRUE); + panel->mFolderRoot.get()->setShowSingleSelection(true); } else { - panel->mFolderRoot.get()->setShowSingleSelection(FALSE); + panel->mFolderRoot.get()->setShowSingleSelection(false); } } else { - panel->mFolderRoot.get()->setShowSingleSelection(FALSE); + panel->mFolderRoot.get()->setShowSingleSelection(false); } } else @@ -1014,14 +1014,14 @@ void LLInventoryPanel::initializeViews(F64 max_time) LLFolderViewFolder* lib_folder = getFolderByID(gInventory.getLibraryRootFolderID()); if (lib_folder) { - lib_folder->setOpen(TRUE); + lib_folder->setOpen(true); } // Auto close the user's my inventory folder LLFolderViewFolder* my_inv_folder = getFolderByID(gInventory.getRootFolderID()); if (my_inv_folder) { - my_inv_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); + my_inv_folder->setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_DOWN); } } } @@ -1232,7 +1232,7 @@ LLFolderViewItem* LLInventoryPanel::buildViewsTree(const LLUUID& id, // In the case of the root folder been shown, open that folder by default once the widget is created if (create_root) { - folder_view_item->setOpen(TRUE); + folder_view_item->setOpen(true); } } } @@ -1416,7 +1416,7 @@ void LLInventoryPanel::openStartFolderOrMyInventory() && fchild->getViewModelItem() && fchild->getViewModelItem()->getName() == "My Inventory") { - fchild->setOpen(TRUE); + fchild->setOpen(true); break; } } @@ -1438,7 +1438,7 @@ void LLInventoryPanel::openSelected() void LLInventoryPanel::unSelectAll() { - mFolderRoot.get()->setSelection(NULL, FALSE, FALSE); + mFolderRoot.get()->setSelection(NULL, false, false); } @@ -1629,17 +1629,17 @@ bool LLInventoryPanel::addBadge(LLBadge * badge) void LLInventoryPanel::openAllFolders() { - mFolderRoot.get()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); + mFolderRoot.get()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_DOWN); mFolderRoot.get()->arrangeAll(); } void LLInventoryPanel::closeAllFolders() { - mFolderRoot.get()->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); + mFolderRoot.get()->setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_DOWN); mFolderRoot.get()->arrangeAll(); } -void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus) +void LLInventoryPanel::setSelection(const LLUUID& obj_id, bool take_keyboard_focus) { // Don't select objects in COF (e.g. to prevent refocus when items are worn). const LLInventoryObject *obj = mInventory->getObject(obj_id); @@ -1650,7 +1650,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc setSelectionByID(obj_id, take_keyboard_focus); } -void LLInventoryPanel::setSelectCallback(const boost::function& items, BOOL user_action)>& cb) +void LLInventoryPanel::setSelectCallback(const boost::function& items, bool user_action)>& cb) { if (mFolderRoot.get()) { @@ -1670,7 +1670,7 @@ LLInventoryPanel::selected_items_t LLInventoryPanel::getSelectedItems() const return mFolderRoot.get()->getSelectionList(); } -void LLInventoryPanel::onSelectionChange(const std::deque& items, BOOL user_action) +void LLInventoryPanel::onSelectionChange(const std::deque& items, bool user_action) { // Schedule updating the folder view context menu when all selected items become complete (STORM-373). mCompletionObserver->reset(); @@ -1698,7 +1698,7 @@ void LLInventoryPanel::onSelectionChange(const std::deque& it LLFolderView* fv = mFolderRoot.get(); if (fv->needsAutoRename()) // auto-selecting a new user-created asset and preparing to rename { - fv->setNeedsAutoRename(FALSE); + fv->setNeedsAutoRename(false); if (items.size()) // new asset is visible and selected { fv->startRenamingSelectedItem(); @@ -2013,7 +2013,7 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata) return true; } -BOOL LLInventoryPanel::getSinceLogoff() +bool LLInventoryPanel::getSinceLogoff() { return getFilter().isSinceLogoff(); } @@ -2057,15 +2057,15 @@ void LLInventoryPanel::dumpSelectionInformation(void* user_data) iv->mFolderRoot.get()->dumpSelectionInformation(); } -BOOL is_inventorysp_active() +bool is_inventorysp_active() { LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); - if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return FALSE; + if (!sidepanel_inventory || !sidepanel_inventory->isInVisibleChain()) return false; return sidepanel_inventory->isMainInventoryPanelActive(); } // static -LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) +LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(bool auto_open) { S32 z_min = S32_MAX; LLInventoryPanel* res = NULL; @@ -2075,7 +2075,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) if (!floater_inventory) { LL_WARNS() << "Could not find My Inventory floater" << LL_ENDL; - return FALSE; + return nullptr; } LLSidepanelInventory *inventory_panel = LLFloaterSidePanelContainer::getPanel("inventory"); @@ -2137,7 +2137,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) //if (active_inv_floaterp && active_inv_floaterp->isMinimized()) if (auto_open && active_inv_floaterp && active_inv_floaterp->isMinimized()) // AO: additionally only unminimize if we are told we want to see the inventory window. { - active_inv_floaterp->setMinimized(FALSE); + active_inv_floaterp->setMinimized(false); } } // else if (auto_open) @@ -2154,7 +2154,7 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) } //static -void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL use_main_panel, BOOL take_keyboard_focus, BOOL reset_filter) +void LLInventoryPanel::openInventoryPanelAndSetSelection(bool auto_open, const LLUUID& obj_id, bool use_main_panel, bool take_keyboard_focus, bool reset_filter) { // Use correct inventory floater //LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); @@ -2253,13 +2253,13 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L if (use_main_panel) { active_panel->getParentByType()->selectFirstTab(); - active_panel = getActiveInventoryPanel(FALSE); + active_panel = getActiveInventoryPanel(false); } LLFloater* floater_inventory = active_panel->getParentByType(); // if (floater_inventory) { - floater_inventory->setFocus(TRUE); + floater_inventory->setFocus(true); } active_panel->setSelection(obj_id, take_keyboard_focus); } @@ -2295,7 +2295,7 @@ void LLInventoryPanel::addHideFolderType(LLFolderType::EType folder_type) getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() & ~(1ULL << folder_type)); } -BOOL LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) const +bool LLInventoryPanel::getIsHiddenFolderType(LLFolderType::EType folder_type) const { return !(getFilter().getFilterCategoryTypes() & (1ULL << folder_type)); } @@ -2309,7 +2309,7 @@ void LLInventoryPanel::removeItemID(const LLUUID& id) { LLInventoryModel::cat_array_t categories; LLInventoryModel::item_array_t items; - gInventory.collectDescendents(id, categories, items, TRUE); + gInventory.collectDescendents(id, categories, items, true); mItemMap.erase(id); @@ -2349,7 +2349,7 @@ LLFolderViewFolder* LLInventoryPanel::getFolderByID(const LLUUID& id) } -void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, BOOL take_keyboard_focus ) +void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, bool take_keyboard_focus ) { LLFolderViewItem* itemp = getItemByID(obj_id); @@ -2364,7 +2364,7 @@ void LLInventoryPanel::setSelectionByID( const LLUUID& obj_id, BOOL take_keyb if(itemp && itemp->getViewModelItem() && itemp->passedFilter()) { - itemp->arrangeAndSet(TRUE, take_keyboard_focus); + itemp->arrangeAndSet(true, take_keyboard_focus); mSelectThisID.setNull(); mFocusSelection = false; return; @@ -2555,7 +2555,7 @@ void LLInventorySingleFolderPanel::onFocusReceived() if (folder_view->getVisible()) { const LLFolderViewModelItemInventory* modelp = static_cast(folder_view->getViewModelItem()); - setSelectionByID(modelp->getUUID(), TRUE); + setSelectionByID(modelp->getUUID(), true); // quick and dirty fix: don't scroll on switching focus // todo: better 'tab' support, one that would work for LLInventoryPanel mFolderRoot.get()->stopAutoScollining(); @@ -2576,7 +2576,7 @@ void LLInventorySingleFolderPanel::onFocusReceived() if (item_view->getVisible()) { const LLFolderViewModelItemInventory* modelp = static_cast(item_view->getViewModelItem()); - setSelectionByID(modelp->getUUID(), TRUE); + setSelectionByID(modelp->getUUID(), true); mFolderRoot.get()->stopAutoScollining(); break; } diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index e0d3df4675..37ded9d64a 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -182,8 +182,8 @@ public: // Call this method to set the selection. void openAllFolders(); void closeAllFolders(); - void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus); - void setSelectCallback(const boost::function& items, BOOL user_action)>& cb); + void setSelection(const LLUUID& obj_id, bool take_keyboard_focus); + void setSelectCallback(const boost::function& items, bool user_action)>& cb); void clearSelection(); selected_items_t getSelectedItems() const; @@ -199,10 +199,10 @@ public: void setFilterSettingsTypes(U64 filter); void setFilterSubString(const std::string& string); const std::string getFilterSubString(); - void setSinceLogoff(BOOL sl); + void setSinceLogoff(bool sl); void setHoursAgo(U32 hours); void setDateSearchDirection(U32 direction); - BOOL getSinceLogoff(); + bool getSinceLogoff(); void setFilterLinks(U64 filter_links); U64 getFilterLinks(); // Filter Links Menu // FIRE-31369: Add inventory filter for coalesced objects @@ -226,7 +226,7 @@ public: bool getAllowDropOnRoot() { return mParams.allow_drop_on_root; } bool areViewsInitialized() { return mViewsInitialized == VIEWS_INITIALIZED && mFolderRoot.get() && !mFolderRoot.get()->needsArrange(); } - void onSelectionChange(const std::deque &items, BOOL user_action); + void onSelectionChange(const std::deque &items, bool user_action); LLHandle getInventoryPanelHandle() const { return getDerivedHandle(); } @@ -258,19 +258,19 @@ public: // Find whichever inventory panel is active / on top. // "Auto_open" determines if we open an inventory panel if none are open. - static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE); + static LLInventoryPanel *getActiveInventoryPanel(bool auto_open = true); - static void openInventoryPanelAndSetSelection(BOOL auto_open, + static void openInventoryPanelAndSetSelection(bool auto_open, const LLUUID& obj_id, - BOOL use_main_panel = FALSE, - BOOL take_keyboard_focus = TAKE_FOCUS_YES, - BOOL reset_filter = FALSE); + bool use_main_panel = false, + bool take_keyboard_focus = TAKE_FOCUS_YES, + bool reset_filter = false); static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id); void addItemID(const LLUUID& id, LLFolderViewItem* itemp); void removeItemID(const LLUUID& id); LLFolderViewItem* getItemByID(const LLUUID& id); LLFolderViewFolder* getFolderByID(const LLUUID& id); - void setSelectionByID(const LLUUID& obj_id, BOOL take_keyboard_focus); + void setSelectionByID(const LLUUID& obj_id, bool take_keyboard_focus); void updateSelection(); void setSuppressOpenItemAction(bool supress_open_item) { mSuppressOpenItemAction = supress_open_item; } @@ -381,13 +381,13 @@ protected: virtual bool typedViewsFilter(const LLUUID& id, LLInventoryObject const* objectp) { return true; } virtual void itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item); - BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const; + bool getIsHiddenFolderType(LLFolderType::EType folder_type) const; virtual LLFolderView * createFolderRoot(LLUUID root_id ); virtual LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop); virtual LLFolderViewItem* createFolderViewItem(LLInvFVBridge * bridge); - boost::function& items, BOOL user_action)> mSelectionCallback; + boost::function& items, bool user_action)> mSelectionCallback; private: // buildViewsTree does not include some checks and is meant // for recursive use, use buildNewViews() for first call diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index e6cd78c687..d8d64dbfb3 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -79,7 +79,7 @@ LLJoystick::LLJoystick(const LLJoystick::Params& p) mVertSlopFar(0), mHorizSlopNear(0), mHorizSlopFar(0), - mHeldDown(FALSE), + mHeldDown(false), mHeldDownTimer(), mInitialQuadrant(p.quadrant) { @@ -235,7 +235,7 @@ void LLJoystick::onBtnHeldDown(void *userdata) LLJoystick *self = (LLJoystick *)userdata; if (self) { - self->mHeldDown = TRUE; + self->mHeldDown = true; self->onHeldDown(); } } @@ -434,11 +434,11 @@ void LLJoystickAgentSlide::onHeldDown() LLJoystickCameraRotate::LLJoystickCameraRotate(const LLJoystickCameraRotate::Params& p) : LLJoystick(p), - mInLeft( FALSE ), - mInTop( FALSE ), - mInRight( FALSE ), - mInBottom( FALSE ), - mInCenter( FALSE ) + mInLeft( false ), + mInTop( false ), + mInRight( false ), + mInBottom( false ), + mInCenter( false ) { mCenterImageName = "Cam_Rotate_Center"; } @@ -461,7 +461,7 @@ void LLJoystickCameraRotate::updateSlop() bool LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask) { - gAgent.setMovementLocked(TRUE); + gAgent.setMovementLocked(true); updateSlop(); // Set initial offset based on initial click location @@ -478,7 +478,7 @@ bool LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask) mInitialOffset.mX = 0; mInitialOffset.mY = 0; mInitialQuadrant = JQ_ORIGIN; - mInCenter = TRUE; + mInCenter = true; resetJoystickCamera(); } @@ -516,8 +516,8 @@ bool LLJoystickCameraRotate::handleMouseDown(S32 x, S32 y, MASK mask) bool LLJoystickCameraRotate::handleMouseUp(S32 x, S32 y, MASK mask) { - gAgent.setMovementLocked(FALSE); - mInCenter = FALSE; + gAgent.setMovementLocked(false); + mInCenter = false; return LLJoystick::handleMouseUp(x, y, mask); } @@ -528,7 +528,7 @@ bool LLJoystickCameraRotate::handleHover(S32 x, S32 y, MASK mask) if (!pointInCenterDot(x, y)) // { - mInCenter = FALSE; + mInCenter = false; } return LLJoystick::handleHover(x, y, mask); @@ -588,7 +588,7 @@ F32 LLJoystickCameraRotate::getOrbitRate() // Only used for drawing -void LLJoystickCameraRotate::setToggleState( BOOL left, BOOL top, BOOL right, BOOL bottom ) +void LLJoystickCameraRotate::setToggleState( bool left, bool top, bool right, bool bottom ) { mInLeft = left; mInTop = top; @@ -787,7 +787,7 @@ LLJoystickQuaternion::LLJoystickQuaternion(const LLJoystickQuaternion::Params &p } } -void LLJoystickQuaternion::setToggleState(BOOL left, BOOL top, BOOL right, BOOL bottom) +void LLJoystickQuaternion::setToggleState(bool left, bool top, bool right, bool bottom) { mInLeft = left; mInTop = top; diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index bcd034b2ad..9fd084ef1e 100644 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -102,7 +102,7 @@ protected: S32 mVertSlopFar; // where the slop regions end S32 mHorizSlopNear; // where the slop regions end S32 mHorizSlopFar; // where the slop regions end - BOOL mHeldDown; + bool mHeldDown; LLFrameTimer mHeldDownTimer; }; @@ -147,7 +147,7 @@ public: LLJoystickCameraRotate(const LLJoystickCameraRotate::Params&); - virtual void setToggleState( BOOL left, BOOL top, BOOL right, BOOL bottom ); + virtual void setToggleState( bool left, bool top, bool right, bool bottom ); virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); @@ -162,11 +162,11 @@ protected: void drawRotatedImage( LLPointer image, S32 rotations ); protected: - BOOL mInLeft; - BOOL mInTop; - BOOL mInRight; - BOOL mInBottom; - BOOL mInCenter; + bool mInLeft; + bool mInTop; + bool mInRight; + bool mInBottom; + bool mInCenter; std::string mCenterImageName; }; @@ -201,7 +201,7 @@ public: LLJoystickQuaternion(const LLJoystickQuaternion::Params &); - virtual void setToggleState(BOOL left, BOOL top, BOOL right, BOOL bottom); + virtual void setToggleState(bool left, bool top, bool right, bool bottom); virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); @@ -216,10 +216,10 @@ protected: virtual void updateSlop(); void drawRotatedImage(LLPointer image, S32 rotations); - BOOL mInLeft; - BOOL mInTop; - BOOL mInRight; - BOOL mInBottom; + bool mInLeft; + bool mInTop; + bool mInRight; + bool mInBottom; S32 mXAxisIndex; S32 mYAxisIndex; diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 968513662b..a267e0adea 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -84,12 +84,12 @@ class LLFetchLandmarksByName : public LLInventoryCollectFunctor { private: std::string name; - BOOL use_substring; + bool use_substring; //this member will be contain copy of founded items to keep the result unique std::set check_duplicate; public: -LLFetchLandmarksByName(std::string &landmark_name, BOOL if_use_substring) +LLFetchLandmarksByName(std::string &landmark_name, bool if_use_substring) :name(landmark_name), use_substring(if_use_substring) { @@ -178,7 +178,7 @@ static void fetch_landmarks(LLInventoryModel::cat_array_t& cats, add); } -LLInventoryModel::item_array_t LLLandmarkActions::fetchLandmarksByName(std::string& name, BOOL use_substring) +LLInventoryModel::item_array_t LLLandmarkActions::fetchLandmarksByName(std::string& name, bool use_substring) { LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h index 1b1d50b927..4ea56479d8 100644 --- a/indra/newview/lllandmarkactions.h +++ b/indra/newview/lllandmarkactions.h @@ -45,7 +45,7 @@ public: /** * @brief Fetches landmark LLViewerInventoryItems for the given landmark name. */ - static LLInventoryModel::item_array_t fetchLandmarksByName(std::string& name, BOOL if_use_substring); + static LLInventoryModel::item_array_t fetchLandmarksByName(std::string& name, bool if_use_substring); /** * @brief Checks whether landmark exists for current agent position. */ diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index d790c6f95e..11a6a755e4 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -176,12 +176,12 @@ void LLLandmarkList::processGetAssetReply( } } -BOOL LLLandmarkList::isAssetInLoadedCallbackMap(const LLUUID& asset_uuid) +bool LLLandmarkList::isAssetInLoadedCallbackMap(const LLUUID& asset_uuid) { return mLoadedCallbackMap.find(asset_uuid) != mLoadedCallbackMap.end(); } -BOOL LLLandmarkList::assetExists(const LLUUID& asset_uuid) +bool LLLandmarkList::assetExists(const LLUUID& asset_uuid) { return mList.count(asset_uuid) != 0 || mBadList.count(asset_uuid) != 0; } diff --git a/indra/newview/lllandmarklist.h b/indra/newview/lllandmarklist.h index b50332b215..6ca5ee19a6 100644 --- a/indra/newview/lllandmarklist.h +++ b/indra/newview/lllandmarklist.h @@ -49,7 +49,7 @@ public: //const LLLandmark* getFirst() { return mList.getFirstData(); } //const LLLandmark* getNext() { return mList.getNextData(); } - BOOL assetExists(const LLUUID& asset_uuid); + bool assetExists(const LLUUID& asset_uuid); LLLandmark* getAsset(const LLUUID& asset_uuid, loaded_callback_t cb = NULL); static void processGetAssetReply( const LLUUID& uuid, @@ -58,9 +58,9 @@ public: S32 status, LLExtStat ext_status ); - // Returns TRUE if loading the landmark with given asset_uuid has been requested + // Returns true if loading the landmark with given asset_uuid has been requested // but is not complete yet. - BOOL isAssetInLoadedCallbackMap(const LLUUID& asset_uuid); + bool isAssetInLoadedCallbackMap(const LLUUID& asset_uuid); protected: void onRegionHandle(const LLUUID& landmark_id); diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp index a34dafb19a..32ca19ffd7 100644 --- a/indra/newview/lllegacyatmospherics.cpp +++ b/indra/newview/lllegacyatmospherics.cpp @@ -180,7 +180,7 @@ LLAtmospherics::LLAtmospherics() mWorldScale(1.f) { /// WL PARAMS - mInitialized = FALSE; + mInitialized = false; mAmbientScale = gSavedSettings.getF32("SkyAmbientScale"); mNightColorShift = gSavedSettings.getColor3("SkyNightColorShift"); mFogColor.mV[VRED] = mFogColor.mV[VGREEN] = mFogColor.mV[VBLUE] = 0.5f; @@ -505,7 +505,7 @@ void LLAtmospherics::updateFog(const F32 distance, const LLVector3& tosun_in) } // Functions used a lot. -F32 color_norm_pow(LLColor3& col, F32 e, BOOL postmultiply) +F32 color_norm_pow(LLColor3& col, F32 e, bool postmultiply) { F32 mv = color_max(col); if (0 == mv) diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index a1fba25bec..3dcf9231f4 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -72,7 +72,7 @@ /*=======================================*/ static const F32 LL_LOCAL_TIMER_HEARTBEAT = 3.0; -static const BOOL LL_LOCAL_USE_MIPMAPS = true; +static const bool LL_LOCAL_USE_MIPMAPS = true; static const S32 LL_LOCAL_DISCARD_LEVEL = 0; static const bool LL_LOCAL_SLAM_FOR_DEBUG = true; static const bool LL_LOCAL_REPLACE_ON_DEL = true; @@ -579,7 +579,7 @@ void LLLocalBitmap::updateUserVolumes(LLUUID old_id, LLUUID new_id, U32 channel) LLSculptParams* old_params = (LLSculptParams*)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT); LLSculptParams new_params(*old_params); new_params.setSculptTexture(new_id, (*old_params).getSculptType()); - object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, TRUE); + object->setParameterEntry(LLNetworkData::PARAMS_SCULPT, new_params, true); } } } @@ -620,7 +620,7 @@ void LLLocalBitmap::updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableTyp U32 index; if (gAgentWearables.getWearableIndex(wearable,index)) { - gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), FALSE, index); + gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), false, index); // [Legacy Bake] //gAgentAvatarp->wearableUpdated(type); gAgentAvatarp->wearableUpdated(type, false); diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 5a350b361a..16e7b65bfd 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -538,7 +538,7 @@ bool LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask) void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor) { KEY key = gKeyboard->currentKey(); - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); // Typing? (moving cursor should not affect showing the list) bool typing = mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END; @@ -578,7 +578,7 @@ void LLLocationInputCtrl::setText(const LLStringExplicit& text) { mTextEntry->setText(text); } - mHasAutocompletedText = FALSE; + mHasAutocompletedText = false; } void LLLocationInputCtrl::setFocus(bool b) @@ -748,7 +748,7 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data) //Let's add landmarks to the top of the list if any if(!filter.empty() ) { - LLInventoryModel::item_array_t landmark_items = LLLandmarkActions::fetchLandmarksByName(filter, TRUE); + LLInventoryModel::item_array_t landmark_items = LLLandmarkActions::fetchLandmarksByName(filter, true); for(U32 i=0; i < landmark_items.size(); i++) { @@ -1102,7 +1102,7 @@ void LLLocationInputCtrl::rebuildLocationHistory(const std::string& filter) void LLLocationInputCtrl::focusTextEntry() { - // We can't use "mTextEntry->setFocus(TRUE)" instead because + // We can't use "mTextEntry->setFocus(true)" instead because // if the "select_on_focus" parameter is true it places the cursor // at the beginning (after selecting text), thus screwing up updateSelection(). if (mTextEntry) @@ -1196,7 +1196,7 @@ void LLLocationInputCtrl::changeLocationPresentation() mTextEntry->setText(LLURI::unescape(slurl.getSLURLString())); mTextEntry->selectAll(); - mMaturityButton->setVisible(FALSE); + mMaturityButton->setVisible(false); isHumanReadableLocationVisible = false; } @@ -1384,7 +1384,7 @@ void LLLocationInputCtrl::createNavMeshStatusListenerForCurrentRegion() } // Pathfinding rebake functions -BOOL LLLocationInputCtrl::rebakeRegionCallback(const LLSD& notification,const LLSD& response) +bool LLLocationInputCtrl::rebakeRegionCallback(const LLSD& notification,const LLSD& response) { std::string newSetName=response["message"].asString(); S32 option=LLNotificationsUtil::getSelectedOption(notification,response); @@ -1393,8 +1393,8 @@ BOOL LLLocationInputCtrl::rebakeRegionCallback(const LLSD& notification,const LL { if(LLMenuOptionPathfindingRebakeNavmesh::getInstance()->isRebakeNeeded()) LLMenuOptionPathfindingRebakeNavmesh::getInstance()->rebakeNavmesh(); - return TRUE; + return true; } - return FALSE; + return false; } // diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index bf53ff71b3..ad07dc22cd 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -214,7 +214,7 @@ private: std::string mMaturityHelpTopic; // Pathfinding rebake functions - BOOL rebakeRegionCallback(const LLSD& notification,const LLSD& response); + bool rebakeRegionCallback(const LLSD& notification,const LLSD& response); // // Prevent querying LLTrans each frame diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index c4fbd33855..56c6404f20 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -551,11 +551,11 @@ void LLLogChat::loadChatHistory(const std::string& file_name, std::list& m char buffer[LOG_RECALL_SIZE]; /*Flawfinder: ignore*/ char *bptr; S32 len; - bool firstline = TRUE; + bool firstline = true; if (load_all_history || fseek(fptr, (LOG_RECALL_SIZE - 1) * -1 , SEEK_END)) { //We need to load the whole historyFile or it's smaller than recall size, so get it all. - firstline = FALSE; + firstline = false; if (fseek(fptr, 0, SEEK_SET)) { fclose(fptr); @@ -570,7 +570,7 @@ void LLLogChat::loadChatHistory(const std::string& file_name, std::list& m if (firstline) { - firstline = FALSE; + firstline = false; continue; } @@ -1332,11 +1332,11 @@ void LLLoadHistoryThread::loadHistory(const std::string& file_name, std::list LLLoginHandler::loadSavedUserLoginInfo() authenticator["algorithm"] = "md5"; authenticator["secret"] = md5pass; // yuck, we'll fix this with mani's changes. - gSavedSettings.setBOOL("AutoLogin", TRUE); // Re-added because handled via FSLoginDontSavePassword debug setting + gSavedSettings.setBOOL("AutoLogin", true); // Re-added because handled via FSLoginDontSavePassword debug setting return gSecAPIHandler->createCredential(identifier["first_name"].asString() + " " + identifier["last_name"].asString() + "@" +LLGridManager::getInstance()->getGrid(), identifier, authenticator); } diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index f490eab622..f418c25647 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -362,7 +362,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) data["message"] = message_response; data["reply_pump"] = TOS_REPLY_PUMP; if (gViewerWindow) - gViewerWindow->setShowProgress(FALSE, FALSE); + gViewerWindow->setShowProgress(false, false); LLFloaterReg::showInstance("message_tos", data); LLEventPumps::instance().obtain(TOS_REPLY_PUMP) .listen(TOS_LISTENER_NAME, @@ -386,7 +386,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) } if (gViewerWindow) - gViewerWindow->setShowProgress(FALSE, FALSE); + gViewerWindow->setShowProgress(false, false); LLFloaterReg::showInstance("message_critical", data); LLEventPumps::instance().obtain(TOS_REPLY_PUMP) .listen(TOS_LISTENER_NAME, @@ -424,7 +424,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) } if (gViewerWindow) - gViewerWindow->setShowProgress(FALSE, FALSE); + gViewerWindow->setShowProgress(false, false); LLSD args; args["VERSION"] = login_version; @@ -463,7 +463,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) if (gViewerWindow) { - gViewerWindow->setShowProgress(FALSE, FALSE); + gViewerWindow->setShowProgress(false, false); } showMFAChallange(LLTrans::getString(response["message_id"])); @@ -483,7 +483,7 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) LL_WARNS("LLLogin") << "Login failed for an unknown reason: " << LLSDOStreamer(response) << LL_ENDL; if (gViewerWindow) - gViewerWindow->setShowProgress(FALSE, FALSE); + gViewerWindow->setShowProgress(false, false); LLNotificationsUtil::add("LoginFailedUnknown", LLSD::emptyMap(), LLSD::emptyMap(), boost::bind(&LLLoginInstance::handleLoginDisallowed, this, _1, _2)); } diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index f65ef20db8..47a2551b6e 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -101,7 +101,7 @@ void LLManip::rebuild(LLViewerObject* vobj) LLManip::LLManip( const std::string& name, LLToolComposite* composite ) : LLTool( name, composite ), - mInSnapRegime(FALSE), + mInSnapRegime(false), mHighlightedPart(LL_NO_PART), mManipPart(LL_NO_PART) { @@ -149,7 +149,7 @@ void LLManip::getManipNormal(LLViewerObject* object, EManipPart manip, LLVector3 } -BOOL LLManip::getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis) +bool LLManip::getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis) { LLVector3 grid_origin; LLVector3 grid_scale; @@ -171,11 +171,11 @@ BOOL LLManip::getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 & } else { - return FALSE; + return false; } axis.rotVec( grid_rotation ); - return TRUE; + return true; } F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing, F32 min_subdivisions, F32 max_subdivisions) @@ -226,7 +226,7 @@ bool LLManip::handleHover(S32 x, S32 y, MASK mask) { // Somehow the object got deselected while we were dragging it. // Release the mouse - setMouseCapture( FALSE ); + setMouseCapture( false ); } LL_DEBUGS("UserInput") << "hover handled by LLManip (active)" << LL_ENDL; @@ -246,7 +246,7 @@ bool LLManip::handleMouseUp(S32 x, S32 y, MASK mask) if( hasMouseCapture() ) { handled = true; - setMouseCapture( FALSE ); + setMouseCapture( false ); } return handled; } @@ -256,20 +256,20 @@ void LLManip::updateGridSettings() sGridMaxSubdivisionLevel = gSavedSettings.getBOOL("GridSubUnit") ? (F32)gSavedSettings.getS32("GridSubdivision") : 1.f; } -BOOL LLManip::getMousePointOnPlaneAgent(LLVector3& point, S32 x, S32 y, LLVector3 origin, LLVector3 normal) +bool LLManip::getMousePointOnPlaneAgent(LLVector3& point, S32 x, S32 y, LLVector3 origin, LLVector3 normal) { LLVector3d origin_double = gAgent.getPosGlobalFromAgent(origin); LLVector3d global_point; - BOOL result = getMousePointOnPlaneGlobal(global_point, x, y, origin_double, normal); + bool result = getMousePointOnPlaneGlobal(global_point, x, y, origin_double, normal); point = gAgent.getPosAgentFromGlobal(global_point); return result; } -BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVector3d origin, LLVector3 normal) const +bool LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVector3d origin, LLVector3 normal) const { if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - BOOL result = FALSE; + bool result = false; F32 mouse_x = ((F32)x / gViewerWindow->getWorldViewWidthScaled() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgentCamera.mHUDCurZoom; F32 mouse_y = ((F32)y / gViewerWindow->getWorldViewHeightScaled() - 0.5f) / gAgentCamera.mHUDCurZoom; @@ -284,7 +284,7 @@ BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVect { mouse_pos.mV[VX] = (normal * (origin_agent - mouse_pos)) / (normal.mV[VX]); - result = TRUE; + result = true; } point = gAgent.getPosGlobalFromAgent(mouse_pos); @@ -296,13 +296,13 @@ BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVect point, x, y, origin, normal ); } - //return FALSE; + //return false; } // Given the line defined by mouse cursor (a1 + a_param*(a2-a1)) and the line defined by b1 + b_param*(b2-b1), // returns a_param and b_param for the points where lines are closest to each other. // Returns false if the two lines are parallel. -BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, const LLVector3& b2, F32 &a_param, F32 &b_param ) +bool LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, const LLVector3& b2, F32 &a_param, F32 &b_param ) { LLVector3 a1; LLVector3 a2; @@ -320,7 +320,7 @@ BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, co a2 = gAgentCamera.getCameraPositionAgent() + LLVector3(gViewerWindow->mouseDirectionGlobal(x, y)); } - BOOL parallel = TRUE; + bool parallel = true; LLVector3 a = a2 - a1; LLVector3 b = b2 - b1; @@ -334,7 +334,7 @@ BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, co if( (denom < -F_APPROXIMATELY_ZERO) || (F_APPROXIMATELY_ZERO < denom) ) { a_param = (dist - normal * a1) / denom; - parallel = FALSE; + parallel = false; } normal = (a % b) % a; // normal to plane (P) through a and (shortest line between a and b) @@ -344,7 +344,7 @@ BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, co if( (denom < -F_APPROXIMATELY_ZERO) || (F_APPROXIMATELY_ZERO < denom) ) { b_param = (dist - normal * b1) / denom; - parallel = FALSE; + parallel = false; } return parallel; @@ -373,7 +373,7 @@ LLVector3 LLManip::getPivotPoint() static LLCachedControl sPivotY(gSavedSettings, "FSBuildPrefs_PivotY"); static LLCachedControl sPivotZ(gSavedSettings, "FSBuildPrefs_PivotZ"); - const BOOL children_ok = TRUE; + const bool children_ok = true; LLViewerObject* root_object = mObjectSelection->getFirstRootObject(children_ok); if (root_object && (mObjectSelection->getObjectCount() == 1 || sActualRoot) && mObjectSelection->getSelectType() != SELECT_TYPE_HUD) { @@ -408,14 +408,14 @@ LLVector3 LLManip::getPivotPoint() } -void LLManip::renderGuidelines(BOOL draw_x, BOOL draw_y, BOOL draw_z) +void LLManip::renderGuidelines(bool draw_x, bool draw_y, bool draw_z) { LLVector3 grid_origin; LLQuaternion grid_rot; LLVector3 grid_scale; LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rot, grid_scale); - const BOOL children_ok = TRUE; + const bool children_ok = true; LLViewerObject* object = mObjectSelection->getFirstRootObject(children_ok); if (!object) { @@ -543,7 +543,7 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons { const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); - BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD; + bool hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD; gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); LLVector3 render_pos = pos; @@ -601,7 +601,7 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string } } - BOOL hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD; + bool hud_selection = mObjectSelection->getSelectType() == SELECT_TYPE_HUD; gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); { diff --git a/indra/newview/llmanip.h b/indra/newview/llmanip.h index 9d5a19c53b..0d31d3af54 100644 --- a/indra/newview/llmanip.h +++ b/indra/newview/llmanip.h @@ -117,8 +117,8 @@ public: LLManip( const std::string& name, LLToolComposite* composite ); - virtual BOOL handleMouseDownOnPart(S32 x, S32 y, MASK mask) = 0; - void renderGuidelines(BOOL draw_x = TRUE, BOOL draw_y = TRUE, BOOL draw_z = TRUE); + virtual bool handleMouseDownOnPart(S32 x, S32 y, MASK mask) = 0; + void renderGuidelines(bool draw_x = true, bool draw_y = true, bool draw_z = true); static void renderXYZ(const LLVector3 &vec); /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); @@ -126,7 +126,7 @@ public: virtual void highlightManipulators(S32 x, S32 y) = 0; virtual void handleSelect(); virtual void handleDeselect(); - virtual BOOL canAffectSelection() = 0; + virtual bool canAffectSelection() = 0; EManipPart getHighlightedPart() { return mHighlightedPart; } @@ -136,18 +136,18 @@ protected: LLVector3 getSavedPivotPoint() const; LLVector3 getPivotPoint(); void getManipNormal(LLViewerObject* object, EManipPart manip, LLVector3 &normal); - BOOL getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis); + bool getManipAxis(LLViewerObject* object, EManipPart manip, LLVector3 &axis); F32 getSubdivisionLevel(const LLVector3 &reference_point, const LLVector3 &translate_axis, F32 grid_scale, S32 min_pixel_spacing = MIN_DIVISION_PIXEL_WIDTH, F32 min_subdivisions = sGridMinSubdivisionLevel, F32 max_subdivisions = sGridMaxSubdivisionLevel); void renderTickValue(const LLVector3& pos, F32 value, const std::string& suffix, const LLColor4 &color); void renderTickText(const LLVector3& pos, const std::string& suffix, const LLColor4 &color); void updateGridSettings(); - BOOL getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVector3d origin, LLVector3 normal) const; - BOOL getMousePointOnPlaneAgent(LLVector3& point, S32 x, S32 y, LLVector3 origin, LLVector3 normal); - BOOL nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, const LLVector3& b2, F32 &a_param, F32 &b_param ); + bool getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVector3d origin, LLVector3 normal) const; + bool getMousePointOnPlaneAgent(LLVector3& point, S32 x, S32 y, LLVector3 origin, LLVector3 normal); + bool nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, const LLVector3& b2, F32 &a_param, F32 &b_param ); LLColor4 setupSnapGuideRenderPass(S32 pass); protected: LLFrameTimer mHelpTextTimer; - BOOL mInSnapRegime; + bool mInSnapRegime; LLSafeHandle mObjectSelection; EManipPart mHighlightedPart; EManipPart mManipPart; diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index a066ec4dad..ba8270ff02 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -95,9 +95,9 @@ LLManipRotate::LLManipRotate( LLToolComposite* composite ) mCenterToCamMag(0.f), mCenterToProfilePlane(), mCenterToProfilePlaneMag(0.f), - mSendUpdateOnMouseUp( FALSE ), - mSmoothRotate( FALSE ), - mCamEdgeOn(FALSE), + mSendUpdateOnMouseUp( false ), + mSmoothRotate( false ), + mCamEdgeOn(false), mManipulatorScales(1.f, 1.f, 1.f, 1.f) { } @@ -120,7 +120,7 @@ void LLManipRotate::render() LLGLEnable gl_blend(GL_BLEND); // You can rotate if you can move - LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(TRUE); + LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(true); if( !first_object ) { return; @@ -202,7 +202,7 @@ void LLManipRotate::render() { gGL.color4f( 0.7f, 0.7f, 0.7f, 0.3f ); gGL.diffuseColor4f(0.7f, 0.7f, 0.7f, 0.3f); - gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, TRUE ); + gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, true ); } gGL.flush(); @@ -366,7 +366,7 @@ bool LLManipRotate::handleMouseDown(S32 x, S32 y, MASK mask) { bool handled = false; - LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(TRUE); + LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(true); if( first_object ) { if( mHighlightedPart != LL_NO_PART ) @@ -379,12 +379,12 @@ bool LLManipRotate::handleMouseDown(S32 x, S32 y, MASK mask) } // Assumes that one of the parts of the manipulator was hit. -BOOL LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) +bool LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) { - BOOL can_rotate = canAffectSelection(); + bool can_rotate = canAffectSelection(); if (!can_rotate) { - return FALSE; + return false; } highlightManipulators(x, y); @@ -439,12 +439,12 @@ BOOL LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) mAgentSelfAtAxis = gAgent.getAtAxis(); // no point checking if avatar was selected, just save the value // Route future Mouse messages here preemptively. (Release on mouse up.) - setMouseCapture( TRUE ); - LLSelectMgr::getInstance()->enableSilhouette(FALSE); + setMouseCapture( true ); + LLSelectMgr::getInstance()->enableSilhouette(false); mHelpTextTimer.reset(); sNumTimesHelpTextShown++; - return TRUE; + return true; } @@ -486,7 +486,7 @@ bool LLManipRotate::handleMouseUp(S32 x, S32 y, MASK mask) // Might have missed last update due to timing. LLSelectMgr::getInstance()->sendMultipleUpdate( UPD_ROTATION | UPD_POSITION ); - LLSelectMgr::getInstance()->enableSilhouette(TRUE); + LLSelectMgr::getInstance()->enableSilhouette(true); //gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject")); LLSelectMgr::getInstance()->updateSelectionCenter(); @@ -504,7 +504,7 @@ bool LLManipRotate::handleHover(S32 x, S32 y, MASK mask) if( mObjectSelection->isEmpty() ) { // Somehow the object got deselected while we were dragging it. - setMouseCapture( FALSE ); + setMouseCapture( false ); } else { @@ -524,7 +524,7 @@ bool LLManipRotate::handleHover(S32 x, S32 y, MASK mask) } -LLVector3 LLManipRotate::projectToSphere( F32 x, F32 y, BOOL* on_sphere ) +LLVector3 LLManipRotate::projectToSphere( F32 x, F32 y, bool* on_sphere ) { F32 z = 0.f; F32 dist_squared = x*x + y*y; @@ -554,8 +554,8 @@ void LLManipRotate::drag( S32 x, S32 y ) mRotation = dragConstrained(x, y); } - BOOL damped = mSmoothRotate; - mSmoothRotate = FALSE; + bool damped = mSmoothRotate; + mSmoothRotate = false; for (LLObjectSelection::iterator iter = mObjectSelection->begin(); iter != mObjectSelection->end(); iter++) @@ -745,13 +745,13 @@ void LLManipRotate::renderActiveRing( F32 radius, F32 width, const LLColor4& fro { LLGLEnable cull_face(GL_CULL_FACE); { - gl_ring(radius, width, back_color, back_color * 0.5f, CIRCLE_STEPS, FALSE); - gl_ring(radius, width, back_color, back_color * 0.5f, CIRCLE_STEPS, TRUE); + gl_ring(radius, width, back_color, back_color * 0.5f, CIRCLE_STEPS, false); + gl_ring(radius, width, back_color, back_color * 0.5f, CIRCLE_STEPS, true); } { LLGLDepthTest gls_depth(GL_FALSE); - gl_ring(radius, width, front_color, front_color * 0.5f, CIRCLE_STEPS, FALSE); - gl_ring(radius, width, front_color, front_color * 0.5f, CIRCLE_STEPS, TRUE); + gl_ring(radius, width, front_color, front_color * 0.5f, CIRCLE_STEPS, false); + gl_ring(radius, width, front_color, front_color * 0.5f, CIRCLE_STEPS, true); } } @@ -786,7 +786,7 @@ void LLManipRotate::renderSnapGuides() LLVector3 world_snap_axis; LLVector3 test_axis = constraint_axis; - BOOL constrain_to_ref_object = FALSE; + bool constrain_to_ref_object = false; if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid()) { test_axis = test_axis * ~grid_rotation; @@ -794,7 +794,7 @@ void LLManipRotate::renderSnapGuides() else if (LLSelectMgr::getInstance()->getGridMode() == GRID_MODE_REF_OBJECT) { test_axis = test_axis * ~grid_rotation; - constrain_to_ref_object = TRUE; + constrain_to_ref_object = true; } test_axis.abs(); @@ -873,17 +873,17 @@ void LLManipRotate::renderSnapGuides() F32 end_angle = atan2(y_axis_snap * edge_normal, x_axis_snap * edge_normal); //F32 start_angle = angle_between((-1.f * LLVector3::x_axis) * snap_guide_rot, edge_normal); F32 start_angle = end_angle - F_PI; - gl_arc_2d(0.f, 0.f, mRadiusMeters * SNAP_GUIDE_INNER_RADIUS, CIRCLE_STEPS, FALSE, start_angle, end_angle); + gl_arc_2d(0.f, 0.f, mRadiusMeters * SNAP_GUIDE_INNER_RADIUS, CIRCLE_STEPS, false, start_angle, end_angle); } else { - gl_circle_2d(0.f, 0.f, mRadiusMeters * SNAP_GUIDE_INNER_RADIUS, CIRCLE_STEPS, FALSE); + gl_circle_2d(0.f, 0.f, mRadiusMeters * SNAP_GUIDE_INNER_RADIUS, CIRCLE_STEPS, false); } gGL.popMatrix(); for (S32 i = 0; i < 64; i++) { - BOOL render_text = TRUE; + bool render_text = true; F32 deg = 5.625f * (F32)i; LLVector3 inner_point; LLVector3 outer_point; @@ -921,7 +921,7 @@ void LLManipRotate::renderSnapGuides() if (dot > 0.f) { outer_point = inner_point; - render_text = FALSE; + render_text = false; } else { @@ -1060,7 +1060,7 @@ void LLManipRotate::renderSnapGuides() getObjectAxisClosestToMouse(object_axis); // project onto constraint plane - LLSelectNode* first_node = mObjectSelection->getFirstMoveableNode(TRUE); + LLSelectNode* first_node = mObjectSelection->getFirstMoveableNode(true); object_axis = object_axis * first_node->getObject()->getRenderRotation(); object_axis = object_axis - (object_axis * getConstraintAxis()) * getConstraintAxis(); object_axis.normVec(); @@ -1152,8 +1152,8 @@ void LLManipRotate::renderSnapGuides() } } -// Returns TRUE if center of sphere is visible. Also sets a bunch of member variables that are used later (e.g. mCenterToCam) -BOOL LLManipRotate::updateVisiblity() +// Returns true if center of sphere is visible. Also sets a bunch of member variables that are used later (e.g. mCenterToCam) +bool LLManipRotate::updateVisiblity() { // Don't want to recalculate the center of the selection during a drag. // Due to packet delays, sometimes half the objects in the selection have their @@ -1166,7 +1166,7 @@ BOOL LLManipRotate::updateVisiblity() mRotationCenter = gAgent.getPosGlobalFromAgent( getPivotPoint() );//LLSelectMgr::getInstance()->getSelectionCenterGlobal(); } - BOOL visible = FALSE; + bool visible = false; //Assume that UI scale factor is equivalent for X and Y axis F32 ui_scale_factor = LLUI::getScaleFactor().mV[VX]; @@ -1190,7 +1190,7 @@ BOOL LLManipRotate::updateVisiblity() // so use getWorldViewHeightRaw as scale factor when converting to pixel coordinates mCenterScreen.set((S32)((0.5f - center.mV[VY]) / gAgentCamera.mHUDCurZoom * gViewerWindow->getWorldViewHeightScaled()), (S32)((center.mV[VZ] + 0.5f) / gAgentCamera.mHUDCurZoom * gViewerWindow->getWorldViewHeightScaled())); - visible = TRUE; + visible = true; } else { @@ -1211,7 +1211,7 @@ BOOL LLManipRotate::updateVisiblity() F32 max_select_distance = gSavedSettings.getF32("MaxSelectDistance"); if (dist_vec_squared(gAgent.getPositionAgent(), center) > (max_select_distance * max_select_distance)) { - visible = FALSE; + visible = false; } } @@ -1227,16 +1227,16 @@ BOOL LLManipRotate::updateVisiblity() } else { - visible = FALSE; + visible = false; } } } - mCamEdgeOn = FALSE; + mCamEdgeOn = false; F32 axis_onto_cam = mManipPart >= LL_ROT_X ? llabs( getConstraintAxis() * mCenterToCamNorm ) : 0.f; if( axis_onto_cam < AXIS_ONTO_CAM_TOLERANCE ) { - mCamEdgeOn = TRUE; + mCamEdgeOn = true; } return visible; @@ -1329,7 +1329,7 @@ LLVector3 LLManipRotate::getConstraintAxis() LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale); - LLSelectNode* first_node = mObjectSelection->getFirstMoveableNode(TRUE); + LLSelectNode* first_node = mObjectSelection->getFirstMoveableNode(true); if (first_node) { // *FIX: get agent local attachment grid working @@ -1343,7 +1343,7 @@ LLVector3 LLManipRotate::getConstraintAxis() LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) { - LLSelectNode* first_object_node = mObjectSelection->getFirstMoveableNode(TRUE); + LLSelectNode* first_object_node = mObjectSelection->getFirstMoveableNode(true); LLVector3 constraint_axis = getConstraintAxis(); LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter ); @@ -1417,7 +1417,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) } LLVector3 projected_mouse; - BOOL hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis); + bool hit = getMousePointOnPlaneAgent(projected_mouse, x, y, snap_plane_center, constraint_axis); projected_mouse -= snap_plane_center; if (gSavedSettings.getBOOL("SnapEnabled")) { @@ -1532,9 +1532,9 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) if (!mInSnapRegime) { - mSmoothRotate = TRUE; + mSmoothRotate = true; } - mInSnapRegime = TRUE; + mInSnapRegime = true; // 0 to 360 deg F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f); @@ -1566,17 +1566,17 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) { if (mInSnapRegime) { - mSmoothRotate = TRUE; + mSmoothRotate = true; } - mInSnapRegime = FALSE; + mInSnapRegime = false; } } else { if (mInSnapRegime) { - mSmoothRotate = TRUE; + mSmoothRotate = true; } - mInSnapRegime = FALSE; + mInSnapRegime = false; } if (!mInSnapRegime) @@ -1618,9 +1618,9 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) { if (!mInSnapRegime) { - mSmoothRotate = TRUE; + mSmoothRotate = true; } - mInSnapRegime = TRUE; + mInSnapRegime = true; // 0 to 360 deg F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f); @@ -1649,9 +1649,9 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) { if (mInSnapRegime) { - mSmoothRotate = TRUE; + mSmoothRotate = true; } - mInSnapRegime = FALSE; + mInSnapRegime = false; } LLVector3 cross_product = mMouseDown % mMouseCur; @@ -1738,7 +1738,7 @@ void LLManipRotate::highlightManipulators( S32 x, S32 y ) mHighlightedPart = LL_NO_PART; //LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); - LLViewerObject *first_object = mObjectSelection->getFirstMoveableObject(TRUE); + LLViewerObject *first_object = mObjectSelection->getFirstMoveableObject(true); if (!first_object) { @@ -1873,7 +1873,7 @@ void LLManipRotate::highlightManipulators( S32 x, S32 y ) S32 LLManipRotate::getObjectAxisClosestToMouse(LLVector3& object_axis) { - LLSelectNode* first_object_node = mObjectSelection->getFirstMoveableNode(TRUE); + LLSelectNode* first_object_node = mObjectSelection->getFirstMoveableNode(true); if (!first_object_node) { @@ -1928,9 +1928,9 @@ S32 LLManipRotate::getObjectAxisClosestToMouse(LLVector3& object_axis) } //virtual -BOOL LLManipRotate::canAffectSelection() +bool LLManipRotate::canAffectSelection() { - BOOL can_rotate = mObjectSelection->getObjectCount() != 0; + bool can_rotate = mObjectSelection->getObjectCount() != 0; if (can_rotate) { struct f : public LLSelectedObjectFunctor diff --git a/indra/newview/llmaniprotate.h b/indra/newview/llmaniprotate.h index 5f34843df9..0fc6793b83 100644 --- a/indra/newview/llmaniprotate.h +++ b/indra/newview/llmaniprotate.h @@ -60,20 +60,20 @@ public: virtual void handleSelect(); - virtual BOOL handleMouseDownOnPart(S32 x, S32 y, MASK mask); + virtual bool handleMouseDownOnPart(S32 x, S32 y, MASK mask); virtual void highlightManipulators(S32 x, S32 y); - virtual BOOL canAffectSelection(); + virtual bool canAffectSelection(); private: void updateHoverView(); void drag( S32 x, S32 y ); - LLVector3 projectToSphere( F32 x, F32 y, BOOL* on_sphere ); + LLVector3 projectToSphere( F32 x, F32 y, bool* on_sphere ); void renderSnapGuides(); void renderActiveRing(F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color); - BOOL updateVisiblity(); + bool updateVisiblity(); LLVector3 findNearestPointOnRing( S32 x, S32 y, const LLVector3& center, const LLVector3& axis ); LLQuaternion dragUnconstrained( S32 x, S32 y ); @@ -104,10 +104,10 @@ private: LLVector3 mCenterToProfilePlane; F32 mCenterToProfilePlaneMag; - BOOL mSendUpdateOnMouseUp; + bool mSendUpdateOnMouseUp; - BOOL mSmoothRotate; - BOOL mCamEdgeOn; + bool mSmoothRotate; + bool mCamEdgeOn; LLVector4 mManipulatorVertices[6]; LLVector4 mManipulatorScales; diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 3004a7b1fb..8a11769c3f 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -110,25 +110,25 @@ F32 get_default_max_prim_scale(bool is_flora) } // static -void LLManipScale::setUniform(BOOL b) +void LLManipScale::setUniform(bool b) { gSavedSettings.setBOOL("ScaleUniform", b); } // static -void LLManipScale::setShowAxes(BOOL b) +void LLManipScale::setShowAxes(bool b) { gSavedSettings.setBOOL("ScaleShowAxes", b); } // static -void LLManipScale::setStretchTextures(BOOL b) +void LLManipScale::setStretchTextures(bool b) { gSavedSettings.setBOOL("ScaleStretchTextures", b); } // static -BOOL LLManipScale::getUniform() +bool LLManipScale::getUniform() { // Add middle mouse control for switching uniform scaling on the fly // return gSavedSettings.getBOOL("ScaleUniform"); @@ -137,13 +137,13 @@ BOOL LLManipScale::getUniform() } // static -BOOL LLManipScale::getShowAxes() +bool LLManipScale::getShowAxes() { return gSavedSettings.getBOOL("ScaleShowAxes"); } // static -BOOL LLManipScale::getStretchTextures() +bool LLManipScale::getStretchTextures() { return gSavedSettings.getBOOL("ScaleStretchTextures"); } @@ -195,7 +195,7 @@ LLManipScale::LLManipScale( LLToolComposite* composite ) mScaledBoxHandleSize( 1.f ), mLastMouseX( -1 ), mLastMouseY( -1 ), - mSendUpdateOnMouseUp( FALSE ), + mSendUpdateOnMouseUp( false ), mLastUpdateFlags( 0 ), mScaleSnapUnit1(1.f), mScaleSnapUnit2(1.f), @@ -344,18 +344,18 @@ bool LLManipScale::handleMouseDown(S32 x, S32 y, MASK mask) } // Assumes that one of the arrows on an object was hit. -BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) +bool LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) { - BOOL can_scale = canAffectSelection(); + bool can_scale = canAffectSelection(); if (!can_scale) { - return FALSE; + return false; } highlightManipulators(x, y); S32 hit_part = mHighlightedPart; - LLSelectMgr::getInstance()->enableSilhouette(FALSE); + LLSelectMgr::getInstance()->enableSilhouette(false); mManipPart = (EManipPart)hit_part; LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); @@ -377,11 +377,11 @@ BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) // we just started a drag, so save initial object positions, orientations, and scales LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_SCALE); // Route future Mouse messages here preemptively. (Release on mouse up.) - setMouseCapture( TRUE ); + setMouseCapture( true ); mHelpTextTimer.reset(); sNumTimesHelpTextShown++; - return TRUE; + return true; } @@ -395,19 +395,19 @@ bool LLManipScale::handleMouseUp(S32 x, S32 y, MASK mask) if( (LL_FACE_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_FACE_MAX) ) { - sendUpdates(TRUE,TRUE,FALSE); + sendUpdates(true,true,false); } else if( (LL_CORNER_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_CORNER_MAX) ) { - sendUpdates(TRUE,TRUE,TRUE); + sendUpdates(true,true,true); } //send texture update - LLSelectMgr::getInstance()->adjustTexturesByScale(TRUE, getStretchTextures()); + LLSelectMgr::getInstance()->adjustTexturesByScale(true, getStretchTextures()); - LLSelectMgr::getInstance()->enableSilhouette(TRUE); + LLSelectMgr::getInstance()->enableSilhouette(true); mManipPart = LL_NO_PART; // Might have missed last update due to UPDATE_DELAY timing @@ -427,7 +427,7 @@ bool LLManipScale::handleHover(S32 x, S32 y, MASK mask) if( mObjectSelection->isEmpty() ) { // Somehow the object got deselected while we were dragging it. - setMouseCapture( FALSE ); + setMouseCapture( false ); } else { @@ -451,7 +451,7 @@ bool LLManipScale::handleHover(S32 x, S32 y, MASK mask) } // Patch up textures, if possible. - LLSelectMgr::getInstance()->adjustTexturesByScale(FALSE, getStretchTextures()); + LLSelectMgr::getInstance()->adjustTexturesByScale(false, getStretchTextures()); gViewerWindow->setCursor(UI_CURSOR_TOOLSCALE); return true; @@ -897,7 +897,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) F32 scale_factor = 1.f; F32 max_scale = partToMaxScale(mManipPart, bbox); F32 min_scale = partToMinScale(mManipPart, bbox); - BOOL uniform = LLManipScale::getUniform(); + bool uniform = LLManipScale::getUniform(); // check for snapping LLVector3 mouse_on_plane1; @@ -911,7 +911,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) LLVector3 projected_drag_pos1 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane1, mSnapGuideDir1)); LLVector3 projected_drag_pos2 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane2, mSnapGuideDir2)); - BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled"); + bool snap_enabled = gSavedSettings.getBOOL("SnapEnabled"); if (snap_enabled && (mouse_on_plane1 - projected_drag_pos1) * mSnapGuideDir1 > mSnapRegimeOffset) { F32 drag_dist = mScaleDir * projected_drag_pos1; // Projecting the drag position allows for negative results, vs using the length which will result in a "reverse scaling" bug. @@ -992,7 +992,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) LLVector3d drag_global = uniform ? mDragStartCenterGlobal : mDragFarHitGlobal; - // do the root objects i.e. (TRUE == cur->isRootEdit()) + // do the root objects i.e. (true == cur->isRootEdit()) for (LLObjectSelection::iterator iter = mObjectSelection->begin(); iter != mObjectSelection->end(); iter++) { @@ -1043,7 +1043,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) } } } - // do the child objects i.e. (FALSE == cur->isRootEdit()) + // do the child objects i.e. (false == cur->isRootEdit()) for (LLObjectSelection::iterator iter = mObjectSelection->begin(); iter != mObjectSelection->end(); iter++) { @@ -1055,7 +1055,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) !cur->isAvatar() && !cur->isRootEdit() ) { const LLVector3& scale = selectNode->mSavedScale; - cur->setScale( scale_factor * scale, FALSE ); + cur->setScale( scale_factor * scale, false ); if (!selectNode->mIndividualSelection) { @@ -1117,7 +1117,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) F32 max_drag_dist = partToMaxScale(mManipPart, bbox); F32 min_drag_dist = partToMinScale(mManipPart, bbox); - BOOL uniform = LLManipScale::getUniform(); + bool uniform = LLManipScale::getUniform(); if( uniform ) { drag_delta *= 2.f; @@ -1127,7 +1127,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) F32 dist_from_scale_line = dist_vec(scale_center_to_mouse, (mouse_on_scale_line - mScaleCenter)); F32 dist_along_scale_line = scale_center_to_mouse * mScaleDir; - BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled"); + bool snap_enabled = gSavedSettings.getBOOL("SnapEnabled"); if (snap_enabled && dist_from_scale_line > mSnapRegimeOffset) { @@ -1203,7 +1203,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) mDragPointGlobal = drag_point_global; } -void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_update, BOOL corner ) +void LLManipScale::sendUpdates( bool send_position_update, bool send_scale_update, bool corner ) { // Throttle updates to 10 per second. static LLTimer update_timer; @@ -1216,7 +1216,7 @@ void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_updat if (send_position_update) update_flags |= UPD_POSITION; if (send_scale_update) update_flags |= UPD_SCALE; -// BOOL send_type = SEND_INDIVIDUALS; +// bool send_type = SEND_INDIVIDUALS; if (corner) { update_flags |= UPD_UNIFORM; @@ -1229,11 +1229,11 @@ void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_updat { LLSelectMgr::getInstance()->sendMultipleUpdate( update_flags ); update_timer.reset(); - mSendUpdateOnMouseUp = FALSE; + mSendUpdateOnMouseUp = false; } else { - mSendUpdateOnMouseUp = TRUE; + mSendUpdateOnMouseUp = true; } dialog_refresh_all(); } @@ -1285,7 +1285,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto LLVector3 scale = cur->getScale(); scale.mV[axis_index] = desired_scale; - cur->setScale(scale, FALSE); + cur->setScale(scale, false); rebuild(cur); LLVector3 delta_pos; if( !getUniform() ) @@ -2121,11 +2121,11 @@ LLVector3 LLManipScale::nearestAxis( const LLVector3& v ) const } // virtual -BOOL LLManipScale::canAffectSelection() +bool LLManipScale::canAffectSelection() { // An selection is scalable if you are allowed to both edit and move // everything in it, and it does not have any sitting agents - BOOL can_scale = mObjectSelection->getObjectCount() != 0; + bool can_scale = mObjectSelection->getObjectCount() != 0; if (can_scale) { struct f : public LLSelectedObjectFunctor diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h index 8783c3f506..32fa022b23 100644 --- a/indra/newview/llmanipscale.h +++ b/indra/newview/llmanipscale.h @@ -82,16 +82,16 @@ public: virtual void render(); virtual void handleSelect(); - virtual BOOL handleMouseDownOnPart(S32 x, S32 y, MASK mask); + virtual bool handleMouseDownOnPart(S32 x, S32 y, MASK mask); virtual void highlightManipulators(S32 x, S32 y); // decided which manipulator, if any, should be highlighted by mouse hover - virtual BOOL canAffectSelection(); + virtual bool canAffectSelection(); - static void setUniform( BOOL b ); - static BOOL getUniform(); - static void setStretchTextures( BOOL b ); - static BOOL getStretchTextures(); - static void setShowAxes( BOOL b ); - static BOOL getShowAxes(); + static void setUniform( bool b ); + static bool getUniform(); + static void setStretchTextures( bool b ); + static bool getStretchTextures(); + static void setShowAxes( bool b ); + static bool getShowAxes(); private: void renderCorners( const LLBBox& local_bbox ); @@ -109,7 +109,7 @@ private: void dragFace( S32 x, S32 y ); void dragCorner( S32 x, S32 y ); - void sendUpdates( BOOL send_position_update, BOOL send_scale_update, BOOL corner = FALSE); + void sendUpdates( bool send_position_update, bool send_scale_update, bool corner = false); LLVector3 faceToUnitVector( S32 part ) const; LLVector3 cornerToUnitVector( S32 part ) const; @@ -148,7 +148,7 @@ private: LLVector3d mDragFarHitGlobal; S32 mLastMouseX; S32 mLastMouseY; - BOOL mSendUpdateOnMouseUp; + bool mSendUpdateOnMouseUp; U32 mLastUpdateFlags; typedef std::set manipulator_list_t; manipulator_list_t mProjectedManipulators; diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 83258a5e51..8bdb60c3c0 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -114,8 +114,8 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) : LLManip( std::string("Move"), composite ), mLastHoverMouseX(-1), mLastHoverMouseY(-1), - mMouseOutsideSlop(FALSE), - mCopyMadeThisDrag(FALSE), + mMouseOutsideSlop(false), + mCopyMadeThisDrag(false), mWarningNoDragCopy(false), // Warning when trying to duplicate while in edit linked parts/select face mode mMouseDownX(-1), mMouseDownY(-1), @@ -127,7 +127,7 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) mUpdateTimer(), mSnapOffsetMeters(0.f), mSubdivisions(10.f), - mInSnapRegime(FALSE), + mInSnapRegime(false), mArrowScales(1.f, 1.f, 1.f), mPlaneScales(1.f, 1.f, 1.f), mPlaneManipPositions(1.f, 1.f, 1.f, 1.f) @@ -313,12 +313,12 @@ bool LLManipTranslate::handleMouseDown(S32 x, S32 y, MASK mask) } // Assumes that one of the arrows on an object was hit. -BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) +bool LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) { - BOOL can_move = canAffectSelection(); + bool can_move = canAffectSelection(); if (!can_move) { - return FALSE; + return false; } highlightManipulators(x, y); @@ -331,7 +331,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) (hit_part != LL_XZ_PLANE) && (hit_part != LL_XY_PLANE) ) { - return TRUE; + return true; } mHelpTextTimer.reset(); @@ -339,7 +339,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) LLSelectMgr::getInstance()->getGrid(mGridOrigin, mGridRotation, mGridScale); - LLSelectMgr::getInstance()->enableSilhouette(FALSE); + LLSelectMgr::getInstance()->enableSilhouette(false); // we just started a drag, so save initial object positions LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_MOVE); @@ -347,17 +347,17 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) mManipPart = (EManipPart)hit_part; mMouseDownX = x; mMouseDownY = y; - mMouseOutsideSlop = FALSE; + mMouseOutsideSlop = false; LLVector3 axis; - LLSelectNode *selectNode = mObjectSelection->getFirstMoveableNode(TRUE); + LLSelectNode *selectNode = mObjectSelection->getFirstMoveableNode(true); if (!selectNode) { // didn't find the object in our selection...oh well LL_WARNS() << "Trying to translate an unselected object" << LL_ENDL; - return TRUE; + return true; } LLViewerObject *selected_object = selectNode->getObject(); @@ -366,11 +366,11 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) // somehow we lost the object! LL_WARNS() << "Translate manip lost the object, no selected object" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); - return TRUE; + return true; } // Compute unit vectors for arrow hit and a plane through that vector - BOOL axis_exists = getManipAxis(selected_object, mManipPart, axis); + bool axis_exists = getManipAxis(selected_object, mManipPart, axis); getManipNormal(selected_object, mManipPart, mManipNormal); //LLVector3 select_center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal()); @@ -399,12 +399,12 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) LLVector3d object_start_global = gAgent.getPosGlobalFromAgent(getPivotPoint()); getMousePointOnPlaneGlobal(mDragCursorStartGlobal, x, y, object_start_global, mManipNormal); mDragSelectionStartGlobal = object_start_global; - mCopyMadeThisDrag = FALSE; + mCopyMadeThisDrag = false; // Route future Mouse messages here preemptively. (Release on mouse up.) - setMouseCapture( TRUE ); + setMouseCapture( true ); - return TRUE; + return true; } bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) @@ -430,7 +430,7 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) mWarningNoDragCopy=true; make_ui_sound("UISndInvalidOp"); } - return TRUE; + return true; } // @@ -439,7 +439,7 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) const F32 ROTATE_ANGLE_PER_SECOND = 30.f * DEG_TO_RAD; const S32 ROTATE_H_MARGIN = world_rect.getWidth() / 20; const F32 rotate_angle = ROTATE_ANGLE_PER_SECOND / gFPSClamped; - BOOL rotated = FALSE; + bool rotated = false; // ...build mode moves camera about focus point if (mObjectSelection->getSelectType() != SELECT_TYPE_HUD) @@ -447,12 +447,12 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) if (x < ROTATE_H_MARGIN) { gAgentCamera.cameraOrbitAround(rotate_angle); - rotated = TRUE; + rotated = true; } else if (x > world_rect.getWidth() - ROTATE_H_MARGIN) { gAgentCamera.cameraOrbitAround(-rotate_angle); - rotated = TRUE; + rotated = true; } } @@ -481,13 +481,13 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) else { // ...just went outside the slop region - mMouseOutsideSlop = TRUE; + mMouseOutsideSlop = true; // If holding down shift, leave behind a copy. if (mask == MASK_COPY) { // ...we're trying to make a copy - LLSelectMgr::getInstance()->selectDuplicate(LLVector3::zero, FALSE); - mCopyMadeThisDrag = TRUE; + LLSelectMgr::getInstance()->selectDuplicate(LLVector3::zero, false); + mCopyMadeThisDrag = true; // When we make the copy, we don't want to do any other processing. // If so, the object will also be moved, and the copy will be offset. @@ -504,7 +504,7 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) // pick the first object to constrain to grid w/ common origin // this is so we don't screw up groups - LLSelectNode* selectNode = mObjectSelection->getFirstMoveableNode(TRUE); + LLSelectNode* selectNode = mObjectSelection->getFirstMoveableNode(true); if (!selectNode) { // somehow we lost the object! @@ -523,7 +523,7 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) } // Compute unit vectors for arrow hit and a plane through that vector - BOOL axis_exists = getManipAxis(object, mManipPart, axis_f); // TODO: move this + bool axis_exists = getManipAxis(object, mManipPart, axis_f); // TODO: move this axis_d.setVec(axis_f); @@ -567,7 +567,7 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) { if (off_axis_magnitude > mSnapOffsetMeters) { - mInSnapRegime = TRUE; + mInSnapRegime = true; LLVector3 cursor_snap_agent = gAgent.getPosAgentFromGlobal(cursor_point_snap_line); F32 cursor_grid_dist = (cursor_snap_agent - mGridOrigin) * axis_f; @@ -651,16 +651,16 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) } cursor_point_agent = (cursor_point_grid * mGridRotation) + mGridOrigin; relative_move.setVec(cursor_point_agent - gAgent.getPosAgentFromGlobal(mDragSelectionStartGlobal)); - mInSnapRegime = TRUE; + mInSnapRegime = true; } else { - mInSnapRegime = FALSE; + mInSnapRegime = false; } } else { - mInSnapRegime = FALSE; + mInSnapRegime = false; } // Clamp to arrow direction @@ -724,7 +724,7 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) if (selectNode->mIndividualSelection) { // counter-translate child objects if we are moving the root as an individual - object->resetChildrenPosition(old_position_local - new_position_local, TRUE) ; + object->resetChildrenPosition(old_position_local - new_position_local, true) ; } } else @@ -776,14 +776,14 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) LLViewerObject* root_object = object->getRootEdit(); new_position_agent -= root_object->getPositionAgent(); new_position_agent = new_position_agent * ~root_object->getRotation(); - object->setPositionParent(new_position_agent, FALSE); + object->setPositionParent(new_position_agent, false); rebuild(object); } if (selectNode->mIndividualSelection) { // counter-translate child objects if we are moving the root as an individual - object->resetChildrenPosition(old_position_agent - new_position_agent, TRUE) ; + object->resetChildrenPosition(old_position_agent - new_position_agent, true) ; } } selectNode->mLastPositionLocal = object->getPosition(); @@ -872,9 +872,9 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) S32 num_arrow_manips = numManips; // planar manipulators - BOOL planar_manip_yz_visible = FALSE; - BOOL planar_manip_xz_visible = FALSE; - BOOL planar_manip_xy_visible = FALSE; + bool planar_manip_yz_visible = false; + bool planar_manip_xz_visible = false; + bool planar_manip_xy_visible = false; mManipulatorVertices[numManips] = LLVector4(0.f, mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), 1.f); mManipulatorVertices[numManips++].scaleVec(mPlaneManipPositions); @@ -882,7 +882,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) mManipulatorVertices[numManips++].scaleVec(mPlaneManipPositions); if (llabs(relative_camera_dir.mV[VX]) > MIN_PLANE_MANIP_DOT_PRODUCT) { - planar_manip_yz_visible = TRUE; + planar_manip_yz_visible = true; } mManipulatorVertices[numManips] = LLVector4(mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), 0.f, mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), 1.f); @@ -891,7 +891,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) mManipulatorVertices[numManips++].scaleVec(mPlaneManipPositions); if (llabs(relative_camera_dir.mV[VY]) > MIN_PLANE_MANIP_DOT_PRODUCT) { - planar_manip_xz_visible = TRUE; + planar_manip_xz_visible = true; } mManipulatorVertices[numManips] = LLVector4(mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), mPlaneManipOffsetMeters * (1.f - PLANE_TICK_SIZE * 0.5f), 0.f, 1.f); @@ -900,7 +900,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) mManipulatorVertices[numManips++].scaleVec(mPlaneManipPositions); if (llabs(relative_camera_dir.mV[VZ]) > MIN_PLANE_MANIP_DOT_PRODUCT) { - planar_manip_xy_visible = TRUE; + planar_manip_xy_visible = true; } // Project up to 9 manipulators to screen space 2*X, 2*Y, 2*Z, 3*planes @@ -1057,12 +1057,12 @@ bool LLManipTranslate::handleMouseUp(S32 x, S32 y, MASK mask) { // make sure arrow colors go back to normal mManipPart = LL_NO_PART; - LLSelectMgr::getInstance()->enableSilhouette(TRUE); + LLSelectMgr::getInstance()->enableSilhouette(true); // Might have missed last update due to UPDATE_DELAY timing. LLSelectMgr::getInstance()->sendMultipleUpdate( UPD_POSITION ); - mInSnapRegime = FALSE; + mInSnapRegime = false; LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK); //gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject")); } @@ -1115,7 +1115,7 @@ void LLManipTranslate::renderSnapGuides() return; } - LLSelectNode *first_node = mObjectSelection->getFirstMoveableNode(TRUE); + LLSelectNode *first_node = mObjectSelection->getFirstMoveableNode(true); if (!first_node) { return; @@ -1589,13 +1589,13 @@ void LLManipTranslate::renderSnapGuides() switch (mManipPart) { case LL_YZ_PLANE: - renderGuidelines(FALSE, TRUE, TRUE); + renderGuidelines(false, true, true); break; case LL_XZ_PLANE: - renderGuidelines(TRUE, FALSE, TRUE); + renderGuidelines(true, false, true); break; case LL_XY_PLANE: - renderGuidelines(TRUE, TRUE, FALSE); + renderGuidelines(true, true, false); break; default: break; @@ -1699,8 +1699,8 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal, static LLStaticHashedString sClipPlane("clip_plane"); gClipProgram.uniform4fv(sClipPlane, 1, plane.v); - BOOL particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES); - BOOL clouds = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS); + bool particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES); + bool clouds = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS); if (particles) { @@ -1716,14 +1716,14 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal, glCullFace(GL_FRONT); for (U32 i = 0; i < num_types; i++) { - gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, FALSE); + gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, false); } //glStencilOp(GL_DECR, GL_DECR, GL_DECR); glCullFace(GL_BACK); for (U32 i = 0; i < num_types; i++) { - gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, FALSE); + gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, false); } if (particles) @@ -1788,7 +1788,7 @@ void LLManipTranslate::renderText() } else { - const BOOL children_ok = TRUE; + const bool children_ok = true; LLViewerObject* objectp = mObjectSelection->getFirstRootObject(children_ok); if (objectp) { @@ -1842,7 +1842,7 @@ void LLManipTranslate::renderTranslationHandles() mPlaneManipPositions.mV[VZ] = -1.f; } - LLViewerObject *first_object = mObjectSelection->getFirstMoveableObject(TRUE); + LLViewerObject *first_object = mObjectSelection->getFirstMoveableObject(true); if (!first_object) return; LLVector3 selection_center = getPivotPoint(); @@ -2197,7 +2197,7 @@ void LLManipTranslate::renderTranslationHandles() (face >= 3) ? -mConeSize : mConeSize, (face >= 3) ? -mArrowLengthMeters : mArrowLengthMeters, mConeSize, - FALSE); + false); } } } @@ -2205,7 +2205,7 @@ void LLManipTranslate::renderTranslationHandles() } -void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_size, F32 arrow_size, F32 handle_size, BOOL reverse_direction) +void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_size, F32 arrow_size, F32 handle_size, bool reverse_direction) { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLEnable gls_blend(GL_BLEND); @@ -2307,9 +2307,9 @@ void LLManipTranslate::renderGridVert(F32 x_trans, F32 y_trans, F32 r, F32 g, F3 } // virtual -BOOL LLManipTranslate::canAffectSelection() +bool LLManipTranslate::canAffectSelection() { - BOOL can_move = mObjectSelection->getObjectCount() != 0; + bool can_move = mObjectSelection->getObjectCount() != 0; if (can_move) { struct f : public LLSelectedObjectFunctor diff --git a/indra/newview/llmaniptranslate.h b/indra/newview/llmaniptranslate.h index c02a68d442..f63b2a18a2 100644 --- a/indra/newview/llmaniptranslate.h +++ b/indra/newview/llmaniptranslate.h @@ -60,8 +60,8 @@ public: virtual void handleSelect(); virtual void highlightManipulators(S32 x, S32 y); - virtual BOOL handleMouseDownOnPart(S32 x, S32 y, MASK mask); - virtual BOOL canAffectSelection(); + virtual bool handleMouseDownOnPart(S32 x, S32 y, MASK mask); + virtual bool canAffectSelection(); protected: enum EHandleType { @@ -70,7 +70,7 @@ protected: HANDLE_SPHERE }; - void renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_size, F32 arrow_size, F32 handle_size, BOOL reverse_direction); + void renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_size, F32 arrow_size, F32 handle_size, bool reverse_direction); void renderTranslationHandles(); void renderText(); void renderSnapGuides(); @@ -85,8 +85,8 @@ protected: private: S32 mLastHoverMouseX; S32 mLastHoverMouseY; - BOOL mMouseOutsideSlop; // true after mouse goes outside slop region - BOOL mCopyMadeThisDrag; + bool mMouseOutsideSlop; // true after mouse goes outside slop region + bool mCopyMadeThisDrag; S32 mMouseDownX; S32 mMouseDownY; F32 mAxisArrowLength; // pixels @@ -105,7 +105,7 @@ private: LLVector3 mGridOrigin; LLVector3 mGridScale; F32 mSubdivisions; - BOOL mInSnapRegime; + bool mInSnapRegime; LLVector3 mArrowScales; LLVector3 mPlaneScales; LLVector4 mPlaneManipPositions; diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 0cd84fc4b9..b96ae5b6f9 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -139,7 +139,7 @@ LLFloaterComboOptions* LLFloaterComboOptions::showUI( combo_picker->mComboOptions->selectFirstItem(); combo_picker->openFloater(LLSD(title)); - combo_picker->setFocus(TRUE); + combo_picker->setFocus(true); combo_picker->center(); } return combo_picker; @@ -482,10 +482,10 @@ bool LLMaterialEditor::postBuild() if (mIsOverride) { - childSetVisible("base_color_upload_fee", FALSE); - childSetVisible("metallic_upload_fee", FALSE); - childSetVisible("emissive_upload_fee", FALSE); - childSetVisible("normal_upload_fee", FALSE); + childSetVisible("base_color_upload_fee", false); + childSetVisible("metallic_upload_fee", false); + childSetVisible("emissive_upload_fee", false); + childSetVisible("normal_upload_fee", false); } else { @@ -619,7 +619,7 @@ void LLMaterialEditor::setBaseColorId(const LLUUID& id) { mBaseColorTextureCtrl->setValue(id); mBaseColorTextureCtrl->setDefaultImageAssetID(id); - mBaseColorTextureCtrl->setTentative(FALSE); + mBaseColorTextureCtrl->setTentative(false); } void LLMaterialEditor::setBaseColorUploadId(const LLUUID& id) @@ -695,7 +695,7 @@ void LLMaterialEditor::setMetallicRoughnessId(const LLUUID& id) { mMetallicTextureCtrl->setValue(id); mMetallicTextureCtrl->setDefaultImageAssetID(id); - mMetallicTextureCtrl->setTentative(FALSE); + mMetallicTextureCtrl->setTentative(false); } void LLMaterialEditor::setMetallicRoughnessUploadId(const LLUUID& id) @@ -739,7 +739,7 @@ void LLMaterialEditor::setEmissiveId(const LLUUID& id) { mEmissiveTextureCtrl->setValue(id); mEmissiveTextureCtrl->setDefaultImageAssetID(id); - mEmissiveTextureCtrl->setTentative(FALSE); + mEmissiveTextureCtrl->setTentative(false); } void LLMaterialEditor::setEmissiveUploadId(const LLUUID& id) @@ -773,7 +773,7 @@ void LLMaterialEditor::setNormalId(const LLUUID& id) { mNormalTextureCtrl->setValue(id); mNormalTextureCtrl->setDefaultImageAssetID(id); - mNormalTextureCtrl->setTentative(FALSE); + mNormalTextureCtrl->setTentative(false); } void LLMaterialEditor::setNormalUploadId(const LLUUID& id) @@ -2026,7 +2026,7 @@ void LLMaterialEditor::loadLive() } me->openFloater(); - me->setFocus(TRUE); + me->setFocus(true); } } @@ -2520,7 +2520,7 @@ void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std:: if (open_floater) { openFloater(getKey()); - setFocus(TRUE); + setFocus(true); setCanSave(true); setCanSaveAs(true); @@ -3369,7 +3369,7 @@ void LLMaterialEditor::loadAsset() LLAssetType::AT_MATERIAL, &onLoadComplete, (void*)user_data, - TRUE); + true); } } } @@ -3401,7 +3401,7 @@ void LLMaterialEditor::loadAsset() { /*editor->setText(LLStringUtil::null); editor->makePristine(); - editor->setEnabled(TRUE);*/ + editor->setEnabled(true);*/ // Don't set asset status here; we may not have set the item id yet // (e.g. when this gets called initially) //mAssetStatus = PREVIEW_ASSET_LOADED; @@ -3433,8 +3433,8 @@ void LLMaterialEditor::onLoadComplete(const LLUUID& asset_uuid, editor->decodeAsset(buffer); - BOOL allow_modify = editor->canModify(editor->mObjectUUID, editor->getItem()); - BOOL source_library = editor->mObjectUUID.isNull() && gInventory.isObjectDescendentOf(editor->mItemUUID, gInventory.getLibraryRootFolderID()); + bool allow_modify = editor->canModify(editor->mObjectUUID, editor->getItem()); + bool source_library = editor->mObjectUUID.isNull() && gInventory.isObjectDescendentOf(editor->mItemUUID, gInventory.getLibraryRootFolderID()); editor->setEnableEditing(allow_modify && !source_library); editor->resetUnsavedChanges(); editor->mAssetStatus = PREVIEW_ASSET_LOADED; diff --git a/indra/newview/llmaterialmgr.h b/indra/newview/llmaterialmgr.h index 6e574219ae..c8a4e006c8 100644 --- a/indra/newview/llmaterialmgr.h +++ b/indra/newview/llmaterialmgr.h @@ -102,7 +102,7 @@ private: const LLMaterialMgr::TEMaterialPair& lhs, const LLMaterialMgr::TEMaterialPair& rhs) { - return (lhs.te < rhs.te) ? TRUE : + return (lhs.te < rhs.te) ? true : (lhs.materialID < rhs.materialID); } diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 1542f054d3..a7539f0333 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -69,7 +69,7 @@ #include "llfloaterwebcontent.h" #include "llwindowshade.h" -extern BOOL gRestoreGL; +extern bool gRestoreGL; static LLDefaultChildRegistry::Register r("web_browser"); @@ -172,7 +172,7 @@ LLMediaCtrl::~LLMediaCtrl() //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::setBorderVisible( BOOL border_visible ) +void LLMediaCtrl::setBorderVisible( bool border_visible ) { if ( mBorder ) { @@ -833,7 +833,7 @@ void LLMediaCtrl::draw() if ( gRestoreGL == 1 || mUpdateScrolls) { LLRect r = getRect(); - reshape( r.getWidth(), r.getHeight(), FALSE ); + reshape( r.getWidth(), r.getHeight(), false ); mUpdateScrolls = false; return; } @@ -1060,7 +1060,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) { LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_SIZE_CHANGED " << LL_ENDL; LLRect r = getRect(); - reshape( r.getWidth(), r.getHeight(), FALSE ); + reshape( r.getWidth(), r.getHeight(), false ); }; break; diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 47597c2155..eb8b4dcf31 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -77,7 +77,7 @@ protected: public: virtual ~LLMediaCtrl(); - void setBorderVisible( BOOL border_visible ); + void setBorderVisible( bool border_visible ); // For the tutorial window, we don't want to take focus on clicks, // as the examples include how to move around with the arrow diff --git a/indra/newview/llmediadataclient.cpp b/indra/newview/llmediadataclient.cpp index ce90acc4c6..820b237693 100644 --- a/indra/newview/llmediadataclient.cpp +++ b/indra/newview/llmediadataclient.cpp @@ -420,7 +420,7 @@ LLMediaDataClient::QueueTimer::QueueTimer(F32 time, LLMediaDataClient *mdc) // virtual bool LLMediaDataClient::QueueTimer::tick() { - BOOL result = true; + bool result = true; if (!mMDC.isNull()) { diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp index dab8a3f31b..bfc7abe612 100644 --- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp +++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp @@ -161,7 +161,7 @@ void LLMenuOptionPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNav mRebakeNavMeshMode = pRebakeNavMeshMode; } -void LLMenuOptionPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion) +void LLMenuOptionPathfindingRebakeNavmesh::handleAgentState(bool pCanRebakeRegion) { llassert(mIsInitialized); mCanRebakeRegion = pCanRebakeRegion; @@ -221,7 +221,7 @@ void LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed() if (mIsInitialized) { createNavMeshStatusListenerForCurrentRegion(); - mCanRebakeRegion = FALSE; + mCanRebakeRegion = false; LLPathfindingManager::getInstance()->requestGetAgentState(); } } diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.h b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h index 9138b94354..3c889a8522 100644 --- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.h +++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.h @@ -65,7 +65,7 @@ protected: private: void setMode(ERebakeNavMeshMode pRebakeNavMeshMode); - void handleAgentState(BOOL pCanRebakeRegion); + void handleAgentState(bool pCanRebakeRegion); void handleRebakeNavMeshResponse(bool pResponseStatus); void handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus); void handleRegionBoundaryCrossed(); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index c16311300d..b7fa2df7d1 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2398,8 +2398,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) mUploadSkin, mUploadJoints, mLockScaleIfJointPosition, - FALSE, - FALSE, + false, + false, data.mBaseModel->mSubmodelID); data.mAssetData = ostr.str(); @@ -2555,8 +2555,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) mUploadSkin, mUploadJoints, mLockScaleIfJointPosition, - FALSE, - FALSE, + false, + false, data.mBaseModel->mSubmodelID); data.mAssetData = ostr.str(); @@ -4583,7 +4583,7 @@ void LLMeshUploadThread::decomposeMeshMatrix(LLMatrix4& transformation, LLVector3& result_scale) { // check for reflection - BOOL reflected = (transformation.determinant() < 0); + bool reflected = (transformation.determinant() < 0); // compute position LLVector3 position = LLVector3(0, 0, 0) * transformation; @@ -5748,7 +5748,7 @@ void on_new_single_inventory_upload_complete( // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. - LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(false); if (panel) { @@ -5758,7 +5758,7 @@ void on_new_single_inventory_upload_complete( } else { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, server_response["new_inventory_item"].asUUID(), TRUE, TAKE_FOCUS_NO, TRUE); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, server_response["new_inventory_item"].asUUID(), true, TAKE_FOCUS_NO, true); } // restore keyboard focus diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 388738cb92..f12745c5c5 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -567,7 +567,7 @@ private: LLHandle mFeeObserverHandle; LLHandle mUploadObserverHandle; - bool mDoUpload; // if FALSE only model data will be requested, otherwise the model will be uploaded + bool mDoUpload; // if false only model data will be requested, otherwise the model will be uploaded LLSD mModelData; // llcorehttp library interface objects. diff --git a/indra/newview/llmimetypes.h b/indra/newview/llmimetypes.h index ab629fd965..be0bdd810b 100644 --- a/indra/newview/llmimetypes.h +++ b/indra/newview/llmimetypes.h @@ -105,10 +105,10 @@ public: std::string mPlayTip; // custom tool tip to display for Play button - BOOL mAllowResize; + bool mAllowResize; // enable/disable media size edit fields - BOOL mAllowLooping; + bool mAllowLooping; // enable/disable media looping checkbox }; typedef std::map< std::string, LLMIMEInfo > mime_info_map_t; diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index fde68b1db5..23f99df949 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -108,7 +108,7 @@ const std::array LLModelPreview::sSuffixVarNames // // More flexible LOD generation -BOOL stop_gloderror() +bool stop_gloderror() { GLuint error = glodGetError(); @@ -118,16 +118,16 @@ BOOL stop_gloderror() out << "GLOD error detected, cannot generate LOD (try another method?): " << std::hex << error; LL_WARNS("MeshUpload") << out.str() << LL_ENDL; LLFloaterModelPreview::addStringToLog(out, true); - return TRUE; + return true; } - return FALSE; + return false; } // LLViewerFetchedTexture* bindMaterialDiffuseTexture(const LLImportMaterial& material) { - LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(material.getDiffuseMap(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_PREVIEW); + LLViewerFetchedTexture *texture = LLViewerTextureManager::getFetchedTexture(material.getDiffuseMap(), FTT_DEFAULT, true, LLGLTexture::BOOST_PREVIEW); if (texture) { @@ -214,7 +214,7 @@ void FindModel(LLModelLoader::scene& scene, const std::string& name_to_match, LL //----------------------------------------------------------------------------- LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) - : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE), LLMutex() + : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, false), LLMutex() , mLodsQuery() , mLodsWithParsingError() , mPelvisZOffset(0.0f) @@ -228,7 +228,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) , mHasDegenerate(false) , mImporterDebug(LLCachedControl(gSavedSettings, "ImporterDebug", false)) { - mNeedsUpdate = TRUE; + mNeedsUpdate = true; mCameraDistance = 0.f; mCameraYaw = 0.f; mCameraPitch = 0.f; @@ -250,7 +250,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) mBuildBorderMode = GLOD_BORDER_UNLOCK; mBuildOperator = GLOD_OPERATOR_EDGE_COLLAPSE; // - mUVGuideTexture = LLViewerTextureManager::getFetchedTextureFromFile(gSavedSettings.getString("FSMeshPreviewUVGuideFile"), FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_PREVIEW); // - Add UV guide overlay to pmesh preview + mUVGuideTexture = LLViewerTextureManager::getFetchedTextureFromFile(gSavedSettings.getString("FSMeshPreviewUVGuideFile"), FTT_LOCAL_FILE, true, LLGLTexture::BOOST_PREVIEW); // - Add UV guide overlay to pmesh preview for (U32 i = 0; i < LLModel::NUM_LODS; ++i) { @@ -473,7 +473,7 @@ void LLModelPreview::rebuildUploadData() F32 max_scale = 0.f; - BOOL legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching"); + bool legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching"); U32 load_state = 0; for (LLModelLoader::scene::iterator iter = mBaseScene.begin(); iter != mBaseScene.end(); ++iter) @@ -891,7 +891,7 @@ void LLModelPreview::saveUploadData(const std::string& filename, save_skinweights, save_joint_positions, lock_scale_if_joint_position, - FALSE, TRUE, instance.mModel->mSubmodelID); + false, true, instance.mModel->mSubmodelID); data["mesh"][instance.mModel->mLocalID] = str.str(); } @@ -1385,18 +1385,18 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) FindModel(mScene[loaded_lod], DEFAULT_PHYSICS_MESH_NAME + getLodSuffix(loaded_lod), mDefaultPhysicsShapeP, ignored_transform); mWarnOfUnmatchedPhyicsMeshes = true; } - BOOL legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching"); + bool legacyMatching = gSavedSettings.getBOOL("ImporterLegacyMatching"); if (!legacyMatching) { if (!mBaseModel.empty()) { - BOOL name_based = FALSE; - BOOL has_submodels = FALSE; + bool name_based = false; + bool has_submodels = false; for (U32 idx = 0; idx < mBaseModel.size(); ++idx) { if (mBaseModel[idx]->mSubmodelID) { // don't do index-based renaming when the base model has submodels - has_submodels = TRUE; + has_submodels = true; if (mImporterDebug) { std::ostringstream out; @@ -1417,12 +1417,12 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) FindModel(mBaseScene, loaded_name, found_model, transform); if (found_model) { // don't rename correctly named models (even if they are placed in a wrong order) - name_based = TRUE; + name_based = true; } if (mModel[loaded_lod][idx]->mSubmodelID) { // don't rename the models when loaded LOD model has submodels - has_submodels = TRUE; + has_submodels = true; } } @@ -3215,7 +3215,7 @@ void LLModelPreview::updateStatusMessages() //warn if hulls have more than 256 points in them - BOOL physExceededVertexLimit = FALSE; + bool physExceededVertexLimit = false; for (U32 i = 0; mModelNoErrors && (i < mModel[LLModel::LOD_PHYSICS].size()); ++i) { LLModel* mdl = mModel[LLModel::LOD_PHYSICS][i]; @@ -3229,7 +3229,7 @@ void LLModelPreview::updateStatusMessages() // if (mdl->mPhysics.mHull[j].size() > 256) { - physExceededVertexLimit = TRUE; + physExceededVertexLimit = true; // add new friendlier logging to mesh uploader // LL_INFOS() << "Physical model " << mdl->mLabel << " exceeds vertex per hull limitations." << LL_ENDL; std::ostringstream out; @@ -4123,8 +4123,8 @@ U32 LLModelPreview::loadTextures(LLImportMaterial& material, void* opaque) material.mOpaqueData = new LLPointer< LLViewerFetchedTexture >; LLPointer< LLViewerFetchedTexture >& tex = (*reinterpret_cast< LLPointer< LLViewerFetchedTexture > * >(material.mOpaqueData)); - tex = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + LLURI::unescape(material.mDiffuseMapFilename), FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_PREVIEW); - tex->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, TRUE, FALSE, opaque, NULL, FALSE); + tex = LLViewerTextureManager::getFetchedTextureFromUrl("file://" + LLURI::unescape(material.mDiffuseMapFilename), FTT_LOCAL_FILE, true, LLGLTexture::BOOST_PREVIEW); + tex->setLoadedCallback(LLModelPreview::textureLoadedCallback, 0, true, false, opaque, NULL, false); tex->forceToSaveRawImage(0, F32_MAX); material.setDiffuseMap(tex->getID()); // record tex ID return 1; @@ -4176,12 +4176,12 @@ void LLModelPreview::addEmptyFace(LLModel* pTarget) //----------------------------------------------------------------------------- // Todo: we shouldn't be setting all those UI elements on render. // Note: Render happens each frame with skinned avatars -BOOL LLModelPreview::render() +bool LLModelPreview::render() { assert_main_thread(); LLMutexLock lock(this); - mNeedsUpdate = FALSE; + mNeedsUpdate = false; bool edges = mViewOption["show_edges"]; bool joint_overrides = mViewOption["show_joint_overrides"]; @@ -4439,7 +4439,7 @@ BOOL LLModelPreview::render() z_near = llclamp(z_far * 0.001f, 0.001f, 0.1f); - LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, width, height, FALSE, z_near, z_far); + LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, width, height, false, z_near, z_far); stop_glerror(); @@ -4468,7 +4468,7 @@ BOOL LLModelPreview::render() else { LL_INFOS() << "Vertex Buffer[" << mPreviewLOD << "]" << " is EMPTY!!!" << LL_ENDL; - regen = TRUE; + regen = true; } } @@ -4949,7 +4949,7 @@ BOOL LLModelPreview::render() gGL.popMatrix(); - return TRUE; + return true; } void LLModelPreview::renderGroundPlane(float z_offset) @@ -4979,7 +4979,7 @@ void LLModelPreview::renderGroundPlane(float z_offset) //----------------------------------------------------------------------------- void LLModelPreview::refresh() { - mNeedsUpdate = TRUE; + mNeedsUpdate = true; } //----------------------------------------------------------------------------- @@ -5052,12 +5052,12 @@ void LLModelPreview::setPreviewLOD(S32 lod) //static void LLModelPreview::textureLoadedCallback( - BOOL success, + bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, - BOOL final, + bool final, void* userdata) { LLModelPreview* preview = (LLModelPreview*)userdata; diff --git a/indra/newview/llmodelpreview.h b/indra/newview/llmodelpreview.h index 406ddfd0f4..193c55e4c4 100644 --- a/indra/newview/llmodelpreview.h +++ b/indra/newview/llmodelpreview.h @@ -150,7 +150,7 @@ public: void setPhysicsFromLOD(S32 lod); void setPhysicsFromPreset(S32 preset);// FIRE-30963 - better physics defaults - BOOL render(); + bool render(); void update(); void genBuffers(S32 lod, bool skinned); void clearBuffers(); @@ -158,7 +158,7 @@ public: void rotate(F32 yaw_radians, F32 pitch_radians); void zoom(F32 zoom_amt); void pan(F32 right, F32 up); - virtual BOOL needsRender() { return mNeedsUpdate; } + virtual bool needsRender() { return mNeedsUpdate; } void setPreviewLOD(S32 lod); void clearModel(S32 lod); void getJointAliases(JointMap& joint_map); @@ -196,7 +196,7 @@ public: U32 getLegacyRigFlags() const { return mLegacyRigFlags; } void setLegacyRigFlags(U32 rigFlags) { mLegacyRigFlags = rigFlags; } - static void textureLoadedCallback(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata); + static void textureLoadedCallback(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, bool final, void* userdata); static bool lodQueryCallback(); boost::signals2::connection setDetailsCallback(const details_signal_t::slot_type& cb){ return mDetailsSignal.connect(cb); } @@ -273,7 +273,7 @@ protected: LLFloater* mFMP; LLPointer mUVGuideTexture; // Add UV Guide texture overlay - BOOL mNeedsUpdate; + bool mNeedsUpdate; bool mDirty; bool mGenLOD; U32 mTextureName; diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp index 24515043cb..9f64dee89e 100644 --- a/indra/newview/llmorphview.cpp +++ b/indra/newview/llmorphview.cpp @@ -61,7 +61,7 @@ LLMorphView::LLMorphView(const LLMorphView::Params& p) mOldCameraNearClip( 0.f ), mCameraPitch( 0.f ), mCameraYaw( 0.f ), - mCameraDrivenByKeys( FALSE ) + mCameraDrivenByKeys( false ) {} //----------------------------------------------------------------------------- @@ -157,7 +157,7 @@ void LLMorphView::updateCamera() gAgentCamera.setCameraPosAndFocusGlobal( camera_pos, target_pos, gAgent.getID() ); } -void LLMorphView::setCameraDrivenByKeys(BOOL b) +void LLMorphView::setCameraDrivenByKeys(bool b) { if( mCameraDrivenByKeys != b ) { diff --git a/indra/newview/llmorphview.h b/indra/newview/llmorphview.h index 6c06947fc3..bd1fbf4f8c 100644 --- a/indra/newview/llmorphview.h +++ b/indra/newview/llmorphview.h @@ -58,7 +58,7 @@ public: void setCameraTargetOffset(const LLVector3d& camera_target_offset) {mCameraTargetOffset = camera_target_offset;} void updateCamera(); - void setCameraDrivenByKeys( BOOL b ); + void setCameraDrivenByKeys( bool b ); protected: void initialize(); @@ -75,7 +75,7 @@ protected: F32 mCameraPitch; F32 mCameraYaw; - BOOL mCameraDrivenByKeys; + bool mCameraDrivenByKeys; }; // diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 8dea7819ea..7a2d4889e1 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -83,7 +83,7 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) LLFloaterMove::~LLFloaterMove() { // Ensure LLPanelStandStopFlying panel is not among floater's children. See EXT-8458. - setVisible(FALSE); + setVisible(false); // Otherwise it can be destroyed and static pointer in LLPanelStandStopFlying::getInstance() will become invalid. // Such situation was possible when LLFloaterReg returns "dead" instance of floater. @@ -197,7 +197,7 @@ F32 LLFloaterMove::getYawRate( F32 time ) // static -void LLFloaterMove::setFlyingMode(BOOL fly) +void LLFloaterMove::setFlyingMode(bool fly) { LLFloaterMove* instance = LLFloaterReg::findTypedInstance("moveview"); if (instance) @@ -229,7 +229,7 @@ void LLFloaterMove::setAlwaysRunMode(bool run) } } -void LLFloaterMove::setFlyingModeImpl(BOOL fly) +void LLFloaterMove::setFlyingModeImpl(bool fly) { updateButtonsWithMovementMode(fly ? MM_FLY : (gAgent.getAlwaysRun() ? MM_RUN : MM_WALK)); } @@ -243,7 +243,7 @@ void LLFloaterMove::setAlwaysRunModeImpl(bool run) } //static -void LLFloaterMove::setSittingMode(BOOL bSitting) +void LLFloaterMove::setSittingMode(bool bSitting) { if (bSitting) { @@ -317,7 +317,7 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) } else { - gAgent.setFlying(FALSE); + gAgent.setFlying(false); } // attempts to set avatar flying can not set it real flying in some cases. @@ -493,7 +493,7 @@ void LLFloaterMove::enableInstance() { if (gAgent.getFlying()) { - instance->showModeButtons(FALSE); + instance->showModeButtons(false); } else { @@ -506,14 +506,14 @@ void LLFloaterMove::onOpen(const LLSD& key) { if (gAgent.getFlying()) { - setFlyingMode(TRUE); - showModeButtons(FALSE); + setFlyingMode(true); + showModeButtons(false); } if (isAgentAvatarValid() && gAgentAvatarp->isSitting()) { - setSittingMode(TRUE); - showModeButtons(FALSE); + setSittingMode(true); + showModeButtons(false); } // sUpdateFlyingStatus(); @@ -529,10 +529,10 @@ void LLFloaterMove::setModeButtonToggleState(const EMovementMode mode) mode_control_button_map_t::const_iterator it = mModeControlButtonMap.begin(); for (; it != mModeControlButtonMap.end(); ++it) { - it->second->setToggleState(FALSE); + it->second->setToggleState(false); } - mModeControlButtonMap[mode]->setToggleState(TRUE); + mModeControlButtonMap[mode]->setToggleState(true); } // Customizable floater transparency @@ -572,7 +572,7 @@ void LLPanelStandStopFlying::setStandStopFlyingMode(EStandStopFlyingMode mode) if (mode == SSFM_FLYCAM) { - panel->mFlycamButton->setVisible(TRUE); + panel->mFlycamButton->setVisible(true); } else { @@ -585,7 +585,7 @@ void LLPanelStandStopFlying::setStandStopFlyingMode(EStandStopFlyingMode mode) panel->mStopFlyingButton->setVisible(SSFM_STOP_FLYING == mode); } //visibility of it should be updated after updating visibility of the buttons - panel->setVisible(TRUE); + panel->setVisible(true); } //static @@ -594,14 +594,14 @@ void LLPanelStandStopFlying::clearStandStopFlyingMode(EStandStopFlyingMode mode) LLPanelStandStopFlying* panel = getInstance(); switch(mode) { case SSFM_STAND: - panel->mStandButton->setVisible(FALSE); + panel->mStandButton->setVisible(false); break; case SSFM_STOP_FLYING: - panel->mStopFlyingButton->setVisible(FALSE); + panel->mStopFlyingButton->setVisible(false); break; case SSFM_FLYCAM: - panel->mFlycamButton->setVisible(FALSE); - panel->setFocus(FALSE); + panel->mFlycamButton->setVisible(false); + panel->setFocus(false); break; default: LL_ERRS() << "Unexpected EStandStopFlyingMode is passed: " << mode << LL_ENDL; @@ -618,7 +618,7 @@ bool LLPanelStandStopFlying::postBuild() LLHints::getInstance()->registerHintTarget("stand_btn", mStandButton->getHandle()); mStopFlyingButton = getChild("stop_fly_btn"); - //mStopFlyingButton->setCommitCallback(boost::bind(&LLFloaterMove::setFlyingMode, FALSE)); + //mStopFlyingButton->setCommitCallback(boost::bind(&LLFloaterMove::setFlyingMode, false)); mStopFlyingButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStopFlyingButtonClick, this)); mStopFlyingButton->setVisible(false); @@ -634,7 +634,7 @@ bool LLPanelStandStopFlying::postBuild() void LLPanelStandStopFlying::setVisible(bool visible) { //we dont need to show the panel if these buttons are not activated - // Stand/Fly button not showing if sitting/flying in mouselook with FSShowInterfaceInMouselook = TRUE + // Stand/Fly button not showing if sitting/flying in mouselook with FSShowInterfaceInMouselook = true //if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false; if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK && !gSavedSettings.getBOOL("FSShowInterfaceInMouselook")) visible = false; // @@ -727,7 +727,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view) // Make sure to resize the panel to fit the new parent. Important for // proper layouting of the buttons. Skins should adapt the parent container. if(getParent()) - reshape(getParent()->getRect().getWidth(),getParent()->getRect().getHeight(),FALSE); + reshape(getParent()->getRect().getWidth(),getParent()->getRect().getHeight(), false); // } @@ -741,7 +741,7 @@ LLPanelStandStopFlying* LLPanelStandStopFlying::getStandStopFlyingPanel() LLPanelStandStopFlying* panel = new LLPanelStandStopFlying(); panel->buildFromFile("panel_stand_stop_flying.xml"); - panel->setVisible(FALSE); + panel->setVisible(false); //LLUI::getInstance()->getRootView()->addChild(panel); LL_INFOS() << "Build LLPanelStandStopFlying panel" << LL_ENDL; @@ -764,14 +764,14 @@ void LLPanelStandStopFlying::onStandButtonClick() // LLSelectMgr::getInstance()->deselectAllForStandingUp(); // gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); - setFocus(FALSE); + setFocus(false); } void LLPanelStandStopFlying::onStopFlyingButtonClick() { - gAgent.setFlying(FALSE); + gAgent.setFlying(false); - setFocus(FALSE); // EXT-482 + setFocus(false); // EXT-482 } /** diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index 77d4e96996..45a1db0747 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -51,11 +51,11 @@ public: /*virtual*/ bool postBuild(); /*virtual*/ void setVisible(bool visible); static F32 getYawRate(F32 time); - static void setFlyingMode(BOOL fly); - void setFlyingModeImpl(BOOL fly); + static void setFlyingMode(bool fly); + void setFlyingModeImpl(bool fly); static void setAlwaysRunMode(bool run); void setAlwaysRunModeImpl(bool run); - static void setSittingMode(BOOL bSitting); + static void setSittingMode(bool bSitting); static void enableInstance(); /*virtual*/ void onOpen(const LLSD& key); diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 66994a1bb7..6ecefe44dc 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -157,7 +157,7 @@ std::string LLMute::getDisplayType() const // LLMuteList() //----------------------------------------------------------------------------- LLMuteList::LLMuteList() : - mIsLoaded(FALSE) + mIsLoaded(false) { gGenericDispatcher.addHandler("emptymutelist", &sDispatchEmptyMuteList); @@ -230,7 +230,7 @@ static LLVOAvatar* find_avatar(const LLUUID& id) } } -BOOL LLMuteList::add(const LLMute& mute, U32 flags) +bool LLMuteList::add(const LLMute& mute, U32 flags) { // Can't mute text from Lindens if ((mute.mType == LLMute::AGENT) @@ -238,7 +238,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) { LL_WARNS() << "Trying to mute a Linden; ignored" << LL_ENDL; LLNotifications::instance().add("MuteLinden", LLSD(), LLSD()); - return FALSE; + return false; } // Can't mute self. @@ -246,7 +246,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) && mute.mID == gAgent.getID()) { LL_WARNS() << "Trying to self; ignored" << LL_ENDL; - return FALSE; + return false; } static LLCachedControl mute_list_limit(gSavedSettings, "MuteListLimit", 1000); @@ -256,7 +256,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) LLSD args; args["MUTE_LIMIT"] = mute_list_limit; LLNotifications::instance().add(LLNotification::Params("MuteLimitReached").substitutions(args)); - return FALSE; + return false; } if (mute.mType == LLMute::BY_NAME) @@ -265,14 +265,14 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) if (mute.mName.empty()) { LL_WARNS() << "Trying to mute empty string by-name" << LL_ENDL; - return FALSE; + return false; } // Null mutes must have uuid null if (mute.mID.notNull()) { LL_WARNS() << "Trying to add by-name mute with non-null id" << LL_ENDL; - return FALSE; + return false; } std::pair result = mLegacyMutes.insert(mute.mName); @@ -282,13 +282,13 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) updateAdd(mute); notifyObservers(); notifyObserversDetailed(mute); - return TRUE; + return true; } else { LL_INFOS() << "duplicate mute ignored" << LL_ENDL; // was duplicate - return FALSE; + return false; } } else @@ -356,13 +356,13 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) { LLNotifications::instance().cancelByOwner(localmute.mID); } - return TRUE; + return true; } } } // If we were going to return success, we'd have done it by now. - return FALSE; + return false; } // FIRE-15746: Show block report in nearby chat @@ -393,7 +393,7 @@ void LLMuteList::updateAdd(const LLMute& mute, bool show_message /* = true */) { LL_WARNS() << "Added elements to non-initialized block list" << LL_ENDL; } - mIsLoaded = TRUE; // why is this here? -MG + mIsLoaded = true; // why is this here? -MG // FIRE-15746: Show block report in nearby chat if (show_message && gSavedSettings.getBOOL("FSReportBlockToNearbyChat")) @@ -406,9 +406,9 @@ void LLMuteList::updateAdd(const LLMute& mute, bool show_message /* = true */) } -BOOL LLMuteList::remove(const LLMute& mute, U32 flags) +bool LLMuteList::remove(const LLMute& mute, U32 flags) { - BOOL found = FALSE; + bool found = false; // First, remove from main list. mute_set_t::iterator it = mMutes.find(mute); @@ -464,7 +464,7 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags) notifyObserversDetailed(localmute); // Return correct return value - found = TRUE; + found = true; } else { @@ -481,7 +481,7 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags) notifyObserversDetailed(mute); // Return correct return value - found = TRUE; + found = true; } } @@ -550,14 +550,14 @@ void notify_automute_callback(const LLUUID& agent_id, const LLAvatarName& full_n } -BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason) +bool LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason) { - BOOL removed = FALSE; + bool removed = false; if (isMuted(agent_id)) { LLMute automute(agent_id, LLStringUtil::null, LLMute::AGENT); - removed = TRUE; + removed = true; remove(automute); LLAvatarName av_name; @@ -604,19 +604,19 @@ std::vector LLMuteList::getMutes() const //----------------------------------------------------------------------------- // loadFromFile() //----------------------------------------------------------------------------- -BOOL LLMuteList::loadFromFile(const std::string& filename) +bool LLMuteList::loadFromFile(const std::string& filename) { if(!filename.size()) { LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL; - return FALSE; + return false; } LLFILE* fp = LLFile::fopen(filename, "rb"); /*Flawfinder: ignore*/ if (!fp) { LL_WARNS() << "Couldn't open mute list " << filename << LL_ENDL; - return FALSE; + return false; } // *NOTE: Changing the size of these buffers will require changes @@ -661,25 +661,25 @@ BOOL LLMuteList::loadFromFile(const std::string& filename) } mPendingAgentNameUpdates.clear(); - return TRUE; + return true; } //----------------------------------------------------------------------------- // saveToFile() //----------------------------------------------------------------------------- -BOOL LLMuteList::saveToFile(const std::string& filename) +bool LLMuteList::saveToFile(const std::string& filename) { if(!filename.size()) { LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL; - return FALSE; + return false; } LLFILE* fp = LLFile::fopen(filename, "wb"); /*Flawfinder: ignore*/ if (!fp) { LL_WARNS() << "Couldn't open mute list " << filename << LL_ENDL; - return FALSE; + return false; } // legacy mutes have null uuid std::string id_string; @@ -704,15 +704,15 @@ BOOL LLMuteList::saveToFile(const std::string& filename) } } fclose(fp); - return TRUE; + return true; } -BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) const +bool LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) const { // In case of an empty mutelist, we can exit right away. if( 0 == mMutes.size() && mLegacyMutes.size() == 0) - return FALSE; + return false; // // for objects, check for muting on their parent prim @@ -723,7 +723,7 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c // a legacy mute by name with our name. if (id_to_check == gAgentID) { - return FALSE; + return false; } // don't need name or type for lookup @@ -734,17 +734,17 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c // If any of the flags the caller passed are set, this item isn't considered muted for this caller. if(flags & mute_it->mFlags) { - return FALSE; + return false; } - return TRUE; + return true; } // empty names can't be legacy-muted // FIRE-8268: Revert STORM-1004 or objects muted by name // won't be muted if worn as attachments //bool avatar = mute_object && mute_object->isAvatar(); - //if (name.empty() || avatar) return FALSE; - if (name.empty()) return FALSE; + //if (name.empty() || avatar) return false; + if (name.empty()) return false; // // Look in legacy pile @@ -752,7 +752,7 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c return legacy_it != mLegacyMutes.end(); } -BOOL LLMuteList::isMuted(const std::string& username, U32 flags) const +bool LLMuteList::isMuted(const std::string& username, U32 flags) const { mute_set_t::const_iterator mute_iter = mMutes.begin(); while(mute_iter != mMutes.end()) @@ -761,11 +761,11 @@ BOOL LLMuteList::isMuted(const std::string& username, U32 flags) const if (mute_iter->mType == LLMute::AGENT && LLCacheName::buildUsername(mute_iter->mName) == username) { - return TRUE; + return true; } mute_iter++; } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -800,7 +800,7 @@ void LLMuteList::requestFromServer(const LLUUID& agent_id) } // Double amount of retries due to this request happening during busy stage // Ideally this should be turned into a capability - gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, TRUE, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL); + gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, true, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL); } //----------------------------------------------------------------------------- @@ -927,7 +927,7 @@ void LLMuteList::removeObserver(LLMuteListObserver* observer) void LLMuteList::setLoaded() { - mIsLoaded = TRUE; + mIsLoaded = true; notifyObservers(); } diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h index 5f14f963c9..7fe3da3933 100644 --- a/indra/newview/llmutelist.h +++ b/indra/newview/llmutelist.h @@ -89,25 +89,25 @@ public: void removeObserver(LLMuteListObserver* observer); // Add either a normal or a BY_NAME mute, for any or all properties. - BOOL add(const LLMute& mute, U32 flags = 0); + bool add(const LLMute& mute, U32 flags = 0); // Remove both normal and legacy mutes, for any or all properties. - BOOL remove(const LLMute& mute, U32 flags = 0); - BOOL autoRemove(const LLUUID& agent_id, const EAutoReason reason); + bool remove(const LLMute& mute, U32 flags = 0); + bool autoRemove(const LLUUID& agent_id, const EAutoReason reason); // Name is required to test against legacy text-only mutes. - BOOL isMuted(const LLUUID& id, const std::string& name = LLStringUtil::null, U32 flags = 0) const; + bool isMuted(const LLUUID& id, const std::string& name = LLStringUtil::null, U32 flags = 0) const; // Workaround for username-based mute search, a lot of string conversions so use cautiously // Expects lower case username - BOOL isMuted(const std::string& username, U32 flags = 0) const; + bool isMuted(const std::string& username, U32 flags = 0) const; // Alternate (convenience) form for places we don't need to pass the name, but do need flags - BOOL isMuted(const LLUUID& id, U32 flags) const { return isMuted(id, LLStringUtil::null, flags); }; + bool isMuted(const LLUUID& id, U32 flags) const { return isMuted(id, LLStringUtil::null, flags); }; static bool isLinden(const std::string& name); - BOOL isLoaded() const { return mIsLoaded; } + bool isLoaded() const { return mIsLoaded; } std::vector getMutes() const; @@ -118,8 +118,8 @@ public: void cache(const LLUUID& agent_id); private: - BOOL loadFromFile(const std::string& filename); - BOOL saveToFile(const std::string& filename); + bool loadFromFile(const std::string& filename); + bool saveToFile(const std::string& filename); void setLoaded(); void notifyObservers(); @@ -170,7 +170,7 @@ private: typedef std::set observer_set_t; observer_set_t mObservers; - BOOL mIsLoaded; + bool mIsLoaded; friend class LLDispatchEmptyMuteList; }; diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index 8d32fb1d5c..33eb20ae11 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -59,12 +59,12 @@ LLNameBox::~LLNameBox() LLNameBox::sInstances.erase(this); } -void LLNameBox::setNameID(const LLUUID& name_id, BOOL is_group) +void LLNameBox::setNameID(const LLUUID& name_id, bool is_group) { mNameID = name_id; std::string name; - BOOL got_name = FALSE; + bool got_name = false; if (!is_group) { @@ -105,7 +105,7 @@ void LLNameBox::refreshAll(const LLUUID& id, const std::string& full_name, bool } } -void LLNameBox::setName(const std::string& name, BOOL is_group) +void LLNameBox::setName(const std::string& name, bool is_group) { if (mLink) { diff --git a/indra/newview/llnamebox.h b/indra/newview/llnamebox.h index 76e8551268..a4ffe389ba 100644 --- a/indra/newview/llnamebox.h +++ b/indra/newview/llnamebox.h @@ -51,7 +51,7 @@ public: virtual ~LLNameBox(); - void setNameID(const LLUUID& name_id, BOOL is_group); + void setNameID(const LLUUID& name_id, bool is_group); void refresh(const LLUUID& id, const std::string& full_name, bool is_group); @@ -62,13 +62,13 @@ protected: friend class LLUICtrlFactory; private: - void setName(const std::string& name, BOOL is_group); + void setName(const std::string& name, bool is_group); static std::set sInstances; private: LLUUID mNameID; - BOOL mLink; + bool mLink; std::string mInitialValue; }; diff --git a/indra/newview/llnameeditor.cpp b/indra/newview/llnameeditor.cpp index 055754f270..93bdf2a715 100644 --- a/indra/newview/llnameeditor.cpp +++ b/indra/newview/llnameeditor.cpp @@ -58,7 +58,7 @@ LLNameEditor::~LLNameEditor() LLNameEditor::sInstances.erase(this); } -void LLNameEditor::setNameID(const LLUUID& name_id, BOOL is_group) +void LLNameEditor::setNameID(const LLUUID& name_id, bool is_group) { mNameID = name_id; @@ -100,7 +100,7 @@ void LLNameEditor::refreshAll(const LLUUID& id, const std::string& full_name, bo void LLNameEditor::setValue( const LLSD& value ) { - setNameID(value.asUUID(), FALSE); + setNameID(value.asUUID(), false); } LLSD LLNameEditor::getValue() const diff --git a/indra/newview/llnameeditor.h b/indra/newview/llnameeditor.h index b8c4a6042e..d8bfcae105 100644 --- a/indra/newview/llnameeditor.h +++ b/indra/newview/llnameeditor.h @@ -57,7 +57,7 @@ protected: public: virtual ~LLNameEditor(); - void setNameID(const LLUUID& name_id, BOOL is_group); + void setNameID(const LLUUID& name_id, bool is_group); void refresh(const LLUUID& id, const std::string& full_name, bool is_group); diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index d4dd5e4d37..1c9d861203 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -80,7 +80,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) // public LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos, - BOOL enabled, const std::string& suffix, const std::string& prefix) + bool enabled, const std::string& suffix, const std::string& prefix) { //LL_INFOS() << "LLNameListCtrl::addNameItem " << agent_id << LL_ENDL; @@ -318,7 +318,7 @@ bool LLNameListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask) // public void LLNameListCtrl::addGroupNameItem(const LLUUID& group_id, EAddPosition pos, - BOOL enabled) + bool enabled) { NameItem item; item.value = group_id; @@ -457,7 +457,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( LLScrollListColumn* columnp = getColumn(mNameColumnIndex); if (columnp && columnp->mHeader) { - columnp->mHeader->setHasResizableElement(TRUE); + columnp->mHeader->setHasResizableElement(true); } return item; @@ -516,7 +516,7 @@ void LLNameListCtrl::selectItemBySpecialId(const LLUUID& special_id) LLNameListItem* item = dynamic_cast(*it); if (item && item->getSpecialID() == special_id) { - item->setSelected(TRUE); + item->setSelected(true); break; } } @@ -638,7 +638,7 @@ void LLNameListCtrl::updateColumns(bool force_update) } } -void LLNameListCtrl::sortByName(BOOL ascending) +void LLNameListCtrl::sortByName(bool ascending) { sortByColumnIndex(mNameColumnIndex,ascending); } diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 13c8454a2e..dc62fdbe13 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -156,7 +156,7 @@ public: // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. LLScrollListItem* addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM, - BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null, const std::string& prefix = LLStringUtil::null); + bool enabled = true, const std::string& suffix = LLStringUtil::null, const std::string& prefix = LLStringUtil::null); LLScrollListItem* addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); @@ -166,7 +166,7 @@ public: // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. void addGroupNameItem(const LLUUID& group_id, EAddPosition pos = ADD_BOTTOM, - BOOL enabled = TRUE); + bool enabled = true); void addGroupNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM); @@ -184,9 +184,9 @@ public: std::string& tooltip_msg); /*virtual*/ bool handleToolTip(S32 x, S32 y, MASK mask); - void setAllowCallingCardDrop(BOOL b) { mAllowCallingCardDrop = b; } + void setAllowCallingCardDrop(bool b) { mAllowCallingCardDrop = b; } - void sortByName(BOOL ascending); + void sortByName(bool ascending); /*virtual*/ void updateColumns(bool force_update); @@ -207,7 +207,7 @@ private: private: S32 mNameColumnIndex; std::string mNameColumn; - BOOL mAllowCallingCardDrop; + bool mAllowCallingCardDrop; bool mShortNames; // display name only, no SLID typedef std::map avatar_name_cache_connection_map_t; avatar_name_cache_connection_map_t mAvatarNameCacheConnections; diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 9a47384b62..b08a789e58 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -179,12 +179,12 @@ void LLTeleportHistoryMenuItem::draw() void LLTeleportHistoryMenuItem::onMouseEnter(S32 x, S32 y, MASK mask) { - mArrowIcon->setVisible(TRUE); + mArrowIcon->setVisible(true); } void LLTeleportHistoryMenuItem::onMouseLeave(S32 x, S32 y, MASK mask) { - mArrowIcon->setVisible(FALSE); + mArrowIcon->setVisible(false); } static LLDefaultChildRegistry::Register menu_button("pull_button"); @@ -306,7 +306,7 @@ LLNavigationBar::~LLNavigationBar() } // Make navigation bar part of the UI -// BOOL LLNavigationBar::postBuild() +// bool LLNavigationBar::postBuild() void LLNavigationBar::setupPanel() // { @@ -336,14 +336,14 @@ void LLNavigationBar::setupPanel() fillSearchComboBox(); - mBtnBack->setEnabled(FALSE); + mBtnBack->setEnabled(false); // [FS:CR] FIRE-12333 //mBtnBack->setClickedCallback(boost::bind(&LLNavigationBar::onBackButtonClicked, this)); mBtnBack->setClickedCallback(boost::bind(&LLNavigationBar::onBackButtonClicked, this, _1)); mBtnBack->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this,_1, _2)); mBtnBack->setClickDraggingCallback(boost::bind(&LLNavigationBar::showTeleportHistoryMenu, this,_1)); - mBtnForward->setEnabled(FALSE); + mBtnForward->setEnabled(false); // [FS:CR] FIRE-12333 //mBtnForward->setClickedCallback(boost::bind(&LLNavigationBar::onForwardButtonClicked, this)); mBtnForward->setClickedCallback(boost::bind(&LLNavigationBar::onForwardButtonClicked, this, _1)); @@ -561,7 +561,7 @@ void LLNavigationBar::onLocationSelection() { LLInventoryModel::item_array_t landmark_items = LLLandmarkActions::fetchLandmarksByName(typed_location, - FALSE); + false); if (!landmark_items.empty()) { gAgent.teleportViaLandmark( landmark_items[0]->getAssetUUID()); diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index 13c9604c9b..dc221e08f4 100755 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -166,7 +166,7 @@ private: // { // if (LLNavigationBar::instanceExists()) // { - // LLNavigationBar::getInstance()->setEnabled(FALSE); + // LLNavigationBar::getInstance()->setEnabled(false); // } // } // diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 07b2901c33..19bc0221af 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -1033,12 +1033,12 @@ void LLNetMap::drawRing(const F32 radius, const LLVector3 pos_map, const LLUICol gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); gGL.translatef((F32)pos_map.mV[VX], (F32)pos_map.mV[VY], 0.f); - gl_ring(radius_pixels, WIDTH_PIXELS, color, color, CIRCLE_STEPS, FALSE); + gl_ring(radius_pixels, WIDTH_PIXELS, color, color, CIRCLE_STEPS, false); gGL.popMatrix(); } void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color, - BOOL draw_arrow ) + bool draw_arrow ) { LLVector3 pos_local = globalPosToView(pos_global); if( (pos_local.mV[VX] < 0) || @@ -1188,7 +1188,7 @@ bool LLNetMap::handleToolTip(S32 x, S32 y, MASK mask) if ( (fRlvCanShowName) && (handleToolTipAgent(mClosestAgentToCursor)) ) // [/RLVa:KB] { - return TRUE; + return true; } // The popup menu uses the hover parcel when it is open and the mouse is on @@ -1335,12 +1335,12 @@ bool LLNetMap::handleToolTip(S32 x, S32 y, MASK mask) return true; } -BOOL LLNetMap::handleToolTipAgent(const LLUUID& avatar_id) +bool LLNetMap::handleToolTipAgent(const LLUUID& avatar_id) { LLAvatarName av_name; if (avatar_id.isNull() || !LLAvatarNameCache::get(avatar_id, &av_name)) { - return FALSE; + return false; } // only show tooltip if same inspector not already open @@ -1408,7 +1408,7 @@ BOOL LLNetMap::handleToolTipAgent(const LLUUID& avatar_id) LLToolTipMgr::instance().show(p); } - return TRUE; + return true; } // static @@ -1674,7 +1674,7 @@ bool LLNetMap::createImage(LLPointer& rawimagep) const // mObjectRawImagep = new LLImageRaw(img_size, img_size, 4); // U8* data = mObjectRawImagep->getData(); // memset( data, 0, img_size * img_size * 4 ); -// mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), FALSE); +// mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), false); // } // setScale(mScale); // mUpdateNow = true; @@ -1684,7 +1684,7 @@ bool LLNetMap::createImage(LLPointer& rawimagep) const void LLNetMap::createObjectImage() { if (createImage(mObjectRawImagep)) - mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), FALSE); + mObjectImagep = LLViewerTextureManager::getLocalTexture( mObjectRawImagep.get(), false); // Synchronize scale throughout instances //setScale(mScale); setScale(sScale); @@ -1695,7 +1695,7 @@ void LLNetMap::createObjectImage() void LLNetMap::createParcelImage() { if (createImage(mParcelRawImagep)) - mParcelImagep = LLViewerTextureManager::getLocalTexture( mParcelRawImagep.get(), FALSE); + mParcelImagep = LLViewerTextureManager::getLocalTexture( mParcelRawImagep.get(), false); mUpdateParcelImage = true; } // [/SL:KB] @@ -1763,7 +1763,7 @@ void LLNetMap::setAvatarProfileLabel(const LLUUID& av_id, const LLAvatarName& av auto menu = static_cast(mPopupMenuHandle.get()); if (menu) { - LLMenuItemGL* pItem = menu->findChild(item_name, TRUE /*recurse*/); + LLMenuItemGL* pItem = menu->findChild(item_name, true /*recurse*/); if (pItem) { pItem->setLabel(avName.getCompleteName()); @@ -1776,7 +1776,7 @@ void LLNetMap::handleOverlayToggle(const LLSD& sdParam) { // Toggle the setting const std::string strControl = sdParam.asString(); - BOOL fCurValue = gSavedSettings.getBOOL(strControl); + bool fCurValue = gSavedSettings.getBOOL(strControl); gSavedSettings.setBOOL(strControl, !fCurValue); // Force an overlay update diff --git a/indra/newview/llnetmap.h b/indra/newview/llnetmap.h index 53e9d98956..40844792de 100644 --- a/indra/newview/llnetmap.h +++ b/indra/newview/llnetmap.h @@ -128,11 +128,11 @@ private: void drawTracking( const LLVector3d& pos_global, const LLColor4& color, - BOOL draw_arrow = TRUE); + bool draw_arrow = true); void drawRing(const F32 radius, LLVector3 pos_map, const LLUIColor& color); bool isMouseOnPopupMenu(); void updateAboutLandPopupButton(); - BOOL handleToolTipAgent(const LLUUID& avatar_id); + bool handleToolTipAgent(const LLUUID& avatar_id); static void showAvatarInspector(const LLUUID& avatar_id); // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3) diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 5bd7f0c654..ee92181c00 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -80,7 +80,7 @@ bool LLHandlerUtil::isIMFloaterOpened(const LLNotificationPtr& notification) if (im_floater != NULL) { - res = im_floater->getVisible() == TRUE; + res = im_floater->getVisible() == true; } return res; diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 25cb34c7b9..e3f389bac4 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -73,7 +73,7 @@ bool LLNotificationListItem::postBuild() mTitleBox->setValue(mParams.title); mTitleBoxExp->setValue(mParams.title); mNoticeTextExp->setValue(mParams.title); - mNoticeTextExp->setEnabled(FALSE); + mNoticeTextExp->setEnabled(false); mNoticeTextExp->setTextExpandedCallback(boost::bind(&LLNotificationListItem::reshapeNotification, this)); mTitleBox->setContentTrusted(false); @@ -99,7 +99,7 @@ bool LLNotificationListItem::postBuild() mExpandedHeight = (S32)atoi(expanded_height_str.c_str()); mCondensedHeight = (S32)atoi(condensed_height_str.c_str()); - setExpanded(FALSE); + setExpanded(false); return rv; } @@ -220,12 +220,12 @@ std::set LLNotificationListItem::getTransactionTypes() void LLNotificationListItem::onClickExpandBtn() { - setExpanded(TRUE); + setExpanded(true); } void LLNotificationListItem::onClickCondenseBtn() { - setExpanded(FALSE); + setExpanded(false); } void LLNotificationListItem::reshapeNotification() @@ -233,11 +233,11 @@ void LLNotificationListItem::reshapeNotification() if(mExpanded) { S32 width = this->getRect().getWidth(); - this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, FALSE); + this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, false); } } -void LLNotificationListItem::setExpanded(BOOL value) +void LLNotificationListItem::setExpanded(bool value) { mCondensedViewPanel->setVisible(!value); mExpandedViewPanel->setVisible(value); @@ -245,11 +245,11 @@ void LLNotificationListItem::setExpanded(BOOL value) if (value) { - this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, FALSE); + this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, false); } else { - this->reshape(width, mCondensedHeight, FALSE); + this->reshape(width, mCondensedHeight, false); } mExpanded = value; @@ -350,8 +350,8 @@ void LLGroupInviteNotificationListItem::setFee(S32 fee) std::string fee_text = getString("group_fee_text", string_args); mSenderOrFeeBox->setValue(fee_text); mSenderOrFeeBoxExp->setValue(fee_text); - mSenderOrFeeBox->setVisible(TRUE); - mSenderOrFeeBoxExp->setVisible(TRUE); + mSenderOrFeeBox->setVisible(true); + mSenderOrFeeBoxExp->setVisible(true); } LLGroupNoticeNotificationListItem::LLGroupNoticeNotificationListItem(const Params& p) @@ -383,7 +383,7 @@ bool LLGroupNoticeNotificationListItem::postBuild() mAttachmentIcon = getChild("attachment_icon"); mAttachmentIconExp = getChild("attachment_icon_exp"); mAttachmentPanel = getChild("attachment_panel"); - mAttachmentPanel->setVisible(FALSE); + mAttachmentPanel->setVisible(false); mTitleBox->setValue(mParams.subject); @@ -403,13 +403,13 @@ bool LLGroupNoticeNotificationListItem::postBuild() if (mInventoryOffer != NULL) { mAttachmentTextBox->setValue(mInventoryOffer->mDesc); - mAttachmentTextBox->setVisible(TRUE); - mAttachmentIcon->setVisible(TRUE); + mAttachmentTextBox->setVisible(true); + mAttachmentIcon->setVisible(true); std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType, LLInventoryType::IT_TEXTURE); mAttachmentIconExp->setValue(icon_name); - mAttachmentIconExp->setVisible(TRUE); + mAttachmentIconExp->setVisible(true); mAttachmentTextBox->setClickedCallback(boost::bind( &LLGroupNoticeNotificationListItem::onClickAttachment, this)); @@ -417,7 +417,7 @@ bool LLGroupNoticeNotificationListItem::postBuild() std::string expanded_height_resize_str = getString("expanded_height_resize_for_attachment"); mExpandedHeightResize = (S32)atoi(expanded_height_resize_str.c_str()); - mAttachmentPanel->setVisible(TRUE); + mAttachmentPanel->setVisible(true); } return rv; } @@ -433,8 +433,8 @@ bool LLGroupNotificationListItem::postBuild() mGroupIcon->setValue(mParams.group_id); mGroupIconExp->setValue(mParams.group_id); - mGroupIcon->setVisible(TRUE); - mGroupIconExp->setVisible(TRUE); + mGroupIcon->setVisible(true); + mGroupIconExp->setVisible(true); mGroupId = mParams.group_id; @@ -491,12 +491,12 @@ void LLGroupNotificationListItem::setGroupName(std::string name) string_args["[GROUP_NAME]"] = llformat("%s", name.c_str()); std::string group_box_str = getString("group_name_text", string_args); mGroupNameBoxExp->setValue(group_box_str); - mGroupNameBoxExp->setVisible(TRUE); + mGroupNameBoxExp->setVisible(true); } else { mGroupNameBoxExp->setValue(LLStringUtil::null); - mGroupNameBoxExp->setVisible(FALSE); + mGroupNameBoxExp->setVisible(false); } } @@ -510,15 +510,15 @@ void LLGroupNoticeNotificationListItem::setGroupName(std::string name) std::string group_box_str = getString("group_name_text", string_args); mSenderOrFeeBox->setValue(name); mGroupNameBoxExp->setValue(group_box_str); - mSenderOrFeeBox->setVisible(TRUE); - mGroupNameBoxExp->setVisible(TRUE); + mSenderOrFeeBox->setVisible(true); + mGroupNameBoxExp->setVisible(true); } else { mSenderOrFeeBox->setValue(LLStringUtil::null); mGroupNameBoxExp->setValue(LLStringUtil::null); - mGroupNameBoxExp->setVisible(FALSE); - mSenderOrFeeBox->setVisible(FALSE); + mGroupNameBoxExp->setVisible(false); + mSenderOrFeeBox->setVisible(false); } } // @@ -532,13 +532,13 @@ void LLGroupNoticeNotificationListItem::setSender(std::string sender) std::string sender_text = getString("sender_resident_text", string_args); //mSenderOrFeeBox->setValue(sender_text); // FIRE-17213: Improve display of condensed group notices mSenderOrFeeBoxExp->setValue(sender_text); - //mSenderOrFeeBox->setVisible(TRUE); // FIRE-17213: Improve display of condensed group notices - mSenderOrFeeBoxExp->setVisible(TRUE); + //mSenderOrFeeBox->setVisible(true); // FIRE-17213: Improve display of condensed group notices + mSenderOrFeeBoxExp->setVisible(true); } else { //mSenderOrFeeBox->setValue(LLStringUtil::null); // FIRE-17213: Improve display of condensed group notices mSenderOrFeeBoxExp->setValue(LLStringUtil::null); - //mSenderOrFeeBox->setVisible(FALSE); // FIRE-17213: Improve display of condensed group notices - mSenderOrFeeBoxExp->setVisible(FALSE); + //mSenderOrFeeBox->setVisible(false); // FIRE-17213: Improve display of condensed group notices + mSenderOrFeeBoxExp->setVisible(false); } } void LLGroupNoticeNotificationListItem::close() @@ -559,7 +559,7 @@ void LLGroupNoticeNotificationListItem::onClickAttachment() static const LLUIColor textColor = LLUIColorTable::instance().getColor( "GroupNotifyDimmedTextColor"); mAttachmentTextBox->setColor(textColor); - mAttachmentIconExp->setEnabled(FALSE); + mAttachmentIconExp->setEnabled(false); //if attachment isn't openable - notify about saving if (!isAttachmentOpenable(mInventoryOffer->mType)) { @@ -614,8 +614,8 @@ bool LLTransactionNotificationListItem::postBuild() mGroupIcon = getChild("group_icon"); mGroupIconExp = getChild("group_icon_exp"); - mAvatarIcon->setVisible(TRUE); - mAvatarIconExp->setVisible(TRUE); + mAvatarIcon->setVisible(true); + mAvatarIconExp->setVisible(true); if((GOVERNOR_LINDEN_ID == mParams.paid_to_id) || (GOVERNOR_LINDEN_ID == mParams.paid_from_id)) { @@ -636,10 +636,10 @@ bool LLTransactionNotificationListItem::postBuild() { mGroupIcon->setValue(mParams.paid_from_id); mGroupIconExp->setValue(mParams.paid_from_id); - mGroupIcon->setVisible(TRUE); - mGroupIconExp->setVisible(TRUE); - mAvatarIcon->setVisible(FALSE); - mAvatarIconExp->setVisible(FALSE); + mGroupIcon->setVisible(true); + mGroupIconExp->setVisible(true); + mAvatarIcon->setVisible(false); + mAvatarIconExp->setVisible(false); } // } @@ -657,10 +657,10 @@ bool LLTransactionNotificationListItem::postBuild() { mGroupIcon->setValue(mParams.paid_to_id); mGroupIconExp->setValue(mParams.paid_to_id); - mGroupIcon->setVisible(TRUE); - mGroupIconExp->setVisible(TRUE); - mAvatarIcon->setVisible(FALSE); - mAvatarIconExp->setVisible(FALSE); + mGroupIcon->setVisible(true); + mGroupIconExp->setVisible(true); + mAvatarIcon->setVisible(false); + mAvatarIconExp->setVisible(false); } // } @@ -691,8 +691,8 @@ bool LLSystemNotificationListItem::postBuild() mSystemNotificationIcon = getChild("system_notification_icon"); mSystemNotificationIconExp = getChild("system_notification_icon_exp"); if (mSystemNotificationIcon) - mSystemNotificationIcon->setVisible(TRUE); + mSystemNotificationIcon->setVisible(true); if (mSystemNotificationIconExp) - mSystemNotificationIconExp->setVisible(TRUE); + mSystemNotificationIconExp->setVisible(true); return rv; } diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 20095d132d..35d55b7237 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -96,7 +96,7 @@ public: boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); } virtual bool showPopup() { return true; } - void setExpanded(BOOL value); + void setExpanded(bool value); virtual bool postBuild(); void reshapeNotification(); diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 9b8e781441..24dfb7a059 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -256,7 +256,7 @@ void LLOutfitGallery::moveUp() item = mIndexToItemMap[n]; LLUUID item_id = item->getUUID(); ChangeOutfitSelection(nullptr, item_id); - item->setFocus(TRUE); + item->setFocus(true); scrollToShowItem(mSelectedOutfitUUID); } @@ -278,7 +278,7 @@ void LLOutfitGallery::moveDown() item = mIndexToItemMap[n]; LLUUID item_id = item->getUUID(); ChangeOutfitSelection(nullptr, item_id); - item->setFocus(TRUE); + item->setFocus(true); scrollToShowItem(mSelectedOutfitUUID); } @@ -303,7 +303,7 @@ void LLOutfitGallery::moveLeft() item = mIndexToItemMap[n]; LLUUID item_id = item->getUUID(); ChangeOutfitSelection(nullptr, item_id); - item->setFocus(TRUE); + item->setFocus(true); scrollToShowItem(mSelectedOutfitUUID); } @@ -326,7 +326,7 @@ void LLOutfitGallery::moveRight() item = mIndexToItemMap[n]; LLUUID item_id = item->getUUID(); ChangeOutfitSelection(nullptr, item_id); - item->setFocus(TRUE); + item->setFocus(true); scrollToShowItem(mSelectedOutfitUUID); } @@ -869,11 +869,11 @@ void LLOutfitGallery::onChangeOutfitSelection(LLWearableItemsList* list, const L return; if (mOutfitMap[mSelectedOutfitUUID]) { - mOutfitMap[mSelectedOutfitUUID]->setSelected(FALSE); + mOutfitMap[mSelectedOutfitUUID]->setSelected(false); } if (mOutfitMap[category_id]) { - mOutfitMap[category_id]->setSelected(TRUE); + mOutfitMap[category_id]->setSelected(true); } // mSelectedOutfitUUID will be set in LLOutfitListBase::ChangeOutfitSelection } @@ -906,15 +906,15 @@ void LLOutfitGallery::updateMessageVisibility() { if(mItems.empty()) { - mMessageTextBox->setVisible(TRUE); - mScrollPanel->setVisible(FALSE); + mMessageTextBox->setVisible(true); + mScrollPanel->setVisible(false); std::string message = sFilterSubString.empty()? getString("no_outfits_msg") : getString("no_matched_outfits_msg"); mMessageTextBox->setValue(message); } else { - mScrollPanel->setVisible(TRUE); - mMessageTextBox->setVisible(FALSE); + mScrollPanel->setVisible(true); + mMessageTextBox->setVisible(false); } } @@ -963,7 +963,7 @@ void LLOutfitGalleryItem::draw() LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "OutfitGalleryItemSelected" : "OutfitGalleryItemUnselected", LLColor4::white); LLRect border = getChildView("preview_outfit")->getRect(); border.mRight = border.mRight + 1; - gl_rect_2d(border, border_color.get(), FALSE); + gl_rect_2d(border, border_color.get(), false); // If the floater is focused, don't apply its alpha to the texture (STORM-677). const F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); @@ -1021,13 +1021,13 @@ void LLOutfitGalleryItem::setSelected(bool value) bool LLOutfitGalleryItem::handleMouseDown(S32 x, S32 y, MASK mask) { - setFocus(TRUE); + setFocus(true); return LLUICtrl::handleMouseDown(x, y, mask); } bool LLOutfitGalleryItem::handleRightMouseDown(S32 x, S32 y, MASK mask) { - setFocus(TRUE); + setFocus(true); return LLUICtrl::handleRightMouseDown(x, y, mask); } @@ -1116,7 +1116,7 @@ bool LLOutfitGalleryItem::setImageAssetId(LLUUID image_asset_id) { mImageAssetId = image_asset_id; mTexturep = texture; - getChildView("preview_outfit")->setVisible(FALSE); + getChildView("preview_outfit")->setVisible(false); mDefaultImage = false; mImageUpdatePending = (texture->getDiscardLevel() == -1); return true; @@ -1133,7 +1133,7 @@ void LLOutfitGalleryItem::setDefaultImage() { mTexturep = NULL; mImageAssetId.setNull(); - getChildView("preview_outfit")->setVisible(TRUE); + getChildView("preview_outfit")->setVisible(true); mDefaultImage = true; mImageUpdatePending = false; } @@ -1202,11 +1202,11 @@ void LLOutfitGalleryGearMenu::onUpdateItemsVisibility() { if (!mMenu) return; bool have_selection = getSelectedOutfitID().notNull(); - mMenu->setItemVisible("expand", FALSE); - mMenu->setItemVisible("collapse", FALSE); + mMenu->setItemVisible("expand", false); + mMenu->setItemVisible("collapse", false); mMenu->setItemVisible("thumbnail", have_selection); - mMenu->setItemVisible("sepatator3", TRUE); - mMenu->setItemVisible("sort_folders_by_name", TRUE); + mMenu->setItemVisible("sepatator3", true); + mMenu->setItemVisible("sort_folders_by_name", true); LLOutfitListGearMenuBase::onUpdateItemsVisibility(); } @@ -1294,7 +1294,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id) LLFloater* appearance_floater = LLFloaterReg::getInstance("appearance"); if (appearance_floater) { - appearance_floater->setFocus(TRUE); + appearance_floater->setFocus(true); } } if (item_name == LLAppearanceMgr::sExpectedTextureName) diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index 577ec5cc47..b62d861d09 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -100,7 +100,7 @@ public: /*virtual*/ bool hasItemSelected(); /*virtual*/ bool canWearSelected(); - /*virtual*/ bool getHasExpandableFolders() { return FALSE; } + /*virtual*/ bool getHasExpandableFolders() { return false; } void updateMessageVisibility(); bool hasDefaultImage(const LLUUID& outfit_cat_id); diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp index b55f06c428..17758a99ab 100644 --- a/indra/newview/lloutfitslist.cpp +++ b/indra/newview/lloutfitslist.cpp @@ -345,15 +345,15 @@ void LLOutfitListBase::performAction(std::string action) if ("replaceoutfit" == action) { - LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, FALSE ); + LLAppearanceMgr::instance().wearInventoryCategory( cat, false, false ); } if ("replaceitems" == action) { - LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, TRUE ); + LLAppearanceMgr::instance().wearInventoryCategory( cat, false, true ); } else if ("addtooutfit" == action) { - LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, TRUE ); + LLAppearanceMgr::instance().wearInventoryCategory( cat, false, true ); } else if ("rename_outfit" == action) { @@ -375,7 +375,7 @@ void LLOutfitsList::onSetSelectedOutfitByUUID(const LLUUID& outfit_uuid) LLWearableItemsList* list = dynamic_cast(tab->getAccordionView()); if (!list) continue; - tab->setFocus(TRUE); + tab->setFocus(true); ChangeOutfitSelection(list, outfit_uuid); tab->changeOpenClose(false); @@ -521,7 +521,7 @@ void LLOutfitsList::resetItemSelection(LLWearableItemsList* list, const LLUUID& void LLOutfitsList::onChangeOutfitSelection(LLWearableItemsList* list, const LLUUID& category_id) { - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); // Reset selection in all previously selected tabs except for the current // if new selection is started. @@ -602,7 +602,7 @@ void LLOutfitsList::applyFilter(const std::string& new_filter_substring) // to compare it with updated string if it was previously hidden. if (!more_restrictive) { - tab->setVisible(TRUE); + tab->setVisible(true); } LLWearableItemsList* list = dynamic_cast(tab->getAccordionView()); @@ -827,7 +827,7 @@ void LLOutfitsList::onOutfitRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUI LLUICtrl* header = tab->findChild("dd_header"); if (header) { - header->setFocus(TRUE); + header->setFocus(true); } uuid_vec_t selected_uuids; @@ -1310,7 +1310,7 @@ void LLOutfitListGearMenuBase::onWear() if (selected_outfit) { LLAppearanceMgr::instance().wearInventoryCategory( - selected_outfit, /*copy=*/ FALSE, /*append=*/ FALSE); + selected_outfit, /*copy=*/ false, /*append=*/ false); } } @@ -1411,11 +1411,11 @@ LLOutfitListGearMenu::~LLOutfitListGearMenu() void LLOutfitListGearMenu::onUpdateItemsVisibility() { if (!mMenu) return; - mMenu->setItemVisible("expand", TRUE); - mMenu->setItemVisible("collapse", TRUE); - mMenu->setItemVisible("thumbnail", FALSE); // Never visible? - mMenu->setItemVisible("sepatator3", FALSE); - mMenu->setItemVisible("sort_folders_by_name", FALSE); + mMenu->setItemVisible("expand", true); + mMenu->setItemVisible("collapse", true); + mMenu->setItemVisible("thumbnail", false); // Never visible? + mMenu->setItemVisible("sepatator3", false); + mMenu->setItemVisible("sort_folders_by_name", false); LLOutfitListGearMenuBase::onUpdateItemsVisibility(); } diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h index ccce021c67..18953ba1e1 100644 --- a/indra/newview/lloutfitslist.h +++ b/indra/newview/lloutfitslist.h @@ -253,7 +253,7 @@ public: */ void onExpandAllFolders(); - /*virtual*/ bool getHasExpandableFolders() { return TRUE; } + /*virtual*/ bool getHasExpandableFolders() { return true; } protected: LLOutfitListGearMenuBase* createGearMenu(); diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 54ad3fdaa8..8a91cddaf0 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -262,7 +262,7 @@ void LLOutputMonitorCtrl::draw() // } // // Draw rectangle filled with the color. - // gl_rect_2d(xpos, recttop, xpos+rectw, rectbtm, rect_color, TRUE); + // gl_rect_2d(xpos, recttop, xpos+rectw, rectbtm, rect_color, true); // xpos += period; //} @@ -270,7 +270,7 @@ void LLOutputMonitorCtrl::draw() // Draw bounding box. // if(mBorder) - gl_rect_2d(0, monh, monw, 0, sColorBound, FALSE); + gl_rect_2d(0, monh, monw, 0, sColorBound, false); } // virtual @@ -304,8 +304,8 @@ void LLOutputMonitorCtrl::setChannelState(EChannelState state) mChannelState = state; if (state == INACTIVE_CHANNEL) { - // switchIndicator will set it to TRUE when channel becomes active - setVisible(FALSE); + // switchIndicator will set it to true when channel becomes active + setVisible(false); } } @@ -365,8 +365,8 @@ void LLOutputMonitorCtrl::onChangeDetailed(const LLMute& mute) void LLOutputMonitorCtrl::switchIndicator(bool switch_on) { // [FS communication UI] - //if ((mChannelState != INACTIVE_CHANNEL) && (getVisible() != (BOOL)switch_on)) - if (getVisible() != (BOOL)switch_on) + //if ((mChannelState != INACTIVE_CHANNEL) && (getVisible() != (bool)switch_on)) + if (getVisible() != switch_on) // [FS communication UI] { setVisible(switch_on); @@ -427,8 +427,8 @@ void NearbyVoiceMonitor::draw() LLUUID id; bool draw = false; - mSpeakerMgr->update(TRUE); - mSpeakerMgr->getSpeakerList(&speaker_list, FALSE); + mSpeakerMgr->update(true); + mSpeakerMgr->getSpeakerList(&speaker_list, false); for (LLSpeakerMgr::speaker_list_t::const_iterator it = speaker_list.begin(); it != speaker_list.end(); ++it) { diff --git a/indra/newview/llpanelavatartag.h b/indra/newview/llpanelavatartag.h index 5d775a09ff..1af34abb78 100644 --- a/indra/newview/llpanelavatartag.h +++ b/indra/newview/llpanelavatartag.h @@ -75,7 +75,7 @@ private: const LLUUID& id, const std::string& first, const std::string& last, - BOOL is_group); + bool is_group); LLAvatarIconCtrl* mIcon; /// status tracking avatar icon LLTextBox* mName; /// displays avatar name diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index fcea4f6277..c27e5c4afb 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -79,7 +79,7 @@ void LLPanelBlockedList::removePicker() bool LLPanelBlockedList::postBuild() { mBlockedList = getChild("blocked"); - mBlockedList->setCommitOnSelectionChange(TRUE); + mBlockedList->setCommitOnSelectionChange(true); this->setVisibleCallback(boost::bind(&LLPanelBlockedList::removePicker, this)); switch (gSavedSettings.getU32("BlockPeopleSortOrder")) @@ -186,7 +186,7 @@ void LLPanelBlockedList::onCustomAction(const LLSD& userdata) } } -BOOL LLPanelBlockedList::isActionChecked(const LLSD& userdata) +bool LLPanelBlockedList::isActionChecked(const LLSD& userdata) { std::string item = userdata.asString(); U32 sort_order = gSavedSettings.getU32("BlockPeopleSortOrder"); @@ -205,13 +205,13 @@ BOOL LLPanelBlockedList::isActionChecked(const LLSD& userdata) void LLPanelBlockedList::blockResidentByName() { - const BOOL allow_multiple = FALSE; - const BOOL close_on_select = TRUE; + const bool allow_multiple = false; + const bool close_on_select = true; - LLView * button = findChild("plus_btn", TRUE); + LLView * button = findChild("plus_btn", true); LLFloater* root_floater = gFloaterView->getParentFloater(this); LLFloaterAvatarPicker * picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelBlockedList::callbackBlockPicked, this, _1, _2), - allow_multiple, close_on_select, FALSE, root_floater->getName(), button); + allow_multiple, close_on_select, false, root_floater->getName(), button); if (root_floater) { @@ -248,7 +248,7 @@ void LLPanelBlockedList::callbackBlockByName(const std::string& text) if (text.empty()) return; LLMute mute(LLUUID::null, text, LLMute::BY_NAME); - BOOL success = LLMuteList::getInstance()->add(mute); + bool success = LLMuteList::getInstance()->add(mute); if (!success) { LLNotificationsUtil::add("MuteByNameFailed"); diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h index d7e3c427f1..9b9ab58afe 100644 --- a/indra/newview/llpanelblockedlist.h +++ b/indra/newview/llpanelblockedlist.h @@ -74,7 +74,7 @@ private: // List commnads void onCustomAction(const LLSD& userdata); - BOOL isActionChecked(const LLSD& userdata); + bool isActionChecked(const LLSD& userdata); void callbackBlockPicked(const uuid_vec_t& ids, const std::vector names); static void callbackBlockByName(const std::string& text); diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index b97e9ddcc8..d7d1b1565b 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -288,8 +288,8 @@ void LLPanelClassifiedInfo::resetData() getChild("auto_renew")->setValue(LLStringUtil::null); getChild("creation_date")->setValue(LLStringUtil::null); getChild("click_through_text")->setValue(LLStringUtil::null); - getChild("content_type_moderate")->setVisible(FALSE); - getChild("content_type_general")->setVisible(FALSE); + getChild("content_type_moderate")->setVisible(false); + getChild("content_type_general")->setVisible(false); } void LLPanelClassifiedInfo::resetControls() diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 86c6cbc787..5e9e7bc957 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -83,7 +83,7 @@ const char* LLPanelContents::PERMS_ANYONE_CONTROL_KEY = "perms_anyone_control"; bool LLPanelContents::postBuild() { - setMouseOpaque(FALSE); + setMouseOpaque(false); childSetAction("button new script",&LLPanelContents::onClickNewScript, this); childSetAction("button permissions",&LLPanelContents::onClickPermissions, this); @@ -112,8 +112,8 @@ void LLPanelContents::getState(LLViewerObject *objectp ) { if( !objectp ) { - getChildView("button new script")->setEnabled(FALSE); - getChildView("btn_reset_scripts")->setEnabled(FALSE); // Script reset in edit floater + getChildView("button new script")->setEnabled(false); + getChildView("btn_reset_scripts")->setEnabled(false); // Script reset in edit floater return; } @@ -124,7 +124,7 @@ void LLPanelContents::getState(LLViewerObject *objectp ) bool editable = gAgent.isGodlike() || (objectp->permModify() && !objectp->isPermanentEnforced() && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 - BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); + bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); // [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a if ( (rlv_handler_t::isEnabled()) && (editable) ) @@ -137,7 +137,7 @@ void LLPanelContents::getState(LLViewerObject *objectp ) if ( (editable) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) ) { // Only check the first (non-)root object because nothing else would result in enabling the button (see below) - LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE); + LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(true); editable = (pObj) && (isAgentAvatarValid()) && ((!gAgentAvatarp->isSitting()) || (gAgentAvatarp->getRoot() != pObj->getRootEdit())); @@ -153,10 +153,10 @@ void LLPanelContents::getState(LLViewerObject *objectp ) // ((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1) // || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1))); - BOOL objectIsOK = FALSE; + bool objectIsOK = false; if( editable && all_volume && ( (LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1) || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1) ) ) { - objectIsOK = TRUE; + objectIsOK = true; } getChildView("button new script")->setEnabled(objectIsOK); @@ -169,7 +169,7 @@ void LLPanelContents::getState(LLViewerObject *objectp ) void LLPanelContents::refresh() { - const BOOL children_ok = TRUE; + const bool children_ok = true; LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); getState(object); @@ -195,7 +195,7 @@ void LLPanelContents::clearContents() // static void LLPanelContents::onClickNewScript(void *userdata) { - const BOOL children_ok = TRUE; + const bool children_ok = true; LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); if(object) { @@ -239,7 +239,7 @@ void LLPanelContents::onClickNewScript(void *userdata) LLSaleInfo::DEFAULT, LLInventoryItemFlags::II_FLAGS_NONE, time_corrected()); - object->saveScript(new_item, TRUE, true); + object->saveScript(new_item, true, true); std::string name = new_item->getName(); diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 5f5dda12c7..d387bbce43 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -367,7 +367,7 @@ bool LLPanelSettingsSkyCloudTab::postBuild() getChild(FIELD_SKY_CLOUD_SCROLL_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScrollChanged(); }); getChild(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); }); getChild(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::GetDefaultCloudNoiseTextureId()); - getChild(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE); + getChild(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(true); getChild(FIELD_SKY_CLOUD_DENSITY_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); }); getChild(FIELD_SKY_CLOUD_DENSITY_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); }); @@ -523,14 +523,14 @@ bool LLPanelSettingsSkySunMoonTab::postBuild() getChild(FIELD_SKY_SUN_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunScaleChanged(); }); getChild(FIELD_SKY_SUN_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId()); getChild(FIELD_SKY_SUN_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetBlankSunTextureId()); - getChild(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(TRUE); + getChild(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(true); getChild(FIELD_SKY_MOON_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonRotationChanged(); }); getChild(FIELD_SKY_MOON_AZIMUTH)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); }); getChild(FIELD_SKY_MOON_ELEVATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonAzimElevChanged(); }); getChild(FIELD_SKY_MOON_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonImageChanged(); }); getChild(FIELD_SKY_MOON_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetDefaultMoonTextureId()); getChild(FIELD_SKY_MOON_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetDefaultMoonTextureId()); - getChild(FIELD_SKY_MOON_IMAGE)->setAllowNoTexture(TRUE); + getChild(FIELD_SKY_MOON_IMAGE)->setAllowNoTexture(true); getChild(FIELD_SKY_MOON_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonScaleChanged(); }); getChild(FIELD_SKY_MOON_BRIGHTNESS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonBrightnessChanged(); }); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index f93384a8da..c563f9eb26 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -357,40 +357,40 @@ LLEditWearableDictionary::ColorSwatchCtrls::ColorSwatchCtrls() LLEditWearableDictionary::TextureCtrls::TextureCtrls() { - addEntry ( TEX_HEAD_BODYPAINT, new PickerControlEntry (TEX_HEAD_BODYPAINT, "Head", LLUUID::null, TRUE )); - addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, TRUE )); - addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, TRUE )); - addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), FALSE )); - addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Upper Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_JACKET, new PickerControlEntry (TEX_LOWER_JACKET, "Lower Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), FALSE )); - addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), FALSE )); - addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), FALSE )); - addEntry ( TEX_LOWER_ALPHA, new PickerControlEntry (TEX_LOWER_ALPHA, "Lower Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_UPPER_ALPHA, new PickerControlEntry (TEX_UPPER_ALPHA, "Upper Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_HEAD_ALPHA, new PickerControlEntry (TEX_HEAD_ALPHA, "Head Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_EYES_ALPHA, new PickerControlEntry (TEX_EYES_ALPHA, "Eye Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_HAIR_ALPHA, new PickerControlEntry (TEX_HAIR_ALPHA, "Hair Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), TRUE )); - addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, TRUE )); - addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, TRUE )); - addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, TRUE )); - addEntry ( TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, TRUE)); - addEntry ( TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, TRUE)); - addEntry (TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, TRUE)); + addEntry ( TEX_HEAD_BODYPAINT, new PickerControlEntry (TEX_HEAD_BODYPAINT, "Head", LLUUID::null, true )); + addEntry ( TEX_UPPER_BODYPAINT, new PickerControlEntry (TEX_UPPER_BODYPAINT, "Upper Body", LLUUID::null, true )); + addEntry ( TEX_LOWER_BODYPAINT, new PickerControlEntry (TEX_LOWER_BODYPAINT, "Lower Body", LLUUID::null, true )); + addEntry ( TEX_HAIR, new PickerControlEntry (TEX_HAIR, "Texture", LLUUID( gSavedSettings.getString( "UIImgDefaultHairUUID" ) ), false )); + addEntry ( TEX_EYES_IRIS, new PickerControlEntry (TEX_EYES_IRIS, "Iris", LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), false )); + addEntry ( TEX_UPPER_SHIRT, new PickerControlEntry (TEX_UPPER_SHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), false )); + addEntry ( TEX_LOWER_PANTS, new PickerControlEntry (TEX_LOWER_PANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), false )); + addEntry ( TEX_LOWER_SHOES, new PickerControlEntry (TEX_LOWER_SHOES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), false )); + addEntry ( TEX_LOWER_SOCKS, new PickerControlEntry (TEX_LOWER_SOCKS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), false )); + addEntry ( TEX_UPPER_JACKET, new PickerControlEntry (TEX_UPPER_JACKET, "Upper Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), false )); + addEntry ( TEX_LOWER_JACKET, new PickerControlEntry (TEX_LOWER_JACKET, "Lower Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), false )); + addEntry ( TEX_SKIRT, new PickerControlEntry (TEX_SKIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), false )); + addEntry ( TEX_UPPER_GLOVES, new PickerControlEntry (TEX_UPPER_GLOVES, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), false )); + addEntry ( TEX_UPPER_UNDERSHIRT, new PickerControlEntry (TEX_UPPER_UNDERSHIRT, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), false )); + addEntry ( TEX_LOWER_UNDERPANTS, new PickerControlEntry (TEX_LOWER_UNDERPANTS, "Fabric", LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), false )); + addEntry ( TEX_LOWER_ALPHA, new PickerControlEntry (TEX_LOWER_ALPHA, "Lower Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_UPPER_ALPHA, new PickerControlEntry (TEX_UPPER_ALPHA, "Upper Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_HEAD_ALPHA, new PickerControlEntry (TEX_HEAD_ALPHA, "Head Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_EYES_ALPHA, new PickerControlEntry (TEX_EYES_ALPHA, "Eye Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_HAIR_ALPHA, new PickerControlEntry (TEX_HAIR_ALPHA, "Hair Alpha", LLUUID( gSavedSettings.getString( "UIImgDefaultAlphaUUID" ) ), true )); + addEntry ( TEX_LOWER_TATTOO, new PickerControlEntry (TEX_LOWER_TATTOO, "Lower Tattoo", LLUUID::null, true )); + addEntry ( TEX_UPPER_TATTOO, new PickerControlEntry (TEX_UPPER_TATTOO, "Upper Tattoo", LLUUID::null, true )); + addEntry ( TEX_HEAD_TATTOO, new PickerControlEntry (TEX_HEAD_TATTOO, "Head Tattoo", LLUUID::null, true )); + addEntry ( TEX_LOWER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_LOWER_UNIVERSAL_TATTOO, "Lower Universal Tattoo", LLUUID::null, true)); + addEntry ( TEX_UPPER_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_UPPER_UNIVERSAL_TATTOO, "Upper Universal Tattoo", LLUUID::null, true)); + addEntry ( TEX_HEAD_UNIVERSAL_TATTOO, new PickerControlEntry( TEX_HEAD_UNIVERSAL_TATTOO, "Head Universal Tattoo", LLUUID::null, true)); + addEntry ( TEX_SKIRT_TATTOO, new PickerControlEntry(TEX_SKIRT_TATTOO, "Skirt Tattoo", LLUUID::null, true)); + addEntry ( TEX_HAIR_TATTOO, new PickerControlEntry(TEX_HAIR_TATTOO, "Hair Tattoo", LLUUID::null, true)); + addEntry ( TEX_EYES_TATTOO, new PickerControlEntry(TEX_EYES_TATTOO, "Eyes Tattoo", LLUUID::null, true)); + addEntry (TEX_LEFT_ARM_TATTOO, new PickerControlEntry(TEX_LEFT_ARM_TATTOO, "Left Arm Tattoo", LLUUID::null, true)); + addEntry (TEX_LEFT_LEG_TATTOO, new PickerControlEntry(TEX_LEFT_LEG_TATTOO, "Left Leg Tattoo", LLUUID::null, true)); + addEntry (TEX_AUX1_TATTOO, new PickerControlEntry(TEX_AUX1_TATTOO, "Aux1 Tattoo", LLUUID::null, true)); + addEntry (TEX_AUX2_TATTOO, new PickerControlEntry(TEX_AUX2_TATTOO, "Aux2 Tattoo", LLUUID::null, true)); + addEntry (TEX_AUX3_TATTOO, new PickerControlEntry(TEX_AUX3_TATTOO, "Aux3 Tattoo", LLUUID::null, true)); } LLEditWearableDictionary::PickerControlEntry::PickerControlEntry(ETextureIndex tex_index, @@ -668,7 +668,7 @@ bool LLPanelEditWearable::changeHeightUnits(const LLSD& new_value) return true; } -void LLPanelEditWearable::updateMetricLayout(BOOL new_value) +void LLPanelEditWearable::updateMetricLayout(bool new_value) { LLUIString current_metric, replacment_metric; current_metric = new_value ? mMeters : mFeet; @@ -912,20 +912,20 @@ void LLPanelEditWearable::setVisible(bool visible) { if (!visible) { - showWearable(mWearablePtr, FALSE); + showWearable(mWearablePtr, false); } LLPanel::setVisible(visible); } -void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, BOOL disable_camera_switch) +void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, bool disable_camera_switch) { - showWearable(mWearablePtr, FALSE, disable_camera_switch); + showWearable(mWearablePtr, false, disable_camera_switch); if (mWearablePtr) mWearablePtr->unregisterObserver(this); mWearablePtr = wearable; if( mWearablePtr ) mWearablePtr->registerObserver( this ); - showWearable(mWearablePtr, TRUE, disable_camera_switch); + showWearable(mWearablePtr, true, disable_camera_switch); } //static @@ -1004,7 +1004,7 @@ void LLPanelEditWearable::onCommitSexChange() // [Legacy Bake] gAgentAvatarp->updateVisualParams(); - showWearable(mWearablePtr, TRUE, TRUE); + showWearable(mWearablePtr, true, true); updateScrollingPanelUI(); } @@ -1036,7 +1036,7 @@ void LLPanelEditWearable::onTexturePickerCommit(const LLUICtrl* ctrl) U32 index; if (gAgentWearables.getWearableIndex(getWearable(), index)) { - gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, FALSE, index); + gAgentAvatarp->setLocalTexture(entry->mTextureIndex, image, false, index); LLVisualParamHint::requestHintUpdates(); // [Legacy Bake] //gAgentAvatarp->wearableUpdated(type); @@ -1153,7 +1153,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) { // the name of the wearable has changed, re-save wearable with new name LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID(),gAgentAvatarp->mEndCustomizeCallback); - gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE); + gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, false); mNameEditor->setText(mWearableItem->getName()); } else @@ -1201,7 +1201,7 @@ void LLPanelEditWearable::revertChanges() gAgentAvatarp->wearableUpdated(mWearablePtr->getType(), false); } -void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BOOL disable_camera_switch) +void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, bool show, bool disable_camera_switch) { if (!wearable) { @@ -1291,12 +1291,12 @@ void LLPanelEditWearable::showWearable(LLViewerWearable* wearable, BOOL show, BO // Don't show female subparts if you're not female, etc. if (!(gAgentAvatarp->getSex() & subpart_entry->mSex)) { - tab->setVisible(FALSE); + tab->setVisible(false); continue; } else { - tab->setVisible(TRUE); + tab->setVisible(true); } // what edit group do we want to extract params for? @@ -1388,7 +1388,7 @@ void LLPanelEditWearable::onTabChanged(LLUICtrl* ctrl, LLWearableType::EType typ ESubpart subpart_e = wearable_entry->mSubparts[index]; const LLEditWearableDictionary::SubpartEntry* subpart_entry = LLEditWearableDictionary::getInstance()->getSubpart(subpart_e); - if (subpart_entry && container->getCurrentPanel()->hasChild(subpart_entry->mAccordionTab, TRUE)) + if (subpart_entry && container->getCurrentPanel()->hasChild(subpart_entry->mAccordionTab, true)) { mLastShownSubpartIndex[type] = index; // Correct camera position for last subpart changeCamera(index); @@ -1439,7 +1439,7 @@ void LLPanelEditWearable::changeCamera(U8 subpart) if (gSavedSettings.getBOOL("AppearanceCameraMovement")) { // Unlock focus from avatar but don't stop animation to not interrupt ANIM_AGENT_CUSTOMIZE - gAgentCamera.setFocusOnAvatar(FALSE, gAgentCamera.getCameraAnimating()); + gAgentCamera.setFocusOnAvatar(false, gAgentCamera.getCameraAnimating()); gMorphView->updateCamera(); } } @@ -1472,7 +1472,7 @@ void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type) // prims inworld, and carried forward from Phoenix. -- TS F32 new_size = gAgentAvatarp->mBodySize.mV[VZ] + .195f; - if (gSavedSettings.getBOOL("HeightUnits") == FALSE) + if (gSavedSettings.getBOOL("HeightUnits") == false) { // convert meters to feet new_size = new_size / ONE_FOOT; @@ -1526,7 +1526,7 @@ void LLPanelEditWearable::updateScrollingPanelUI() continue; } - panel_list->updatePanels(TRUE); + panel_list->updatePanels(true); } } } @@ -1639,7 +1639,7 @@ void LLPanelEditWearable::getSortedParams(value_map_t &sorted_params, const std: void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab, LLJoint* jointp) { // FIRE-21936: Option to disable visual hints for appearance editor - BOOL show_hints = gSavedSettings.getBOOL("FSAppearanceShowHints"); + bool show_hints = gSavedSettings.getBOOL("FSAppearanceShowHints"); // sorted_params is sorted according to magnitude of effect from // least to greatest. Adding to the front of the child list @@ -1659,11 +1659,11 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value if (!show_hints || (wearable && wearable->getType() == LLWearableType::WT_PHYSICS)) // Hack to show a different panel for physics. Should generalize this later. // { - panel_param = new LLScrollingPanelParamBase( p, NULL, (*it).second, TRUE, this->getWearable(), jointp); + panel_param = new LLScrollingPanelParamBase( p, NULL, (*it).second, true, this->getWearable(), jointp); } else { - panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable(), jointp); + panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, true, this->getWearable(), jointp); } panel_list->addPanel( panel_param ); } @@ -1747,7 +1747,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL mPreviousAlphaTexture[te] = lto->getID(); LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( IMG_INVISIBLE ); - gAgentAvatarp->setLocalTexture(te, image, FALSE, index); + gAgentAvatarp->setLocalTexture(te, image, false, index); // [Legacy Bake] //gAgentAvatarp->wearableUpdated(getWearable()->getType()); gAgentAvatarp->wearableUpdated(getWearable()->getType(), false); @@ -1765,7 +1765,7 @@ void LLPanelEditWearable::onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LL LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture(prev_id); if (!image) return; - gAgentAvatarp->setLocalTexture(te, image, FALSE, index); + gAgentAvatarp->setLocalTexture(te, image, false, index); // [Legacy Bake] //gAgentAvatarp->wearableUpdated(getWearable()->getType()); gAgentAvatarp->wearableUpdated(getWearable()->getType(), false); @@ -1816,7 +1816,7 @@ void LLPanelEditWearable::onClickedImportBtnCallback(const std::vector [AIS Merge] Change back once legacy baking is re-added //visual_param->setWeight(value); - visual_param->setWeight(value, FALSE); + visual_param->setWeight(value, false); } else { @@ -1895,8 +1895,8 @@ public: bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web) { - // change height units TRUE for meters and FALSE for feet - BOOL new_value = (gSavedSettings.getBOOL("HeightUnits") == FALSE) ? TRUE : FALSE; + // change height units true for meters and false for feet + bool new_value = (gSavedSettings.getBOOL("HeightUnits") == false) ? true : false; gSavedSettings.setBOOL("HeightUnits", new_value); return true; } diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 5746f04ee2..28b9906a60 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -65,7 +65,7 @@ public: void changeCamera(U8 subpart); LLViewerWearable* getWearable() { return mWearablePtr; } - void setWearable(LLViewerWearable *wearable, BOOL disable_camera_switch = FALSE); + void setWearable(LLViewerWearable *wearable, bool disable_camera_switch = false); void saveChanges(bool force_save_as = false); void revertChanges(); @@ -87,7 +87,7 @@ public: private: typedef std::map value_map_t; - void showWearable(LLViewerWearable* wearable, BOOL show, BOOL disable_camera_switch = FALSE); + void showWearable(LLViewerWearable* wearable, bool show, bool disable_camera_switch = false); void updateScrollingPanelUI(); LLPanel* getPanel(LLWearableType::EType type); void getSortedParams(value_map_t &sorted_params, const std::string &edit_group); @@ -112,7 +112,7 @@ private: bool changeHeightUnits(const LLSD& new_value); // updates current metric and replacement metric label text - void updateMetricLayout(BOOL new_value); + void updateMetricLayout(bool new_value); // updates avatar height label void updateAvatarHeightLabel(); diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index bc2c930459..209be11eff 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -871,7 +871,7 @@ void LLPanelEnvironmentInfo::onBtnSelect() picker->setSettingsFilter(LLSettingsType::ST_NONE); picker->setSettingsItemId(item_id); picker->openFloater(); - picker->setFocus(TRUE); + picker->setFocus(true); } } diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp index b6ff033d05..00015d13c8 100644 --- a/indra/newview/llpanelexperiencelisteditor.cpp +++ b/indra/newview/llpanelexperiencelisteditor.cpp @@ -119,7 +119,7 @@ void LLPanelExperienceListEditor::onAdd() mKey.generateNewID(); - LLFloaterExperiencePicker* picker=LLFloaterExperiencePicker::show(boost::bind(&LLPanelExperienceListEditor::addExperienceIds, this, _1), mKey, FALSE, TRUE, mFilters, mAdd); + LLFloaterExperiencePicker* picker=LLFloaterExperiencePicker::show(boost::bind(&LLPanelExperienceListEditor::addExperienceIds, this, _1), mKey, false, true, mFilters, mAdd); mPicker = picker->getDerivedHandle(); } diff --git a/indra/newview/llpanelexperiencelog.cpp b/indra/newview/llpanelexperiencelog.cpp index 5690384b8a..c4a70b11a1 100644 --- a/indra/newview/llpanelexperiencelog.cpp +++ b/indra/newview/llpanelexperiencelog.cpp @@ -102,7 +102,7 @@ void LLPanelExperienceLog::refresh() return; } - setAllChildrenEnabled(FALSE); + setAllChildrenEnabled(false); LLSD item; bool waiting = false; @@ -179,9 +179,9 @@ void LLPanelExperienceLog::refresh() } else { - setAllChildrenEnabled(TRUE); + setAllChildrenEnabled(true); - mEventList->setEnabled(TRUE); + mEventList->setEnabled(true); getChild("btn_next")->setEnabled(moreItems); getChild("btn_prev")->setEnabled(mCurrentPage>0); getChild("btn_clear")->setEnabled(mEventList->getItemCount()>0); diff --git a/indra/newview/llpanelexperiencepicker.cpp b/indra/newview/llpanelexperiencepicker.cpp index 39dda7bd00..52abad3cfe 100644 --- a/indra/newview/llpanelexperiencepicker.cpp +++ b/indra/newview/llpanelexperiencepicker.cpp @@ -75,23 +75,23 @@ bool LLPanelExperiencePicker::postBuild() getChild(TEXT_EDIT)->setKeystrokeCallback( boost::bind(&LLPanelExperiencePicker::editKeystroke, this, _1, _2),NULL); childSetAction(BTN_FIND, boost::bind(&LLPanelExperiencePicker::onBtnFind, this)); - getChildView(BTN_FIND)->setEnabled(TRUE); + getChildView(BTN_FIND)->setEnabled(true); LLScrollListCtrl* searchresults = getChild(LIST_RESULTS); searchresults->setDoubleClickCallback( boost::bind(&LLPanelExperiencePicker::onBtnSelect, this)); searchresults->setCommitCallback(boost::bind(&LLPanelExperiencePicker::onList, this)); - getChildView(LIST_RESULTS)->setEnabled(FALSE); + getChildView(LIST_RESULTS)->setEnabled(false); getChild(LIST_RESULTS)->setCommentText(getString("no_results")); childSetAction(BTN_OK, boost::bind(&LLPanelExperiencePicker::onBtnSelect, this)); - getChildView(BTN_OK)->setEnabled(FALSE); + getChildView(BTN_OK)->setEnabled(false); childSetAction(BTN_CANCEL, boost::bind(&LLPanelExperiencePicker::onBtnClose, this)); childSetAction(BTN_PROFILE, boost::bind(&LLPanelExperiencePicker::onBtnProfile, this)); - getChildView(BTN_PROFILE)->setEnabled(FALSE); + getChildView(BTN_PROFILE)->setEnabled(false); getChild(TEXT_MATURITY)->setCurrentByIndex(gSavedPerAccountSettings.getU32("ExperienceSearchMaturity")); getChild(TEXT_MATURITY)->setCommitCallback(boost::bind(&LLPanelExperiencePicker::onMaturity, this)); - getChild(TEXT_EDIT)->setFocus(TRUE); + getChild(TEXT_EDIT)->setFocus(true); childSetAction(BTN_LEFT, boost::bind(&LLPanelExperiencePicker::onPage, this, -1)); childSetAction(BTN_RIGHT, boost::bind(&LLPanelExperiencePicker::onPage, this, 1)); @@ -140,11 +140,11 @@ void LLPanelExperiencePicker::onBtnFind() getChild(LIST_RESULTS)->deleteAllItems(); getChild(LIST_RESULTS)->setCommentText(getString("searching")); - getChildView(BTN_OK)->setEnabled(FALSE); - getChildView(BTN_PROFILE)->setEnabled(FALSE); + getChildView(BTN_OK)->setEnabled(false); + getChildView(BTN_PROFILE)->setEnabled(false); - getChildView(BTN_RIGHT)->setEnabled(FALSE); - getChildView(BTN_LEFT)->setEnabled(FALSE); + getChildView(BTN_RIGHT)->setEnabled(false); + getChildView(BTN_LEFT)->setEnabled(false); LLExperienceCache::instance().get(experience_id, boost::bind(&LLPanelExperiencePicker::onBtnFind, this)); return; } @@ -176,11 +176,11 @@ void LLPanelExperiencePicker::find() getChild(LIST_RESULTS)->deleteAllItems(); getChild(LIST_RESULTS)->setCommentText(getString("searching")); - getChildView(BTN_OK)->setEnabled(FALSE); - getChildView(BTN_PROFILE)->setEnabled(FALSE); + getChildView(BTN_OK)->setEnabled(false); + getChildView(BTN_PROFILE)->setEnabled(false); - getChildView(BTN_RIGHT)->setEnabled(FALSE); - getChildView(BTN_LEFT)->setEnabled(FALSE); + getChildView(BTN_RIGHT)->setEnabled(false); + getChildView(BTN_LEFT)->setEnabled(false); } /*static*/ @@ -266,10 +266,10 @@ void LLPanelExperiencePicker::onBtnSelect() getSelectedExperienceIds(results, experience_ids); mSelectionCallback(experience_ids); - getChild(LIST_RESULTS)->deselectAllItems(TRUE); + getChild(LIST_RESULTS)->deselectAllItems(true); if(mCloseOnSelect) { - mCloseOnSelect = FALSE; + mCloseOnSelect = false; onBtnClose(); } } @@ -368,14 +368,14 @@ void LLPanelExperiencePicker::filterContent() { getChildView(BTN_OK)->setEnabled(true); search_results->setEnabled(true); - search_results->sortByColumnIndex(1, TRUE); + search_results->sortByColumnIndex(1, true); std::string text = getChild(TEXT_EDIT)->getValue().asString(); - if (!search_results->selectItemByLabel(text, TRUE, 1)) + if (!search_results->selectItemByLabel(text, true, 1)) { search_results->selectFirstItem(); } onList(); - search_results->setFocus(TRUE); + search_results->setFocus(true); } } diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 580ba2fd57..3e20cb288e 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -491,7 +491,7 @@ bool LLPanelFace::postBuild() mColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectColor, this, _2)); mColorSwatch->setFollowsTop(); mColorSwatch->setFollowsLeft(); - mColorSwatch->setCanApplyImmediately(TRUE); + mColorSwatch->setCanApplyImmediately(true); } mShinyColorSwatch = getChild("shinycolorswatch"); @@ -502,7 +502,7 @@ bool LLPanelFace::postBuild() mShinyColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectShinyColor, this, _2)); mShinyColorSwatch->setFollowsTop(); mShinyColorSwatch->setFollowsLeft(); - mShinyColorSwatch->setCanApplyImmediately(TRUE); + mShinyColorSwatch->setCanApplyImmediately(true); } mLabelColorTransp = getChild("color trans"); @@ -768,7 +768,7 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor LLPanelFaceSetTEFunctor(LLPanelFace* panel) : mPanel(panel) {} virtual bool apply(LLViewerObject* object, S32 te) { - BOOL valid; + bool valid; F32 value; std::string prefix; @@ -1130,8 +1130,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) && objectp->getPCode() == LL_PCODE_VOLUME && objectp->permModify()) { - BOOL editable = objectp->permModify() && !objectp->isPermanentEnforced(); - BOOL attachment = objectp->isAttachment(); + bool editable = objectp->permModify() && !objectp->isPermanentEnforced(); + bool attachment = objectp->isAttachment(); bool has_pbr_material; bool has_faces_without_pbr; @@ -1143,7 +1143,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) childSetEnabled("button align", editable); // - BOOL enable_material_controls = (!gSavedSettings.getBOOL("SyncMaterialSettings")); + bool enable_material_controls = (!gSavedSettings.getBOOL("SyncMaterialSettings")); if (mComboMatMedia->getCurrentIndex() < MATMEDIA_MATERIAL) { @@ -1349,18 +1349,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) // Texture { - mIsAlpha = FALSE; + mIsAlpha = false; LLGLenum image_format = GL_RGB; bool identical_image_format = false; LLSelectedTE::getImageFormat(image_format, identical_image_format); - mIsAlpha = FALSE; + mIsAlpha = false; switch (image_format) { case GL_RGBA: case GL_ALPHA: { - mIsAlpha = TRUE; + mIsAlpha = true; } break; @@ -1412,7 +1412,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) { if (identical_diffuse) { - mTextureCtrl->setTentative(FALSE); + mTextureCtrl->setTentative(false); mTextureCtrl->setEnabled(editable && !has_pbr_material); mTextureCtrl->setImageAssetID(id); getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material); @@ -1420,25 +1420,25 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChildView("maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material); getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material); - mTextureCtrl->setBakeTextureEnabled(TRUE); + mTextureCtrl->setBakeTextureEnabled(true); } else if (id.isNull()) { // None selected - mTextureCtrl->setTentative(FALSE); - mTextureCtrl->setEnabled(FALSE); + mTextureCtrl->setTentative(false); + mTextureCtrl->setEnabled(false); mTextureCtrl->setImageAssetID(LLUUID::null); - getChildView("combobox alphamode")->setEnabled(FALSE); - getChildView("label alphamode")->setEnabled(FALSE); - getChildView("maskcutoff")->setEnabled(FALSE); - getChildView("label maskcutoff")->setEnabled(FALSE); + getChildView("combobox alphamode")->setEnabled(false); + getChildView("label alphamode")->setEnabled(false); + getChildView("maskcutoff")->setEnabled(false); + getChildView("label maskcutoff")->setEnabled(false); mTextureCtrl->setBakeTextureEnabled(false); } else { // Tentative: multiple selected with different textures - mTextureCtrl->setTentative(TRUE); + mTextureCtrl->setTentative(true); mTextureCtrl->setEnabled(editable && !has_pbr_material); mTextureCtrl->setImageAssetID(id); getChildView("combobox alphamode")->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material); @@ -1446,7 +1446,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChildView("maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material); getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha && !has_pbr_material); - mTextureCtrl->setBakeTextureEnabled(TRUE); + mTextureCtrl->setBakeTextureEnabled(true); } if (attachment) @@ -1569,9 +1569,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) mCtrlShinyScaleU->setEnabled(editable && has_material && specmap_id.notNull() && enable_material_controls); mCtrlBumpyScaleU->setEnabled(editable && has_material && normmap_id.notNull() && enable_material_controls); - BOOL diff_scale_tentative = !(identical && identical_diff_scale_s); - BOOL norm_scale_tentative = !(identical && identical_norm_scale_s); - BOOL spec_scale_tentative = !(identical && identical_spec_scale_s); + bool diff_scale_tentative = !(identical && identical_diff_scale_s); + bool norm_scale_tentative = !(identical && identical_norm_scale_s); + bool spec_scale_tentative = !(identical && identical_spec_scale_s); mCtrlTexScaleU->setTentative( LLSD(diff_scale_tentative)); mCtrlShinyScaleU->setTentative(LLSD(spec_scale_tentative)); @@ -1603,9 +1603,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) spec_scale_t = editable ? spec_scale_t : 1.0f; spec_scale_t *= identical_planar_texgen ? 2.0f : 1.0f; - BOOL diff_scale_tentative = !identical_diff_scale_t; - BOOL norm_scale_tentative = !identical_norm_scale_t; - BOOL spec_scale_tentative = !identical_spec_scale_t; + bool diff_scale_tentative = !identical_diff_scale_t; + bool norm_scale_tentative = !identical_norm_scale_t; + bool spec_scale_tentative = !identical_spec_scale_t; mCtrlTexScaleV->setEnabled(editable && has_material); // Materials alignment @@ -1644,9 +1644,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) LLSelectedTEMaterial::getNormalOffsetX(norm_offset_s, identical_norm_offset_s); LLSelectedTEMaterial::getSpecularOffsetX(spec_offset_s, identical_spec_offset_s); - BOOL diff_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_diff_offset_s); - BOOL norm_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_s); - BOOL spec_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_s); + bool diff_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_diff_offset_s); + bool norm_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_s); + bool spec_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_s); mCtrlTexOffsetU->setValue( editable ? diff_offset_s : 0.0f); mCtrlBumpyOffsetU->setValue(editable ? norm_offset_s : 0.0f); @@ -1677,9 +1677,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) LLSelectedTEMaterial::getNormalOffsetY(norm_offset_t, identical_norm_offset_t); LLSelectedTEMaterial::getSpecularOffsetY(spec_offset_t, identical_spec_offset_t); - BOOL diff_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_diff_offset_t); - BOOL norm_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_t); - BOOL spec_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_t); + bool diff_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_diff_offset_t); + bool norm_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_t); + bool spec_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_t); mCtrlTexOffsetV->setValue( editable ? diff_offset_t : 0.0f); mCtrlBumpyOffsetV->setValue(editable ? norm_offset_t : 0.0f); @@ -1711,9 +1711,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) LLSelectedTEMaterial::getSpecularRotation(spec_rotation,identical_spec_rotation); LLSelectedTEMaterial::getNormalRotation(norm_rotation,identical_norm_rotation); - BOOL diff_rot_tentative = !(align_planar ? identical_planar_aligned : identical_diff_rotation); - BOOL norm_rot_tentative = !(align_planar ? identical_planar_aligned : identical_norm_rotation); - BOOL spec_rot_tentative = !(align_planar ? identical_planar_aligned : identical_spec_rotation); + bool diff_rot_tentative = !(align_planar ? identical_planar_aligned : identical_diff_rotation); + bool norm_rot_tentative = !(align_planar ? identical_planar_aligned : identical_norm_rotation); + bool spec_rot_tentative = !(align_planar ? identical_planar_aligned : identical_spec_rotation); F32 diff_rot_deg = diff_rotation * RAD_TO_DEG; F32 norm_rot_deg = norm_rotation * RAD_TO_DEG; @@ -1849,7 +1849,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) break; } - BOOL repeats_tentative = !identical_repeats; + bool repeats_tentative = !identical_repeats; //LLSpinCtrl* rpt_ctrl = getChild("rptctrl"); if (force_set_values) @@ -1975,7 +1975,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) } } S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); - BOOL single_volume = (selected_count == 1); + bool single_volume = (selected_count == 1); // Extended copy & paste buttons //mMenuClipboardColor->setEnabled(editable && single_volume); mBtnCopyFaces->setEnabled(editable && single_volume); @@ -2008,40 +2008,40 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) if (pbr_ctrl) { pbr_ctrl->setImageAssetID(LLUUID::null); - pbr_ctrl->setEnabled(FALSE); + pbr_ctrl->setEnabled(false); } ///LLTextureCtrl* texture_ctrl = getChild("texture control"); if (mTextureCtrl) { mTextureCtrl->setImageAssetID( LLUUID::null ); - mTextureCtrl->setEnabled( FALSE ); // this is a LLUICtrl, but we don't want it to have keyboard focus so we add it as a child, not a ctrl. -// mTextureCtrl->setValid(FALSE); + mTextureCtrl->setEnabled( false ); // this is a LLUICtrl, but we don't want it to have keyboard focus so we add it as a child, not a ctrl. +// mTextureCtrl->setValid(false); } //LLColorSwatchCtrl* mColorSwatch = getChild("colorswatch"); if (mColorSwatch) { - mColorSwatch->setEnabled( FALSE ); + mColorSwatch->setEnabled( false ); mColorSwatch->setFallbackImage(LLUI::getUIImage("locked_image.j2c") ); - mColorSwatch->setValid(FALSE); + mColorSwatch->setValid(false); } //LLRadioGroup* radio_mat_type = getChild("radio_material_type"); if (mRadioMatType) { mRadioMatType->setSelectedIndex(0); } - getChildView("color trans")->setEnabled(FALSE); - mCtrlRpt->setEnabled(FALSE); - getChildView("tex gen")->setEnabled(FALSE); - getChildView("label shininess")->setEnabled(FALSE); - getChildView("label bumpiness")->setEnabled(FALSE); - getChildView("button align")->setEnabled(FALSE); - getChildView("pbr_from_inventory")->setEnabled(FALSE); - getChildView("edit_selected_pbr")->setEnabled(FALSE); - getChildView("save_selected_pbr")->setEnabled(FALSE); + getChildView("color trans")->setEnabled(false); + mCtrlRpt->setEnabled(false); + getChildView("tex gen")->setEnabled(false); + getChildView("label shininess")->setEnabled(false); + getChildView("label bumpiness")->setEnabled(false); + getChildView("button align")->setEnabled(false); + getChildView("pbr_from_inventory")->setEnabled(false); + getChildView("edit_selected_pbr")->setEnabled(false); + getChildView("save_selected_pbr")->setEnabled(false); // Extended copy & paste buttons - mBtnCopyFaces->setEnabled(FALSE); - mBtnPasteFaces->setEnabled(FALSE); + mBtnCopyFaces->setEnabled(false); + mBtnPasteFaces->setEnabled(false); // updateVisibility(); @@ -2152,7 +2152,7 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material, { LLSelectedTE::getPbrMaterialId(pbr_id, identical_pbr, has_pbr_material, has_faces_without_pbr); - pbr_ctrl->setTentative(identical_pbr ? FALSE : TRUE); + pbr_ctrl->setTentative(identical_pbr ? false : true); pbr_ctrl->setEnabled(settable); pbr_ctrl->setImageAssetID(pbr_id); @@ -2276,7 +2276,7 @@ void LLPanelFace::refreshMedia() && first_object->permModify() )) { - getChildView("add_media")->setEnabled(FALSE); + getChildView("add_media")->setEnabled(false); mTitleMediaText->clear(); clearMediaSettings(); return; @@ -2287,13 +2287,13 @@ void LLPanelFace::refreshMedia() if (!has_media_capability) { - getChildView("add_media")->setEnabled(FALSE); + getChildView("add_media")->setEnabled(false); LL_WARNS("LLFloaterToolsMedia") << "Media not enabled (no capability) in this region!" << LL_ENDL; clearMediaSettings(); return; } - BOOL is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + bool is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); bool editable = is_nonpermanent_enforced && (first_object->permModify() || selectedMediaEditable()); @@ -2413,7 +2413,7 @@ void LLPanelFace::refreshMedia() } } - getChildView("delete_media")->setEnabled(TRUE); + getChildView("delete_media")->setEnabled(true); } U32 materials_media = mComboMatMedia->getCurrentIndex(); @@ -2657,7 +2657,7 @@ void LLPanelFace::updateMediaSettings() // Auto play //value_bool = default_media_data.getAutoPlay(); - // set default to auto play TRUE -- angela EXT-5172 + // set default to auto play true -- angela EXT-5172 value_bool = true; struct functor_getter_auto_play : public LLSelectedTEGetFunctor< bool > { @@ -2669,7 +2669,7 @@ void LLPanelFace::updateMediaSettings() if (object->getTE(face)) if (object->getTE(face)->getMediaData()) return object->getTE(face)->getMediaData()->getAutoPlay(); - //return mMediaEntry.getAutoPlay(); set default to auto play TRUE -- angela EXT-5172 + //return mMediaEntry.getAutoPlay(); set default to auto play true -- angela EXT-5172 return true; }; @@ -2683,7 +2683,7 @@ void LLPanelFace::updateMediaSettings() // Auto scale - // set default to auto scale TRUE -- angela EXT-5172 + // set default to auto scale true -- angela EXT-5172 //value_bool = default_media_data.getAutoScale(); value_bool = true; struct functor_getter_auto_scale : public LLSelectedTEGetFunctor< bool > @@ -2696,7 +2696,7 @@ void LLPanelFace::updateMediaSettings() if (object->getTE(face)) if (object->getTE(face)->getMediaData()) return object->getTE(face)->getMediaData()->getAutoScale(); - // return mMediaEntry.getAutoScale(); set default to auto scale TRUE -- angela EXT-5172 + // return mMediaEntry.getAutoScale(); set default to auto scale true -- angela EXT-5172 return true; }; @@ -3393,9 +3393,9 @@ void LLPanelFace::onCommitGlow(LLUICtrl* ctrl, void* userdata) } // static -BOOL LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item) +bool LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item) { - BOOL accept = TRUE; + bool accept = true; for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++) { @@ -3403,7 +3403,7 @@ BOOL LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item) LLViewerObject* obj = node->getObject(); if (!LLToolDragAndDrop::isInventoryDropAcceptable(obj, item)) { - accept = FALSE; + accept = false; break; } } @@ -3459,9 +3459,9 @@ void LLPanelFace::onSelectPbr(const LLSD& data) } // static -BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item) +bool LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item) { - BOOL accept = TRUE; + bool accept = true; for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++) { @@ -3469,7 +3469,7 @@ BOOL LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item) LLViewerObject* obj = node->getObject(); if (!LLToolDragAndDrop::isInventoryDropAcceptable(obj, item)) { - accept = FALSE; + accept = false; break; } } @@ -4853,7 +4853,7 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) else if (full_perm) { // Either library, local or existed as fullperm when user made a copy - LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(imageid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(imageid, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); objectp->setTEImage(U8(te), image); } } diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index d6574bc092..825c4132bf 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -154,10 +154,10 @@ protected: void onCommitPbr(const LLSD& data); void onCancelPbr(const LLSD& data); void onSelectPbr(const LLSD& data); - static BOOL onDragPbr(LLUICtrl* ctrl, LLInventoryItem* item); + static bool onDragPbr(LLUICtrl* ctrl, LLInventoryItem* item); - // this function is to return TRUE if the drag should succeed. - static BOOL onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item); + // this function is to return true if the drag should succeed. + static bool onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item); void onCommitTexture(const LLSD& data); void onCancelTexture(const LLSD& data); diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index b07472486a..3ec0268797 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -68,8 +68,8 @@ static LLPanelInjector t_panel_group("panel_group_info_sidetray"); LLPanelGroupTab::LLPanelGroupTab() : LLPanel(), - mAllowEdit(TRUE), - mHasModal(FALSE) + mAllowEdit(true), + mHasModal(false) { mGroupID = LLUUID::null; } @@ -78,10 +78,10 @@ LLPanelGroupTab::~LLPanelGroupTab() { } -BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp) +bool LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp) { //default to being visible - return TRUE; + return true; } bool LLPanelGroupTab::postBuild() @@ -92,7 +92,7 @@ bool LLPanelGroupTab::postBuild() LLPanelGroup::LLPanelGroup() : LLPanel(), LLGroupMgrObserver( LLUUID() ), - mSkipRefresh(FALSE), + mSkipRefresh(false), mButtonJoin(NULL), mIsUsingTabContainer(false) // TabContainer switch { @@ -160,7 +160,7 @@ void LLPanelGroup::onOpen(const LLSD& key) if (target_tab) { target_tab->changeOpenClose(false); - target_tab->setFocus(TRUE); + target_tab->setFocus(true); target_tab->notifyParent(LLSD().with("action", "select_current")); } } @@ -638,7 +638,7 @@ bool LLPanelGroup::apply(LLPanelGroupTab* tab) } } - mSkipRefresh = TRUE; + mSkipRefresh = true; return true; } @@ -700,7 +700,7 @@ void LLPanelGroup::refreshData() { if(mSkipRefresh) { - mSkipRefresh = FALSE; + mSkipRefresh = false; return; } LLGroupMgr::getInstance()->clearGroupData(getID()); @@ -792,7 +792,7 @@ bool LLPanelGroup::handleKeyHere(KEY key, MASK mask) LLPanelGroupRoles* panel = dynamic_cast(getChild("groups_accordion")->getCurrentPanel()); if (panel) { - panel->getCurrentTab()->setSearchFilterFocus(TRUE); + panel->getCurrentTab()->setSearchFilterFocus(true); return true; } } @@ -801,7 +801,7 @@ bool LLPanelGroup::handleKeyHere(KEY key, MASK mask) LLAccordionCtrlTab* tab = getChild("groups_accordion")->getSelectedTab(); if (tab && tab->getName() == "group_roles_tab") { - tab->findChild("group_roles_tab_panel")->getCurrentTab()->setSearchFilterFocus(TRUE); + tab->findChild("group_roles_tab_panel")->getCurrentTab()->setSearchFilterFocus(true); return true; } } diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 6131ac2a80..1cebf82a2b 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -112,7 +112,7 @@ protected: LLTimer mRefreshTimer; - BOOL mSkipRefresh; + bool mSkipRefresh; std::string mDefaultNeedsApplyMesg; std::string mWantApplyMesg; @@ -143,7 +143,7 @@ public: virtual bool needsApply(std::string& mesg) { return false; } // Asks if there is currently a modal dialog being shown. - virtual BOOL hasModal() { return mHasModal; } + virtual bool hasModal() { return mHasModal; } // Request to apply current data. // If returning fail, this function should modify the message to the user. @@ -158,7 +158,7 @@ public: // This just connects the help button callback. virtual bool postBuild(); - virtual BOOL isVisibleByAgent(LLAgent* agentp); + virtual bool isVisibleByAgent(LLAgent* agentp); virtual void setGroupID(const LLUUID& id) {mGroupID = id;}; @@ -172,8 +172,8 @@ public: protected: LLUUID mGroupID; - BOOL mAllowEdit; - BOOL mHasModal; + bool mAllowEdit; + bool mHasModal; }; #endif // LL_LLPANELGROUP_H diff --git a/indra/newview/llpanelgroupbulk.cpp b/indra/newview/llpanelgroupbulk.cpp index cffda02aa0..4ef5f1c733 100644 --- a/indra/newview/llpanelgroupbulk.cpp +++ b/indra/newview/llpanelgroupbulk.cpp @@ -93,7 +93,7 @@ void LLPanelGroupBulkImpl::callbackClickAdd(void* userdata) LLView* button = panelp->findChild("add_button"); LLFloater* root_floater = gFloaterView->getParentFloater(panelp); LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( - boost::bind(callbackAddUsers, _1, panelp->mImplementation), TRUE, FALSE, FALSE, root_floater->getName(), button); + boost::bind(callbackAddUsers, _1, panelp->mImplementation), true, false, false, root_floater->getName(), button); if(picker) { root_floater->addDependentFloater(picker); @@ -181,12 +181,12 @@ void LLPanelGroupBulkImpl::handleRemove() } mBulkAgentList->deleteSelectedItems(); - mRemoveButton->setEnabled(FALSE); + mRemoveButton->setEnabled(false); if( mOKButton && mOKButton->getEnabled() && mBulkAgentList->isEmpty()) { - mOKButton->setEnabled(FALSE); + mOKButton->setEnabled(false); } } @@ -194,9 +194,9 @@ void LLPanelGroupBulkImpl::handleSelection() { std::vector selection = mBulkAgentList->getAllSelected(); if (selection.empty()) - mRemoveButton->setEnabled(FALSE); + mRemoveButton->setEnabled(false); else - mRemoveButton->setEnabled(TRUE); + mRemoveButton->setEnabled(true); } void LLPanelGroupBulkImpl::addUsers(const std::vector& names, const uuid_vec_t& agent_ids) @@ -241,7 +241,7 @@ void LLPanelGroupBulkImpl::addUsers(const std::vector& names, const // We've successfully added someone to the list. if(mOKButton && !mOKButton->getEnabled()) - mOKButton->setEnabled(TRUE); + mOKButton->setEnabled(true); } } @@ -273,7 +273,7 @@ void LLPanelGroupBulk::clear() mImplementation->mBulkAgentList->deleteAllItems(); if(mImplementation->mOKButton) - mImplementation->mOKButton->setEnabled(FALSE); + mImplementation->mOKButton->setEnabled(false); } void LLPanelGroupBulk::update() diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp index c047ffb270..847a895bb8 100644 --- a/indra/newview/llpanelgroupbulkban.cpp +++ b/indra/newview/llpanelgroupbulkban.cpp @@ -66,7 +66,7 @@ bool LLPanelGroupBulkBan::postBuild() mImplementation->mBulkAgentList = getChild("banned_agent_list", recurse); if ( mImplementation->mBulkAgentList ) { - mImplementation->mBulkAgentList->setCommitOnSelectionChange(TRUE); + mImplementation->mBulkAgentList->setCommitOnSelectionChange(true); mImplementation->mBulkAgentList->setCommitCallback(LLPanelGroupBulkImpl::callbackSelect, mImplementation); } @@ -163,12 +163,12 @@ void LLPanelGroupBulkBan::submit() // remove already banned users and yourself from request. std::vector banned_avatar_names; std::vector out_of_limit_names; - bool banning_self = FALSE; + bool banning_self = false; std::vector::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgent.getID()); if (conflict != banned_agent_list.end()) { banned_agent_list.erase(conflict); - banning_self = TRUE; + banning_self = true; } if (group_datap) { diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp index df041fa486..01057aaeb0 100644 --- a/indra/newview/llpanelgroupcreate.cpp +++ b/indra/newview/llpanelgroupcreate.cpp @@ -89,8 +89,8 @@ bool LLPanelGroupCreate::postBuild() mGroupNameEditor->setPrevalidate(LLTextValidate::validateASCIINoLeadingSpace); mInsignia = getChild("insignia", true); - mInsignia->setAllowLocalTexture(FALSE); - mInsignia->setCanApplyImmediately(FALSE); + mInsignia->setAllowLocalTexture(false); + mInsignia->setCanApplyImmediately(false); return true; } diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index bbb9b2c0cc..c73e52e993 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -77,8 +77,8 @@ static F32 sAllTime = 0.0f; LLPanelGroupGeneral::LLPanelGroupGeneral() : LLPanelGroupTab(), - mChanged(FALSE), - mFirstUse(TRUE), + mChanged(false), + mFirstUse(true), mGroupNameEditor(NULL), mFounderName(NULL), mInsignia(NULL), @@ -94,7 +94,7 @@ LLPanelGroupGeneral::LLPanelGroupGeneral() mComboActiveTitle(NULL), mCtrlReceiveGroupChat(NULL), // // Re-add group member list on general panel - mPendingMemberUpdate(FALSE), + mPendingMemberUpdate(false), mListVisibleMembers(NULL) // { @@ -130,7 +130,7 @@ bool LLPanelGroupGeneral::postBuild() // set up callbacks for copy URI and name buttons childSetCommitCallback("copy_uri", boost::bind(&LLPanelGroupGeneral::onCopyURI, this), NULL); childSetCommitCallback("copy_name", boost::bind(&LLPanelGroupGeneral::onCopyName, this), NULL); - childSetEnabled("copy_name", FALSE); + childSetEnabled("copy_name", false); // // Re-add group member list on general panel @@ -161,7 +161,7 @@ bool LLPanelGroupGeneral::postBuild() if (gAgent.isTeen()) { // Teens don't get to set mature flag. JC - mComboMature->setVisible(FALSE); + mComboMature->setVisible(false); mComboMature->setCurrentByIndex(NON_MATURE_CONTENT); } } @@ -261,7 +261,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group) if (mInsignia) { mInsignia->setCommitCallback(onCommitAny, this); - mInsignia->setAllowLocalTexture(FALSE); + mInsignia->setAllowLocalTexture(false); } mFounderName = getChild("founder_name"); @@ -292,7 +292,7 @@ void LLPanelGroupGeneral::onCommitAny(LLUICtrl* ctrl, void* data) void LLPanelGroupGeneral::onCommitUserOnly(LLUICtrl* ctrl, void* data) { LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data; - self->mChanged = TRUE; + self->mChanged = true; self->notifyObservers(); } @@ -318,11 +318,11 @@ void LLPanelGroupGeneral::onCommitEnrollment(LLUICtrl* ctrl, void* data) if (self->mCtrlEnrollmentFee->get()) { - self->mSpinEnrollmentFee->setEnabled(TRUE); + self->mSpinEnrollmentFee->setEnabled(true); } else { - self->mSpinEnrollmentFee->setEnabled(FALSE); + self->mSpinEnrollmentFee->setEnabled(false); self->mSpinEnrollmentFee->set(0); } } @@ -361,9 +361,9 @@ void LLPanelGroupGeneral::activate() LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); } - mFirstUse = FALSE; + mFirstUse = false; } - mChanged = FALSE; + mChanged = false; update(GC_ALL); } @@ -394,7 +394,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) mComboActiveTitle->resetDirty(); } - BOOL has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY); + bool has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY); if (has_power_in_group) { @@ -434,7 +434,7 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) } else { - gdatap->mMaturePublish = FALSE; + gdatap->mMaturePublish = false; } } if (mCtrlShowInGroupList) gdatap->mShowInList = mCtrlShowInGroupList->get(); @@ -458,8 +458,8 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) } } - BOOL receive_notices = false; - BOOL list_in_profile = false; + bool receive_notices = false; + bool list_in_profile = false; if (mCtrlReceiveNotices) receive_notices = mCtrlReceiveNotices->get(); if (mCtrlListGroup) @@ -483,14 +483,14 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) resetDirty(); - mChanged = FALSE; + mChanged = false; return true; } void LLPanelGroupGeneral::cancel() { - mChanged = FALSE; + mChanged = false; //cancel out all of the click changes to, although since we are //shifting tabs or closing the floater, this need not be done...yet @@ -560,11 +560,11 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) if (1 == gdatap->mTitles.size()) { // Only the everyone title. Don't bother letting them try changing this. - mComboActiveTitle->setEnabled(FALSE); + mComboActiveTitle->setEnabled(false); } else { - mComboActiveTitle->setEnabled(TRUE); + mComboActiveTitle->setEnabled(true); } std::vector::const_iterator citer = gdatap->mTitles.begin(); @@ -661,7 +661,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) if (mInsignia) mInsignia->setEnabled(mAllowEdit && can_change_ident); if (mEditCharter) mEditCharter->setEnabled(mAllowEdit && can_change_ident); - if (mGroupNameEditor) mGroupNameEditor->setVisible(FALSE); + if (mGroupNameEditor) mGroupNameEditor->setVisible(false); if (mFounderName) mFounderName->setText(LLSLURL("agent", gdatap->mFounderID, "inspect").getSLURLString()); if (mInsignia) { @@ -689,7 +689,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) if (gdatap->isMemberDataComplete()) { mMemberProgress = gdatap->mMembers.begin(); - mPendingMemberUpdate = TRUE; + mPendingMemberUpdate = true; mIteratorGroup = mGroupID; // FIRE-6074 sSDTime = 0.0f; @@ -705,7 +705,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) row["columns"][0]["value"] = pending.str(); row["columns"][0]["column"] = "name"; - mListVisibleMembers->setEnabled(FALSE); + mListVisibleMembers->setEnabled(false); mListVisibleMembers->addElement(row); } } @@ -740,13 +740,13 @@ void LLPanelGroupGeneral::updateChanged() mCtrlReceiveGroupChat // }; - mChanged = FALSE; + mChanged = false; for( size_t i=0; iisDirty() ) { - mChanged = TRUE; + mChanged = true; break; } } @@ -767,17 +767,17 @@ void LLPanelGroupGeneral::reset() mCtrlListGroup->setEnabled(false); - mGroupNameEditor->setEnabled(TRUE); - mEditCharter->setEnabled(TRUE); + mGroupNameEditor->setEnabled(true); + mEditCharter->setEnabled(true); mCtrlShowInGroupList->setEnabled(false); - mComboMature->setEnabled(TRUE); + mComboMature->setEnabled(true); - mCtrlOpenEnrollment->setEnabled(TRUE); + mCtrlOpenEnrollment->setEnabled(true); - mCtrlEnrollmentFee->setEnabled(TRUE); + mCtrlEnrollmentFee->setEnabled(true); - mSpinEnrollmentFee->setEnabled(TRUE); + mSpinEnrollmentFee->setEnabled(true); mSpinEnrollmentFee->set((F32)0); mGroupNameEditor->setVisible(true); @@ -809,7 +809,7 @@ void LLPanelGroupGeneral::reset() row["columns"][0]["column"] = "name"; mListVisibleMembers->deleteAllItems(); - mListVisibleMembers->setEnabled(FALSE); + mListVisibleMembers->setEnabled(false); mListVisibleMembers->addElement(row); } // @@ -870,10 +870,10 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id) groupKeyEditor->setValue(LLSD()); if (copyURIButton) - copyURIButton->setEnabled(FALSE); + copyURIButton->setEnabled(false); if (copyNameButton) - copyNameButton->setEnabled(FALSE); + copyNameButton->setEnabled(false); // reset(); @@ -886,11 +886,11 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id) // activate copy URI button if (copyURIButton) - copyURIButton->setEnabled(TRUE); + copyURIButton->setEnabled(true); // - BOOL accept_notices = FALSE; - BOOL list_in_profile = FALSE; + bool accept_notices = false; + bool list_in_profile = false; LLGroupData data; if(gAgent.getGroupData(mGroupID,data)) { @@ -975,7 +975,7 @@ void LLPanelGroupGeneral::openProfile(void* data) void LLPanelGroupGeneral::updateMembers() { - mPendingMemberUpdate = FALSE; + mPendingMemberUpdate = false; LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); @@ -1042,12 +1042,12 @@ void LLPanelGroupGeneral::updateMembers() if (mMemberProgress == gdatap->mMembers.end()) { LL_DEBUGS() << " member list completed." << LL_ENDL; - mListVisibleMembers->setEnabled(TRUE); + mListVisibleMembers->setEnabled(true); } else { - mPendingMemberUpdate = TRUE; - mListVisibleMembers->setEnabled(FALSE); + mPendingMemberUpdate = true; + mListVisibleMembers->setEnabled(false); } } diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 91df546251..0f6534b763 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -93,8 +93,8 @@ private: void updateChanged(); bool confirmMatureApply(const LLSD& notification, const LLSD& response); - BOOL mChanged; - BOOL mFirstUse; + bool mChanged; + bool mFirstUse; std::string mIncompleteMemberDataStr; // Group information (include any updates in updateChanged) @@ -130,7 +130,7 @@ private: typedef std::unordered_map avatar_name_cache_connection_map_t; avatar_name_cache_connection_map_t mAvatarNameCacheConnections; - BOOL mPendingMemberUpdate; + bool mPendingMemberUpdate; LLNameListCtrl* mListVisibleMembers; // }; diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index b481cb07c3..6955bfd439 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -253,7 +253,7 @@ void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap) //else if they have the limited add to roles power //we add every role the user is in, //else we just add to everyone - bool is_owner = FALSE; + bool is_owner = false; bool can_assign_any = gAgent.hasPowerInGroup(mGroupID, GP_ROLE_ASSIGN_MEMBER); bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID, @@ -314,7 +314,7 @@ void LLPanelGroupInvite::impl::callbackClickAdd(void* userdata) LLView * button = panelp->findChild("add_button"); LLFloater * root_floater = gFloaterView->getParentFloater(panelp); LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( - boost::bind(impl::callbackAddUsers, _1, panelp->mImplementation), TRUE, FALSE, FALSE, root_floater->getName(), button); + boost::bind(impl::callbackAddUsers, _1, panelp->mImplementation), true, false, false, root_floater->getName(), button); if (picker) { root_floater->addDependentFloater(picker); @@ -345,7 +345,7 @@ void LLPanelGroupInvite::impl::handleRemove() // Remove all selected invitees. mInvitees->deleteSelectedItems(); - mRemoveButton->setEnabled(FALSE); + mRemoveButton->setEnabled(false); } // static @@ -363,11 +363,11 @@ void LLPanelGroupInvite::impl::handleSelection() mInvitees->getAllSelected(); if (selection.empty()) { - mRemoveButton->setEnabled(FALSE); + mRemoveButton->setEnabled(false); } else { - mRemoveButton->setEnabled(TRUE); + mRemoveButton->setEnabled(true); } } @@ -443,7 +443,7 @@ void LLPanelGroupInvite::impl::onAvatarNameCache(const LLUUID& agent_id, LLPanelGroupInvite::LLPanelGroupInvite(const LLUUID& group_id) : LLPanel(), mImplementation(new impl(group_id)), - mPendingUpdate(FALSE) + mPendingUpdate(false) { // Pass on construction of this panel to the control factory. buildFromFile( "panel_group_invite.xml"); @@ -467,7 +467,7 @@ void LLPanelGroupInvite::clear() mImplementation->mInvitees->deleteAllItems(); mImplementation->mRoleNames->clear(); mImplementation->mRoleNames->removeall(); - mImplementation->mOKButton->setEnabled(FALSE); + mImplementation->mOKButton->setEnabled(false); mImplementation->mInviteeIDs.clear(); } @@ -544,7 +544,7 @@ void LLPanelGroupInvite::draw() void LLPanelGroupInvite::update() { - mPendingUpdate = FALSE; + mPendingUpdate = false; if (mImplementation->mGroupName) { mImplementation->mGroupName->setText(mImplementation->mLoadingText); @@ -638,14 +638,14 @@ void LLPanelGroupInvite::updateLists() LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID); } } - mPendingUpdate = TRUE; + mPendingUpdate = true; } else { - mPendingUpdate = FALSE; + mPendingUpdate = false; if (mImplementation->mOKButton && mImplementation->mRoleNames->getItemCount()) { - mImplementation->mOKButton->setEnabled(TRUE); + mImplementation->mOKButton->setEnabled(true); } } } diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h index d41e8a3097..16fea8040c 100644 --- a/indra/newview/llpanelgroupinvite.h +++ b/indra/newview/llpanelgroupinvite.h @@ -54,7 +54,7 @@ protected: class impl; impl* mImplementation; - BOOL mPendingUpdate; + bool mPendingUpdate; LLUUID mStoreSelected; void updateLists(); }; diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index bcc5be1a06..d51daa4c3f 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -737,7 +737,7 @@ bool LLPanelGroupLandMoney::postBuild() { mImplementationp->mGroupParcelsp->setCommentText( mImplementationp->mCantViewParcelsText); - mImplementationp->mGroupParcelsp->setEnabled(FALSE); + mImplementationp->mGroupParcelsp->setEnabled(false); } } @@ -832,7 +832,7 @@ void LLPanelGroupLandMoney::onLandSelectionChanged() mImplementationp->mMapButtonp->setEnabled( mImplementationp->mGroupParcelsp->getItemCount() > 0 ); } -BOOL LLPanelGroupLandMoney::isVisibleByAgent(LLAgent* agentp) +bool LLPanelGroupLandMoney::isVisibleByAgent(LLAgent* agentp) { return mAllowEdit && agentp->isInGroup(mGroupID); } @@ -1573,12 +1573,12 @@ void LLPanelGroupLandMoney::setGroupID(const LLUUID& id) if ( mImplementationp->mGroupOverLimitTextp ) { - mImplementationp->mGroupOverLimitTextp->setVisible(FALSE); + mImplementationp->mGroupOverLimitTextp->setVisible(false); } if ( mImplementationp->mGroupOverLimitIconp ) { - mImplementationp->mGroupOverLimitIconp->setVisible(FALSE); + mImplementationp->mGroupOverLimitIconp->setVisible(false); } if ( mImplementationp->mGroupParcelsp ) @@ -1588,7 +1588,7 @@ void LLPanelGroupLandMoney::setGroupID(const LLUUID& id) if ( !can_view && mImplementationp->mGroupParcelsp ) { - mImplementationp->mGroupParcelsp->setEnabled(FALSE); + mImplementationp->mGroupParcelsp->setEnabled(false); } diff --git a/indra/newview/llpanelgrouplandmoney.h b/indra/newview/llpanelgrouplandmoney.h index 0df34d26ba..3a818ecc40 100644 --- a/indra/newview/llpanelgrouplandmoney.h +++ b/indra/newview/llpanelgrouplandmoney.h @@ -37,7 +37,7 @@ public: LLPanelGroupLandMoney(); virtual ~LLPanelGroupLandMoney(); virtual bool postBuild(); - virtual BOOL isVisibleByAgent(LLAgent* agentp); + virtual bool isVisibleByAgent(LLAgent* agentp); virtual void activate(); virtual bool needsApply(std::string& mesg); diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index c88a9396d7..408b89765e 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -236,7 +236,7 @@ LLPanelGroupNotices::~LLPanelGroupNotices() } -BOOL LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp) +bool LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp) { return mAllowEdit && agentp->hasPowerInGroup(mGroupID, GP_NOTICES_SEND | GP_NOTICES_RECEIVE); @@ -247,7 +247,7 @@ bool LLPanelGroupNotices::postBuild() constexpr bool recurse = true; mNoticesList = getChild("notice_list",recurse); - mNoticesList->setCommitOnSelectionChange(TRUE); + mNoticesList->setCommitOnSelectionChange(true); mNoticesList->setCommitCallback(onSelectNotice, this); mBtnNewMessage = getChild("create_new_notice",recurse); @@ -315,15 +315,15 @@ void LLPanelGroupNotices::activate() mPrevSelectedNotice = LLUUID(); - BOOL can_send = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND); - BOOL can_receive = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_RECEIVE); + bool can_send = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND); + bool can_receive = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_RECEIVE); mPanelViewNotice->setEnabled(can_receive); mPanelCreateNotice->setEnabled(can_send); // Always disabled to stop direct editing of attachment names - mCreateInventoryName->setEnabled(FALSE); - mViewInventoryName->setEnabled(FALSE); + mCreateInventoryName->setEnabled(false); + mViewInventoryName->setEnabled(false); // If we can receive notices, grab them right away. if (can_receive) @@ -336,10 +336,10 @@ void LLPanelGroupNotices::setItem(LLPointer inv_item) { mInventoryItem = inv_item; - BOOL item_is_multi = FALSE; + bool item_is_multi = false; if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) { - item_is_multi = TRUE; + item_is_multi = true; }; std::string icon_name = LLInventoryIcon::getIconName(inv_item->getType(), @@ -349,13 +349,13 @@ void LLPanelGroupNotices::setItem(LLPointer inv_item) // Doesn't exist as of 2015-11-27 //mCreateInventoryIcon->setValue(icon_name); - //mCreateInventoryIcon->setVisible(TRUE); + //mCreateInventoryIcon->setVisible(true); std::stringstream ss; ss << " " << mInventoryItem->getName(); mCreateInventoryName->setText(ss.str()); - mBtnRemoveAttachment->setEnabled(TRUE); + mBtnRemoveAttachment->setEnabled(true); } void LLPanelGroupNotices::onClickRemoveAttachment(void* data) @@ -363,8 +363,8 @@ void LLPanelGroupNotices::onClickRemoveAttachment(void* data) LLPanelGroupNotices* self = (LLPanelGroupNotices*)data; self->mInventoryItem = NULL; self->mCreateInventoryName->clear(); - //self->mCreateInventoryIcon->setVisible(FALSE); // Doesn't exist as of 2015-11-27 - self->mBtnRemoveAttachment->setEnabled(FALSE); + //self->mCreateInventoryIcon->setVisible(false); // Doesn't exist as of 2015-11-27 + self->mBtnRemoveAttachment->setEnabled(false); } //static @@ -374,7 +374,7 @@ void LLPanelGroupNotices::onClickOpenAttachment(void* data) self->mInventoryOffer->forceResponse(IOR_ACCEPT); self->mInventoryOffer = NULL; - self->mBtnOpenAttachment->setEnabled(FALSE); + self->mBtnOpenAttachment->setEnabled(false); } void LLPanelGroupNotices::onClickSendMessage(void* data) @@ -444,7 +444,7 @@ void LLPanelGroupNotices::onClickNewMessage(void* data) self->mCreateSubject->clear(); self->mCreateMessage->clear(); if (self->mInventoryItem) onClickRemoveAttachment(self); - self->mNoticesList->deselectAllItems(TRUE); // TRUE == don't commit on chnage + self->mNoticesList->deselectAllItems(true); // true == don't commit on chnage } void LLPanelGroupNotices::refreshNotices() @@ -516,7 +516,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) S32 i=0; S32 count = msg->getNumberOfBlocks("Data"); - mNoticesList->setEnabled(TRUE); + mNoticesList->setEnabled(true); //save sort state and set unsorted state to prevent unnecessary //sorting while adding notices @@ -531,7 +531,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) { // Only one entry, the dummy entry. mNoticesList->setCommentText(mNoNoticesStr); - mNoticesList->setEnabled(FALSE); + mNoticesList->setEnabled(false); return; } @@ -658,19 +658,19 @@ void LLPanelGroupNotices::showNotice(const std::string& subject, // Doesn't exist as of 2015-11-27 //mViewInventoryIcon->setValue(icon_name); - //mViewInventoryIcon->setVisible(TRUE); + //mViewInventoryIcon->setVisible(true); std::stringstream ss; ss << " " << inventory_name; mViewInventoryName->setText(ss.str()); - mBtnOpenAttachment->setEnabled(TRUE); + mBtnOpenAttachment->setEnabled(true); } else { mViewInventoryName->clear(); - //mViewInventoryIcon->setVisible(FALSE); // Doesn't exist as of 2015-11-27 - mBtnOpenAttachment->setEnabled(FALSE); + //mViewInventoryIcon->setVisible(falseALSE); // Doesn't exist as of 2015-11-27 + mBtnOpenAttachment->setEnabled(false); } } @@ -678,14 +678,14 @@ void LLPanelGroupNotices::arrangeNoticeView(ENoticeView view_type) { if (CREATE_NEW_NOTICE == view_type) { - mPanelCreateNotice->setVisible(TRUE); - mPanelViewNotice->setVisible(FALSE); + mPanelCreateNotice->setVisible(true); + mPanelViewNotice->setVisible(false); } else { - mPanelCreateNotice->setVisible(FALSE); - mPanelViewNotice->setVisible(TRUE); - mBtnOpenAttachment->setEnabled(FALSE); + mPanelCreateNotice->setVisible(false); + mPanelViewNotice->setVisible(true); + mBtnOpenAttachment->setEnabled(false); } } void LLPanelGroupNotices::setGroupID(const LLUUID& id) diff --git a/indra/newview/llpanelgroupnotices.h b/indra/newview/llpanelgroupnotices.h index 78ad078b63..a272019340 100644 --- a/indra/newview/llpanelgroupnotices.h +++ b/indra/newview/llpanelgroupnotices.h @@ -51,7 +51,7 @@ public: //virtual void update(); virtual bool postBuild(); - virtual BOOL isVisibleByAgent(LLAgent* agentp); + virtual bool isVisibleByAgent(LLAgent* agentp); void setItem(LLPointer inv_item); diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 43064a3b04..794b95b60b 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -124,7 +124,7 @@ LLPanelGroupRoles::LLPanelGroupRoles() mCurrentTab(NULL), mRequestedTab( NULL ), mSubTabContainer( NULL ), - mFirstUse( TRUE ) + mFirstUse( true ) { } @@ -182,7 +182,7 @@ bool LLPanelGroupRoles::postBuild() return LLPanelGroupTab::postBuild(); } -BOOL LLPanelGroupRoles::isVisibleByAgent(LLAgent* agentp) +bool LLPanelGroupRoles::isVisibleByAgent(LLAgent* agentp) { /* This power was removed to make group roles simpler return agentp->hasPowerInGroup(mGroupID, @@ -226,9 +226,9 @@ bool LLPanelGroupRoles::handleSubTabSwitch(const LLSD& data) args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; LLNotificationsUtil::add("PanelGroupApply", args, LLSD(), boost::bind(&LLPanelGroupRoles::handleNotifyCallback, this, _1, _2)); - mHasModal = TRUE; + mHasModal = true; - // Returning FALSE will block a close action from finishing until + // Returning false will block a close action from finishing until // we get a response back from the user. return false; } @@ -258,7 +258,7 @@ void LLPanelGroupRoles::transitionToTab() bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - mHasModal = FALSE; + mHasModal = false; LLPanelGroupTab* transition_tab = mRequestedTab; switch (option) { @@ -271,7 +271,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS // There was a problem doing the apply. if ( !apply_mesg.empty() ) { - mHasModal = TRUE; + mHasModal = true; LLSD args; args["MESSAGE"] = apply_mesg; LLNotificationsUtil::add("GenericAlert", args, LLSD(), boost::bind(&LLPanelGroupRoles::onModalClose, this, _1, _2)); @@ -301,7 +301,7 @@ bool LLPanelGroupRoles::handleNotifyCallback(const LLSD& notification, const LLS bool LLPanelGroupRoles::onModalClose(const LLSD& notification, const LLSD& response) { - mHasModal = FALSE; + mHasModal = false; return false; } @@ -374,7 +374,7 @@ void LLPanelGroupRoles::activate() LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mGroupID); } - mFirstUse = FALSE; + mFirstUse = false; LLPanelGroupTab* panelp = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); if (panelp) panelp->activate(); @@ -394,12 +394,12 @@ bool LLPanelGroupRoles::needsApply(std::string& mesg) return panelp->needsApply(mesg); } -BOOL LLPanelGroupRoles::hasModal() +bool LLPanelGroupRoles::hasModal() { - if (mHasModal) return TRUE; + if (mHasModal) return true; LLPanelGroupTab* panelp = (LLPanelGroupTab*) mSubTabContainer->getCurrentPanel(); - if (!panelp) return FALSE; + if (!panelp) return false; return panelp->hasModal(); } @@ -428,7 +428,7 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id) // [/FS:CR] if(mSubTabContainer) mSubTabContainer->selectTab(1); - group_roles_tab->mFirstOpen = TRUE; + group_roles_tab->mFirstOpen = true; activate(); } @@ -454,7 +454,7 @@ LLPanelGroupSubTab::~LLPanelGroupSubTab() { } -BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupSubTab::postBuildSubTab(LLView* root) { // Get icons for later use. mActionIcons.clear(); @@ -473,7 +473,7 @@ BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root) { mActionIcons["partial"] = getString("power_partial_icon"); } - return TRUE; + return true; } bool LLPanelGroupSubTab::postBuild() @@ -514,15 +514,15 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter) void LLPanelGroupSubTab::activate() { - setOthersVisible(TRUE); + setOthersVisible(true); } void LLPanelGroupSubTab::deactivate() { - setOthersVisible(FALSE); + setOthersVisible(false); } -void LLPanelGroupSubTab::setOthersVisible(BOOL b) +void LLPanelGroupSubTab::setOthersVisible(bool b) { if (mHeader) { @@ -558,9 +558,9 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl, U64 allowed_by_some, U64 allowed_by_all, LLUICtrl::commit_callback_t commit_callback, - BOOL show_all, - BOOL filter, - BOOL is_owner_role) + bool show_all, + bool filter, + bool is_owner_role) { if (LLGroupMgr::getInstance()->mRoleActionSets.empty()) { @@ -590,9 +590,9 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, U64 allowed_by_all, LLRoleActionSet* action_set, LLUICtrl::commit_callback_t commit_callback, - BOOL show_all, - BOOL filter, - BOOL is_owner_role) + bool show_all, + bool filter, + bool is_owner_role) { LL_DEBUGS() << "Building role list for: " << action_set->mActionSetData->mName << LL_ENDL; // See if the allow mask matches anything in this category. @@ -628,7 +628,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, std::vector::iterator ra_end = action_set->mActions.end(); bool items_match_filter = false; - BOOL can_change_actions = (!is_owner_role && gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CHANGE_ACTIONS)); + bool can_change_actions = (!is_owner_role && gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CHANGE_ACTIONS)); for ( ; ra_it != ra_end; ++ra_it) { @@ -739,26 +739,26 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, if (show_all) { - check->setTentative(FALSE); + check->setTentative(false); if (allowed_by_some & (*ra_it)->mPowerBit) { - check->set(TRUE); + check->set(true); } else { - check->set(FALSE); + check->set(false); } } else { - check->set(TRUE); + check->set(true); if (show_full_strength) { - check->setTentative(FALSE); + check->setTentative(false); } else { - check->setTentative(TRUE); + check->setTentative(true); } } @@ -781,7 +781,7 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, } } -void LLPanelGroupSubTab::setFooterEnabled(BOOL enable) +void LLPanelGroupSubTab::setFooterEnabled(bool enable) { if (mFooter) { @@ -790,7 +790,7 @@ void LLPanelGroupSubTab::setFooterEnabled(BOOL enable) } // CTRL-F focusses local search editor -void LLPanelGroupSubTab::setSearchFilterFocus(BOOL focus) +void LLPanelGroupSubTab::setSearchFilterFocus(bool focus) { mSearchEditor->setFocus(focus); } @@ -804,9 +804,9 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() mMembersList(NULL), mAssignedRolesList(NULL), mAllowedActionsList(NULL), - mChanged(FALSE), - mPendingMemberUpdate(FALSE), - mHasMatch(FALSE), + mChanged(false), + mPendingMemberUpdate(false), + mHasMatch(false), mNumOwnerAdditions(0) { } @@ -827,7 +827,7 @@ LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() } } -BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) { LLPanelGroupSubTab::postBuildSubTab(root); @@ -845,15 +845,15 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) // Undo changes from MAINT-2929 //mActionDescription = parent->getChild("member_action_description", recurse); - //if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList || !mActionDescription) return FALSE; + //if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList || !mActionDescription) return false; - //mAllowedActionsList->setCommitOnSelectionChange(TRUE); + //mAllowedActionsList->setCommitOnSelectionChange(true); //mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupMembersSubTab::updateActionDescription, this)); - if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList) return FALSE; + if (!mMembersList || !mAssignedRolesList || !mAllowedActionsList) return false; // // We want to be notified whenever a member is selected. - mMembersList->setCommitOnSelectionChange(TRUE); + mMembersList->setCommitOnSelectionChange(true); mMembersList->setCommitCallback(onMemberSelect, this); // Show the member's profile on double click. mMembersList->setDoubleClickCallback(onMemberDoubleClick, this); @@ -871,7 +871,7 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) std::string order_by = gSavedSettings.getString("GroupMembersSortOrder"); if(!order_by.empty()) { - mMembersList->sortByColumn(order_by, TRUE); + mMembersList->sortByColumn(order_by, true); } LLButton* button = parent->getChild("member_invite", recurse); @@ -893,17 +893,17 @@ BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root) if ( mEjectBtn ) { mEjectBtn->setClickedCallback(onEjectMembers, this); - mEjectBtn->setEnabled(FALSE); + mEjectBtn->setEnabled(false); } mBanBtn = parent->getChild("member_ban", recurse); if(mBanBtn) { mBanBtn->setClickedCallback(onBanMember, this); - mBanBtn->setEnabled(FALSE); + mBanBtn->setEnabled(false); } - return TRUE; + return true; } void LLPanelGroupMembersSubTab::setGroupID(const LLUUID& id) @@ -971,9 +971,9 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() allowed_by_some, allowed_by_all, NULL, - FALSE, - FALSE, - FALSE); + false, + false, + false); ////////////////////////////////// // Build the assigned roles list. @@ -982,9 +982,9 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() LLGroupMgrGroupData::role_list_t::iterator iter = gdatap->mRoles.begin(); LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end(); - BOOL can_ban_members = gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS); - BOOL can_eject_members = gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT); - BOOL member_is_owner = FALSE; + bool can_ban_members = gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS); + bool can_eject_members = gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT); + bool member_is_owner = false; for( ; iter != end; ++iter) { @@ -994,14 +994,14 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() if (group_role_data) { - const BOOL needs_sort = FALSE; + const bool needs_sort = false; S32 count = group_role_data->getMembersInRole( selected_members, needs_sort); //check if the user has permissions to assign/remove //members to/from the role (but the ability to add/remove //should only be based on the "saved" changes to the role //not in the temp/meta data. -jwolk - BOOL cb_enable = ( (count > 0) ? + bool cb_enable = ( (count > 0) ? agentCanRemoveFromRole(mGroupID, role_id) : agentCanAddToRole(mGroupID, role_id) ); @@ -1029,8 +1029,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() if ( member_data && member_data->isInRole(gdatap->mOwnerRole) ) { // Can't remove other owners. - cb_enable = FALSE; - can_ban_members = FALSE; + cb_enable = false; + can_ban_members = false; break; } } @@ -1052,10 +1052,10 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() // If anyone selected is in any role besides 'Everyone' then they can't be ejected. if (role_id.notNull() && (count > 0)) { - can_eject_members = FALSE; + can_eject_members = false; if (role_id == gdatap->mOwnerRole) { - member_is_owner = TRUE; + member_is_owner = true; } } @@ -1111,12 +1111,12 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() LL_WARNS() << "No group role data for " << iter->second << LL_ENDL; } } - mAssignedRolesList->setEnabled(TRUE); + mAssignedRolesList->setEnabled(true); if (gAgent.isGodlike()) { - can_eject_members = TRUE; - // can_ban_members = TRUE; + can_eject_members = true; + // can_ban_members = true; } if (!can_eject_members && !member_is_owner) @@ -1129,8 +1129,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() if ( member_data && member_data->isInRole(gdatap->mOwnerRole) ) { - can_eject_members = TRUE; - //can_ban_members = TRUE; + can_eject_members = true; + //can_ban_members = true; } } @@ -1142,12 +1142,12 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() { if( gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT)) { - can_eject_members = TRUE; + can_eject_members = true; } if( gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS)) { - can_ban_members = TRUE; + can_ban_members = true; } } @@ -1159,8 +1159,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() // Don't count the agent. if ((*member_iter) == gAgent.getID()) { - can_eject_members = FALSE; - can_ban_members = FALSE; + can_eject_members = false; + can_ban_members = false; } } @@ -1295,7 +1295,7 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id, U64 powers_all_have = GP_ALL_POWERS; U64 powers_some_have = 0; - BOOL is_owner_role = ( gdatap->mOwnerRole == role_id ); + bool is_owner_role = ( gdatap->mOwnerRole == role_id ); LLUUID member_id; std::vector selection = mMembersList->getAllSelected(); @@ -1367,9 +1367,9 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id, powers_some_have, powers_all_have, NULL, - FALSE, - FALSE, - FALSE); + false, + false, + false); } // static @@ -1452,7 +1452,7 @@ void LLPanelGroupMembersSubTab::cancel() DeletePairedPointer()); mMemberRoleChangeData.clear(); - mChanged = FALSE; + mChanged = false; notifyObservers(); } } @@ -1479,7 +1479,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg) if ( gdatap->getRoleData(gdatap->mOwnerRole, rd) ) { - mHasModal = TRUE; + mHasModal = true; args["ROLE_NAME"] = rd.mRoleName; LLNotificationsUtil::add("AddGroupOwnerWarning", args, @@ -1507,7 +1507,7 @@ bool LLPanelGroupMembersSubTab::apply(std::string& mesg) bool LLPanelGroupMembersSubTab::addOwnerCB(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - mHasModal = FALSE; + mHasModal = false; if (0 == option) { @@ -1550,7 +1550,7 @@ void LLPanelGroupMembersSubTab::applyMemberChanges() //force a UI update handleMemberSelect(); - mChanged = FALSE; + mChanged = false; mNumOwnerAdditions = 0; notifyObservers(); } @@ -1718,8 +1718,8 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) && gdatap->isRoleMemberDataComplete()) { mMemberProgress = gdatap->mMembers.begin(); - mPendingMemberUpdate = TRUE; - mHasMatch = FALSE; + mPendingMemberUpdate = true; + mHasMatch = false; } else { @@ -1748,7 +1748,7 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) // Still busy retreiving role/member mappings. retrieved << "Retrieving role member mappings..."; } - mMembersList->setEnabled(FALSE); + mMembersList->setEnabled(false); mMembersList->setCommentText(retrieved.str()); } } @@ -1774,7 +1774,7 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) mMembersList->addNameItemRow(item_params); - mHasMatch = TRUE; + mHasMatch = true; } void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id) @@ -1806,7 +1806,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb addMemberToList(member); if(!mMembersList->getEnabled()) { - mMembersList->setEnabled(TRUE); + mMembersList->setEnabled(true); } } @@ -1814,7 +1814,7 @@ void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemb void LLPanelGroupMembersSubTab::updateMembers() { - mPendingMemberUpdate = FALSE; + mPendingMemberUpdate = false; // Rebuild the members list. @@ -1893,17 +1893,17 @@ void LLPanelGroupMembersSubTab::updateMembers() { if (mHasMatch) { - mMembersList->setEnabled(TRUE); + mMembersList->setEnabled(true); } else if (gdatap->mMembers.size()) { - mMembersList->setEnabled(FALSE); + mMembersList->setEnabled(false); mMembersList->setCommentText(std::string("No match.")); } } else { - mPendingMemberUpdate = TRUE; + mPendingMemberUpdate = true; } // This should clear the other two lists, since nothing is selected. @@ -2067,8 +2067,8 @@ LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab() mDeleteRoleButton(NULL), mCopyRoleButton(NULL), mCreateRoleButton(NULL), - mFirstOpen(TRUE), - mHasRoleChange(FALSE) + mFirstOpen(true), + mHasRoleChange(false) { } @@ -2076,7 +2076,7 @@ LLPanelGroupRolesSubTab::~LLPanelGroupRolesSubTab() { } -BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) { LLPanelGroupSubTab::postBuildSubTab(root); @@ -2104,7 +2104,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) || !mRoleName || !mRoleTitle || !mRoleDescription || !mMemberVisibleCheck) { LL_WARNS() << "ARG! element not found." << LL_ENDL; - return FALSE; + return false; } mRemoveEveryoneTxt = getString("cant_delete_role"); @@ -2114,7 +2114,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) if ( mCreateRoleButton ) { mCreateRoleButton->setClickedCallback(onCreateRole, this); - mCreateRoleButton->setEnabled(FALSE); + mCreateRoleButton->setEnabled(false); } mCopyRoleButton = @@ -2122,7 +2122,7 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) if ( mCopyRoleButton ) { mCopyRoleButton->setClickedCallback(onCopyRole, this); - mCopyRoleButton->setEnabled(FALSE); + mCopyRoleButton->setEnabled(false); } mDeleteRoleButton = @@ -2130,10 +2130,10 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) if ( mDeleteRoleButton ) { mDeleteRoleButton->setClickedCallback(onDeleteRole, this); - mDeleteRoleButton->setEnabled(FALSE); + mDeleteRoleButton->setEnabled(false); } - mRolesList->setCommitOnSelectionChange(TRUE); + mRolesList->setCommitOnSelectionChange(true); mRolesList->setCommitCallback(onRoleSelect, this); // Special Firestorm menu also allowing multi-select action @@ -2142,21 +2142,21 @@ BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root) mMemberVisibleCheck->setCommitCallback(onMemberVisibilityChange, this); - mAllowedActionsList->setCommitOnSelectionChange(TRUE); + mAllowedActionsList->setCommitOnSelectionChange(true); //mAllowedActionsList->setCommitCallback(boost::bind(&LLPanelGroupRolesSubTab::updateActionDescription, this)); // Undo changes from MAINT-2929 - mRoleName->setCommitOnFocusLost(TRUE); + mRoleName->setCommitOnFocusLost(true); mRoleName->setKeystrokeCallback(onPropertiesKey, this); - mRoleTitle->setCommitOnFocusLost(TRUE); + mRoleTitle->setCommitOnFocusLost(true); mRoleTitle->setKeystrokeCallback(onPropertiesKey, this); - mRoleDescription->setCommitOnFocusLost(TRUE); + mRoleDescription->setCommitOnFocusLost(true); mRoleDescription->setKeystrokeCallback(boost::bind(&LLPanelGroupRolesSubTab::onDescriptionKeyStroke, this, _1)); - setFooterEnabled(FALSE); + setFooterEnabled(false); - return TRUE; + return true; } void LLPanelGroupRolesSubTab::activate() @@ -2171,9 +2171,9 @@ void LLPanelGroupRolesSubTab::activate() mRoleDescription->clear(); mRoleTitle->clear(); - setFooterEnabled(FALSE); + setFooterEnabled(false); - mHasRoleChange = FALSE; + mHasRoleChange = false; update(GC_ALL); } @@ -2182,7 +2182,7 @@ void LLPanelGroupRolesSubTab::deactivate() LL_DEBUGS() << "LLPanelGroupRolesSubTab::deactivate()" << LL_ENDL; LLPanelGroupSubTab::deactivate(); - mFirstOpen = FALSE; + mFirstOpen = false; } bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg) @@ -2206,7 +2206,7 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg) LL_DEBUGS() << "LLPanelGroupRolesSubTab::apply()" << LL_ENDL; saveRoleChanges(true); - mFirstOpen = FALSE; + mFirstOpen = false; LLGroupMgr::getInstance()->sendGroupRoleChanges(mGroupID); notifyObservers(); @@ -2216,7 +2216,7 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg) void LLPanelGroupRolesSubTab::cancel() { - mHasRoleChange = FALSE; + mHasRoleChange = false; LLGroupMgr::getInstance()->cancelGroupRoleChanges(mGroupID); notifyObservers(); @@ -2305,7 +2305,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) item = mRolesList->addElement(row, ((*rit).first.isNull()) ? ADD_TOP : ADD_BOTTOM, this); if (had_selection && ((*rit).first == last_selected)) { - item->setSelected(TRUE); + item->setSelected(true); } } } @@ -2315,16 +2315,16 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) } } - mRolesList->sortByColumn(std::string("name"), TRUE); + mRolesList->sortByColumn(std::string("name"), true); if ( (gdatap->mRoles.size() < (U32)MAX_ROLES) && gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CREATE) ) { - mCreateRoleButton->setEnabled(TRUE); + mCreateRoleButton->setEnabled(true); } else { - mCreateRoleButton->setEnabled(FALSE); + mCreateRoleButton->setEnabled(false); } if (had_selection) @@ -2338,9 +2338,9 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) mRoleName->clear(); mRoleDescription->clear(); mRoleTitle->clear(); - setFooterEnabled(FALSE); - mDeleteRoleButton->setEnabled(FALSE); - mCopyRoleButton->setEnabled(FALSE); + setFooterEnabled(false); + mDeleteRoleButton->setEnabled(false); + mCopyRoleButton->setEnabled(false); } } @@ -2365,7 +2365,7 @@ void LLPanelGroupRolesSubTab::onRoleSelect(LLUICtrl* ctrl, void* user_data) void LLPanelGroupRolesSubTab::handleRoleSelect() { - BOOL can_delete = TRUE; + bool can_delete = true; LL_DEBUGS() << "LLPanelGroupRolesSubTab::handleRoleSelect()" << LL_ENDL; mAssignedMembersList->deleteAllItems(); @@ -2385,16 +2385,16 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() LLScrollListItem* item = mRolesList->getFirstSelected(); if (!item) { - setFooterEnabled(FALSE); + setFooterEnabled(false); return; } - setFooterEnabled(TRUE); + setFooterEnabled(true); LLRoleData rd; if (gdatap->getRoleData(item->getUUID(),rd)) { - BOOL is_owner_role = ( gdatap->mOwnerRole == item->getUUID() ); + bool is_owner_role = ( gdatap->mOwnerRole == item->getUUID() ); mRoleName->setText(rd.mRoleName); mRoleTitle->setText(rd.mRoleTitle); mRoleDescription->setText(rd.mRoleDescription); @@ -2405,8 +2405,8 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() rd.mRolePowers, 0LL, boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false), - TRUE, - FALSE, + true, + false, is_owner_role); @@ -2419,9 +2419,9 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() if ( is_owner_role ) { // you can't delete the owner role - can_delete = FALSE; + can_delete = false; // ... or hide members with this role - mMemberVisibleCheck->setEnabled(FALSE); + mMemberVisibleCheck->setEnabled(false); } else { @@ -2431,9 +2431,9 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() if (item->getUUID().isNull()) { // Everyone role, can't edit description or name or delete - mRoleDescription->setEnabled(FALSE); - mRoleName->setEnabled(FALSE); - can_delete = FALSE; + mRoleDescription->setEnabled(false); + mRoleName->setEnabled(false); + can_delete = false; } } else @@ -2444,9 +2444,9 @@ void LLPanelGroupRolesSubTab::handleRoleSelect() mRoleName->clear(); mRoleDescription->clear(); mRoleTitle->clear(); - setFooterEnabled(FALSE); + setFooterEnabled(false); - can_delete = FALSE; + can_delete = false; } mSelectedRole = item->getUUID(); buildMembersList(); @@ -2550,7 +2550,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) { // Uncheck the item, for now. It will be // checked if they click 'Yes', below. - check->set(FALSE); + check->set(false); LLRoleData rd; LLSD args; @@ -2559,7 +2559,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) { args["ACTION_NAME"] = rap->mDescription; args["ROLE_NAME"] = rd.mRoleName; - mHasModal = TRUE; + mHasModal = true; std::string warning = "AssignDangerousActionWarning"; if (GP_ROLE_CHANGE_ACTIONS == power) { @@ -2586,7 +2586,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) { args["ACTION_NAME"] = rap->mDescription; args["ROLE_NAME"] = rd.mRoleName; - mHasModal = TRUE; + mHasModal = true; std::vector all_data = mAllowedActionsList->getAllData(); std::vector::iterator ad_it = all_data.begin(); @@ -2632,9 +2632,9 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) current_role_powers, current_role_powers, boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false), - TRUE, - FALSE, - FALSE); + true, + false, + false); } @@ -2650,7 +2650,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) gdatap->removeRolePower(role_id,power); } - mHasRoleChange = TRUE; + mHasRoleChange = true; notifyObservers(); } @@ -2659,13 +2659,13 @@ bool LLPanelGroupRolesSubTab::addActionCB(const LLSD& notification, const LLSD& { if (!check) return false; - mHasModal = FALSE; + mHasModal = false; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (0 == option) { // User clicked "Yes" - check->set(TRUE); + check->set(true); const bool force_add = true; handleActionCheck(check, force_add); } @@ -2678,13 +2678,13 @@ void LLPanelGroupRolesSubTab::onPropertiesKey(LLLineEditor* ctrl, void* user_dat LLPanelGroupRolesSubTab* self = static_cast(user_data); if (!self) return; - self->mHasRoleChange = TRUE; + self->mHasRoleChange = true; self->notifyObservers(); } void LLPanelGroupRolesSubTab::onDescriptionKeyStroke(LLTextEditor* caller) { - mHasRoleChange = TRUE; + mHasRoleChange = true; notifyObservers(); } @@ -2694,7 +2694,7 @@ void LLPanelGroupRolesSubTab::onDescriptionCommit(LLUICtrl* ctrl, void* user_dat LLPanelGroupRolesSubTab* self = static_cast(user_data); if (!self) return; - self->mHasRoleChange = TRUE; + self->mHasRoleChange = true; self->notifyObservers(); } @@ -2758,7 +2758,7 @@ void LLPanelGroupRolesSubTab::handleCreateRole() rd.mRoleName = "New Role"; gdatap->createRole(new_role_id,rd); - mRolesList->deselectAllItems(TRUE); + mRolesList->deselectAllItems(true); LLSD row; row["id"] = new_role_id; row["columns"][0]["column"] = "name"; @@ -2769,7 +2769,7 @@ void LLPanelGroupRolesSubTab::handleCreateRole() // put focus on name field and select its contents if(mRoleName) { - mRoleName->setFocus(TRUE); + mRoleName->setFocus(true); mRoleName->onTabInto(); gFocusMgr.triggerFocusFlash(); } @@ -2809,7 +2809,7 @@ void LLPanelGroupRolesSubTab::handleCopyRole() rd.mRoleName += "(Copy)"; gdatap->createRole(new_role_id,rd); - mRolesList->deselectAllItems(TRUE); + mRolesList->deselectAllItems(true); LLSD row; row["id"] = new_role_id; row["columns"][0]["column"] = "name"; @@ -2820,7 +2820,7 @@ void LLPanelGroupRolesSubTab::handleCopyRole() // put focus on name field and select its contents if(mRoleName) { - mRoleName->setFocus(TRUE); + mRoleName->setFocus(true); mRoleName->onTabInto(); gFocusMgr.triggerFocusFlash(); } @@ -2897,7 +2897,7 @@ void LLPanelGroupRolesSubTab::saveRoleChanges(bool select_saved_role) LLScrollListItem* item = mRolesList->addElement(row, ADD_BOTTOM, this); item->setSelected(select_saved_role); - mHasRoleChange = FALSE; + mHasRoleChange = false; } } @@ -2928,9 +2928,9 @@ void LLPanelGroupRolesSubTab::setGroupID(const LLUUID& id) if(mRoleDescription) mRoleDescription->clear(); if(mRoleTitle) mRoleTitle->clear(); - mHasRoleChange = FALSE; + mHasRoleChange = false; - setFooterEnabled(FALSE); + setFooterEnabled(false); LLPanelGroupSubTab::setGroupID(id); } @@ -2948,7 +2948,7 @@ LLPanelGroupActionsSubTab::~LLPanelGroupActionsSubTab() { } -BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root) { LLPanelGroupSubTab::postBuildSubTab(root); @@ -2966,9 +2966,9 @@ BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root) mActionRoles = parent->getChild("action_roles",recurse); mActionMembers = parent->getChild("action_members",recurse); - if (!mActionList || !mActionDescription || !mActionRoles || !mActionMembers) return FALSE; + if (!mActionList || !mActionDescription || !mActionRoles || !mActionMembers) return false; - mActionList->setCommitOnSelectionChange(TRUE); + mActionList->setCommitOnSelectionChange(true); mActionList->setCommitCallback(boost::bind(&LLPanelGroupActionsSubTab::handleActionSelect, this)); // Special Firestorm menu also allowing multi-select action //mActionList->setContextMenu(LLScrollListCtrl::MENU_AVATAR); @@ -2976,7 +2976,7 @@ BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root) update(GC_ALL); - return TRUE; + return true; } void LLPanelGroupActionsSubTab::activate() @@ -2991,9 +2991,9 @@ void LLPanelGroupActionsSubTab::activate() GP_ALL_POWERS, GP_ALL_POWERS, NULL, - FALSE, - TRUE, - FALSE); + false, + true, + false); } void LLPanelGroupActionsSubTab::deactivate() @@ -3044,9 +3044,9 @@ void LLPanelGroupActionsSubTab::onFilterChanged() GP_ALL_POWERS, GP_ALL_POWERS, NULL, - FALSE, - TRUE, - FALSE); + false, + true, + false); } void LLPanelGroupActionsSubTab::handleActionSelect() @@ -3157,7 +3157,7 @@ LLPanelGroupBanListSubTab::LLPanelGroupBanListSubTab() mDeleteBanButton(NULL) {} -BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) +bool LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) { LLPanelGroupSubTab::postBuildSubTab(root); @@ -3178,20 +3178,20 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) mBanCountText = parent->getChild("ban_count", recurse); if(!mBanList || !mCreateBanButton || !mDeleteBanButton || !mRefreshBanListButton || !mBanCountText) - return FALSE; + return false; - mBanList->setCommitOnSelectionChange(TRUE); + mBanList->setCommitOnSelectionChange(true); mBanList->setCommitCallback(onBanEntrySelect, this); mBanList->setFilterColumn(0); // FIRE-31653: add banlist filter editor mCreateBanButton->setClickedCallback(onCreateBanEntry, this); - mCreateBanButton->setEnabled(FALSE); + mCreateBanButton->setEnabled(false); mDeleteBanButton->setClickedCallback(onDeleteBanEntry, this); - mDeleteBanButton->setEnabled(FALSE); + mDeleteBanButton->setEnabled(false); mRefreshBanListButton->setClickedCallback(onRefreshBanList, this); - mRefreshBanListButton->setEnabled(FALSE); + mRefreshBanListButton->setEnabled(false); setBanCount(0); @@ -3201,8 +3201,8 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) // Don't do this - it will cause populateBanList() being called twice because activate() is being called when switching to a tab, also calling populateBanList() //populateBanList(); - setFooterEnabled(FALSE); - return TRUE; + setFooterEnabled(false); + return true; } void LLPanelGroupBanListSubTab::activate() @@ -3210,7 +3210,7 @@ void LLPanelGroupBanListSubTab::activate() LLPanelGroupSubTab::activate(); mBanList->deselectAllItems(); - mDeleteBanButton->setEnabled(FALSE); + mDeleteBanButton->setEnabled(false); LLGroupMgrGroupData * group_datap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (group_datap) @@ -3221,7 +3221,7 @@ void LLPanelGroupBanListSubTab::activate() } else { - mCreateBanButton->setEnabled(FALSE); + mCreateBanButton->setEnabled(false); setBanCount(0); } @@ -3232,7 +3232,7 @@ void LLPanelGroupBanListSubTab::activate() // LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID); - setFooterEnabled(FALSE); + setFooterEnabled(false); update(GC_ALL); } @@ -3270,7 +3270,7 @@ void LLPanelGroupBanListSubTab::handleBanEntrySelect() // if (gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS)) { - mDeleteBanButton->setEnabled(TRUE); + mDeleteBanButton->setEnabled(true); } } @@ -3346,11 +3346,11 @@ void LLPanelGroupBanListSubTab::handleDeleteBanEntry() // Removing an item removes the selection, we shouldn't be able to click // the button anymore until we reselect another entry. - mDeleteBanButton->setEnabled(FALSE); + mDeleteBanButton->setEnabled(false); } // update ban-count related elements - mCreateBanButton->setEnabled(TRUE); + mCreateBanButton->setEnabled(true); setBanCount(gdatap->mBanList.size()); LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mGroupID, LLGroupMgr::BAN_DELETE, ban_ids); @@ -3367,7 +3367,7 @@ void LLPanelGroupBanListSubTab::onRefreshBanList(void* user_data) void LLPanelGroupBanListSubTab::handleRefreshBanList() { - mRefreshBanListButton->setEnabled(FALSE); + mRefreshBanListButton->setEnabled(false); LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID); } @@ -3376,7 +3376,7 @@ void LLPanelGroupBanListSubTab::handleRefreshBanList() //{ // if(isComplete) // { -// mRefreshBanListButton->setEnabled(TRUE); +// mRefreshBanListButton->setEnabled(true); // populateBanList(); // } //} @@ -3428,7 +3428,7 @@ void LLPanelGroupBanListSubTab::populateBanList() mBanList->addNameItemRow(ban_entry); } - mRefreshBanListButton->setEnabled(TRUE); + mRefreshBanListButton->setEnabled(true); mCreateBanButton->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS) && gdatap->mBanList.size() < GB_MAX_BANNED_AGENTS); setBanCount(gdatap->mBanList.size()); @@ -3439,7 +3439,7 @@ void LLPanelGroupBanListSubTab::setGroupID(const LLUUID& id) if(mBanList) mBanList->deleteAllItems(); - setFooterEnabled(FALSE); + setFooterEnabled(false); LLPanelGroupSubTab::setGroupID(id); } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index c1dcda7cac..480a78441d 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -54,13 +54,13 @@ public: friend class LLPanelGroupActionsSubTab; virtual bool postBuild(); - virtual BOOL isVisibleByAgent(LLAgent* agentp); + virtual bool isVisibleByAgent(LLAgent* agentp); bool handleSubTabSwitch(const LLSD& data); // Checks if the current tab needs to be applied, and tries to switch to the requested tab. - BOOL attemptTransition(); + bool attemptTransition(); // Switches to the requested tab (will close() if requested is NULL) void transitionToTab(); @@ -73,7 +73,7 @@ public: virtual void activate(); virtual void deactivate(); virtual bool needsApply(std::string& mesg); - virtual BOOL hasModal(); + virtual bool hasModal(); virtual bool apply(std::string& mesg); virtual void cancel(); virtual void update(LLGroupChange gc); @@ -87,7 +87,7 @@ protected: LLPanelGroupTab* mCurrentTab; LLPanelGroupTab* mRequestedTab; LLTabContainer* mSubTabContainer; - BOOL mFirstUse; + bool mFirstUse; std::string mDefaultNeedsApplyMesg; std::string mWantApplyMesg; @@ -103,7 +103,7 @@ public: virtual bool postBuild(); // This allows sub-tabs to collect child widgets from a higher level in the view hierarchy. - virtual BOOL postBuildSubTab(LLView* root); + virtual bool postBuildSubTab(LLView* root); virtual void setSearchFilter( const std::string& filter ); @@ -114,29 +114,29 @@ public: bool matchesActionSearchFilter(std::string action); - void setFooterEnabled(BOOL enable); + void setFooterEnabled(bool enable); virtual void setGroupID(const LLUUID& id); // CTRL-F focusses local search editor - void setSearchFilterFocus(BOOL focus); + void setSearchFilterFocus(bool focus); protected: void buildActionsList(LLScrollListCtrl* ctrl, U64 allowed_by_some, U64 allowed_by_all, LLUICtrl::commit_callback_t commit_callback, - BOOL show_all, - BOOL filter, - BOOL is_owner_role); + bool show_all, + bool filter, + bool is_owner_role); void buildActionCategory(LLScrollListCtrl* ctrl, U64 allowed_by_some, U64 allowed_by_all, LLRoleActionSet* action_set, LLUICtrl::commit_callback_t commit_callback, - BOOL show_all, - BOOL filter, - BOOL is_owner_role); + bool show_all, + bool filter, + bool is_owner_role); protected: LLPanel* mHeader; // Might not be present in xui of derived class (NULL) @@ -153,7 +153,7 @@ protected: bool mHasGroupBanPower; // Used to communicate between action sets due to the dependency between // GP_GROUP_BAN_ACCESS and GP_EJECT_MEMBER and GP_ROLE_REMOVE_MEMBER - void setOthersVisible(BOOL b); + void setOthersVisible(bool b); }; @@ -163,7 +163,7 @@ public: LLPanelGroupMembersSubTab(); virtual ~LLPanelGroupMembersSubTab(); - virtual BOOL postBuildSubTab(LLView* root); + virtual bool postBuildSubTab(LLView* root); static void onMemberSelect(LLUICtrl*, void*); void handleMemberSelect(); @@ -226,9 +226,9 @@ protected: LLButton* mEjectBtn; LLButton* mBanBtn; - BOOL mChanged; - BOOL mPendingMemberUpdate; - BOOL mHasMatch; + bool mChanged; + bool mPendingMemberUpdate; + bool mHasMatch; LLTextEditor* mActionDescription; @@ -252,7 +252,7 @@ public: LLPanelGroupRolesSubTab(); virtual ~LLPanelGroupRolesSubTab(); - virtual BOOL postBuildSubTab(LLView* root); + virtual bool postBuildSubTab(LLView* root); virtual void activate(); virtual void deactivate(); @@ -293,7 +293,7 @@ public: virtual void setGroupID(const LLUUID& id); - BOOL mFirstOpen; + bool mFirstOpen; protected: void handleActionCheck(LLUICtrl* ctrl, bool force); @@ -314,7 +314,7 @@ protected: LLButton* mCopyRoleButton; LLUUID mSelectedRole; - BOOL mHasRoleChange; + bool mHasRoleChange; std::string mRemoveEveryoneTxt; }; @@ -325,7 +325,7 @@ public: LLPanelGroupActionsSubTab(); virtual ~LLPanelGroupActionsSubTab(); - virtual BOOL postBuildSubTab(LLView* root); + virtual bool postBuildSubTab(LLView* root); virtual void activate(); @@ -353,7 +353,7 @@ public: LLPanelGroupBanListSubTab(); virtual ~LLPanelGroupBanListSubTab() {} - virtual BOOL postBuildSubTab(LLView* root); + virtual bool postBuildSubTab(LLView* root); virtual void activate(); virtual void update(LLGroupChange gc); diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp index cc1b4261c6..bd36062d5b 100644 --- a/indra/newview/llpanelland.cpp +++ b/indra/newview/llpanelland.cpp @@ -129,11 +129,11 @@ void LLPanelLandInfo::refresh() //mTextPrice->setText(LLStringUtil::null); //getChild("textbox price")->setValue(LLStringUtil::null); // Doesn't exist as of 2016-11-16 - getChildView("button buy land")->setEnabled(FALSE); - getChildView("button abandon land")->setEnabled(FALSE); - getChildView("button subdivide land")->setEnabled(FALSE); - getChildView("button join land")->setEnabled(FALSE); - getChildView("button about land")->setEnabled(FALSE); + getChildView("button buy land")->setEnabled(false); + getChildView("button abandon land")->setEnabled(false); + getChildView("button subdivide land")->setEnabled(false); + getChildView("button join land")->setEnabled(false); + getChildView("button about land")->setEnabled(false); } else { @@ -141,30 +141,30 @@ void LLPanelLandInfo::refresh() const LLUUID& owner_id = parcel->getOwnerID(); const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); - BOOL is_public = parcel->isPublic(); - BOOL is_for_sale = parcel->getForSale() + bool is_public = parcel->isPublic(); + bool is_for_sale = parcel->getForSale() && ((parcel->getSalePrice() > 0) || (auth_buyer_id.notNull())); - BOOL can_buy = (is_for_sale + bool can_buy = (is_for_sale && (owner_id != gAgent.getID()) && ((gAgent.getID() == auth_buyer_id) || (auth_buyer_id.isNull()))); if (is_public && !LLViewerParcelMgr::getInstance()->getParcelSelection()->getMultipleOwners()) { - getChildView("button buy land")->setEnabled(TRUE); + getChildView("button buy land")->setEnabled(true); } else { getChildView("button buy land")->setEnabled(can_buy); } - BOOL owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE); - BOOL owner_divide = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_DIVIDE_JOIN); + bool owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_RELEASE); + bool owner_divide = LLViewerParcelMgr::isParcelOwnedByAgent(parcel, GP_LAND_DIVIDE_JOIN); - BOOL manager_releaseable = ( gAgent.canManageEstate() + bool manager_releaseable = ( gAgent.canManageEstate() && (parcel->getOwnerID() == regionp->getOwner()) ); - BOOL manager_divideable = ( gAgent.canManageEstate() + bool manager_divideable = ( gAgent.canManageEstate() && ((parcel->getOwnerID() == regionp->getOwner()) || owner_divide) ); getChildView("button abandon land")->setEnabled(owner_release || manager_releaseable || gAgent.isGodlike()); @@ -187,21 +187,21 @@ void LLPanelLandInfo::refresh() //&& LLViewerParcelMgr::getInstance()->getSelfCount() > 1 && !LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected()) { - getChildView("button join land")->setEnabled(TRUE); + getChildView("button join land")->setEnabled(true); } else { LL_DEBUGS() << "Invalid selection for joining land" << LL_ENDL; - getChildView("button join land")->setEnabled(FALSE); + getChildView("button join land")->setEnabled(false); } - getChildView("button about land")->setEnabled(TRUE); + getChildView("button about land")->setEnabled(true); // show pricing information S32 area; S32 claim_price; S32 rent_price; - BOOL for_sale; + bool for_sale; F32 dwell; LLViewerParcelMgr::getInstance()->getDisplayInfo(&area, &claim_price, diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp index a0eee34633..b937c94654 100644 --- a/indra/newview/llpanellandaudio.cpp +++ b/indra/newview/llpanellandaudio.cpp @@ -134,7 +134,7 @@ void LLPanelLandAudio::refresh() // something selected, hooray! // Display options - BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); + bool can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); mCheckSoundLocal->set( parcel->getSoundLocal() ); mCheckSoundLocal->setEnabled( can_change_media ); @@ -185,7 +185,7 @@ void LLPanelLandAudio::refresh() mBtnStreamAdd->setEnabled( can_change_media ); mBtnStreamDelete->setEnabled( can_change_media ); - mBtnStreamCopyToClipboard->setEnabled(TRUE); + mBtnStreamCopyToClipboard->setEnabled(true); // mMusicURLEdit->setEnabled( can_change_media ); @@ -207,7 +207,7 @@ void LLPanelLandAudio::refresh() } // - BOOL can_change_av_sounds = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS) && parcel->getHaveNewParcelLimitData(); + bool can_change_av_sounds = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS) && parcel->getHaveNewParcelLimitData(); mCheckAVSoundAny->set(parcel->getAllowAnyAVSounds()); mCheckAVSoundAny->setEnabled(can_change_av_sounds); @@ -230,17 +230,17 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) } // Extract data from UI - BOOL sound_local = self->mCheckSoundLocal->get(); + bool sound_local = self->mCheckSoundLocal->get(); // FIRE-593 - It's a combobox now //std::string music_url = self->mMusicURLEdit->getText(); std::string music_url = self->mMusicURLEdit->getSimple(); // - BOOL voice_enabled = self->mCheckParcelEnableVoice->get(); - BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get(); + bool voice_enabled = self->mCheckParcelEnableVoice->get(); + bool voice_estate_chan = !self->mCheckParcelVoiceLocal->get(); - BOOL any_av_sound = self->mCheckAVSoundAny->get(); - BOOL group_av_sound = TRUE; // If set to "Everyone" then group is checked as well + bool any_av_sound = self->mCheckAVSoundAny->get(); + bool group_av_sound = true; // If set to "Everyone" then group is checked as well if (!any_av_sound) { // If "Everyone" is off, use the value from the checkbox group_av_sound = self->mCheckAVSoundGroup->get(); diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 3c166f2c28..24b0074bb0 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -134,9 +134,9 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type, const LLUUID &folder_id) { mCurrentTitle = getString("title_create_landmark"); - mLandmarkTitle->setVisible(FALSE); - mLandmarkTitleEditor->setVisible(TRUE); - mNotesEditor->setEnabled(TRUE); + mLandmarkTitle->setVisible(false); + mLandmarkTitleEditor->setVisible(true); + mNotesEditor->setEnabled(true); LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); LLParcel* parcel = parcel_mgr->getAgentParcel(); @@ -203,16 +203,16 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type, const LLUUID &folder_id) default: mCurrentTitle = getString("title_landmark"); - mLandmarkTitle->setVisible(TRUE); - mLandmarkTitleEditor->setVisible(FALSE); - mNotesEditor->setEnabled(FALSE); + mLandmarkTitle->setVisible(true); + mLandmarkTitleEditor->setVisible(false); + mNotesEditor->setEnabled(false); break; } populateFoldersList(); // Prevent the floater from losing focus (if the sidepanel is undocked). - setFocus(TRUE); + setFocus(true); LLPanelPlaceInfo::setInfoType(type); } @@ -338,7 +338,7 @@ void LLPanelLandmarkInfo::displayItemInfo(const LLInventoryItem* pItem) mNotesEditor->setText(pItem->getDescription()); } -void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled) +void LLPanelLandmarkInfo::toggleLandmarkEditMode(bool enabled) { // If switching to edit mode while creating landmark // the "Create Landmark" title remains. @@ -353,7 +353,7 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled) mLandmarkTitle->setText(mLandmarkTitleEditor->getText()); } - if (mNotesEditor->getReadOnly() == (enabled == TRUE)) + if (mNotesEditor->getReadOnly() == (enabled == true)) { mLandmarkTitle->setVisible(!enabled); mLandmarkTitleEditor->setVisible(enabled); @@ -368,10 +368,10 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(BOOL enabled) } // Prevent the floater from losing focus (if the sidepanel is undocked). - setFocus(TRUE); + setFocus(true); } -void LLPanelLandmarkInfo::setCanEdit(BOOL enabled) +void LLPanelLandmarkInfo::setCanEdit(bool enabled) { getChild("edit_btn")->setEnabled(enabled); } @@ -391,7 +391,7 @@ const LLUUID LLPanelLandmarkInfo::getLandmarkFolder() const return mFolderCombo->getValue().asUUID(); } -BOOL LLPanelLandmarkInfo::setLandmarkFolder(const LLUUID& id) +bool LLPanelLandmarkInfo::setLandmarkFolder(const LLUUID& id) { return mFolderCombo->setCurrentByID(id); } diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h index f607126328..e71413a8f6 100644 --- a/indra/newview/llpanellandmarkinfo.h +++ b/indra/newview/llpanellandmarkinfo.h @@ -55,15 +55,15 @@ public: // Displays landmark owner, creator and creation date info. void displayItemInfo(const LLInventoryItem* pItem); - void toggleLandmarkEditMode(BOOL enabled); - void setCanEdit(BOOL enabled); + void toggleLandmarkEditMode(bool enabled); + void setCanEdit(bool enabled); const std::string& getLandmarkTitle() const; const std::string getLandmarkNotes() const; const LLUUID getLandmarkFolder() const; // Select current landmark folder in combobox. - BOOL setLandmarkFolder(const LLUUID& id); + bool setLandmarkFolder(const LLUUID& id); typedef std::vector > cat_array_t; static std::string getFullFolderName(const LLViewerInventoryCategory* cat); diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index bdebf76e15..cb28b651e2 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -71,7 +71,7 @@ static void collapse_all_folders(LLFolderView* root_folder); static void expand_all_folders(LLFolderView* root_folder); static bool has_expanded_folders(LLFolderView* root_folder); static bool has_collapsed_folders(LLFolderView* root_folder); -static void toggle_restore_menu(LLMenuGL* menu, BOOL visible, BOOL enabled); +static void toggle_restore_menu(LLMenuGL* menu, bool visible, bool enabled); // FIRE-31051: Hide empty folders in Places floater when filtering static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list); @@ -143,7 +143,7 @@ void LLOpenFolderByID::doFolder(LLFolderViewFolder* folder) { if (!folder->isOpen()) { - folder->setOpen(TRUE); + folder->setOpen(true); mIsFolderOpen = true; } } @@ -185,7 +185,7 @@ LLLandmarksPanel::~LLLandmarksPanel() bool LLLandmarksPanel::postBuild() { if (!gInventory.isInventoryUsable()) - return FALSE; + return false; // mast be called before any other initXXX methods to init Gear menu initListCommandsHandlers(); @@ -219,7 +219,7 @@ void LLLandmarksPanel::onShowOnMap() // Disable the "Map" button because loading landmark can take some time. // During this time the button is useless. It will be enabled on callback finish // or upon switching to other item. - mShowOnMapBtn->setEnabled(FALSE); + mShowOnMapBtn->setEnabled(false); // doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doShowOnMap, this, _1)); @@ -319,7 +319,7 @@ void LLLandmarksPanel::updateVerbs() // } -void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus) +void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, bool take_keyboard_focus) { if (!mCurrentSelectedList) return; @@ -328,7 +328,7 @@ void LLLandmarksPanel::setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_ LLFolderViewItem* item = mCurrentSelectedList->getItemByID(obj_id); if (!item) return; - root->setSelection(item, FALSE, take_keyboard_focus); + root->setSelection(item, false, take_keyboard_focus); root->scrollToShowSelection(); } @@ -521,18 +521,18 @@ void LLLandmarksPanel::initListCommandsHandlers() { mGearLandmarkMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2)); // show menus even if all items are disabled - mGearLandmarkMenu->setAlwaysShowMenu(TRUE); + mGearLandmarkMenu->setAlwaysShowMenu(true); } // Else corrupted files? if (mGearFolderMenu) { mGearFolderMenu->setVisibilityChangeCallback(boost::bind(&LLLandmarksPanel::onMenuVisibilityChange, this, _1, _2)); - mGearFolderMenu->setAlwaysShowMenu(TRUE); + mGearFolderMenu->setAlwaysShowMenu(true); } if (mAddMenu) { - mAddMenu->setAlwaysShowMenu(TRUE); + mAddMenu->setAlwaysShowMenu(true); } } @@ -964,8 +964,8 @@ void LLLandmarksPanel::onMenuVisibilityChange(LLUICtrl* ctrl, const LLSD& param) // We don't have to update items visibility if the menu is hiding. if (!new_visibility) return; - BOOL are_any_items_in_trash = FALSE; - BOOL are_all_items_in_trash = TRUE; + bool are_any_items_in_trash = false; + bool are_all_items_in_trash = true; LLFolderView* root_folder_view = mCurrentSelectedList ? mCurrentSelectedList->getRootFolder() : NULL; if(root_folder_view) @@ -1081,7 +1081,7 @@ bool LLLandmarksPanel::canItemBeModified(const std::string& command_name, LLFold return can_be_modified; } -bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data , EAcceptance* accept) +bool LLLandmarksPanel::handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data , EAcceptance* accept) { *accept = ACCEPT_NO; @@ -1137,10 +1137,10 @@ void LLLandmarksPanel::doShowOnMap(LLLandmark* landmark) LLFloaterReg::showInstance("world_map", "center"); } - mShowOnMapBtn->setEnabled(TRUE); // FIRE-31033: Keep Teleport/Map/Profile buttons on places floater + mShowOnMapBtn->setEnabled(true); // FIRE-31033: Keep Teleport/Map/Profile buttons on places floater if (mGearLandmarkMenu) { - mGearLandmarkMenu->setItemEnabled("show_on_map", TRUE); + mGearLandmarkMenu->setItemEnabled("show_on_map", true); } } @@ -1229,7 +1229,7 @@ static void collapse_all_folders(LLFolderView* root_folder) if (!root_folder) return; - root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); + root_folder->setOpenArrangeRecursively(false, LLFolderViewFolder::RECURSE_DOWN); root_folder->arrangeAll(); } @@ -1238,7 +1238,7 @@ static void expand_all_folders(LLFolderView* root_folder) if (!root_folder) return; - root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); + root_folder->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_DOWN); root_folder->arrangeAll(); } @@ -1273,7 +1273,7 @@ static bool has_collapsed_folders(LLFolderView* root_folder) // Displays "Restore Item" context menu entry while hiding // all other entries or vice versa. // Sets "Restore Item" enabled state. -void toggle_restore_menu(LLMenuGL *menu, BOOL visible, BOOL enabled) +void toggle_restore_menu(LLMenuGL *menu, bool visible, bool enabled) { if (!menu) return; diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 0f0d4ffb73..6ef70022b6 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -68,7 +68,7 @@ public: /** * Processes drag-n-drop of the Landmarks and folders into trash button. */ - bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override; + bool handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override; void setCurrentSelectedList(LLPlacesInventoryPanel* inventory_list) { @@ -78,7 +78,7 @@ public: /** * Selects item with "obj_id" in one of accordion tabs. */ - void setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus); + void setItemSelected(const LLUUID& obj_id, bool take_keyboard_focus); void updateMenuVisibility(LLUICtrl* menu); diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index 43241b2eeb..f7016c76be 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -83,7 +83,7 @@ bool LLPanelLandMedia::postBuild() mMediaTextureCtrl = getChild("media texture"); mMediaTextureCtrl->setCommitCallback( onCommitAny, this ); - mMediaTextureCtrl->setAllowNoTexture ( TRUE ); + mMediaTextureCtrl->setAllowNoTexture ( true ); mMediaTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); mMediaTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); @@ -130,10 +130,10 @@ void LLPanelLandMedia::refresh() // something selected, hooray! // Display options - BOOL can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); + bool can_change_media = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_CHANGE_MEDIA); mMediaURLEdit->setText(parcel->getMediaURL()); - mMediaURLEdit->setEnabled( FALSE ); + mMediaURLEdit->setEnabled( false ); // Doesn't exists as of 2014-04-14 //getChild("current_url")->setValue(parcel->getMediaCurrentURL()); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 2678801fec..bdcd17a248 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -76,8 +76,8 @@ #include "llsdserialize.h" LLPanelLogin *LLPanelLogin::sInstance = NULL; -BOOL LLPanelLogin::sCapslockDidNotification = FALSE; -BOOL LLPanelLogin::sCredentialSet = FALSE; +bool LLPanelLogin::sCapslockDidNotification = false; +bool LLPanelLogin::sCredentialSet = false; // Helper functions @@ -192,10 +192,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mLocationLength(0), mShowFavorites(false) { - setBackgroundVisible(FALSE); - setBackgroundOpaque(TRUE); + setBackgroundVisible(false); + setBackgroundOpaque(true); - mPasswordModified = FALSE; + mPasswordModified = false; sInstance = this; @@ -323,7 +323,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // STEAM-14: When user presses Enter with this field in focus, initiate login username_combo->setCommitCallback(boost::bind(&LLPanelLogin::onUserListCommit, this)); username_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this)); - username_combo->setKeystrokeOnEsc(TRUE); + username_combo->setKeystrokeOnEsc(true); LLCheckBoxCtrl* remember_name = getChild("remember_name"); @@ -477,8 +477,8 @@ void LLPanelLogin::giveFocus() std::string username = sInstance->getChild("username_combo")->getValue().asString(); std::string pass = sInstance->getChild("password_edit")->getValue().asString(); - BOOL have_username = !username.empty(); - BOOL have_pass = !pass.empty(); + bool have_username = !username.empty(); + bool have_pass = !pass.empty(); LLLineEditor* edit = NULL; LLComboBox* combo = NULL; @@ -496,12 +496,12 @@ void LLPanelLogin::giveFocus() if (edit) { - edit->setFocus(TRUE); + edit->setFocus(true); edit->selectAll(); } else if (combo) { - combo->setFocus(TRUE); + combo->setFocus(true); } } } @@ -519,7 +519,7 @@ void LLPanelLogin::show(const LLRect &rect, if( !gFocusMgr.getKeyboardFocus() ) { // Grab focus and move cursor to first enabled control - sInstance->setFocus(TRUE); + sInstance->setFocus(true); } // Make sure that focus always goes here (and use the latest sInstance that was just created) @@ -581,7 +581,7 @@ void LLPanelLogin::setFields(LLPointer credential) LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL; return; } - sCredentialSet = TRUE; + sCredentialSet = true; LL_INFOS("Credentials") << "Setting login fields to " << *credential << LL_ENDL; LLSD identifier = credential.notNull() ? credential->getIdentifier() : LLSD(); @@ -717,7 +717,7 @@ void LLPanelLogin::getFields(LLPointer& credential, // static -BOOL LLPanelLogin::areCredentialFieldsDirty() +bool LLPanelLogin::areCredentialFieldsDirty() { if (!sInstance) { @@ -745,7 +745,7 @@ void LLPanelLogin::updateLocationSelectorsVisibility() { if (sInstance) { - BOOL show_server = gSavedSettings.getBOOL("ForceShowGrid"); + bool show_server = gSavedSettings.getBOOL("ForceShowGrid"); LLComboBox* server_combo = sInstance->getChild("server_combo"); if ( server_combo ) { @@ -892,7 +892,7 @@ void LLPanelLogin::loadLoginPage() // First Login? if (gSavedSettings.getBOOL("FirstLoginThisInstall")) { - params["firstlogin"] = "TRUE"; // not bool: server expects string TRUE + params["firstlogin"] = "true"; // not bool: server expects string true } // Channel and Version @@ -943,7 +943,7 @@ void LLPanelLogin::onClickConnect(bool commit_fields) if (commit_fields) { // JC - Make sure the fields all get committed. - sInstance->setFocus(FALSE); + sInstance->setFocus(false); } LLComboBox* combo = sInstance->getChild("server_combo"); @@ -979,7 +979,7 @@ void LLPanelLogin::onClickConnect(bool commit_fields) } else { - sCredentialSet = FALSE; + sCredentialSet = false; LLPointer cred; bool remember_1, remember_2; getFields(cred, remember_1, remember_2); @@ -1118,11 +1118,11 @@ void LLPanelLogin::onRememberPasswordCheck(void*) void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { LLPanelLogin *self = (LLPanelLogin *)user_data; - self->mPasswordModified = TRUE; - if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE) + self->mPasswordModified = true; + if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == false) { // *TODO: use another way to notify user about enabled caps lock, see EXT-6858 - sCapslockDidNotification = TRUE; + sCapslockDidNotification = true; } LLLineEditor* password_edit(self->getChild("password_edit")); @@ -1207,7 +1207,7 @@ void LLPanelLogin::updateLoginButtons() { remember_name->setValue(true); LLCheckBoxCtrl* remember_pass = getChild("remember_password"); - remember_pass->setEnabled(TRUE); + remember_pass->setEnabled(true); } // Note: might be good idea to do "else remember_name->setValue(mRememberedState)" but it might behave 'weird' to user } } @@ -1234,7 +1234,7 @@ void LLPanelLogin::populateUserList(LLPointer credential) if (cr_iter->second.notNull()) // basic safety in case of future changes { // cr_iter->first == user_id , to be able to be find it in case we select it - user_combo->add(LLPanelLogin::getUserName(cr_iter->second), cr_iter->first, ADD_BOTTOM, TRUE); + user_combo->add(LLPanelLogin::getUserName(cr_iter->second), cr_iter->first, ADD_BOTTOM, true); } cr_iter++; } diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index b3aae8ab6f..1cc78e4d9f 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -62,9 +62,9 @@ public: static void resetFields(); static void getFields(LLPointer& credential, bool& remember_user, bool& remember_psswrd); - static BOOL isCredentialSet() { return sCredentialSet; } + static bool isCredentialSet() { return sCredentialSet; } - static BOOL areCredentialFieldsDirty(); + static bool areCredentialFieldsDirty(); static void setLocation(const LLSLURL& slurl); static void autologinToLocation(const LLSLURL& slurl); @@ -117,14 +117,14 @@ private: void (*mCallback)(S32 option, void *userdata); void* mCallbackData; - BOOL mPasswordModified; + bool mPasswordModified; bool mShowFavorites; static LLPanelLogin* sInstance; - static BOOL sCapslockDidNotification; + static bool sCapslockDidNotification; bool mFirstLoginThisInstall; - static BOOL sCredentialSet; + static bool sCredentialSet; unsigned int mUsernameLength; unsigned int mPasswordLength; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index b704c34177..f43bc0112b 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -92,8 +92,8 @@ public: /*virtual*/ bool postBuild(); void changeFilter(LLInventoryFilter* filter); void updateElementsFromFilter(); - BOOL getCheckShowEmpty(); - BOOL getCheckSinceLogoff(); + bool getCheckShowEmpty(); + bool getCheckSinceLogoff(); U32 getDateSearchDirection(); void onCreatorSelfFilterCommit(); @@ -192,7 +192,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) // mSavedFolderState = new LLSaveFolderState(); - mSavedFolderState->setApply(FALSE); + mSavedFolderState->setApply(false); // Filter dropdown // create name-to-number mapping for the dropdown filter @@ -254,7 +254,7 @@ bool LLPanelMainInventory::postBuild() if (recent_items_panel) { // assign default values until we will be sure that we have setting to restore - recent_items_panel->setSinceLogoff(TRUE); + recent_items_panel->setSinceLogoff(true); // Recent items panel should save sort order // recent_items_panel->setSortOrder(LLInventoryFilter::SO_DATE); recent_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::RECENTITEMS_SORT_ORDER)); @@ -288,7 +288,7 @@ bool LLPanelMainInventory::postBuild() if (mWornItemsPanel->getRootFolder()) { - mWornItemsPanel->getRootFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_NO); + mWornItemsPanel->getRootFolder()->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_NO); mWornItemsPanel->getRootFolder()->arrangeAll(); } // @@ -412,7 +412,7 @@ bool LLPanelMainInventory::postBuild() // Trigger callback for focus received so we can deselect items in inbox/outbox LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMainInventory::onFocusReceived, this)); - return TRUE; + return true; } // Destroys the object @@ -509,7 +509,7 @@ void LLPanelMainInventory::startSearch() // this forces focus to line editor portion of search editor if (mFilterEditor) { - mFilterEditor->focusFirstItem(TRUE); + mFilterEditor->focusFirstItem(true); } } @@ -518,8 +518,8 @@ bool LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) // CTRL-F focusses local search editor if (FSCommon::isFilterEditorKeyCombo(key, mask)) { - mFilterEditor->setFocus(TRUE); - return TRUE; + mFilterEditor->setFocus(true); + return true; } // @@ -536,7 +536,7 @@ bool LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) // move focus to inventory proper mActivePanel->setFocus(true); root_folder->scrollToShowSelection(); - return TRUE; + return true; } if (mActivePanel->hasFocus() && key == KEY_UP) @@ -746,7 +746,7 @@ void LLPanelMainInventory::findLinks(const LLUUID& item_id, const std::string& i filter.setFindAllLinksMode(item_name, item_id); mFilterEditor->setText(item_name); - mFilterEditor->setFocus(TRUE); + mFilterEditor->setFocus(true); } void LLPanelMainInventory::setSortBy(const LLSD& userdata) @@ -882,7 +882,7 @@ void LLPanelMainInventory::updateSearchTypeCombo() } } -BOOL LLPanelMainInventory::isSortByChecked(const LLSD& userdata) +bool LLPanelMainInventory::isSortByChecked(const LLSD& userdata) { U32 sort_order_mask = getActivePanel()->getSortOrder(); const std::string command_name = userdata.asString(); @@ -906,22 +906,22 @@ BOOL LLPanelMainInventory::isSortByChecked(const LLSD& userdata) return (sort_order_mask & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP); } - return FALSE; + return false; } // Sort By menu handlers // static -BOOL LLPanelMainInventory::filtersVisible(void* user_data) +bool LLPanelMainInventory::filtersVisible(void* user_data) { LLPanelMainInventory* self = (LLPanelMainInventory*)user_data; - if(!self) return FALSE; + if(!self) return false; return self->getFinder() != NULL; } void LLPanelMainInventory::onClearSearch() { - BOOL initially_active = FALSE; + bool initially_active = false; LLFloater *finder = getFinder(); // Worn inventory panel //if (mActivePanel && (getActivePanel() != mWornItemsPanel)) @@ -945,7 +945,7 @@ void LLPanelMainInventory::onClearSearch() // re-open folders that were initially open in case filter was active if (mActivePanel && (mFilterSubString.size() || initially_active) && !mSingleFolderMode) { - mSavedFolderState->setApply(TRUE); + mSavedFolderState->setApply(true); mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); LLOpenFoldersWithSelection opener; mActivePanel->getRootFolder()->applyFunctorRecursively(opener); @@ -1026,7 +1026,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) // save current folder open state if no filter currently applied if (!mActivePanel->getFilter().isNotDefault()) { - mSavedFolderState->setApply(FALSE); + mSavedFolderState->setApply(false); mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); } @@ -1103,7 +1103,7 @@ void LLPanelMainInventory::onFilterTypeSelected(const std::string& filter_type_n } else { - finder->setFocus(TRUE); + finder->setFocus(true); } return; @@ -1168,7 +1168,7 @@ void LLPanelMainInventory::updateFilterDropdown(const LLInventoryFilter* filter) // Filter dropdown //static - BOOL LLPanelMainInventory::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward) + bool LLPanelMainInventory::incrementalFind(LLFolderViewItem* first_item, const char *find_text, bool backward) { LLPanelMainInventory* active_view = NULL; @@ -1188,23 +1188,23 @@ void LLPanelMainInventory::updateFilterDropdown(const LLInventoryFilter* filter) if (!active_view) { - return FALSE; + return false; } std::string search_string(find_text); if (search_string.empty()) { - return FALSE; + return false; } if (active_view->getPanel() && active_view->getPanel()->getRootFolder()->search(first_item, search_string, backward)) { - return TRUE; + return true; } - return FALSE; + return false; } void LLPanelMainInventory::onFilterSelected() @@ -1473,7 +1473,7 @@ void LLPanelMainInventory::setSelectCallback(const LLFolderView::signal_t::slot_ getChild("Worn Items")->setSelectCallback(cb); } -void LLPanelMainInventory::onSelectionChange(LLInventoryPanel *panel, const std::deque& items, BOOL user_action) +void LLPanelMainInventory::onSelectionChange(LLInventoryPanel *panel, const std::deque& items, bool user_action) { updateListCommands(); panel->onSelectionChange(items, user_action); @@ -1626,40 +1626,40 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() getChild("date_search_direction")->setSelectedIndex(date_search_direction); // FIRE-1175 - Filter Permissions Menu - getChild("check_modify")->setValue((BOOL) (mFilter->getFilterPermissions() & PERM_MODIFY)); - getChild("check_copy")->setValue((BOOL) (mFilter->getFilterPermissions() & PERM_COPY)); - getChild("check_transfer")->setValue((BOOL) (mFilter->getFilterPermissions() & PERM_TRANSFER)); + getChild("check_modify")->setValue((bool) (mFilter->getFilterPermissions() & PERM_MODIFY)); + getChild("check_copy")->setValue((bool) (mFilter->getFilterPermissions() & PERM_COPY)); + getChild("check_transfer")->setValue((bool) (mFilter->getFilterPermissions() & PERM_TRANSFER)); // } void LLFloaterInventoryFinder::draw() { U64 filter = 0xffffffffffffffffULL; - BOOL filtered_by_all_types = TRUE; + bool filtered_by_all_types = true; if (!getChild("check_animation")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_ANIMATION); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_calling_card")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_CALLINGCARD); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_clothing")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_WEARABLE); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_gesture")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_GESTURE); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_landmark")->getValue()) @@ -1667,56 +1667,56 @@ void LLFloaterInventoryFinder::draw() { filter &= ~(0x1 << LLInventoryType::IT_LANDMARK); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_material")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_MATERIAL); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_notecard")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_NOTECARD); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_object")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_OBJECT); filter &= ~(0x1 << LLInventoryType::IT_ATTACHMENT); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_script")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_LSL); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_sound")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_SOUND); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_texture")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_TEXTURE); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_snapshot")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_SNAPSHOT); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!getChild("check_settings")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_SETTINGS); - filtered_by_all_types = FALSE; + filtered_by_all_types = false; } if (!filtered_by_all_types || (mPanelMainInventory->getPanel()->getFilter().getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE)) @@ -1807,7 +1807,7 @@ void LLFloaterInventoryFinder::onCreatorSelfFilterCommit() else if(!show_creator_self || !show_creator_other) { mPanelMainInventory->getCurrentFilter().setFilterCreator(LLInventoryFilter::FILTERCREATOR_OTHERS); - mCreatorOthers->set(TRUE); + mCreatorOthers->set(true); } } @@ -1827,7 +1827,7 @@ void LLFloaterInventoryFinder::onCreatorOtherFilterCommit() else if(!show_creator_other || !show_creator_self) { mPanelMainInventory->getCurrentFilter().setFilterCreator(LLInventoryFilter::FILTERCREATOR_SELF); - mCreatorSelf->set(TRUE); + mCreatorSelf->set(true); } } @@ -1855,12 +1855,12 @@ void LLFloaterInventoryFinder::onPermissionsChanged() } // -BOOL LLFloaterInventoryFinder::getCheckShowEmpty() +bool LLFloaterInventoryFinder::getCheckShowEmpty() { return getChild("check_show_empty")->getValue(); } -BOOL LLFloaterInventoryFinder::getCheckSinceLogoff() +bool LLFloaterInventoryFinder::getCheckSinceLogoff() { return getChild("check_since_logoff")->getValue(); } @@ -1882,19 +1882,19 @@ void LLFloaterInventoryFinder::selectAllTypes(void* user_data) LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data; if(!self) return; - self->getChild("check_animation")->setValue(TRUE); - self->getChild("check_calling_card")->setValue(TRUE); - self->getChild("check_clothing")->setValue(TRUE); - self->getChild("check_gesture")->setValue(TRUE); - self->getChild("check_landmark")->setValue(TRUE); - self->getChild("check_material")->setValue(TRUE); - self->getChild("check_notecard")->setValue(TRUE); - self->getChild("check_object")->setValue(TRUE); - self->getChild("check_script")->setValue(TRUE); - self->getChild("check_sound")->setValue(TRUE); - self->getChild("check_texture")->setValue(TRUE); - self->getChild("check_snapshot")->setValue(TRUE); - self->getChild("check_settings")->setValue(TRUE); + self->getChild("check_animation")->setValue(true); + self->getChild("check_calling_card")->setValue(true); + self->getChild("check_clothing")->setValue(true); + self->getChild("check_gesture")->setValue(true); + self->getChild("check_landmark")->setValue(true); + self->getChild("check_material")->setValue(true); + self->getChild("check_notecard")->setValue(true); + self->getChild("check_object")->setValue(true); + self->getChild("check_script")->setValue(true); + self->getChild("check_sound")->setValue(true); + self->getChild("check_texture")->setValue(true); + self->getChild("check_snapshot")->setValue(true); + self->getChild("check_settings")->setValue(true); } //static @@ -1903,19 +1903,19 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data) LLFloaterInventoryFinder* self = (LLFloaterInventoryFinder*)user_data; if(!self) return; - self->getChild("check_animation")->setValue(FALSE); - self->getChild("check_calling_card")->setValue(FALSE); - self->getChild("check_clothing")->setValue(FALSE); - self->getChild("check_gesture")->setValue(FALSE); - self->getChild("check_landmark")->setValue(FALSE); - self->getChild("check_material")->setValue(FALSE); - self->getChild("check_notecard")->setValue(FALSE); - self->getChild("check_object")->setValue(FALSE); - self->getChild("check_script")->setValue(FALSE); - self->getChild("check_sound")->setValue(FALSE); - self->getChild("check_texture")->setValue(FALSE); - self->getChild("check_snapshot")->setValue(FALSE); - self->getChild("check_settings")->setValue(FALSE); + self->getChild("check_animation")->setValue(false); + self->getChild("check_calling_card")->setValue(false); + self->getChild("check_clothing")->setValue(false); + self->getChild("check_gesture")->setValue(false); + self->getChild("check_landmark")->setValue(false); + self->getChild("check_material")->setValue(false); + self->getChild("check_notecard")->setValue(false); + self->getChild("check_object")->setValue(false); + self->getChild("check_script")->setValue(false); + self->getChild("check_sound")->setValue(false); + self->getChild("check_texture")->setValue(false); + self->getChild("check_snapshot")->setValue(false); + self->getChild("check_settings")->setValue(false); } // Inventory Collapse and Expand Buttons @@ -1954,7 +1954,7 @@ void LLPanelMainInventory::initListCommandsHandlers() // Keep better inventory layout mTrashButton = getChild("trash_btn"); mTrashButton->setDragAndDropHandler(boost::bind(&LLPanelMainInventory::handleDragAndDropToTrash, this - , _4 // BOOL drop + , _4 // bool drop , _5 // EDragAndDropType cargo_type , _7 // EAcceptance* accept )); @@ -2543,13 +2543,13 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) return false; } -BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) +bool LLPanelMainInventory::isActionEnabled(const LLSD& userdata) { const std::string command_name = userdata.asString(); // Unused changes from STORM-2091 that has been fixed by LL differently in the meantime //if (command_name == "not_empty") //{ - // BOOL status = FALSE; + // bool status = false; // LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); // if (current_item) // { @@ -2579,15 +2579,15 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } else{ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); - if (!current_item) return FALSE; + if (!current_item) return false; item_id = static_cast(current_item->getViewModelItem())->getUUID(); } const LLViewerInventoryItem *item = gInventory.getItem(item_id); if (item && item->getIsLinkType() && !item->getIsBrokenLink()) { - return TRUE; + return true; } - return FALSE; + return false; } if (command_name == "find_links") @@ -2600,30 +2600,30 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) else{ LLFolderView* root = getActivePanel()->getRootFolder(); std::set selection_set = root->getSelectionList(); - if (selection_set.size() != 1) return FALSE; + if (selection_set.size() != 1) return false; LLFolderViewItem* current_item = root->getCurSelectedItem(); - if (!current_item) return FALSE; + if (!current_item) return false; item_id = static_cast(current_item->getViewModelItem())->getUUID(); } const LLInventoryObject *obj = gInventory.getObject(item_id); if (obj && !obj->getIsLinkType() && LLAssetType::lookupCanLink(obj->getType())) { - return TRUE; + return true; } - return FALSE; + return false; } // This doesn't currently work, since the viewer can't change an assetID an item. if (command_name == "regenerate_link") { LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); - if (!current_item) return FALSE; + if (!current_item) return false; const LLUUID& item_id = static_cast(current_item->getViewModelItem())->getUUID(); const LLViewerInventoryItem *item = gInventory.getItem(item_id); if (item && item->getIsBrokenLink()) { - return TRUE; + return true; } - return FALSE; + return false; } if (command_name == "share") @@ -2634,9 +2634,9 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } else{ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); - if (!current_item) return FALSE; + if (!current_item) return false; LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel("inventory"); - return parent ? parent->canShare() : FALSE; + return parent ? parent->canShare() : false; } } if (command_name == "empty_trash") @@ -2652,7 +2652,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id); } - return TRUE; + return true; } bool LLPanelMainInventory::isActionVisible(const LLSD& userdata) @@ -2670,7 +2670,7 @@ bool LLPanelMainInventory::isActionVisible(const LLSD& userdata) return true; } -BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata) +bool LLPanelMainInventory::isActionChecked(const LLSD& userdata) { U32 sort_order_mask = (mSingleFolderMode && isGalleryViewMode()) ? mCombinationGalleryPanel->getSortOrder() : getActivePanel()->getSortOrder(); const std::string command_name = userdata.asString(); @@ -2738,7 +2738,7 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata) } - return FALSE; + return false; } // FIRE-31369: Add inventory filter for coalesced objects @@ -2783,7 +2783,7 @@ void LLPanelMainInventory::onFilterLinksChecked(const LLSD& userdata) } } -BOOL LLPanelMainInventory::isFilterLinksChecked(const LLSD& userdata) +bool LLPanelMainInventory::isFilterLinksChecked(const LLSD& userdata) { const std::string command_name = userdata.asString(); if (command_name == "show_links") @@ -2801,7 +2801,7 @@ BOOL LLPanelMainInventory::isFilterLinksChecked(const LLSD& userdata) return (getActivePanel()->getFilter().getFilterLinks() == LLInventoryFilter::FILTERLINK_EXCLUDE_LINKS); } - return FALSE; + return false; } // Filter Links Menu @@ -2832,7 +2832,7 @@ void LLPanelMainInventory::onFilterPermissionsChecked(const LLSD &userdata) } } -BOOL LLPanelMainInventory::isFilterPermissionsChecked(const LLSD &userdata) +bool LLPanelMainInventory::isFilterPermissionsChecked(const LLSD &userdata) { const std::string command_name = userdata.asString(); if (command_name == "only_modify") @@ -2850,7 +2850,7 @@ BOOL LLPanelMainInventory::isFilterPermissionsChecked(const LLSD &userdata) return (getActivePanel()->getFilter().getFilterPermissions() & PERM_TRANSFER); } - return FALSE; + return false; } // @@ -2880,7 +2880,7 @@ void LLPanelMainInventory::onSearchTypeChecked(const LLSD& userdata) } } -BOOL LLPanelMainInventory::isSearchTypeChecked(const LLSD& userdata) +bool LLPanelMainInventory::isSearchTypeChecked(const LLSD& userdata) { LLInventoryFilter::ESearchType search_type = getActivePanel()->getSearchType(); const std::string command_name = userdata.asString(); @@ -2908,12 +2908,12 @@ BOOL LLPanelMainInventory::isSearchTypeChecked(const LLSD& userdata) { return (search_type == LLInventoryFilter::SEARCHTYPE_ALL); } - return FALSE; + return false; } // Extended Inventory Search // Keep better inventory layout -bool LLPanelMainInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept) +bool LLPanelMainInventory::handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, EAcceptance* accept) { *accept = ACCEPT_NO; @@ -3045,7 +3045,7 @@ void LLPanelMainInventory::onCombinationGallerySelectionChanged(const LLUUID& ca { } -void LLPanelMainInventory::onCombinationInventorySelectionChanged(const std::deque& items, BOOL user_action) +void LLPanelMainInventory::onCombinationInventorySelectionChanged(const std::deque& items, bool user_action) { onSelectionChange(mCombinationInventoryPanel, items, user_action); } @@ -3177,9 +3177,9 @@ void LLPanelMainInventory::updateCombinationVisibility() && mCombInvUUIDNeedsRename.notNull() && mCombinationInventoryPanel->areViewsInitialized()) { - mCombinationInventoryPanel->setSelectionByID(mCombInvUUIDNeedsRename, TRUE); + mCombinationInventoryPanel->setSelectionByID(mCombInvUUIDNeedsRename, true); mCombinationInventoryPanel->getRootFolder()->scrollToShowSelection(); - mCombinationInventoryPanel->getRootFolder()->setNeedsAutoRename(TRUE); + mCombinationInventoryPanel->getRootFolder()->setNeedsAutoRename(true); mCombInvUUIDNeedsRename.setNull(); } } diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 1570a866ff..fb918dea83 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -161,14 +161,14 @@ protected: void setFilterTextFromFilter(); void startSearch(); - void onSelectionChange(LLInventoryPanel *panel, const std::deque& items, BOOL user_action); + void onSelectionChange(LLInventoryPanel *panel, const std::deque& items, bool user_action); - static BOOL filtersVisible(void* user_data); + static bool filtersVisible(void* user_data); void onClearSearch(); static void onFoldersByName(void *user_data); - static BOOL checkFoldersByName(void *user_data); + static bool checkFoldersByName(void *user_data); - static BOOL incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward); + static bool incrementalFind(LLFolderViewItem* first_item, const char *find_text, bool backward); void onFilterSelected(); const std::string getFilterSubString(); @@ -181,7 +181,7 @@ protected: // Sort By menu handlers void setSortBy(const LLSD& userdata); - BOOL isSortByChecked(const LLSD& userdata); + bool isSortByChecked(const LLSD& userdata); // Sort By menu handlers void saveTexture(const LLSD& userdata); @@ -257,8 +257,8 @@ protected: void showActionMenu(LLMenuGL* menu, std::string spawning_view_name); void onTrashButtonClick(); // Keep better inventory layout void onClipboardAction(const LLSD& userdata); - BOOL isActionEnabled(const LLSD& command_name); - BOOL isActionChecked(const LLSD& userdata); + bool isActionEnabled(const LLSD& command_name); + bool isActionChecked(const LLSD& userdata); void onCustomAction(const LLSD& command_name); bool isActionVisible(const LLSD& userdata); @@ -268,22 +268,22 @@ protected: // // Filter Links Menu - BOOL isFilterLinksChecked(const LLSD& userdata); + bool isFilterLinksChecked(const LLSD& userdata); void onFilterLinksChecked(const LLSD& userdata); // Filter Links Menu // FIRE-1175 - Filter Permissions Menu - BOOL isFilterPermissionsChecked(const LLSD &userdata); + bool isFilterPermissionsChecked(const LLSD &userdata); void onFilterPermissionsChecked(const LLSD &userdata); // // Extended Inventory Search - BOOL isSearchTypeChecked(const LLSD& userdata); + bool isSearchTypeChecked(const LLSD& userdata); void onSearchTypeChecked(const LLSD& userdata); // Extended Inventory Search // Keep better inventory layout - bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); + bool handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, EAcceptance* accept); static bool hasSettingsInventory(); static bool hasMaterialsInventory(); void updateTitle(); @@ -291,7 +291,7 @@ protected: void onCombinationRootChanged(bool gallery_clicked); void onCombinationGallerySelectionChanged(const LLUUID& category_id); - void onCombinationInventorySelectionChanged(const std::deque& items, BOOL user_action); + void onCombinationInventorySelectionChanged(const std::deque& items, bool user_action); /** * Set upload cost in "Upload" sub menu. */ diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp index 3b187a8968..83969f4661 100644 --- a/indra/newview/llpanelmarketplaceinbox.cpp +++ b/indra/newview/llpanelmarketplaceinbox.cpp @@ -54,7 +54,7 @@ LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p) , mSavedFolderState(NULL) { mSavedFolderState = new LLSaveFolderState(); - mSavedFolderState->setApply(FALSE); + mSavedFolderState->setApply(false); } LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox() @@ -75,7 +75,7 @@ bool LLPanelMarketplaceInbox::postBuild() // FIRE-21948: Show element count in Received Items folder //void LLPanelMarketplaceInbox::onSelectionChange() -void LLPanelMarketplaceInbox::onSelectionChange(const std::deque& items, BOOL user_action) +void LLPanelMarketplaceInbox::onSelectionChange(const std::deque& items, bool user_action) // { @@ -115,7 +115,7 @@ LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel() mInventoryPanel->getFilter().setEmptyLookupMessage("InventoryInboxNoItems"); // Hide the placeholder text - inbox_inventory_placeholder->setVisible(FALSE); + inbox_inventory_placeholder->setVisible(false); return mInventoryPanel; } @@ -209,7 +209,7 @@ void LLPanelMarketplaceInbox::onClearSearch() if (mInventoryPanel) { mInventoryPanel->setFilterSubString(LLStringUtil::null); - mSavedFolderState->setApply(TRUE); + mSavedFolderState->setApply(true); mInventoryPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); LLOpenFoldersWithSelection opener; mInventoryPanel->getRootFolder()->applyFunctorRecursively(opener); @@ -229,7 +229,7 @@ void LLPanelMarketplaceInbox::onFilterEdit(const std::string& search_string) if (!mInventoryPanel->getFilter().isNotDefault()) { - mSavedFolderState->setApply(FALSE); + mSavedFolderState->setApply(false); mInventoryPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); } mInventoryPanel->setFilterSubString(search_string); @@ -283,7 +283,7 @@ void LLPanelMarketplaceInbox::draw() { mInboxButton->setLabel(getString("InboxLabelNoArg")); - mFreshCountCtrl->setVisible(FALSE); + mFreshCountCtrl->setVisible(false); } LLPanel::draw(); diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h index d3fb8dc379..9417820315 100644 --- a/indra/newview/llpanelmarketplaceinbox.h +++ b/indra/newview/llpanelmarketplaceinbox.h @@ -68,7 +68,7 @@ private: // FIRE-21948: Show element count in Received Items folder //void onSelectionChange(); - void onSelectionChange(const std::deque& items, BOOL user_action); + void onSelectionChange(const std::deque& items, bool user_action); // void onFocusReceived() override; diff --git a/indra/newview/llpanelmediasettingspermissions.cpp b/indra/newview/llpanelmediasettingspermissions.cpp index 99b158550b..befa74db5c 100644 --- a/indra/newview/llpanelmediasettingspermissions.cpp +++ b/indra/newview/llpanelmediasettingspermissions.cpp @@ -95,7 +95,7 @@ void LLPanelMediaSettingsPermissions::draw() getChild("perms_group_name")->setValue(LLStringUtil::null); LLUUID group_id; - BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); + bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) { if(mPermsGroupName) @@ -107,7 +107,7 @@ void LLPanelMediaSettingsPermissions::draw() { if(mPermsGroupName) { - mPermsGroupName->setNameID(LLUUID::null, TRUE); + mPermsGroupName->setNameID(LLUUID::null, true); mPermsGroupName->refresh(LLUUID::null, std::string(), true); } } diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 7976f730eb..cab82bbd68 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -309,17 +309,17 @@ bool LLPanelObject::postBuild() LLAggregatePermissions texture_perms; if (LLSelectMgr::getInstance()->selectGetAggregateTexturePermissions(texture_perms)) { - BOOL can_copy = + bool can_copy = texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_EMPTY || texture_perms.getValue(PERM_COPY) == LLAggregatePermissions::AP_ALL; - BOOL can_transfer = + bool can_transfer = texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_EMPTY || texture_perms.getValue(PERM_TRANSFER) == LLAggregatePermissions::AP_ALL; mCtrlSculptTexture->setCanApplyImmediately(can_copy && can_transfer); } else { - mCtrlSculptTexture->setCanApplyImmediately(FALSE); + mCtrlSculptTexture->setCanApplyImmediately(false); } } @@ -338,7 +338,7 @@ bool LLPanelObject::postBuild() clearCtrls(); // Aurora Sim - updateLimits(FALSE); // default to non-attachment + updateLimits(false); // default to non-attachment // Aurora Sim changePrecision(gSavedSettings.getS32("FSBuildToolDecimalPrecision")); // Adjustable decimal precision @@ -348,16 +348,16 @@ bool LLPanelObject::postBuild() LLPanelObject::LLPanelObject() : LLPanel(), - mIsPhysical(FALSE), - mIsTemporary(FALSE), - mIsPhantom(FALSE), + mIsPhysical(false), + mIsTemporary(false), + mIsPhantom(false), mSelectedType(MI_BOX), mSculptTextureRevert(LLUUID::null), mSculptTypeRevert(0), mHasClipboardPos(false), mHasClipboardSize(false), mHasClipboardRot(false), - mSizeChanged(FALSE) + mSizeChanged(false) { // Extended copy & paste buttons //mCommitCallbackRegistrar.add("PanelObject.menuDoToSelected", boost::bind(&LLPanelObject::menuDoToSelected, this, _2)); @@ -372,7 +372,7 @@ LLPanelObject::~LLPanelObject() } // -void LLPanelObject::updateLimits(BOOL attachment) +void LLPanelObject::updateLimits(bool attachment) { // Aurora Sim //mRegionMaxHeight = LLWorld::getInstance()->getRegionMaxHeight(); @@ -498,7 +498,7 @@ void LLPanelObject::getState( ) } S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); - BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) + bool single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) && (selected_count == 1); // FIRE-8205: Unable to edit attachment to negative coordinates @@ -511,8 +511,8 @@ void LLPanelObject::getState( ) LLSelectMgr::getInstance()->selectGetEditMoveLinksetPermissions(enable_move, enable_modify); - BOOL enable_scale = enable_modify; - BOOL enable_rotate = enable_move; // already accounts for a case of children, which needs permModify() as well + bool enable_scale = enable_modify; + bool enable_rotate = enable_move; // already accounts for a case of children, which needs permModify() as well LLVector3 vec; if (enable_move) @@ -623,20 +623,20 @@ void LLPanelObject::getState( ) // BUG? Check for all objects being editable? S32 roots_selected = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount(); - BOOL editable = root_objectp->permModify(); + bool editable = root_objectp->permModify(); - BOOL is_flexible = volobjp && volobjp->isFlexible(); - BOOL is_permanent = root_objectp->flagObjectPermanent(); - BOOL is_permanent_enforced = root_objectp->isPermanentEnforced(); - BOOL is_character = root_objectp->flagCharacter(); + bool is_flexible = volobjp && volobjp->isFlexible(); + bool is_permanent = root_objectp->flagObjectPermanent(); + bool is_permanent_enforced = root_objectp->isPermanentEnforced(); + bool is_character = root_objectp->flagCharacter(); llassert(!is_permanent || !is_character); // should never have a permanent object that is also a character // Lock checkbox - only modifiable if you own the object. - BOOL self_owned = (gAgent.getID() == owner_id); + bool self_owned = (gAgent.getID() == owner_id); mCheckLock->setEnabled( roots_selected > 0 && self_owned && !is_permanent_enforced); // More lock and debit checkbox - get the values - BOOL valid; + bool valid; U32 owner_mask_on; U32 owner_mask_off; valid = LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, &owner_mask_on, &owner_mask_off); @@ -646,20 +646,20 @@ void LLPanelObject::getState( ) if(owner_mask_on & PERM_MOVE) { // owner can move, so not locked - mCheckLock->set(FALSE); - mCheckLock->setTentative(FALSE); + mCheckLock->set(false); + mCheckLock->setTentative(false); } else if(owner_mask_off & PERM_MOVE) { // owner can't move, so locked - mCheckLock->set(TRUE); - mCheckLock->setTentative(FALSE); + mCheckLock->set(true); + mCheckLock->setTentative(false); } else { // some locked, some not locked - mCheckLock->set(FALSE); - mCheckLock->setTentative(TRUE); + mCheckLock->set(false); + mCheckLock->setTentative(true); } } @@ -679,7 +679,7 @@ void LLPanelObject::getState( ) mCheckTemporary->setEnabled( roots_selected>0 && editable && !is_permanent); mIsPhantom = root_objectp->flagPhantom(); - BOOL is_volume_detect = root_objectp->flagVolumeDetect(); + bool is_volume_detect = root_objectp->flagVolumeDetect(); llassert(!is_character || !mIsPhantom); // should never have a character that is also a phantom mCheckPhantom->set( mIsPhantom ); mCheckPhantom->setEnabled( roots_selected>0 && editable && !is_flexible && !is_permanent_enforced && !is_character && !is_volume_detect); @@ -688,10 +688,10 @@ void LLPanelObject::getState( ) S32 selected_item = MI_BOX; S32 selected_hole = MI_HOLE_SAME; - BOOL enabled = FALSE; - BOOL hole_enabled = FALSE; + bool enabled = false; + bool hole_enabled = false; F32 scale_x=1.f, scale_y=1.f; - BOOL isMesh = FALSE; + bool isMesh = false; if( !objectp || !objectp->getVolume() || !editable || !single_volume) { @@ -737,7 +737,7 @@ void LLPanelObject::getState( ) scale_x = volume_params.getRatioX(); scale_y = volume_params.getRatioY(); - BOOL linear_path = (path == LL_PCODE_PATH_LINE) || (path == LL_PCODE_PATH_FLEXIBLE); + bool linear_path = (path == LL_PCODE_PATH_LINE) || (path == LL_PCODE_PATH_FLEXIBLE); if ( linear_path && profile == LL_PCODE_PROFILE_CIRCLE ) { selected_item = MI_CYLINDER; @@ -891,7 +891,7 @@ void LLPanelObject::getState( ) else { mComboHoleType->setCurrentByIndex( MI_HOLE_SAME ); - hole_enabled = FALSE; + hole_enabled = false; } // Cut interpretation varies based on base object type @@ -1028,41 +1028,41 @@ void LLPanelObject::getState( ) // Compute control visibility, label names, and twist range. // Start with defaults. // FIRE-21772 mComboBaseType remians invisible after editing a mesh - mComboBaseType->setVisible(TRUE); + mComboBaseType->setVisible(true); // - BOOL cut_visible = TRUE; - BOOL hollow_visible = TRUE; - BOOL top_size_x_visible = TRUE; - BOOL top_size_y_visible = TRUE; - BOOL top_shear_x_visible = TRUE; - BOOL top_shear_y_visible = TRUE; - BOOL twist_visible = TRUE; + bool cut_visible = true; + bool hollow_visible = true; + bool top_size_x_visible = true; + bool top_size_y_visible = true; + bool top_shear_x_visible = true; + bool top_shear_y_visible = true; + bool twist_visible = true; //KC: Phoenix capability, allow all transforms - BOOL advanced_cut_visible = TRUE; - BOOL taper_visible = TRUE; - BOOL skew_visible = TRUE; - BOOL radius_offset_visible = TRUE; - BOOL revolutions_visible = TRUE; - BOOL sculpt_texture_visible = FALSE; + bool advanced_cut_visible = true; + bool taper_visible = true; + bool skew_visible = true; + bool radius_offset_visible = true; + bool revolutions_visible = true; + bool sculpt_texture_visible = false; F32 twist_min = OBJECT_TWIST_LINEAR_MIN; F32 twist_max = OBJECT_TWIST_LINEAR_MAX; F32 twist_inc = OBJECT_TWIST_LINEAR_INC; - BOOL advanced_is_dimple = FALSE; - BOOL advanced_is_slice = FALSE; - BOOL size_is_hole = FALSE; + bool advanced_is_dimple = false; + bool advanced_is_slice = false; + bool size_is_hole = false; // Tune based on overall volume type switch (selected_item) { case MI_SPHERE: - top_size_x_visible = TRUE; - top_size_y_visible = TRUE; - top_shear_x_visible = TRUE; - top_shear_y_visible = TRUE; - twist_visible = TRUE; - advanced_cut_visible = TRUE; - advanced_is_dimple = TRUE; + top_size_x_visible = true; + top_size_y_visible = true; + top_shear_x_visible = true; + top_shear_y_visible = true; + twist_visible = true; + advanced_cut_visible = true; + advanced_is_dimple = true; twist_min = OBJECT_TWIST_MIN; twist_max = OBJECT_TWIST_MAX; twist_inc = OBJECT_TWIST_INC; @@ -1071,14 +1071,14 @@ void LLPanelObject::getState( ) case MI_TORUS: case MI_TUBE: case MI_RING: - //top_size_x_visible = FALSE; - //top_size_y_visible = FALSE; - size_is_hole = TRUE; - skew_visible = TRUE; - advanced_cut_visible = TRUE; - taper_visible = TRUE; - radius_offset_visible = TRUE; - revolutions_visible = TRUE; + //top_size_x_visible = false; + //top_size_y_visible = false; + size_is_hole = true; + skew_visible = true; + advanced_cut_visible = true; + taper_visible = true; + radius_offset_visible = true; + revolutions_visible = true; twist_min = OBJECT_TWIST_MIN; twist_max = OBJECT_TWIST_MAX; twist_inc = OBJECT_TWIST_INC; @@ -1086,36 +1086,36 @@ void LLPanelObject::getState( ) break; case MI_SCULPT: - cut_visible = FALSE; - hollow_visible = FALSE; - twist_visible = FALSE; - top_size_x_visible = FALSE; - top_size_y_visible = FALSE; - top_shear_x_visible = FALSE; - top_shear_y_visible = FALSE; - skew_visible = FALSE; - advanced_cut_visible = FALSE; - taper_visible = FALSE; - radius_offset_visible = FALSE; - revolutions_visible = FALSE; - sculpt_texture_visible = TRUE; + cut_visible = false; + hollow_visible = false; + twist_visible = false; + top_size_x_visible = false; + top_size_y_visible = false; + top_shear_x_visible = false; + top_shear_y_visible = false; + skew_visible = false; + advanced_cut_visible = false; + taper_visible = false; + radius_offset_visible = false; + revolutions_visible = false; + sculpt_texture_visible = true; break; case MI_BOX: - advanced_cut_visible = TRUE; - advanced_is_slice = TRUE; - taper_visible = FALSE; //KC: does nothing for boxes + advanced_cut_visible = true; + advanced_is_slice = true; + taper_visible = false; //KC: does nothing for boxes break; case MI_CYLINDER: - advanced_cut_visible = TRUE; - advanced_is_slice = TRUE; + advanced_cut_visible = true; + advanced_is_slice = true; break; case MI_PRISM: - advanced_cut_visible = TRUE; - advanced_is_slice = TRUE; + advanced_cut_visible = true; + advanced_is_slice = true; break; default: @@ -1225,18 +1225,18 @@ void LLPanelObject::getState( ) mLabelSkew ->setEnabled( enabled ); mSpinSkew ->setEnabled( enabled ); - getChildView("scale_hole")->setVisible( FALSE); - getChildView("scale_taper")->setVisible( FALSE); + getChildView("scale_hole")->setVisible( false); + getChildView("scale_taper")->setVisible( false); if (top_size_x_visible || top_size_y_visible) { if (size_is_hole) { - getChildView("scale_hole")->setVisible( TRUE); + getChildView("scale_hole")->setVisible( true); getChildView("scale_hole")->setEnabled(enabled); } else { - getChildView("scale_taper")->setVisible( TRUE); + getChildView("scale_taper")->setVisible( true); getChildView("scale_taper")->setEnabled(enabled); } } @@ -1248,26 +1248,26 @@ void LLPanelObject::getState( ) mSpinShearX ->setEnabled( enabled ); mSpinShearY ->setEnabled( enabled ); - getChildView("advanced_cut")->setVisible( FALSE); - getChildView("advanced_dimple")->setVisible( FALSE); - getChildView("advanced_slice")->setVisible( FALSE); + getChildView("advanced_cut")->setVisible( false); + getChildView("advanced_dimple")->setVisible( false); + getChildView("advanced_slice")->setVisible( false); if (advanced_cut_visible) { if (advanced_is_dimple) { - getChildView("advanced_dimple")->setVisible( TRUE); + getChildView("advanced_dimple")->setVisible( true); getChildView("advanced_dimple")->setEnabled(enabled); } else if (advanced_is_slice) { - getChildView("advanced_slice")->setVisible( TRUE); + getChildView("advanced_slice")->setVisible( true); getChildView("advanced_slice")->setEnabled(enabled); } else { - getChildView("advanced_cut")->setVisible( TRUE); + getChildView("advanced_cut")->setVisible( true); getChildView("advanced_cut")->setEnabled(enabled); } } @@ -1355,8 +1355,8 @@ void LLPanelObject::getState( ) U8 sculpt_type = sculpt_params->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_invert = sculpt_type & LL_SCULPT_FLAG_INVERT; + bool sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; isMesh = (sculpt_stitching == LL_SCULPT_TYPE_MESH); // FIRE-21445 - Show specific LOD + Mesh Info in object panel @@ -1375,7 +1375,7 @@ void LLPanelObject::getState( ) LLTextureCtrl* mTextureCtrl = getChild("sculpt texture control"); if (mTextureCtrl) { - mTextureCtrl->setTentative(FALSE); + mTextureCtrl->setTentative(false); mTextureCtrl->setEnabled(editable && !isMesh); if (editable) mTextureCtrl->setImageAssetID(sculpt_params->getSculptTexture()); @@ -1415,7 +1415,7 @@ void LLPanelObject::getState( ) if (mLabelSculptType) { - mLabelSculptType->setEnabled(TRUE); + mLabelSculptType->setEnabled(true); } // FIRE-21445 } @@ -1440,61 +1440,61 @@ void LLPanelObject::deactivateStandardFields() { // Update field visibility - mComboBaseType->setEnabled(FALSE); - mComboBaseType->setVisible(FALSE); + mComboBaseType->setEnabled(false); + mComboBaseType->setVisible(false); - mLabelCut->setVisible(FALSE); - mSpinCutBegin->setVisible(FALSE); - mSpinCutEnd->setVisible(FALSE); + mLabelCut->setVisible(false); + mSpinCutBegin->setVisible(false); + mSpinCutEnd->setVisible(false); - mLabelHollow->setVisible(FALSE); - mSpinHollow->setVisible(FALSE); - mLabelHoleType->setVisible(FALSE); - mComboHoleType->setVisible(FALSE); + mLabelHollow->setVisible(false); + mSpinHollow->setVisible(false); + mLabelHoleType->setVisible(false); + mComboHoleType->setVisible(false); - mLabelTwist->setVisible(FALSE); - mSpinTwist->setVisible(FALSE); - mSpinTwistBegin->setVisible(FALSE); - mSpinTwist->setMinValue(FALSE); - mSpinTwist->setMaxValue(FALSE); - mSpinTwist->setIncrement(FALSE); - mSpinTwistBegin->setMinValue(FALSE); - mSpinTwistBegin->setMaxValue(FALSE); - mSpinTwistBegin->setIncrement(FALSE); + mLabelTwist->setVisible(false); + mSpinTwist->setVisible(false); + mSpinTwistBegin->setVisible(false); + mSpinTwist->setMinValue(false); + mSpinTwist->setMaxValue(false); + mSpinTwist->setIncrement(false); + mSpinTwistBegin->setMinValue(false); + mSpinTwistBegin->setMaxValue(false); + mSpinTwistBegin->setIncrement(false); - mSpinScaleX->setVisible(FALSE); - mSpinScaleY->setVisible(FALSE); + mSpinScaleX->setVisible(false); + mSpinScaleY->setVisible(false); - mLabelSkew->setVisible(FALSE); - mSpinSkew->setVisible(FALSE); + mLabelSkew->setVisible(false); + mSpinSkew->setVisible(false); - mLabelShear->setVisible(FALSE); - mSpinShearX->setVisible(FALSE); - mSpinShearY->setVisible(FALSE); + mLabelShear->setVisible(false); + mSpinShearX->setVisible(false); + mSpinShearY->setVisible(false); - mCtrlPathBegin->setVisible(FALSE); - mCtrlPathEnd->setVisible(FALSE); + mCtrlPathBegin->setVisible(false); + mCtrlPathEnd->setVisible(false); - mLabelTaper->setVisible(FALSE); - mSpinTaperX->setVisible(FALSE); - mSpinTaperY->setVisible(FALSE); + mLabelTaper->setVisible(false); + mSpinTaperX->setVisible(false); + mSpinTaperY->setVisible(false); - mLabelRadiusOffset->setVisible(FALSE); - mSpinRadiusOffset->setVisible(FALSE); + mLabelRadiusOffset->setVisible(false); + mSpinRadiusOffset->setVisible(false); - mLabelRevolutions->setVisible(FALSE); - mSpinRevolutions->setVisible(FALSE); + mLabelRevolutions->setVisible(false); + mSpinRevolutions->setVisible(false); - mCtrlSculptTexture->setVisible(FALSE); - mLabelSculptType->setVisible(FALSE); - mCtrlSculptType->setVisible(FALSE); + mCtrlSculptTexture->setVisible(false); + mLabelSculptType->setVisible(false); + mCtrlSculptType->setVisible(false); - getChildView("scale_hole")->setVisible(FALSE); - getChildView("scale_taper")->setVisible(FALSE); + getChildView("scale_hole")->setVisible(false); + getChildView("scale_taper")->setVisible(false); - getChildView("advanced_cut")->setVisible(FALSE); - getChildView("advanced_dimple")->setVisible(FALSE); - getChildView("advanced_slice")->setVisible(FALSE); + getChildView("advanced_cut")->setVisible(false); + getChildView("advanced_dimple")->setVisible(false); + getChildView("advanced_slice")->setVisible(false); } void LLPanelObject::activateMeshFields(LLViewerObject* objectp) @@ -1508,15 +1508,15 @@ void LLPanelObject::activateMeshFields(LLViewerObject* objectp) args[dataFields[i]] = llformat("%d", objectp->mDrawable->getVOVolume()->getLODTriangleCount(i)); } num_tris->setText(getString("mesh_lod_num_tris_values",args)); - num_tris->setVisible(TRUE); + num_tris->setVisible(true); childSetVisible("mesh_info_label", true); childSetVisible("lod_label", true); childSetVisible("lod_num_tris", true); childSetVisible("mesh_lod_label", true); // Mesh specific display - mComboLOD->setEnabled(TRUE); - mComboLOD->setVisible(TRUE); + mComboLOD->setEnabled(true); + mComboLOD->setVisible(true); F32 radius; @@ -1545,7 +1545,7 @@ void LLPanelObject::activateMeshFields(LLViewerObject* objectp) childSetVisible("object_radius", true); LLTextBox* tb = getChild("object_radius_value"); tb->setText(llformat("%.3f", radius)); - tb->setVisible(TRUE); + tb->setVisible(true); childSetVisible("LOD_swap_defaults_label", true); childSetVisible("LOD_swap_usr_label", true); @@ -1560,7 +1560,7 @@ void LLPanelObject::activateMeshFields(LLViewerObject* objectp) args["FACTOR"] = llformat("%.3f", factor); tb = getChild("LOD_swap_ll_default"); tb->setToolTip(getString("ll_lod_tooltip_msg",args)); - tb->setVisible(TRUE); + tb->setVisible(true); tb = getChild("LOD_swap_ll_values"); setLODDistValues(tb, factor, dmid, dlow, dlowest); @@ -1570,7 +1570,7 @@ void LLPanelObject::activateMeshFields(LLViewerObject* objectp) args["FACTOR"] = llformat("%.3f", factor); tb = getChild("LOD_swap_fs_default"); tb->setToolTip(getString("fs_lod_tooltip_msg", args)); - tb->setVisible(TRUE); + tb->setVisible(true); tb = getChild("LOD_swap_fs_values"); setLODDistValues(tb, factor, dmid, dlow, dlowest); @@ -1580,7 +1580,7 @@ void LLPanelObject::activateMeshFields(LLViewerObject* objectp) args["FACTOR"] = llformat("%.3f", factor); tb = getChild("LOD_swap_usr_current"); tb->setText(getString("user_lod_label_string", args));// Note: here we are setting the label not the tooltip - tb->setVisible(TRUE); + tb->setVisible(true); tb = getChild("LOD_swap_usr_values"); setLODDistValues(tb, factor, dmid, dlow, dlowest); @@ -1595,8 +1595,8 @@ void LLPanelObject::setLODDistValues(LLTextBox* tb, F32 factor, F32 dmid, F32 dl args["MED2LOW"] = llformat("%.1f", factor*dlow); args["LOW2LOWEST"] = llformat("%.1f", factor*dlowest); tb->setText(getString("LODSwapFormatString",args)); - tb->setVisible(TRUE); - tb->setEnabled(TRUE); + tb->setVisible(true); + tb->setEnabled(true); } } @@ -1612,12 +1612,12 @@ void LLPanelObject::deactivateMeshFields() // mComboLOD->setCurrentByIndex(0); - mComboLOD->setEnabled(FALSE); - mComboLOD->setVisible(FALSE); + mComboLOD->setEnabled(false); + mComboLOD->setVisible(false); childSetVisible("object_radius", false); LLTextBox* tb = getChild("object_radius_value"); - tb->setVisible(FALSE); + tb->setVisible(false); childSetVisible("ObjectLODbehaviourLabel", false); childSetVisible("LOD_swap_defaults_label", false); @@ -1639,12 +1639,12 @@ void LLPanelObject::deactivateMeshFields() bool LLPanelObject::precommitValidate( const LLSD& data ) { // TODO: Richard will fill this in later. - return TRUE; // FALSE means that validation failed and new value should not be commited. + return true; // false means that validation failed and new value should not be commited. } void LLPanelObject::sendIsPhysical() { - BOOL value = mCheckPhysics->get(); + bool value = mCheckPhysics->get(); if( mIsPhysical != value ) { LLSelectMgr::getInstance()->selectionUpdatePhysics(value); @@ -1660,7 +1660,7 @@ void LLPanelObject::sendIsPhysical() void LLPanelObject::sendIsTemporary() { - BOOL value = mCheckTemporary->get(); + bool value = mCheckTemporary->get(); if( mIsTemporary != value ) { LLSelectMgr::getInstance()->selectionUpdateTemporary(value); @@ -1677,7 +1677,7 @@ void LLPanelObject::sendIsTemporary() void LLPanelObject::sendIsPhantom() { - BOOL value = mCheckPhantom->get(); + bool value = mCheckPhantom->get(); if( mIsPhantom != value ) { LLSelectMgr::getInstance()->selectionUpdatePhantom(value); @@ -1736,7 +1736,7 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata ) if (selected_type == MI_SCULPT) { - self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE); + self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, true, true); LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT); if (sculpt_params) volume_params.setSculptID(sculpt_params->getSculptTexture(), sculpt_params->getSculptType()); @@ -1745,7 +1745,7 @@ void LLPanelObject::onCommitParametric( LLUICtrl* ctrl, void* userdata ) { LLSculptParams *sculpt_params = (LLSculptParams *)self->mObject->getParameterEntry(LLNetworkData::PARAMS_SCULPT); if (sculpt_params) - self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, FALSE, TRUE); + self->mObject->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, false, true); } // Update the volume, if necessary. @@ -2130,7 +2130,7 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params) } // BUG: Make work with multiple objects -void LLPanelObject::sendRotation(BOOL btn_down) +void LLPanelObject::sendRotation(bool btn_down) { if (mObject.isNull()) return; @@ -2201,7 +2201,7 @@ F32 llpanelobject_max_prim_scale() } // BUG: Make work with multiple objects -void LLPanelObject::sendScale(BOOL btn_down) +void LLPanelObject::sendScale(bool btn_down) { if (mObject.isNull()) return; @@ -2223,20 +2223,20 @@ void LLPanelObject::sendScale(BOOL btn_down) // check to see if we aren't scaling the textures // (in which case the tex coord's need to be recomputed) - BOOL dont_stretch_textures = !LLManipScale::getStretchTextures(); + bool dont_stretch_textures = !LLManipScale::getStretchTextures(); if (dont_stretch_textures) { LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_SCALE); } - mObject->setScale(newscale, TRUE); + mObject->setScale(newscale, true); if(!btn_down) { LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_SCALE | UPD_POSITION); } - LLSelectMgr::getInstance()->adjustTexturesByScale(TRUE, !dont_stretch_textures); + LLSelectMgr::getInstance()->adjustTexturesByScale(true, !dont_stretch_textures); // LL_INFOS() << "scale sent" << LL_ENDL; } else @@ -2246,7 +2246,7 @@ void LLPanelObject::sendScale(BOOL btn_down) } -void LLPanelObject::sendPosition(BOOL btn_down) +void LLPanelObject::sendPosition(bool btn_down) { if (mObject.isNull()) return; @@ -2343,7 +2343,7 @@ void LLPanelObject::sendPosition(BOOL btn_down) if (mObject->isRootEdit()) { // counter-translate child objects if we are moving the root as an individual - mObject->resetChildrenPosition(old_position_local - new_position_local, TRUE); + mObject->resetChildrenPosition(old_position_local - new_position_local, true); } if (!btn_down) @@ -2379,7 +2379,7 @@ void LLPanelObject::sendPosition(BOOL btn_down) if (mObject->isRootEdit()) { // only offset by parent's translation - mObject->resetChildrenPosition(LLVector3(-delta), TRUE, TRUE) ; + mObject->resetChildrenPosition(LLVector3(-delta), true, true) ; } if(!btn_down) @@ -2420,11 +2420,11 @@ void LLPanelObject::sendSculpt() if (mCtrlSculptMirror) { - mCtrlSculptMirror->setEnabled(enabled ? TRUE : FALSE); + mCtrlSculptMirror->setEnabled(enabled ? true : false); } if (mCtrlSculptInvert) { - mCtrlSculptInvert->setEnabled(enabled ? TRUE : FALSE); + mCtrlSculptInvert->setEnabled(enabled ? true : false); } if ((mCtrlSculptMirror) && (mCtrlSculptMirror->get())) @@ -2434,7 +2434,7 @@ void LLPanelObject::sendSculpt() sculpt_type |= LL_SCULPT_FLAG_INVERT; sculpt_params.setSculptTexture(sculpt_id, sculpt_type); - mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); + mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, true); } void LLPanelObject::refresh() @@ -2538,34 +2538,34 @@ void LLPanelObject::clearCtrls() { LLPanel::clearCtrls(); - mCheckLock ->set(FALSE); - mCheckLock ->setEnabled( FALSE ); - mCheckPhysics ->set(FALSE); - mCheckPhysics ->setEnabled( FALSE ); - mCheckTemporary ->set(FALSE); - mCheckTemporary ->setEnabled( FALSE ); - mCheckPhantom ->set(FALSE); - mCheckPhantom ->setEnabled( FALSE ); + mCheckLock ->set(false); + mCheckLock ->setEnabled( false ); + mCheckPhysics ->set(false); + mCheckPhysics ->setEnabled( false ); + mCheckTemporary ->set(false); + mCheckTemporary ->setEnabled( false ); + mCheckPhantom ->set(false); + mCheckPhantom ->setEnabled( false ); // Disable text labels - mLabelPosition ->setEnabled( FALSE ); - mLabelSize ->setEnabled( FALSE ); - mLabelRotation ->setEnabled( FALSE ); - mLabelCut ->setEnabled( FALSE ); - mLabelHollow ->setEnabled( FALSE ); - mLabelHoleType ->setEnabled( FALSE ); - mLabelTwist ->setEnabled( FALSE ); - mLabelSkew ->setEnabled( FALSE ); - mLabelShear ->setEnabled( FALSE ); - mLabelTaper ->setEnabled( FALSE ); - mLabelRadiusOffset->setEnabled( FALSE ); - mLabelRevolutions->setEnabled( FALSE ); + mLabelPosition ->setEnabled( false ); + mLabelSize ->setEnabled( false ); + mLabelRotation ->setEnabled( false ); + mLabelCut ->setEnabled( false ); + mLabelHollow ->setEnabled( false ); + mLabelHoleType ->setEnabled( false ); + mLabelTwist ->setEnabled( false ); + mLabelSkew ->setEnabled( false ); + mLabelShear ->setEnabled( false ); + mLabelTaper ->setEnabled( false ); + mLabelRadiusOffset->setEnabled( false ); + mLabelRevolutions->setEnabled( false ); - getChildView("scale_hole")->setEnabled(FALSE); - getChildView("scale_taper")->setEnabled(FALSE); - getChildView("advanced_cut")->setEnabled(FALSE); - getChildView("advanced_dimple")->setEnabled(FALSE); - getChildView("advanced_slice")->setVisible( FALSE); + getChildView("scale_hole")->setEnabled(false); + getChildView("scale_taper")->setEnabled(false); + getChildView("advanced_cut")->setEnabled(false); + getChildView("advanced_dimple")->setEnabled(false); + getChildView("advanced_slice")->setVisible( false); } // @@ -2580,7 +2580,7 @@ void LLPanelObject::onCommitLock(LLUICtrl *ctrl, void *data) if(self->mRootObject.isNull()) return; - BOOL new_state = self->mCheckLock->get(); + bool new_state = self->mCheckLock->get(); LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, !new_state, PERM_MOVE | PERM_MODIFY); } @@ -2589,7 +2589,7 @@ void LLPanelObject::onCommitLock(LLUICtrl *ctrl, void *data) void LLPanelObject::onCommitPosition( LLUICtrl* ctrl, void* userdata ) { LLPanelObject* self = (LLPanelObject*) userdata; - BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ; + bool btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ; self->sendPosition(btn_down); } @@ -2597,7 +2597,7 @@ void LLPanelObject::onCommitPosition( LLUICtrl* ctrl, void* userdata ) void LLPanelObject::onCommitScale( LLUICtrl* ctrl, void* userdata ) { LLPanelObject* self = (LLPanelObject*) userdata; - BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ; + bool btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ; self->sendScale(btn_down); } @@ -2605,7 +2605,7 @@ void LLPanelObject::onCommitScale( LLUICtrl* ctrl, void* userdata ) void LLPanelObject::onCommitRotation( LLUICtrl* ctrl, void* userdata ) { LLPanelObject* self = (LLPanelObject*) userdata; - BOOL btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ; + bool btn_down = ((LLSpinCtrl*)ctrl)->isMouseHeldDown() ; self->sendRotation(btn_down); } @@ -2648,7 +2648,7 @@ void LLPanelObject::onCommitSculpt( const LLSD& data ) sendSculpt(); } -BOOL LLPanelObject::onDropSculpt(LLInventoryItem* item) +bool LLPanelObject::onDropSculpt(LLInventoryItem* item) { LLTextureCtrl* mTextureCtrl = getChild("sculpt texture control"); @@ -2660,7 +2660,7 @@ BOOL LLPanelObject::onDropSculpt(LLInventoryItem* item) mSculptTextureRevert = asset; } - return TRUE; + return true; } @@ -2748,7 +2748,7 @@ void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata) // if (command == "psr_paste") // { // S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); -// BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode(LL_PCODE_VOLUME)) +// bool single_volume = (LLSelectMgr::getInstance()->selectionAllPCode(LL_PCODE_VOLUME)) // && (selected_count == 1); // // if (!single_volume) @@ -2784,7 +2784,7 @@ void LLPanelObject::onCommitSculptType(LLUICtrl *ctrl, void* userdata) // else if (command == "psr_copy") // { // S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); -// BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode(LL_PCODE_VOLUME)) +// bool single_volume = (LLSelectMgr::getInstance()->selectionAllPCode(LL_PCODE_VOLUME)) // && (selected_count == 1); // // if (!single_volume) @@ -2825,7 +2825,7 @@ void LLPanelObject::onCopyPos() args["VALUE"] = stringVec; mBtnPastePos->setToolTip(getString("paste_position", args)); - mBtnPastePos->setEnabled(TRUE); + mBtnPastePos->setEnabled(true); // mHasClipboardPos = true; @@ -2844,7 +2844,7 @@ void LLPanelObject::onCopySize() args["VALUE"] = stringVec; mBtnPasteSize->setToolTip(getString("paste_size", args)); - mBtnPasteSize->setEnabled(TRUE); + mBtnPasteSize->setEnabled(true); // mHasClipboardSize = true; @@ -2863,7 +2863,7 @@ void LLPanelObject::onCopyRot() args["VALUE"] = stringVec; mBtnPasteRot->setToolTip(getString("paste_rotation", args)); - mBtnPasteRot->setEnabled(TRUE); + mBtnPasteRot->setEnabled(true); // mHasClipboardRot = true; @@ -2894,7 +2894,7 @@ void LLPanelObject::onPastePos() mCtrlPosY->set( mClipboardPos.mV[VY] ); mCtrlPosZ->set( mClipboardPos.mV[VZ] ); - sendPosition(FALSE); + sendPosition(false); } void LLPanelObject::onPasteSize() @@ -2914,7 +2914,7 @@ void LLPanelObject::onPasteSize() mCtrlScaleY->set(mClipboardSize.mV[VY]); mCtrlScaleZ->set(mClipboardSize.mV[VZ]); - sendScale(FALSE); + sendScale(false); } void LLPanelObject::onPasteRot() @@ -2925,7 +2925,7 @@ void LLPanelObject::onPasteRot() mCtrlRotY->set(mClipboardRot.mV[VY]); mCtrlRotZ->set(mClipboardRot.mV[VZ]); - sendRotation(FALSE); + sendRotation(false); } void LLPanelObject::onCopyParams() @@ -2981,14 +2981,14 @@ void LLPanelObject::onPasteParams() LLUUID sculpt_id = mClipboardParams["sculpt"]["id"].asUUID(); U8 sculpt_type = (U8)mClipboardParams["sculpt"]["type"].asInteger(); sculpt_params.setSculptTexture(sculpt_id, sculpt_type); - objectp->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); + objectp->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, true); } else { LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); if (sculpt_params) { - objectp->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, FALSE, TRUE); + objectp->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, false, true); } } diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index 864d7aa083..f34fd532f2 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -55,7 +55,7 @@ public: virtual void clearCtrls(); void changePrecision(S32 decimal_precision); // Adjustable decimal precision - void updateLimits(BOOL attachment);// + void updateLimits(bool attachment);// void refresh(); static bool precommitValidate(const LLSD& data); @@ -91,7 +91,7 @@ public: void onCommitSculpt(const LLSD& data); void onCancelSculpt(const LLSD& data); void onSelectSculpt(const LLSD& data); - BOOL onDropSculpt(LLInventoryItem* item); + bool onDropSculpt(LLInventoryItem* item); static void onCommitSculptType( LLUICtrl *ctrl, void* userdata); // Extended copy & paste buttons @@ -107,9 +107,9 @@ protected: void setLODDistValues(LLTextBox * tb, F32 factor, F32 dmid, F32 dlow, F32 dlowest); void deactivateMeshFields(); // - void sendRotation(BOOL btn_down); - void sendScale(BOOL btn_down); - void sendPosition(BOOL btn_down); + void sendRotation(bool btn_down); + void sendScale(bool btn_down); + void sendPosition(bool btn_down); void sendIsPhysical(); void sendIsTemporary(); void sendIsPhantom(); @@ -187,7 +187,7 @@ protected: LLSpinCtrl* mCtrlScaleX; LLSpinCtrl* mCtrlScaleY; LLSpinCtrl* mCtrlScaleZ; - BOOL mSizeChanged; + bool mSizeChanged; //LLMenuButton* mMenuClipboardRot; // Extended copy & paste buttons LLTextBox* mLabelRotation; @@ -222,9 +222,9 @@ protected: LLCheckBoxCtrl *mCtrlSculptInvert; LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed - BOOL mIsPhysical; // to avoid sending "physical" when not changed - BOOL mIsTemporary; // to avoid sending "temporary" when not changed - BOOL mIsPhantom; // to avoid sending "phantom" when not changed + bool mIsPhysical; // to avoid sending "physical" when not changed + bool mIsTemporary; // to avoid sending "temporary" when not changed + bool mIsPhantom; // to avoid sending "phantom" when not changed S32 mSelectedType; // So we know what selected type we last were LLUUID mSculptTextureRevert; // so we can revert the sculpt texture on cancel diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 69abb461a6..6f5cd6986b 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -130,7 +130,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); - virtual BOOL canOpenItem() const { return FALSE; } + virtual bool canOpenItem() const { return false; } virtual void closeItem() {} virtual void selectItem() {} virtual void navigateToFolder(bool new_window = false, bool change_mode = false) {} @@ -149,8 +149,8 @@ public: virtual void pasteLinkFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual void performAction(LLInventoryModel* model, std::string action); - virtual BOOL isUpToDate() const { return TRUE; } - virtual bool hasChildren() const { return FALSE; } + virtual bool isUpToDate() const { return true; } + virtual bool hasChildren() const { return false; } virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; } virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } virtual LLSettingsType::type_e getSettingsType() const { return LLSettingsType::ST_NONE; } @@ -160,7 +160,7 @@ public: // LLDragAndDropBridge functionality virtual LLToolDragAndDrop::ESource getDragSource() const { return LLToolDragAndDrop::SOURCE_WORLD; } - virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; + virtual bool startDrag(EDragAndDropType* type, LLUUID* id) const; virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, @@ -244,9 +244,9 @@ const std::string& LLTaskInvFVBridge::getDisplayName() const } const LLPermissions& perm(item->getPermissions()); - BOOL copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); - BOOL mod = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE); - BOOL xfer = gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE); + bool copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); + bool mod = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE); + bool xfer = gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE); if(!copy) { @@ -285,7 +285,7 @@ void LLTaskInvFVBridge::setCreationDate(time_t creation_date_utc) LLUIImagePtr LLTaskInvFVBridge::getIcon() const { - const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS); + const bool item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS); return LLInventoryIcon::getIcon(mAssetType, mInventoryType, 0, item_is_multi ); } @@ -326,7 +326,7 @@ bool LLTaskInvFVBridge::renameItem(const std::string& new_name) LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if ( (rlv_handler_t::isEnabled()) && (object) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) ) { - return FALSE; + return false; } // [/RLVa:KB] @@ -386,12 +386,12 @@ bool LLTaskInvFVBridge::isItemRemovable() const { if (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) { - return FALSE; + return false; } else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) { if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (gAgentAvatarp->getRoot() == object->getRootEdit()) ) - return FALSE; + return false; } } // [/RLVa:KB] @@ -530,7 +530,7 @@ void LLTaskInvFVBridge::pasteLinkFromClipboard() { } -BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const +bool LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { //LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL; if(mPanel) @@ -548,7 +548,7 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const // Kind of redundant due to the note below, but in case that ever gets fixed if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) ) { - return FALSE; + return false; } // [/RLVa:KB] if (object->isAttachment() && !can_copy) @@ -557,7 +557,7 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const // due to a race condition and possible exploit where // attached objects do not update their inventory items // when their contents are manipulated - return FALSE; + return false; } if((can_copy && perm.allowTransferTo(gAgent.getID())) || object->permYouOwner()) @@ -567,12 +567,12 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const *type = LLViewerAssetType::lookupDragAndDropType(inv->getType()); *id = inv->getUUID(); - return TRUE; + return true; } } } } - return FALSE; + return false; } bool LLTaskInvFVBridge::dragOrDrop(MASK mask, bool drop, @@ -678,17 +678,17 @@ public: virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const; virtual bool isItemRenameable() const; - // virtual BOOL isItemCopyable() const { return FALSE; } + // virtual bool isItemCopyable() const { return false; } virtual bool renameItem(const std::string& new_name); virtual bool isItemRemovable() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual bool hasChildren() const; - virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; + virtual bool startDrag(EDragAndDropType* type, LLUUID* id) const; virtual bool dragOrDrop(MASK mask, bool drop, EDragAndDropType cargo_type, void* cargo_data, std::string& tooltip_msg); - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual EInventorySortGroup getSortGroup() const { return SG_NORMAL_FOLDER; } }; @@ -794,8 +794,8 @@ void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags) bool LLTaskCategoryBridge::hasChildren() const { - // return TRUE if we have or do know know if we have children. - // *FIX: For now, return FALSE - we will know for sure soon enough. + // return true if we have or do know know if we have children. + // *FIX: For now, return false - we will know for sure soon enough. return false; } @@ -803,7 +803,7 @@ void LLTaskCategoryBridge::openItem() { } -BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const +bool LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const { //LL_INFOS() << "LLTaskInvFVBridge::startDrag()" << LL_ENDL; if(mPanel && mUUID.notNull()) @@ -812,15 +812,15 @@ BOOL LLTaskCategoryBridge::startDrag(EDragAndDropType* type, LLUUID* id) const if(object) { const LLInventoryObject* cat = object->getInventoryObject(mUUID); - if ( (cat) && (move_inv_category_world_to_agent(mUUID, LLUUID::null, FALSE)) ) + if ( (cat) && (move_inv_category_world_to_agent(mUUID, LLUUID::null, false)) ) { *type = LLViewerAssetType::lookupDragAndDropType(cat->getType()); *id = mUUID; - return TRUE; + return true; } } } - return FALSE; + return false; } bool LLTaskCategoryBridge::dragOrDrop(MASK mask, bool drop, @@ -878,7 +878,7 @@ bool LLTaskCategoryBridge::dragOrDrop(MASK mask, bool drop, LLViewerInventoryItem* item = (LLViewerInventoryItem*)cargo_data; // rez in the script active by default, rez in // inactive if the control key is being held down. - BOOL active = ((mask & MASK_CONTROL) == 0); + bool active = ((mask & MASK_CONTROL) == 0); LLToolDragAndDrop::dropScript(object, item, active, LLToolDragAndDrop::getInstance()->getSource(), LLToolDragAndDrop::getInstance()->getSourceID()); @@ -903,7 +903,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); }; @@ -942,7 +942,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -1081,7 +1081,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - //static BOOL enableIfCopyable( void* userdata ); + //static bool enableIfCopyable( void* userdata ); }; class LLTaskLSLBridge : public LLTaskScriptBridge @@ -1092,7 +1092,7 @@ public: const std::string& name) : LLTaskScriptBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual bool removeItem(); //virtual void buildContextMenu(LLMenuGL& menu); @@ -1164,7 +1164,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual bool removeItem(); }; @@ -1187,7 +1187,7 @@ void LLTaskNotecardBridge::openItem() // Note: even if we are not allowed to modify copyable notecard, we should be able to view it LLInventoryItem *item = dynamic_cast(object->getInventoryObject(mUUID)); - BOOL item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); + bool item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); if( item_copy || object->permModify() || gAgent.isGodlike()) @@ -1221,7 +1221,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual bool removeItem(); }; @@ -1255,7 +1255,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - virtual BOOL canOpenItem() const { return TRUE; } + virtual bool canOpenItem() const { return true; } virtual void openItem(); virtual bool removeItem(); }; @@ -1299,7 +1299,7 @@ public: LLUIImagePtr LLTaskWearableBridge::getIcon() const { - return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE ); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, false ); } ///---------------------------------------------------------------------------- @@ -1321,7 +1321,7 @@ public: LLUIImagePtr LLTaskSettingsBridge::getIcon() const { - return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE); + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, false); } LLSettingsType::type_e LLTaskSettingsBridge::getSettingsType() const @@ -1341,7 +1341,7 @@ public: const std::string& name) : LLTaskInvFVBridge(panel, uuid, name) {} - BOOL canOpenItem() const override { return TRUE; } + bool canOpenItem() const override { return true; } void openItem() override; bool removeItem() override; }; @@ -1356,7 +1356,7 @@ void LLTaskMaterialBridge::openItem() // Note: even if we are not allowed to modify copyable notecard, we should be able to view it LLInventoryItem *item = dynamic_cast(object->getInventoryObject(mUUID)); - BOOL item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); + bool item_copy = item && gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); if( item_copy || object->permModify() || gAgent.isGodlike()) @@ -1369,7 +1369,7 @@ void LLTaskMaterialBridge::openItem() { mat->setObjectID(mPanel->getTaskUUID()); mat->openFloater(floater_key); - mat->setFocus(TRUE); + mat->setFocus(true); } } } @@ -1497,9 +1497,9 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par LLPanel(p), mScroller(NULL), mFolders(NULL), - mHaveInventory(FALSE), - mIsInventoryEmpty(TRUE), - mInventoryNeedsUpdate(FALSE), + mHaveInventory(false), + mIsInventoryEmpty(true), + mInventoryNeedsUpdate(false), mInventoryViewModel(p.name), mShowRootFolder(p.show_root_folder) { @@ -1544,8 +1544,8 @@ void LLPanelObjectInventory::doToSelected(const LLSD& userdata) void LLPanelObjectInventory::clearContents() { - mHaveInventory = FALSE; - mIsInventoryEmpty = TRUE; + mHaveInventory = false; + mIsInventoryEmpty = true; if (LLToolDragAndDrop::getInstance() && LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_WORLD) { LLToolDragAndDrop::getInstance()->endDrag(); @@ -1633,7 +1633,7 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object, // << " task UUID: " << object->mID << LL_ENDL; if(mTaskUUID == object->mID) { - mInventoryNeedsUpdate = TRUE; + mInventoryNeedsUpdate = true; } // Keep legacy properties floater @@ -1662,7 +1662,7 @@ void LLPanelObjectInventory::updateInventory() // We're still interested in this task's inventory. std::vector selected_item_ids; std::set selected_items; - BOOL inventory_has_focus = FALSE; + bool inventory_has_focus = false; if (mHaveInventory && mFolders) { selected_items = mFolders->getSelectionList(); @@ -1685,14 +1685,14 @@ void LLPanelObjectInventory::updateInventory() if (inventory_root) { reset(); - mIsInventoryEmpty = FALSE; + mIsInventoryEmpty = false; createFolderViews(inventory_root, contents); - mFolders->setEnabled(TRUE); + mFolders->setEnabled(true); } else { // TODO: create an empty inventory - mIsInventoryEmpty = TRUE; + mIsInventoryEmpty = true; } mHaveInventory = !mIsInventoryEmpty || !objectp->isInventoryDirty(); @@ -1707,8 +1707,8 @@ void LLPanelObjectInventory::updateInventory() else { // TODO: create an empty inventory - mIsInventoryEmpty = TRUE; - mHaveInventory = TRUE; + mIsInventoryEmpty = true; + mHaveInventory = true; } // restore previous selection @@ -1723,12 +1723,12 @@ void LLPanelObjectInventory::updateInventory() //HACK: "set" first item then "change" each other one to get keyboard focus right if (first_item) { - mFolders->setSelection(selected_item, TRUE, inventory_has_focus); - first_item = FALSE; + mFolders->setSelection(selected_item, true, inventory_has_focus); + first_item = false; } else { - mFolders->changeSelection(selected_item, TRUE); + mFolders->changeSelection(selected_item, true); } } } @@ -1737,7 +1737,7 @@ void LLPanelObjectInventory::updateInventory() { mFolders->requestArrange(); } - mInventoryNeedsUpdate = FALSE; + mInventoryNeedsUpdate = false; // Edit menu handler is set in onFocusReceived } @@ -1887,8 +1887,8 @@ void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_li void LLPanelObjectInventory::refresh() { //LL_INFOS() << "LLPanelObjectInventory::refresh()" << LL_ENDL; - BOOL has_inventory = FALSE; - const BOOL non_root_ok = TRUE; + bool has_inventory = false; + const bool non_root_ok = true; LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); LLSelectNode* node = selection->getFirstRootNode(NULL, non_root_ok); if(node && node->mValid) @@ -1899,7 +1899,7 @@ void LLPanelObjectInventory::refresh() { // determine if we need to make a request. Start with a // default based on if we have inventory at all. - BOOL make_request = !mHaveInventory; + bool make_request = !mHaveInventory; // If the task id is different than what we've stored, // then make the request. @@ -1907,7 +1907,7 @@ void LLPanelObjectInventory::refresh() { mTaskUUID = object->mID; mAttachmentUUID = object->getAttachmentItemID(); - make_request = TRUE; + make_request = true; // This is a new object so pre-emptively clear the contents // Otherwise we show the old stuff until the update comes in @@ -1933,7 +1933,7 @@ void LLPanelObjectInventory::refresh() { if(node->mInventorySerial != object->getInventorySerial() || object->isInventoryDirty()) { - make_request = TRUE; + make_request = true; } } @@ -1942,7 +1942,7 @@ void LLPanelObjectInventory::refresh() { requestVOInventory(); } - has_inventory = TRUE; + has_inventory = true; } } if(!has_inventory) @@ -2112,7 +2112,7 @@ bool LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) if (mask == MASK_NONE) { LLPanelObjectInventory::doToSelected(LLSD("task_open")); - handled = TRUE; + handled = true; } break; // Fix broken return key in task inventory @@ -2132,16 +2132,16 @@ bool LLPanelObjectInventory::handleKeyHere( KEY key, MASK mask ) return handled; } -BOOL LLPanelObjectInventory::isSelectionRemovable() +bool LLPanelObjectInventory::isSelectionRemovable() { if (!mFolders || !mFolders->getRoot()) { - return FALSE; + return false; } std::set selection_set = mFolders->getRoot()->getSelectionList(); if (selection_set.empty()) { - return FALSE; + return false; } for (std::set::iterator iter = selection_set.begin(); iter != selection_set.end(); @@ -2151,8 +2151,8 @@ BOOL LLPanelObjectInventory::isSelectionRemovable() const LLFolderViewModelItemInventory *listener = dynamic_cast(item->getViewModelItem()); if (!listener || !listener->isItemRemovable() || listener->isItemInTrash()) { - return FALSE; + return false; } } - return TRUE; + return true; } diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index 98ca2bd30a..08508e368b 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -79,7 +79,7 @@ public: virtual bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); // Fix broken return and delete key in task inventory - //virtual BOOL handleKeyHere(KEY key, MASK mask); + //virtual bool handleKeyHere(KEY key, MASK mask); /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); @@ -105,7 +105,7 @@ protected: void clearItemIDs(); bool handleKeyHere( KEY key, MASK mask ); - BOOL isSelectionRemovable(); + bool isSelectionRemovable(); private: std::map mItemMap; @@ -115,9 +115,9 @@ private: LLUUID mTaskUUID; LLUUID mAttachmentUUID; - BOOL mHaveInventory; // 'Loading' label and used for initial request - BOOL mIsInventoryEmpty; // 'Empty' label - BOOL mInventoryNeedsUpdate; // for idle, set on changed callback + bool mHaveInventory; // 'Loading' label and used for initial request + bool mIsInventoryEmpty; // 'Empty' label + bool mInventoryNeedsUpdate; // for idle, set on changed callback LLFolderViewModelInventory mInventoryViewModel; bool mShowRootFolder; }; diff --git a/indra/newview/llpanelopenregionsettings.cpp b/indra/newview/llpanelopenregionsettings.cpp index 3a9db841fc..222e027303 100644 --- a/indra/newview/llpanelopenregionsettings.cpp +++ b/indra/newview/llpanelopenregionsettings.cpp @@ -46,7 +46,7 @@ class OpenRegionInfoUpdate : public LLHTTPNode const LLSD& context, const LLSD& input) const { - BOOL time_UTCDST = FALSE; + bool time_UTCDST = false; if (!input || !context || !input.isMap() || !input.has("body")) { @@ -89,7 +89,7 @@ class OpenRegionInfoUpdate : public LLHTTPNode } if ( body.has("ForceDrawDistance") ) { - regionlimits->setLockedDrawDistance(body["ForceDrawDistance"].asInteger() == 1 ? TRUE : FALSE); + regionlimits->setLockedDrawDistance(body["ForceDrawDistance"].asInteger() == 1 ? true : false); } } if ( body.has("LSLFunctions") ) @@ -155,7 +155,7 @@ class OpenRegionInfoUpdate : public LLHTTPNode } if ( body.has("OffsetOfUTCDST") ) { - time_UTCDST = body["OffsetOfUTCDST"].asInteger() == 1 ? TRUE : FALSE; + time_UTCDST = body["OffsetOfUTCDST"].asInteger() == 1 ? true : false; } if ( body.has("OffsetOfUTC") ) { @@ -164,7 +164,7 @@ class OpenRegionInfoUpdate : public LLHTTPNode } if ( body.has("RenderWater") ) { - regionlimits->setAllowRenderWater(body["RenderWater"].asInteger() == 1 ? TRUE : FALSE); + regionlimits->setAllowRenderWater(body["RenderWater"].asInteger() == 1 ? true : false); } #if 0 // *FIXME if ( body.has("SayDistance") ) @@ -182,7 +182,7 @@ class OpenRegionInfoUpdate : public LLHTTPNode #endif // FIXME if ( body.has("ToggleTeenMode") ) { - regionlimits->setEnableTeenMode(body["ToggleTeenMode"].asInteger() == 1 ? TRUE : FALSE); + regionlimits->setEnableTeenMode(body["ToggleTeenMode"].asInteger() == 1 ? true : false); } if ( body.has("ShowTags") ) { @@ -190,7 +190,7 @@ class OpenRegionInfoUpdate : public LLHTTPNode } if ( body.has("EnforceMaxBuild") ) { - regionlimits->setEnforceMaxBuild(body["EnforceMaxBuild"].asInteger() == 1 ? TRUE : FALSE); + regionlimits->setEnforceMaxBuild(body["EnforceMaxBuild"].asInteger() == 1 ? true : false); } if ( body.has("MaxGroups") ) { diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 522213ca2f..27cde983f4 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -191,8 +191,8 @@ private: // Populate the menu with items like "New Skin", "New Pants", etc. static void populateCreateWearableSubmenus(LLMenuGL* menu) { - LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE); - LLView* menu_bp = gMenuHolder->getChildView("COF.Gear.New_Body_Parts", FALSE); + LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", false); + LLView* menu_bp = gMenuHolder->getChildView("COF.Gear.New_Body_Parts", false); LLWearableType * wearable_type_inst = LLWearableType::getInstance(); for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i) @@ -414,7 +414,7 @@ LLPanelOutfitEdit::LLPanelOutfitEdit() mAvatarComplexityAddingLabel(NULL) { mSavedFolderState = new LLSaveFolderState(); - mSavedFolderState->setApply(FALSE); + mSavedFolderState->setApply(false); LLOutfitObserver& observer = LLOutfitObserver::instance(); @@ -606,7 +606,7 @@ void LLPanelOutfitEdit::moveWearable(bool closer_to_body) void LLPanelOutfitEdit::toggleAddWearablesPanel() { - BOOL current_visibility = mAddWearablesPanel->getVisible(); + bool current_visibility = mAddWearablesPanel->getVisible(); showAddWearablesPanel(!current_visibility); } @@ -670,7 +670,7 @@ void LLPanelOutfitEdit::showWearablesFilter() } else { - mSearchFilter->setFocus(TRUE); + mSearchFilter->setFocus(true); } } @@ -682,7 +682,7 @@ void LLPanelOutfitEdit::showWearablesListView() updateFiltersVisibility(); mWearableListManager->populateIfNeeded(); } - mListViewBtn->setToggleState(TRUE); + mListViewBtn->setToggleState(true); } void LLPanelOutfitEdit::showWearablesFolderView() @@ -692,7 +692,7 @@ void LLPanelOutfitEdit::showWearablesFolderView() updateWearablesPanelVerbButtons(); updateFiltersVisibility(); } - mFolderViewBtn->setToggleState(TRUE); + mFolderViewBtn->setToggleState(true); } void LLPanelOutfitEdit::updateFiltersVisibility() @@ -708,7 +708,7 @@ void LLPanelOutfitEdit::onFolderViewFilterCommitted(LLUICtrl* ctrl) mInventoryItemsPanel->setFilterTypes(mFolderViewItemTypes[curr_filter_type].inventoryMask); - mSavedFolderState->setApply(TRUE); + mSavedFolderState->setApply(true); mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); LLOpenFoldersWithSelection opener; @@ -750,7 +750,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) mInventoryItemsPanel->setFilterSubString(LLStringUtil::null); mWearableItemsList->setFilterSubString(LLStringUtil::null); // re-open folders that were initially open - mSavedFolderState->setApply(TRUE); + mSavedFolderState->setApply(true); mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); LLOpenFoldersWithSelection opener; mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(opener); @@ -772,7 +772,7 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) // save current folder open state if no filter currently applied if (mInventoryItemsPanel->getFilterSubString().empty()) { - mSavedFolderState->setApply(FALSE); + mSavedFolderState->setApply(false); mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); } @@ -1013,10 +1013,10 @@ void LLPanelOutfitEdit::updatePlusButton() current_item->getLocalRect().mBottom); mAddToLookBtn->setRect(btn_rect); - mAddToLookBtn->setEnabled(TRUE); + mAddToLookBtn->setEnabled(true); if (!mAddToLookBtn->getVisible()) { - mAddToLookBtn->setVisible(TRUE); + mAddToLookBtn->setVisible(true); } current_item->addChild(mAddToLookBtn); */ @@ -1192,7 +1192,7 @@ bool LLPanelOutfitEdit::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, if (cargo_data == NULL) { LL_WARNS() << "cargo_data is NULL" << LL_ENDL; - return TRUE; + return true; } switch (cargo_type) @@ -1237,7 +1237,7 @@ void LLPanelOutfitEdit::displayCurrentOutfit() { if (!getVisible()) { - setVisible(TRUE); + setVisible(true); } updateCurrentOutfitName(); @@ -1280,8 +1280,8 @@ bool LLPanelOutfitEdit::switchPanels(LLPanel* switch_from_panel, LLPanel* switch { if(switch_from_panel && switch_to_panel && !switch_to_panel->getVisible()) { - switch_from_panel->setVisible(FALSE); - switch_to_panel->setVisible(TRUE); + switch_from_panel->setVisible(false); + switch_to_panel->setVisible(true); return true; } return false; @@ -1399,13 +1399,13 @@ void LLPanelOutfitEdit::updateWearablesPanelVerbButtons() { if(mWearablesListViewPanel->getVisible()) { - mFolderViewBtn->setToggleState(FALSE); + mFolderViewBtn->setToggleState(false); mFolderViewBtn->setImageOverlay(getString("folder_view_off"), mFolderViewBtn->getImageOverlayHAlign()); mListViewBtn->setImageOverlay(getString("list_view_on"), mListViewBtn->getImageOverlayHAlign()); } else if(mInventoryItemsPanel->getVisible()) { - mListViewBtn->setToggleState(FALSE); + mListViewBtn->setToggleState(false); mListViewBtn->setImageOverlay(getString("list_view_off"), mListViewBtn->getImageOverlayHAlign()); mFolderViewBtn->setImageOverlay(getString("folder_view_on"), mFolderViewBtn->getImageOverlayHAlign()); } @@ -1445,9 +1445,9 @@ void LLPanelOutfitEdit::saveListSelection() LLFolderViewFolder* parent = item->getParentFolder(); if(parent) { - parent->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_UP); + parent->setOpenArrangeRecursively(true, LLFolderViewFolder::RECURSE_UP); } - mInventoryItemsPanel->getRootFolder()->changeSelection(item, TRUE); + mInventoryItemsPanel->getRootFolder()->changeSelection(item, true); } mInventoryItemsPanel->getRootFolder()->scrollToShowSelection(); } diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index c505b6e1cb..d7fad3e0b7 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -154,7 +154,7 @@ void LLPanelOutfitsInventory::onOpen(const LLSD& key) LLFolderViewFolder* first_outfit = dynamic_cast(my_outfits_folder->getFirstChild()); if (first_outfit) { - first_outfit->setOpen(TRUE); + first_outfit->setOpen(true); } } } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 57f099579f..2117d5e373 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -959,7 +959,7 @@ void LLPanelPeople::updateNearbyList() mNearbyList->setDirty(); DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs()); - LLActiveSpeakerMgr::instance().update(TRUE); + LLActiveSpeakerMgr::instance().update(true); } void LLPanelPeople::updateRecentList() @@ -1022,9 +1022,9 @@ void LLPanelPeople::updateButtons() if (cur_panel) { // RLVa check - //if (cur_panel->hasChild("add_friend_btn", TRUE)) + //if (cur_panel->hasChild("add_friend_btn", true)) // cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self); - if (!nearby_tab_active && cur_panel->hasChild("add_friend_btn", TRUE)) + if (!nearby_tab_active && cur_panel->hasChild("add_friend_btn", true)) cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self && RlvActions::canShowName(RlvActions::SNC_DEFAULT, selected_id)); // RLVa check @@ -1351,11 +1351,11 @@ bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids) void LLPanelPeople::onAddFriendWizButtonClicked() { LLPanel* cur_panel = mTabContainer->getCurrentPanel(); - LLView * button = cur_panel->findChild("friends_add_btn", TRUE); + LLView * button = cur_panel->findChild("friends_add_btn", true); // Show add friend wizard. LLFloater* root_floater = gFloaterView->getParentFloater(this); - LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), false, true, false, root_floater->getName(), button); if (!picker) { return; @@ -1921,7 +1921,7 @@ void LLPanelPeople::onContactSetsMenuItemClicked(const LLSD& userdata) { LLFloater* root_floater = gFloaterView->getParentFloater(this); LLFloater* avatar_picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::handlePickerCallback, this, _1, mContactSetCombo->getValue().asString()), - TRUE, TRUE, TRUE, root_floater->getName()); + true, true, true, root_floater->getName()); if (root_floater && avatar_picker) root_floater->addDependentFloater(avatar_picker); } diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 1a102e707a..e9d043c664 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -186,7 +186,7 @@ std::string click_action_to_string_value( U8 action) LLPanelPermissions::LLPanelPermissions() : LLPanel() { - setMouseOpaque(FALSE); + setMouseOpaque(false); } bool LLPanelPermissions::postBuild() @@ -247,106 +247,106 @@ LLPanelPermissions::~LLPanelPermissions() void LLPanelPermissions::disableAll() { - getChildView("perm_modify")->setEnabled(FALSE); + getChildView("perm_modify")->setEnabled(false); getChild("perm_modify")->setValue(LLStringUtil::null); - getChildView("pathfinding_attributes_value")->setEnabled(FALSE); + getChildView("pathfinding_attributes_value")->setEnabled(false); getChild("pathfinding_attributes_value")->setValue(LLStringUtil::null); - getChildView("Creator:")->setEnabled(FALSE); - //getChild("Creator Icon")->setVisible(FALSE); + getChildView("Creator:")->setEnabled(false); + //getChild("Creator Icon")->setVisible(false); //mLabelCreatorName->setValue(LLStringUtil::null); - //mLabelCreatorName->setEnabled(FALSE); + //mLabelCreatorName->setEnabled(false); getChild("Creator Name")->setValue(LLStringUtil::null); - getChildView("Creator Name")->setEnabled(FALSE); + getChildView("Creator Name")->setEnabled(false); - getChildView("Owner:")->setEnabled(FALSE); - //getChild("Owner Icon")->setVisible(FALSE); - //getChild("Owner Group Icon")->setVisible(FALSE); + getChildView("Owner:")->setEnabled(false); + //getChild("Owner Icon")->setVisible(false); + //getChild("Owner Group Icon")->setVisible(false); //mLabelOwnerName->setValue(LLStringUtil::null); - //mLabelOwnerName->setEnabled(FALSE); + //mLabelOwnerName->setEnabled(false); getChild("Owner Name")->setValue(LLStringUtil::null); - getChildView("Owner Name")->setEnabled(FALSE); + getChildView("Owner Name")->setEnabled(false); - getChildView("Last Owner:")->setEnabled(FALSE); + getChildView("Last Owner:")->setEnabled(false); getChild("Last Owner Name")->setValue(LLStringUtil::null); - getChildView("Last Owner Name")->setEnabled(FALSE); + getChildView("Last Owner Name")->setEnabled(false); - getChildView("Group:")->setEnabled(FALSE); + getChildView("Group:")->setEnabled(false); //getChild("Group Name Proxy")->setValue(LLStringUtil::null); - //getChildView("Group Name Proxy")->setEnabled(FALSE); + //getChildView("Group Name Proxy")->setEnabled(false); getChild("Group Name")->setValue(LLStringUtil::null); - getChildView("Group Name")->setEnabled(FALSE); - getChildView("button set group")->setEnabled(FALSE); + getChildView("Group Name")->setEnabled(false); + getChildView("button set group")->setEnabled(false); getChild("Object Name")->setValue(LLStringUtil::null); - getChildView("Object Name")->setEnabled(FALSE); - getChildView("Name:")->setEnabled(FALSE); + getChildView("Object Name")->setEnabled(false); + getChildView("Name:")->setEnabled(false); getChild("Group Name")->setValue(LLStringUtil::null); - getChildView("Group Name")->setEnabled(FALSE); - getChildView("Description:")->setEnabled(FALSE); + getChildView("Group Name")->setEnabled(false); + getChildView("Description:")->setEnabled(false); getChild("Object Description")->setValue(LLStringUtil::null); - getChildView("Object Description")->setEnabled(FALSE); + getChildView("Object Description")->setEnabled(false); - //getChildView("Permissions:")->setEnabled(FALSE); // Doesn't exist as of 2016-11-16 (gone since 2009) + //getChildView("Permissions:")->setEnabled(false); // Doesn't exist as of 2016-11-16 (gone since 2009) - getChild("checkbox share with group")->setValue(FALSE); - getChildView("checkbox share with group")->setEnabled(FALSE); - getChildView("button deed")->setEnabled(FALSE); + getChild("checkbox share with group")->setValue(false); + getChildView("checkbox share with group")->setEnabled(false); + getChildView("button deed")->setEnabled(false); - getChild("checkbox allow everyone move")->setValue(FALSE); - getChildView("checkbox allow everyone move")->setEnabled(FALSE); - getChild("checkbox allow everyone copy")->setValue(FALSE); - getChildView("checkbox allow everyone copy")->setEnabled(FALSE); + getChild("checkbox allow everyone move")->setValue(false); + getChildView("checkbox allow everyone move")->setEnabled(false); + getChild("checkbox allow everyone copy")->setValue(false); + getChildView("checkbox allow everyone copy")->setEnabled(false); // OpenSim export permissions - getChild("checkbox allow export")->setValue(FALSE); - getChildView("checkbox allow export")->setEnabled(FALSE); + getChild("checkbox allow export")->setValue(false); + getChildView("checkbox allow export")->setEnabled(false); // //Next owner can: - getChildView("Next owner can:")->setEnabled(FALSE); - getChild("checkbox next owner can modify")->setValue(FALSE); - getChildView("checkbox next owner can modify")->setEnabled(FALSE); - getChild("checkbox next owner can copy")->setValue(FALSE); - getChildView("checkbox next owner can copy")->setEnabled(FALSE); - getChild("checkbox next owner can transfer")->setValue(FALSE); - getChildView("checkbox next owner can transfer")->setEnabled(FALSE); + getChildView("Next owner can:")->setEnabled(false); + getChild("checkbox next owner can modify")->setValue(false); + getChildView("checkbox next owner can modify")->setEnabled(false); + getChild("checkbox next owner can copy")->setValue(false); + getChildView("checkbox next owner can copy")->setEnabled(false); + getChild("checkbox next owner can transfer")->setValue(false); + getChildView("checkbox next owner can transfer")->setEnabled(false); //checkbox for sale - getChild("checkbox for sale")->setValue(FALSE); - getChildView("checkbox for sale")->setEnabled(FALSE); + getChild("checkbox for sale")->setValue(false); + getChildView("checkbox for sale")->setEnabled(false); //checkbox include in search - getChild("search_check")->setValue(FALSE); - getChildView("search_check")->setEnabled(FALSE); + getChild("search_check")->setValue(false); + getChildView("search_check")->setEnabled(false); LLComboBox* combo_sale_type = getChild("sale type"); combo_sale_type->setValue(LLSaleInfo::FS_COPY); - combo_sale_type->setEnabled(FALSE); + combo_sale_type->setEnabled(false); // Doesn't exist as of 2016-11-16 (gone since 2009) - //getChildView("Cost")->setEnabled(FALSE); + //getChildView("Cost")->setEnabled(false); //getChild("Cost")->setValue(getString("Cost Default")); // getChild("Edit Cost")->setValue(LLStringUtil::null); - getChildView("Edit Cost")->setEnabled(FALSE); + getChildView("Edit Cost")->setEnabled(false); - showMarkForSale(FALSE); + showMarkForSale(false); - getChildView("label click action")->setEnabled(FALSE); + getChildView("label click action")->setEnabled(false); LLComboBox* combo_click_action = getChild("clickaction"); if (combo_click_action) { - combo_click_action->setEnabled(FALSE); + combo_click_action->setEnabled(false); combo_click_action->clear(); } - getChildView("B:")->setVisible(FALSE); - getChildView("O:")->setVisible(FALSE); - getChildView("G:")->setVisible(FALSE); - getChildView("E:")->setVisible(FALSE); - getChildView("N:")->setVisible(FALSE); - getChildView("F:")->setVisible(FALSE); + getChildView("B:")->setVisible(false); + getChildView("O:")->setVisible(false); + getChildView("G:")->setVisible(false); + getChildView("E:")->setVisible(false); + getChildView("N:")->setVisible(false); + getChildView("F:")->setVisible(false); } void LLPanelPermissions::refresh() @@ -366,17 +366,17 @@ void LLPanelPermissions::refresh() BtnDeedToGroup->setLabelSelected(deedText); BtnDeedToGroup->setLabelUnselected(deedText); } - BOOL root_selected = TRUE; + bool root_selected = true; LLSelectNode* nodep = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); S32 object_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount(); if(!nodep || 0 == object_count) { nodep = LLSelectMgr::getInstance()->getSelection()->getFirstNode(); object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); - root_selected = FALSE; + root_selected = false; } - //BOOL attachment_selected = LLSelectMgr::getInstance()->getSelection()->isAttachment(); + //bool attachment_selected = LLSelectMgr::getInstance()->getSelection()->isAttachment(); //attachment_selected = false; LLViewerObject* objectp = NULL; if(nodep) objectp = nodep->getObject(); @@ -389,13 +389,13 @@ void LLPanelPermissions::refresh() } // figure out a few variables - const BOOL is_one_object = (object_count == 1); + const bool is_one_object = (object_count == 1); // BUG: fails if a root and non-root are both single-selected. - BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + bool is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); - BOOL is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + bool is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); const LLFocusableElement* keyboard_focus_view = gFocusMgr.getKeyboardFocus(); @@ -422,7 +422,7 @@ void LLPanelPermissions::refresh() { ++string_index; } - getChildView("perm_modify")->setEnabled(TRUE); + getChildView("perm_modify")->setEnabled(true); getChild("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]); std::string pfAttrName; @@ -450,15 +450,15 @@ void LLPanelPermissions::refresh() pfAttrName = "Pathfinding_Object_Attr_MultiSelect"; } - getChildView("pathfinding_attributes_value")->setEnabled(TRUE); + getChildView("pathfinding_attributes_value")->setEnabled(true); getChild("pathfinding_attributes_value")->setValue(LLTrans::getString(pfAttrName)); - //getChildView("Permissions:")->setEnabled(TRUE); // Doesn't exist as of 2016-11-16 (gone since 2009) + //getChildView("Permissions:")->setEnabled(true); // Doesn't exist as of 2016-11-16 (gone since 2009) // Update creator text field - getChildView("Creator:")->setEnabled(TRUE); + getChildView("Creator:")->setEnabled(true); // [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a - BOOL creators_identical = FALSE; + bool creators_identical = false; // [/RLVa:KB] std::string creator_app_link; // [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a @@ -493,16 +493,16 @@ void LLPanelPermissions::refresh() // mCreatorCacheConnection = LLAvatarNameCache::get(mCreatorID, boost::bind(&LLPanelPermissions::updateCreatorName, this, _1, _2, style_params)); // } // getChild("Creator Icon")->setValue(mCreatorID); -// getChild("Creator Icon")->setVisible(TRUE); -// mLabelCreatorName->setEnabled(TRUE); +// getChild("Creator Icon")->setVisible(true); +// mLabelCreatorName->setEnabled(true); // [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row // Update owner text field - getChildView("Owner:")->setEnabled(TRUE); - getChildView("Last Owner:")->setEnabled(TRUE); + getChildView("Owner:")->setEnabled(true); + getChildView("Last Owner:")->setEnabled(true); std::string owner_app_link; - const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_app_link); + const bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_app_link); //KC: Always show last owner //if (LLSelectMgr::getInstance()->selectIsGroupOwned()) //{ @@ -513,8 +513,8 @@ void LLPanelPermissions::refresh() // style_params.link_href = owner_app_link; // mLabelOwnerName->setText(group_data->mName, style_params); // getChild("Owner Group Icon")->setIconId(group_data->mInsigniaID); - // getChild("Owner Group Icon")->setVisible(TRUE); - // getChild("Owner Icon")->setVisible(FALSE); + // getChild("Owner Group Icon")->setVisible(true); + // getChild("Owner Icon")->setVisible(false); // } // else // { @@ -529,7 +529,7 @@ void LLPanelPermissions::refresh() // { // Display last owner if public std::string last_owner_app_link; - const BOOL last_owners_identical = LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_app_link); + const bool last_owners_identical = LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_app_link); // It should never happen that the last owner is null and the owner // is null, but it seems to be a bug in the simulator right now. JC @@ -557,10 +557,10 @@ void LLPanelPermissions::refresh() // } // // getChild("Owner Icon")->setValue(owner_id); - // getChild("Owner Icon")->setVisible(TRUE); - // getChild("Owner Group Icon")->setVisible(FALSE); + // getChild("Owner Icon")->setVisible(true); + // getChild("Owner Group Icon")->setVisible(false); //} -// mLabelOwnerName->setEnabled(TRUE); +// mLabelOwnerName->setEnabled(true); // [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row // [RLVa:KB] - Checked: RLVa-2.0.1 @@ -580,45 +580,45 @@ void LLPanelPermissions::refresh() } getChild("Creator Name")->setValue(creator_app_link); - getChildView("Creator Name")->setEnabled(TRUE); + getChildView("Creator Name")->setEnabled(true); getChild("Owner Name")->setValue(owner_app_link); - getChildView("Owner Name")->setEnabled(TRUE); + getChildView("Owner Name")->setEnabled(true); // [/RLVa:KB] getChild("Last Owner Name")->setValue(last_owner_app_link); - getChildView("Last Owner Name")->setEnabled(TRUE); + getChildView("Last Owner Name")->setEnabled(true); // update group text field - getChildView("Group:")->setEnabled(TRUE); + getChildView("Group:")->setEnabled(true); getChild("Group Name")->setValue(LLStringUtil::null); LLUUID group_id; - BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); + bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) { getChild("Group Name")->setValue(LLSLURL("group", group_id, "inspect").getSLURLString()); - getChild("Group Name")->setEnabled(TRUE); + getChild("Group Name")->setEnabled(true); //if (mLabelGroupName) //{ - // mLabelGroupName->setNameID(group_id,TRUE); - // mLabelGroupName->setEnabled(TRUE); + // mLabelGroupName->setNameID(group_id,true); + // mLabelGroupName->setEnabled(true); //} } //else //{ // if (mLabelGroupName) // { - // mLabelGroupName->setNameID(LLUUID::null, TRUE); + // mLabelGroupName->setNameID(LLUUID::null, true); // mLabelGroupName->refresh(LLUUID::null, std::string(), true); - // mLabelGroupName->setEnabled(FALSE); + // mLabelGroupName->setEnabled(false); // } //} getChildView("button set group")->setEnabled(root_selected && owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); - getChildView("Name:")->setEnabled(TRUE); + getChildView("Name:")->setEnabled(true); LLLineEditor* LineEditorObjectName = getChild("Object Name"); - getChildView("Description:")->setEnabled(TRUE); + getChildView("Description:")->setEnabled(true); LLLineEditor* LineEditorObjectDesc = getChild("Object Description"); if (is_one_object) @@ -657,57 +657,57 @@ void LLPanelPermissions::refresh() } // figure out the contents of the name, description, & category - BOOL edit_name_desc = FALSE; + bool edit_name_desc = false; // FIRE-777:�allow batch edit for name and description // if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced()) if (objectp->permModify()) // /FIRE-777 { - edit_name_desc = TRUE; + edit_name_desc = true; } if (edit_name_desc) { - getChildView("Object Name")->setEnabled(TRUE); - getChildView("Object Description")->setEnabled(TRUE); + getChildView("Object Name")->setEnabled(true); + getChildView("Object Description")->setEnabled(true); } else { - getChildView("Object Name")->setEnabled(FALSE); - getChildView("Object Description")->setEnabled(FALSE); + getChildView("Object Name")->setEnabled(false); + getChildView("Object Description")->setEnabled(false); } //Check if the object selection has changed and that there is pending sale info changes //Prevents clearing the unsaved input on idle refresh - BOOL selection_changed = FALSE; + bool selection_changed = false; if (mLastSelectedObject != objectp) { mLastSelectedObject = objectp; - selection_changed = TRUE; + selection_changed = true; } - BOOL update_sale_info = selection_changed || !getChild("button mark for sale")->getEnabled(); + bool update_sale_info = selection_changed || !getChild("button mark for sale")->getEnabled(); S32 total_sale_price = 0; S32 individual_sale_price = 0; - BOOL is_for_sale_mixed = FALSE; - BOOL is_sale_price_mixed = FALSE; - U32 num_for_sale = FALSE; + bool is_for_sale_mixed = false; + bool is_sale_price_mixed = false; + U32 num_for_sale = false; LLSelectMgr::getInstance()->selectGetAggregateSaleInfo(num_for_sale, is_for_sale_mixed, is_sale_price_mixed, total_sale_price, individual_sale_price); - const BOOL self_owned = (gAgent.getID() == mOwnerID); - const BOOL group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ; - const BOOL public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned()); - const BOOL can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer(); - const BOOL can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy(); + const bool self_owned = (gAgent.getID() == mOwnerID); + const bool group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ; + const bool public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned()); + const bool can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer(); + const bool can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy(); if (!owners_identical) { - //getChildView("Cost")->setEnabled(FALSE); // Doesn't exist as of 2016-11-16 (gone since 2009) + //getChildView("Cost")->setEnabled(false); // Doesn't exist as of 2016-11-16 (gone since 2009) getChild("Edit Cost")->setValue(LLStringUtil::null); - getChildView("Edit Cost")->setEnabled(FALSE); + getChildView("Edit Cost")->setEnabled(false); } // You own these objects. else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) @@ -725,8 +725,8 @@ void LLPanelPermissions::refresh() // // The edit fields are only enabled if you can sell this object // and the sale price is not mixed. - //BOOL enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : FALSE; - BOOL enable_edit = can_transfer ? !is_for_sale_mixed : FALSE; + //bool enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : false; + bool enable_edit = can_transfer ? !is_for_sale_mixed : false; //getChildView("Cost")->setEnabled(enable_edit); // Doesn't exist as of 2016-11-16 (gone since 2009) // Dont update and clear the price if change is pending @@ -739,11 +739,11 @@ void LLPanelPermissions::refresh() // set to the actual cost. if ((num_for_sale > 0) && is_for_sale_mixed) { - edit_price->setTentative(TRUE); + edit_price->setTentative(true); } else if ((num_for_sale > 0) && is_sale_price_mixed) { - edit_price->setTentative(TRUE); + edit_price->setTentative(true); } else { @@ -756,8 +756,8 @@ void LLPanelPermissions::refresh() // Someone, not you, owns these objects. else if (!public_owned) { - //getChildView("Cost")->setEnabled(FALSE); // Doesn't exist as of 2016-11-16 (gone since 2009) - getChildView("Edit Cost")->setEnabled(FALSE); + //getChildView("Cost")->setEnabled(false); // Doesn't exist as of 2016-11-16 (gone since 2009) + getChildView("Edit Cost")->setEnabled(false); // Don't show a price if none of the items are for sale. if (num_for_sale) @@ -777,12 +777,12 @@ void LLPanelPermissions::refresh() else { // Doesn't exist as of 2016-11-16 (gone since 2009) - //getChildView("Cost")->setEnabled(FALSE); + //getChildView("Cost")->setEnabled(false); //getChild("Cost")->setValue(getString("Cost Default")); // getChild("Edit Cost")->setValue(LLStringUtil::null); - getChildView("Edit Cost")->setEnabled(FALSE); + getChildView("Edit Cost")->setEnabled(false); } // Enable and disable the permissions checkboxes @@ -800,22 +800,22 @@ void LLPanelPermissions::refresh() U32 next_owner_mask_on = 0; U32 next_owner_mask_off = 0; - BOOL valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, + bool valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, &base_mask_on, &base_mask_off); - //BOOL valid_owner_perms =// + //bool valid_owner_perms =// LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, &owner_mask_on, &owner_mask_off); - BOOL valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, + bool valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, &group_mask_on, &group_mask_off); - BOOL valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, + bool valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, &everyone_mask_on, &everyone_mask_off); - BOOL valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, + bool valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, &next_owner_mask_on, &next_owner_mask_off); @@ -833,15 +833,15 @@ void LLPanelPermissions::refresh() if (valid_base_perms) { getChild("B:")->setValue("B: " + mask_to_string(base_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("B:")->setVisible(TRUE); + getChildView("B:")->setVisible(true); getChild("O:")->setValue("O: " + mask_to_string(owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("O:")->setVisible(TRUE); + getChildView("O:")->setVisible(true); getChild("G:")->setValue("G: " + mask_to_string(group_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("G:")->setVisible(TRUE); + getChildView("G:")->setVisible(true); getChild("E:")->setValue("E: " + mask_to_string(everyone_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("E:")->setVisible(TRUE); + getChildView("E:")->setVisible(true); getChild("N:")->setValue("N: " + mask_to_string(next_owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("N:")->setVisible(TRUE); + getChildView("N:")->setVisible(true); } else if(!root_selected) { @@ -851,25 +851,25 @@ void LLPanelPermissions::refresh() if (node && node->mValid) { getChild("B:")->setValue("B: " + mask_to_string( node->mPermissions->getMaskBase(), isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("B:")->setVisible(TRUE); + getChildView("B:")->setVisible(true); getChild("O:")->setValue("O: " + mask_to_string(node->mPermissions->getMaskOwner(), isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("O:")->setVisible(TRUE); + getChildView("O:")->setVisible(true); getChild("G:")->setValue("G: " + mask_to_string(node->mPermissions->getMaskGroup(), isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("G:")->setVisible(TRUE); + getChildView("G:")->setVisible(true); getChild("E:")->setValue("E: " + mask_to_string(node->mPermissions->getMaskEveryone(), isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("E:")->setVisible(TRUE); + getChildView("E:")->setVisible(true); getChild("N:")->setValue("N: " + mask_to_string(node->mPermissions->getMaskNextOwner(), isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("N:")->setVisible(TRUE); + getChildView("N:")->setVisible(true); } } } else { - getChildView("B:")->setVisible(FALSE); - getChildView("O:")->setVisible(FALSE); - getChildView("G:")->setVisible(FALSE); - getChildView("E:")->setVisible(FALSE); - getChildView("N:")->setVisible(FALSE); + getChildView("B:")->setVisible(false); + getChildView("O:")->setVisible(false); + getChildView("G:")->setVisible(false); + getChildView("E:")->setVisible(false); + getChildView("N:")->setVisible(false); } U32 flag_mask = 0x0; @@ -881,30 +881,30 @@ void LLPanelPermissions::refresh() //if (objectp->permExport()) flag_mask |= PERM_EXPORT; // OpenSim export permissions getChild("F:")->setValue("F:" + mask_to_string(flag_mask, isOpenSim)); // remove misleading X for export when not in OpenSim - getChildView("F:")->setVisible( TRUE); + getChildView("F:")->setVisible( true); } else { - getChildView("B:")->setVisible( FALSE); - getChildView("O:")->setVisible( FALSE); - getChildView("G:")->setVisible( FALSE); - getChildView("E:")->setVisible( FALSE); - getChildView("N:")->setVisible( FALSE); - getChildView("F:")->setVisible( FALSE); + getChildView("B:")->setVisible( false); + getChildView("O:")->setVisible( false); + getChildView("G:")->setVisible( false); + getChildView("E:")->setVisible( false); + getChildView("N:")->setVisible( false); + getChildView("F:")->setVisible( false); } - BOOL has_change_perm_ability = FALSE; - BOOL has_change_sale_ability = FALSE; + bool has_change_perm_ability = false; + bool has_change_sale_ability = false; if (valid_base_perms && is_nonpermanent_enforced && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { - has_change_perm_ability = TRUE; + has_change_perm_ability = true; } if (valid_base_perms && is_nonpermanent_enforced && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { - has_change_sale_ability = TRUE; + has_change_sale_ability = true; } if (!has_change_perm_ability && !has_change_sale_ability && !root_selected) @@ -915,15 +915,15 @@ void LLPanelPermissions::refresh() if (has_change_perm_ability) { - getChildView("checkbox share with group")->setEnabled(TRUE); + getChildView("checkbox share with group")->setEnabled(true); getChildView("checkbox allow everyone move")->setEnabled(owner_mask_on & PERM_MOVE); getChildView("checkbox allow everyone copy")->setEnabled(owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); } else { - getChildView("checkbox share with group")->setEnabled(FALSE); - getChildView("checkbox allow everyone move")->setEnabled(FALSE); - getChildView("checkbox allow everyone copy")->setEnabled(FALSE); + getChildView("checkbox share with group")->setEnabled(false); + getChildView("checkbox allow everyone move")->setEnabled(false); + getChildView("checkbox allow everyone copy")->setEnabled(false); } // Opensim export permissions - Codeblock courtesy of Liru F�rs. @@ -964,20 +964,20 @@ void LLPanelPermissions::refresh() getChild("checkbox for sale")->setTentative( is_for_sale_mixed); getChildView("sale type")->setEnabled(num_for_sale && can_transfer && !is_sale_price_mixed); - getChildView("Next owner can:")->setEnabled(TRUE); + getChildView("Next owner can:")->setEnabled(true); getChildView("checkbox next owner can modify")->setEnabled(base_mask_on & PERM_MODIFY); getChildView("checkbox next owner can copy")->setEnabled(base_mask_on & PERM_COPY); getChildView("checkbox next owner can transfer")->setEnabled(next_owner_mask_on & PERM_COPY); } else { - getChildView("checkbox for sale")->setEnabled(FALSE); - getChildView("sale type")->setEnabled(FALSE); + getChildView("checkbox for sale")->setEnabled(false); + getChildView("sale type")->setEnabled(false); - getChildView("Next owner can:")->setEnabled(FALSE); - getChildView("checkbox next owner can modify")->setEnabled(FALSE); - getChildView("checkbox next owner can copy")->setEnabled(FALSE); - getChildView("checkbox next owner can transfer")->setEnabled(FALSE); + getChildView("Next owner can:")->setEnabled(false); + getChildView("checkbox next owner can modify")->setEnabled(false); + getChildView("checkbox next owner can copy")->setEnabled(false); + getChildView("checkbox next owner can transfer")->setEnabled(false); } } @@ -985,20 +985,20 @@ void LLPanelPermissions::refresh() { if ((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE)) { - getChild("checkbox share with group")->setValue(TRUE); - getChild("checkbox share with group")->setTentative( FALSE); + getChild("checkbox share with group")->setValue(true); + getChild("checkbox share with group")->setTentative( false); getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } else if ((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE)) { - getChild("checkbox share with group")->setValue(FALSE); - getChild("checkbox share with group")->setTentative( FALSE); - getChildView("button deed")->setEnabled(FALSE); + getChild("checkbox share with group")->setValue(false); + getChild("checkbox share with group")->setTentative( false); + getChildView("button deed")->setEnabled(false); } else { - getChild("checkbox share with group")->setValue(TRUE); - getChild("checkbox share with group")->setTentative( TRUE); + getChild("checkbox share with group")->setValue(true); + getChild("checkbox share with group")->setTentative( true); getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } } @@ -1008,35 +1008,35 @@ void LLPanelPermissions::refresh() // Move if (everyone_mask_on & PERM_MOVE) { - getChild("checkbox allow everyone move")->setValue(TRUE); - getChild("checkbox allow everyone move")->setTentative( FALSE); + getChild("checkbox allow everyone move")->setValue(true); + getChild("checkbox allow everyone move")->setTentative( false); } else if (everyone_mask_off & PERM_MOVE) { - getChild("checkbox allow everyone move")->setValue(FALSE); - getChild("checkbox allow everyone move")->setTentative( FALSE); + getChild("checkbox allow everyone move")->setValue(false); + getChild("checkbox allow everyone move")->setTentative( false); } else { - getChild("checkbox allow everyone move")->setValue(TRUE); - getChild("checkbox allow everyone move")->setTentative( TRUE); + getChild("checkbox allow everyone move")->setValue(true); + getChild("checkbox allow everyone move")->setTentative( true); } // Copy == everyone can't copy if (everyone_mask_on & PERM_COPY) { - getChild("checkbox allow everyone copy")->setValue(TRUE); + getChild("checkbox allow everyone copy")->setValue(true); getChild("checkbox allow everyone copy")->setTentative( !can_copy || !can_transfer); } else if (everyone_mask_off & PERM_COPY) { - getChild("checkbox allow everyone copy")->setValue(FALSE); - getChild("checkbox allow everyone copy")->setTentative( FALSE); + getChild("checkbox allow everyone copy")->setValue(false); + getChild("checkbox allow everyone copy")->setTentative( false); } else { - getChild("checkbox allow everyone copy")->setValue(TRUE); - getChild("checkbox allow everyone copy")->setTentative( TRUE); + getChild("checkbox allow everyone copy")->setValue(true); + getChild("checkbox allow everyone copy")->setTentative( true); } // OpenSim export permissions @@ -1044,18 +1044,18 @@ void LLPanelPermissions::refresh() { if(everyone_mask_on & PERM_EXPORT) { - getChild("checkbox allow export")->setValue(TRUE); - getChild("checkbox allow export")->setTentative( FALSE); + getChild("checkbox allow export")->setValue(true); + getChild("checkbox allow export")->setTentative(false); } else if(everyone_mask_off & PERM_EXPORT) { - getChild("checkbox allow export")->setValue(FALSE); - getChild("checkbox allow export")->setTentative( FALSE); + getChild("checkbox allow export")->setValue(false); + getChild("checkbox allow export")->setTentative(false); } else { - getChild("checkbox allow export")->setValue(TRUE); - getChild("checkbox allow export")->setValue( TRUE); + getChild("checkbox allow export")->setValue(true); + getChild("checkbox allow export")->setValue( true); } } else @@ -1071,52 +1071,52 @@ void LLPanelPermissions::refresh() // Modify == next owner canot modify if (next_owner_mask_on & PERM_MODIFY) { - getChild("checkbox next owner can modify")->setValue(TRUE); - getChild("checkbox next owner can modify")->setTentative( FALSE); + getChild("checkbox next owner can modify")->setValue(true); + getChild("checkbox next owner can modify")->setTentative( false); } else if (next_owner_mask_off & PERM_MODIFY) { - getChild("checkbox next owner can modify")->setValue(FALSE); - getChild("checkbox next owner can modify")->setTentative( FALSE); + getChild("checkbox next owner can modify")->setValue(false); + getChild("checkbox next owner can modify")->setTentative( false); } else { - getChild("checkbox next owner can modify")->setValue(TRUE); - getChild("checkbox next owner can modify")->setTentative( TRUE); + getChild("checkbox next owner can modify")->setValue(true); + getChild("checkbox next owner can modify")->setTentative( true); } // Copy == next owner cannot copy if (next_owner_mask_on & PERM_COPY) { - getChild("checkbox next owner can copy")->setValue(TRUE); + getChild("checkbox next owner can copy")->setValue(true); getChild("checkbox next owner can copy")->setTentative( !can_copy); } else if (next_owner_mask_off & PERM_COPY) { - getChild("checkbox next owner can copy")->setValue(FALSE); - getChild("checkbox next owner can copy")->setTentative( FALSE); + getChild("checkbox next owner can copy")->setValue(false); + getChild("checkbox next owner can copy")->setTentative( false); } else { - getChild("checkbox next owner can copy")->setValue(TRUE); - getChild("checkbox next owner can copy")->setTentative( TRUE); + getChild("checkbox next owner can copy")->setValue(true); + getChild("checkbox next owner can copy")->setTentative( true); } // Transfer == next owner cannot transfer if (next_owner_mask_on & PERM_TRANSFER) { - getChild("checkbox next owner can transfer")->setValue(TRUE); + getChild("checkbox next owner can transfer")->setValue(true); getChild("checkbox next owner can transfer")->setTentative( !can_transfer); } else if (next_owner_mask_off & PERM_TRANSFER) { - getChild("checkbox next owner can transfer")->setValue(FALSE); - getChild("checkbox next owner can transfer")->setTentative( FALSE); + getChild("checkbox next owner can transfer")->setValue(false); + getChild("checkbox next owner can transfer")->setTentative( false); } else { - getChild("checkbox next owner can transfer")->setValue(TRUE); - getChild("checkbox next owner can transfer")->setTentative( TRUE); + getChild("checkbox next owner can transfer")->setValue(true); + getChild("checkbox next owner can transfer")->setTentative( true); } } @@ -1125,20 +1125,20 @@ void LLPanelPermissions::refresh() { // reflect sale information LLSaleInfo sale_info; - BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); + bool valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); LLSaleInfo::EForSale sale_type = sale_info.getSaleType(); LLComboBox* combo_sale_type = getChild("sale type"); if (valid_sale_info) { combo_sale_type->setValue( sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type); - combo_sale_type->setTentative( FALSE); // unfortunately this doesn't do anything at the moment. + combo_sale_type->setTentative( false); // unfortunately this doesn't do anything at the moment. } else { // default option is sell copy, determined to be safest combo_sale_type->setValue( LLSaleInfo::FS_COPY); - combo_sale_type->setTentative( TRUE); // unfortunately this doesn't do anything at the moment. + combo_sale_type->setTentative( true); // unfortunately this doesn't do anything at the moment. } getChild("checkbox for sale")->setValue((num_for_sale != 0)); @@ -1155,13 +1155,13 @@ void LLPanelPermissions::refresh() } } - showMarkForSale(FALSE); + showMarkForSale(false); } // Check search status of objects - const BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); + const bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); bool include_in_search; - const BOOL all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); + const bool all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); getChildView("search_check")->setEnabled(has_change_sale_ability && all_volume); getChild("search_check")->setValue(include_in_search); getChild("search_check")->setTentative( !all_include_in_search); @@ -1180,9 +1180,9 @@ void LLPanelPermissions::refresh() if (LLSelectMgr::getInstance()->getSelection()->isAttachment()) { - getChildView("checkbox for sale")->setEnabled(FALSE); - getChildView("Edit Cost")->setEnabled(FALSE); - getChild("sale type")->setEnabled(FALSE); + getChildView("checkbox for sale")->setEnabled(false); + getChildView("Edit Cost")->setEnabled(false); + getChild("sale type")->setEnabled(false); } getChildView("label click action")->setEnabled(is_perm_modify && is_nonpermanent_enforced && all_volume); @@ -1259,7 +1259,7 @@ void LLPanelPermissions::onClickGroup() { LLUUID owner_id; std::string name; - BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name); + bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name); LLFloater* parent_floater = gFloaterView->getParentFloater(this); if(owners_identical && (owner_id == gAgent.getID())) @@ -1283,7 +1283,7 @@ void LLPanelPermissions::cbGroupID(LLUUID group_id) { // if(mLabelGroupName) // { - // mLabelGroupName->setNameID(group_id, TRUE); + // mLabelGroupName->setNameID(group_id, true); // } getChild("Group Name")->setValue(LLSLURL("group", group_id, "inspect").getSLURLString()); LLSelectMgr::getInstance()->sendGroup(group_id); @@ -1295,10 +1295,10 @@ bool callback_deed_to_group(const LLSD& notification, const LLSD& response) if (0 == option) { LLUUID group_id; - BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); + bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if(group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED))) { - LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE); + LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, false); } } return false; @@ -1322,7 +1322,7 @@ void LLPanelPermissions::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 // Checkbox will have toggled itself // LLPanelPermissions* self = (LLPanelPermissions*)data; LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; - BOOL new_state = check->get(); + bool new_state = check->get(); LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm); } @@ -1435,9 +1435,9 @@ void LLPanelPermissions::onCommitForSale() LLCheckBoxCtrl *checkPurchase = getChild("checkbox for sale"); if(!gSavedSettings.getBOOL("FSCommitForSaleOnChange") && checkPurchase && checkPurchase->get()) { - getChildView("sale type")->setEnabled(TRUE); - getChildView("Edit Cost")->setEnabled(TRUE); - showMarkForSale(TRUE); + getChildView("sale type")->setEnabled(true); + getChildView("Edit Cost")->setEnabled(true); + showMarkForSale(true); } else { @@ -1454,7 +1454,7 @@ void LLPanelPermissions::onCommitSaleInfo() } else { - showMarkForSale(TRUE); + showMarkForSale(true); } } @@ -1488,10 +1488,10 @@ void LLPanelPermissions::setAllSaleInfo() LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(new_sale_info); // Note: won't work right if a root and non-root are both single-selected (here and other places). - BOOL is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + bool is_perm_modify = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); - BOOL is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() + bool is_nonpermanent_enforced = (LLSelectMgr::getInstance()->getSelection()->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); @@ -1528,10 +1528,10 @@ void LLPanelPermissions::setAllSaleInfo() } } - showMarkForSale(FALSE); + showMarkForSale(false); } -void LLPanelPermissions::showMarkForSale(BOOL show) +void LLPanelPermissions::showMarkForSale(bool show) { LLButton* button_mark_for_sale = getChild("button mark for sale"); button_mark_for_sale->setEnabled(show); diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h index 8358e936d3..42cf1f9351 100644 --- a/indra/newview/llpanelpermissions.h +++ b/indra/newview/llpanelpermissions.h @@ -80,7 +80,7 @@ protected: void onCommitForSale(); void onCommitSaleInfo(); void setAllSaleInfo(); - void showMarkForSale(BOOL show); + void showMarkForSale(bool show); static void onCommitClickAction(LLUICtrl* ctrl, void*); static void onCommitIncludeInSearch(LLUICtrl* ctrl, void*); diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 31fa3b9ce7..8285eeac72 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -335,7 +335,7 @@ void LLPanelPlaceInfo::reshape(S32 width, S32 height, bool called_from_parent) { // This if was added to force collapsing description textbox on Windows at the beginning of reshape - // (the only case when reshape is skipped here is when it's caused by this textbox, so called_from_parent is FALSE) + // (the only case when reshape is skipped here is when it's caused by this textbox, so called_from_parent is false) // This way it is consistent with Linux where topLost collapses textbox at the beginning of reshape. // On windows it collapsed only after reshape which caused EXT-8342. if(called_from_parent) @@ -394,7 +394,7 @@ void LLPanelPlaceInfo::onAvatarNameCache(const LLUUID& agent_id, // FIRE-817: Separate place details floater -void LLPanelPlaceInfo::setHeaderVisible(BOOL visible) +void LLPanelPlaceInfo::setHeaderVisible(bool visible) { getChildView("header_container")->setVisible(visible); } diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 7591f32980..97a9fd79f4 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -101,7 +101,7 @@ public: void createPick(const LLVector3d& pos_global); // FIRE-817: Separate place details floater - void setHeaderVisible(BOOL visible); + void setHeaderVisible(bool visible); typedef boost::signals2::signal parcel_detail_loaded_t; boost::signals2::connection setParcelDetailLoadedCallback( const parcel_detail_loaded_t::slot_type& cb ) diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index c49affc33d..1e63ed8efe 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -180,8 +180,8 @@ void LLPanelPlaceProfile::resetLocation() mLastSelectedRegionID = LLUUID::null; mNextCovenantUpdateTime = 0; - mForSalePanel->setVisible(FALSE); - mYouAreHerePanel->setVisible(FALSE); + mForSalePanel->setVisible(false); + mYouAreHerePanel->setVisible(false); // Fix loading icon; don't use translated string! const std::string unknown("Unknown_Icon"); @@ -240,7 +240,7 @@ void LLPanelPlaceProfile::resetLocation() mResaleText->setValue(loading); mSaleToText->setValue(loading); - getChild("sales_tab")->setVisible(TRUE); + getChild("sales_tab")->setVisible(true); } // virtual @@ -563,7 +563,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, S32 claim_price; S32 rent_price; F32 dwell; - BOOL for_sale; + bool for_sale; vpm->getDisplayInfo(&area, &claim_price, &rent_price, &for_sale, &dwell); mForSalePanel->setVisible(for_sale); if (for_sale) @@ -576,7 +576,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, // Show sales info to a specific person or a group he belongs to. if (auth_buyer_id != gAgent.getID() && !gAgent.isInGroup(auth_buyer_id)) { - for_sale = FALSE; + for_sale = false; } } else @@ -700,7 +700,7 @@ void LLPanelPlaceProfile::updateYouAreHereBanner(void* userdata) { static F32 radius = gSavedSettings.getF32("YouAreHereDistance"); - BOOL display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID && + bool display_banner = gAgent.getRegion()->getRegionID() == self->mLastSelectedRegionID && LLAgentUI::checkAgentDistance(self->mPosRegion, radius); // self->mYouAreHerePanel->setVisible(display_banner); diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index b4f0ad76ce..76a01cd813 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -115,7 +115,7 @@ public: } LLUUID parcel_id; - if (!parcel_id.set(params[0], FALSE)) + if (!parcel_id.set(params[0], false)) { return false; } @@ -327,7 +327,7 @@ bool LLPanelPlaces::postBuild() LLDragAndDropButton* trash_btn = (LLDragAndDropButton*)mRemoveSelectedBtn; trash_btn->setDragAndDropHandler(boost::bind(&LLPanelPlaces::handleDragAndDropToTrash, this - , _4 // BOOL drop + , _4 // bool drop , _5 // EDragAndDropType cargo_type , _6 // void* cargo_data , _7 // EAcceptance* accept @@ -362,7 +362,7 @@ bool LLPanelPlaces::postBuild() // FIRE-31033: Keep Teleport/Map/Profile buttons on places floater //mButtonsContainer = getChild("button_layout_panel"); - //mButtonsContainer->setVisible(FALSE); + //mButtonsContainer->setVisible(false); mFilterContainer = getChild("top_menu_panel"); mFilterEditor = getChild("Filter"); @@ -422,9 +422,9 @@ void LLPanelPlaces::onOpen(const LLSD& key) // The second toggle forces the list to be set to Landmark. // This avoids extracting and duplicating all the state logic from togglePlaceInfoPanel() // here or some specific private method - togglePlaceInfoPanel(FALSE); + togglePlaceInfoPanel(false); mPlaceInfoType = key_type; - togglePlaceInfoPanel(FALSE); + togglePlaceInfoPanel(false); // Update the active tab onTabSelected(); // Update the buttons at the bottom of the panel @@ -448,13 +448,13 @@ void LLPanelPlaces::onOpen(const LLSD& key) // Toggle teleport history panel directly else if (key_type == TELEPORT_HISTORY_TAB_INFO_TYPE) { - togglePlaceInfoPanel(FALSE); + togglePlaceInfoPanel(false); // This has been set intentially to not mess up other functions! mPlaceInfoType = LANDMARK_TAB_INFO_TYPE; // This has been basically borrowed from togglePlaceInfoPanel() // further down. - mLandmarkInfo->setVisible(FALSE); + mLandmarkInfo->setVisible(false); LLTeleportHistoryPanel* teleport_history_panel = dynamic_cast(mTabContainer->getPanelByName("Teleport History")); if (teleport_history_panel) @@ -477,7 +477,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) mPosGlobal.setZero(); mItem = NULL; mRegionId.setNull(); - togglePlaceInfoPanel(TRUE); + togglePlaceInfoPanel(true); if (mPlaceInfoType == AGENT_INFO_TYPE) { @@ -505,7 +505,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); - mSaveBtn->setEnabled(FALSE); + mSaveBtn->setEnabled(false); } else if (mPlaceInfoType == LANDMARK_INFO_TYPE) { @@ -516,7 +516,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) if (!item) return; - BOOL is_editable = gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID()) + bool is_editable = gInventory.isObjectDescendentOf(id, gInventory.getRootFolderID()) && item->getPermissions().allowModifyBy(gAgent.getID()); mLandmarkInfo->setCanEdit(is_editable); @@ -624,7 +624,7 @@ void LLPanelPlaces::setItem(LLInventoryItem* item) } // Check if item is in agent's inventory and he has the permission to modify it. - BOOL is_landmark_editable = gInventory.isObjectDescendentOf(mItem->getUUID(), gInventory.getRootFolderID()) && + bool is_landmark_editable = gInventory.isObjectDescendentOf(mItem->getUUID(), gInventory.getRootFolderID()) && mItem->getPermissions().allowModifyBy(gAgent.getID()); mSaveBtn->setEnabled(is_landmark_editable); @@ -714,7 +714,7 @@ void LLPanelPlaces::onTabSelected() // favorites and inventory can remove items, history can clear history // Trashcan icon clearing everything? No way! - //childSetVisible("trash_btn_panel", TRUE); + //childSetVisible("trash_btn_panel", true); //if (supports_create) //{ @@ -837,7 +837,7 @@ void LLPanelPlaces::onEditButtonClicked() isLandmarkEditModeOn = true; - mLandmarkInfo->toggleLandmarkEditMode(TRUE); + mLandmarkInfo->toggleLandmarkEditMode(true); updateVerbs(); } @@ -904,7 +904,7 @@ void LLPanelPlaces::onCancelButtonClicked() } else { - mLandmarkInfo->toggleLandmarkEditMode(FALSE); + mLandmarkInfo->toggleLandmarkEditMode(false); isLandmarkEditModeOn = false; updateVerbs(); @@ -955,7 +955,7 @@ void LLPanelPlaces::onOverflowButtonClicked() { menu = mLandmarkMenu; - BOOL is_landmark_removable = FALSE; + bool is_landmark_removable = false; if (mItem.notNull()) { const LLUUID& item_id = mItem->getUUID(); @@ -1045,7 +1045,7 @@ void LLPanelPlaces::onOverflowMenuItemClicked(const LLSD& param) void LLPanelPlaces::onBackButtonClicked() { - togglePlaceInfoPanel(FALSE); + togglePlaceInfoPanel(false); // Resetting mPlaceInfoType when Place Info panel is closed. mPlaceInfoType = LLStringUtil::null; @@ -1090,7 +1090,7 @@ void LLPanelPlaces::onRemoveButtonClicked() } } -bool LLPanelPlaces::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) +bool LLPanelPlaces::handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) { if (mActivePanel) { @@ -1099,7 +1099,7 @@ bool LLPanelPlaces::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_t return false; } -void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) +void LLPanelPlaces::togglePlaceInfoPanel(bool visible) { if (!mPlaceProfile || !mLandmarkInfo) return; @@ -1123,7 +1123,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) // to avoid text blinking. mResetInfoTimer.setTimerExpirySec(PLACE_INFO_UPDATE_INTERVAL); - mLandmarkInfo->setVisible(FALSE); + mLandmarkInfo->setVisible(false); } else if (mPlaceInfoType == AGENT_INFO_TYPE) { @@ -1139,7 +1139,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) mPlaceInfoType == LANDMARK_TAB_INFO_TYPE) { mLandmarkInfo->setVisible(visible); - mPlaceProfile->setVisible(FALSE); + mPlaceProfile->setVisible(false); if (visible) { mLandmarkInfo->resetLocation(); @@ -1163,7 +1163,7 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) mTabContainer->selectTabPanel(landmarks_panel); if (mItem.notNull()) { - landmarks_panel->setItemSelected(mItem->getUUID(), TRUE); + landmarks_panel->setItemSelected(mItem->getUUID(), true); } else { @@ -1291,7 +1291,7 @@ void LLPanelPlaces::createTabs() // favorites and inventory can remove items, history can clear history // Trashcan icon clearing everything? No way! - //childSetVisible("trash_btn_panel", TRUE); + //childSetVisible("trash_btn_panel", true); //if (supports_create) //{ diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 4ba91c06ef..9bd242a287 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -107,9 +107,9 @@ private: void onSortingMenuClick(); void onAddMenuClick(); void onRemoveButtonClicked(); - bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept); + bool handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept); - void togglePlaceInfoPanel(BOOL visible); + void togglePlaceInfoPanel(bool visible); /*virtual*/ void onVisibilityChange(bool new_visibility); diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h index 9376d1a6df..19a73fcec3 100644 --- a/indra/newview/llpanelplacestab.h +++ b/indra/newview/llpanelplacestab.h @@ -54,7 +54,7 @@ public: /** * Processes drag-n-drop of the Landmarks and folders into trash button. */ - virtual bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) = 0; + virtual bool handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) = 0; bool isTabVisible(); // Check if parent TabContainer is visible. diff --git a/indra/newview/llpanelpresetscamerapulldown.cpp b/indra/newview/llpanelpresetscamerapulldown.cpp index 19e5bdfde3..c280392477 100644 --- a/indra/newview/llpanelpresetscamerapulldown.cpp +++ b/indra/newview/llpanelpresetscamerapulldown.cpp @@ -129,9 +129,9 @@ void LLPanelPresetsCameraPulldown::onRowClick(const LLSD& user_data) LLFloaterCamera::switchToPreset(name); // Scroll grabbed focus, drop it to prevent selection of parent menu - setFocus(FALSE); + setFocus(false); - setVisible(FALSE); + setVisible(false); } else { @@ -147,7 +147,7 @@ void LLPanelPresetsCameraPulldown::onRowClick(const LLSD& user_data) void LLPanelPresetsCameraPulldown::onViewButtonClick(const LLSD& user_data) { // close the minicontrol, we're bringing up the big one - setVisible(FALSE); + setVisible(false); // Optional small camera floater //LLFloaterReg::toggleInstanceOrBringToFront("camera"); diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp index d4afcf4de6..9cc748238c 100644 --- a/indra/newview/llpanelpresetspulldown.cpp +++ b/indra/newview/llpanelpresetspulldown.cpp @@ -124,9 +124,9 @@ void LLPanelPresetsPulldown::onRowClick(const LLSD& user_data) LLPresetsManager::getInstance()->loadPreset(PRESETS_GRAPHIC, name); // Scroll grabbed focus, drop it to prevent selection of parent menu - setFocus(FALSE); + setFocus(false); - setVisible(FALSE); + setVisible(false); } else { @@ -142,7 +142,7 @@ void LLPanelPresetsPulldown::onRowClick(const LLSD& user_data) void LLPanelPresetsPulldown::onGraphicsButtonClick(const LLSD& user_data) { // close the minicontrol, we're bringing up the big one - setVisible(FALSE); + setVisible(false); // bring up the prefs floater LLFloater* prefsfloater = LLFloaterReg::showInstance("preferences"); @@ -161,7 +161,7 @@ void LLPanelPresetsPulldown::onGraphicsButtonClick(const LLSD& user_data) void LLPanelPresetsPulldown::onAutofpsButtonClick(const LLSD& user_data) { - setVisible(FALSE); + setVisible(false); //LLFloaterPerformance* performance_floater = LLFloaterReg::showTypedInstance("performance"); FSFloaterPerformance* performance_floater = LLFloaterReg::showTypedInstance("performance"); if (performance_floater) diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 801f28c599..58a3f6671b 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -297,7 +297,7 @@ void LLPanelPrimMediaControls::updateShape() if(!media_impl || gFloaterTools->getVisible()) { - setVisible(FALSE); + setVisible(false); return; } @@ -443,17 +443,17 @@ void LLPanelPrimMediaControls::updateShape() switch(result) { case LLPluginClassMediaOwner::MEDIA_PLAYING: - mPlayCtrl->setEnabled(FALSE); - mPlayCtrl->setVisible(FALSE); - mPauseCtrl->setEnabled(TRUE); + mPlayCtrl->setEnabled(false); + mPlayCtrl->setVisible(false); + mPauseCtrl->setEnabled(true); mPauseCtrl->setVisible(has_focus); break; case LLPluginClassMediaOwner::MEDIA_PAUSED: default: - mPauseCtrl->setEnabled(FALSE); - mPauseCtrl->setVisible(FALSE); - mPlayCtrl->setEnabled(TRUE); + mPauseCtrl->setEnabled(false); + mPauseCtrl->setVisible(false); + mPlayCtrl->setEnabled(true); mPlayCtrl->setVisible(has_focus); break; } @@ -469,17 +469,17 @@ void LLPanelPrimMediaControls::updateShape() mCurrentURL.clear(); } - mPlayCtrl->setVisible(FALSE); - mPauseCtrl->setVisible(FALSE); - mMediaStopCtrl->setVisible(FALSE); + mPlayCtrl->setVisible(false); + mPauseCtrl->setVisible(false); + mMediaStopCtrl->setVisible(false); mMediaAddressCtrl->setVisible(has_focus && !mini_controls); mMediaAddressCtrl->setEnabled(has_focus && !mini_controls); - mMediaPlaySliderPanel->setVisible(FALSE); - mMediaPlaySliderPanel->setEnabled(FALSE); - mSkipFwdCtrl->setVisible(FALSE); - mSkipFwdCtrl->setEnabled(FALSE); - mSkipBackCtrl->setVisible(FALSE); - mSkipBackCtrl->setEnabled(FALSE); + mMediaPlaySliderPanel->setVisible(false); + mMediaPlaySliderPanel->setEnabled(false); + mSkipFwdCtrl->setVisible(false); + mSkipFwdCtrl->setEnabled(false); + mSkipBackCtrl->setVisible(false); + mSkipBackCtrl->setEnabled(false); if(media_impl->getVolume() <= 0.0) { @@ -515,17 +515,17 @@ void LLPanelPrimMediaControls::updateShape() if(result == LLPluginClassMediaOwner::MEDIA_LOADING) { - mReloadCtrl->setEnabled(FALSE); - mReloadCtrl->setVisible(FALSE); - mStopCtrl->setEnabled(TRUE); + mReloadCtrl->setEnabled(false); + mReloadCtrl->setVisible(false); + mStopCtrl->setEnabled(true); mStopCtrl->setVisible(has_focus); } else { - mReloadCtrl->setEnabled(TRUE); + mReloadCtrl->setEnabled(true); mReloadCtrl->setVisible(has_focus); - mStopCtrl->setEnabled(FALSE); - mStopCtrl->setVisible(FALSE); + mStopCtrl->setEnabled(false); + mStopCtrl->setVisible(false); } } @@ -743,7 +743,7 @@ void LLPanelPrimMediaControls::updateShape() else { // I don't think this is correct anymore. This is done in draw() after the fade has completed. - // setVisible(FALSE); + // setVisible(false); } } } @@ -936,7 +936,7 @@ void LLPanelPrimMediaControls::close() { resetZoomLevel(true); LLViewerMediaFocus::getInstance()->clearFocus(); - setVisible(FALSE); + setVisible(false); } @@ -1122,7 +1122,7 @@ void LLPanelPrimMediaControls::updateZoom() { case ZOOM_NONE: { - gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(true, ANIMATE); break; } case ZOOM_FAR: @@ -1142,7 +1142,7 @@ void LLPanelPrimMediaControls::updateZoom() } default: { - gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(true, ANIMATE); break; } } @@ -1422,7 +1422,7 @@ void LLPanelPrimMediaControls::clearFaceOnFade() // Hiding this object makes scroll events go missing after it fades out // (see DEV-41755 for a full description of the train wreck). // Only hide the controls when we're untargeting. - setVisible(FALSE); + setVisible(false); mClearFaceOnFade = false; mVolumeSliderVisible = 0; diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 9a179517f9..ab6a3b865f 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -144,7 +144,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) return; } - LLPanel *panel = floater_profile->findChild(PANEL_PROFILE_VIEW, TRUE); + LLPanel *panel = floater_profile->findChild(PANEL_PROFILE_VIEW, true); LLPanelProfile *panel_profile = dynamic_cast(panel); if (!panel_profile) { @@ -205,21 +205,21 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) avatar_data->caption_text = result["caption"].asString(); } - panel = floater_profile->findChild(PANEL_SECONDLIFE, TRUE); + panel = floater_profile->findChild(PANEL_SECONDLIFE, true); LLPanelProfileSecondLife *panel_sl = dynamic_cast(panel); if (panel_sl) { panel_sl->processProfileProperties(avatar_data); } - panel = floater_profile->findChild(PANEL_WEB, TRUE); + panel = floater_profile->findChild(PANEL_WEB, true); LLPanelProfileWeb *panel_web = dynamic_cast(panel); if (panel_web) { panel_web->setLoaded(); } - panel = floater_profile->findChild(PANEL_FIRSTLIFE, TRUE); + panel = floater_profile->findChild(PANEL_FIRSTLIFE, true); LLPanelProfileFirstLife *panel_first = dynamic_cast(panel); if (panel_first) { @@ -239,7 +239,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) avatar_picks.picks_list.emplace_back(pick_data["id"].asUUID(), pick_data["name"].asString()); } - panel = floater_profile->findChild(PANEL_PICKS, TRUE); + panel = floater_profile->findChild(PANEL_PICKS, true); LLPanelProfilePicks *panel_picks = dynamic_cast(panel); if (panel_picks) { @@ -280,7 +280,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id) avatar_notes.target_id = agent_id; avatar_notes.notes = result["notes"].asString(); - panel = floater_profile->findChild(PANEL_NOTES, TRUE); + panel = floater_profile->findChild(PANEL_NOTES, true); LLPanelProfileNotes *panel_notes = dynamic_cast(panel); if (panel_notes) { @@ -811,11 +811,11 @@ void LLFloaterProfilePermissions::fillRightsData() { S32 rights = relation->getRightsGrantedTo(); - BOOL see_online = LLRelationship::GRANT_ONLINE_STATUS & rights ? TRUE : FALSE; + bool see_online = LLRelationship::GRANT_ONLINE_STATUS & rights ? true : false; mOnlineStatus->setValue(see_online); mMapRights->setEnabled(see_online); - mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE); - mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? TRUE : FALSE); + mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? true : false); + mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? true : false); } else { @@ -830,7 +830,7 @@ void LLFloaterProfilePermissions::rightsConfirmationCallback(const LLSD& notific S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option != 0) // canceled { - mEditObjectRights->setValue(mEditObjectRights->getValue().asBoolean() ? FALSE : TRUE); + mEditObjectRights->setValue(mEditObjectRights->getValue().asBoolean() ? false : true); } else { @@ -856,7 +856,7 @@ void LLFloaterProfilePermissions::onCommitSeeOnlineRights() if (relation) { S32 rights = relation->getRightsGrantedTo(); - mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? TRUE : FALSE); + mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? true : false); } else { @@ -866,7 +866,7 @@ void LLFloaterProfilePermissions::onCommitSeeOnlineRights() } else { - mMapRights->setValue(FALSE); + mMapRights->setValue(false); } mHasUnsavedPermChanges = true; } @@ -1063,7 +1063,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) LLUUID avatar_id = getAvatarId(); - BOOL own_profile = getSelfProfile(); + bool own_profile = getSelfProfile(); mGroupList->setShowNone(!own_profile); @@ -1112,12 +1112,12 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) #endif // { - mImageActionMenuButton->setVisible(TRUE); + mImageActionMenuButton->setVisible(true); mImageActionMenuButton->setMenu("menu_fs_profile_image_actions.xml", LLMenuButton::MP_BOTTOM_RIGHT); } else { - mImageActionMenuButton->setVisible(FALSE); + mImageActionMenuButton->setVisible(false); LLToggleableMenu* profile_menu = LLUICtrlFactory::getInstance()->createFromFile("menu_fs_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mOverflowButton->setMenu(profile_menu, LLMenuButton::MP_TOP_RIGHT); } @@ -1129,7 +1129,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) if (!own_profile) { - mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(avatar_id) ? LLAvatarTracker::instance().isBuddyOnline(avatar_id) : TRUE); + mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(avatar_id) ? LLAvatarTracker::instance().isBuddyOnline(avatar_id) : true); updateOnlineStatus(); fillRightsData(); } @@ -1169,13 +1169,13 @@ bool LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, bool d if (localPointToOtherView(x, y, &child_x, &child_y, mDescriptionEdit) && mDescriptionEdit->pointInView(child_x, child_y)) { - return FALSE; + return false; } if (localPointToOtherView(x, y, &child_x, &child_y, mGroupList) && mGroupList->pointInView(child_x, child_y)) { - return FALSE; + return false; } // Share @@ -1185,7 +1185,7 @@ bool LLPanelProfileSecondLife::handleDragAndDrop(S32 x, S32 y, MASK mask, bool d cargo_type, cargo_data, accept); - return TRUE; + return true; } void LLPanelProfileSecondLife::updateData() @@ -1292,15 +1292,15 @@ void LLPanelProfileSecondLife::resetData() mCanSeeOnlineIcon->setVisible(false); // Fix LL UI/UX design accident //mCantSeeOnlineIcon->setVisible(!own_profile); - mCantSeeOnlineIcon->setVisible(FALSE); + mCantSeeOnlineIcon->setVisible(false); mCanSeeOnMapIcon->setVisible(false); // Fix LL UI/UX design accident //mCantSeeOnMapIcon->setVisible(!own_profile); - mCantSeeOnMapIcon->setVisible(FALSE); + mCantSeeOnMapIcon->setVisible(false); mCanEditObjectsIcon->setVisible(false); // Fix LL UI/UX design accident //mCantEditObjectsIcon->setVisible(!own_profile); - mCantEditObjectsIcon->setVisible(FALSE); + mCantEditObjectsIcon->setVisible(false); mCanSeeOnlineIcon->setEnabled(false); mCantSeeOnlineIcon->setEnabled(false); @@ -1310,17 +1310,17 @@ void LLPanelProfileSecondLife::resetData() mCantEditObjectsIcon->setEnabled(false); // Fix LL UI/UX design accident - //childSetVisible("partner_layout", FALSE); - //childSetVisible("badge_layout", FALSE); - //childSetVisible("partner_spacer_layout", TRUE); + //childSetVisible("partner_layout", false); + //childSetVisible("badge_layout", false); + //childSetVisible("partner_spacer_layout", true); // Always show the online status text, just set it to "offline" when a friend is hiding - // mStatusText->setVisible(FALSE); - mCopyMenuButton->setVisible(FALSE); + // mStatusText->setVisible(false); + mCopyMenuButton->setVisible(false); mGroupInviteButton->setVisible(!own_profile); if (own_profile && LLAvatarName::useDisplayNames()) { - mDisplayNameButton->setVisible(TRUE); - mDisplayNameButton->setEnabled(TRUE); + mDisplayNameButton->setVisible(true); + mDisplayNameButton->setEnabled(true); } mShowOnMapButton->setVisible(!own_profile); mPayButton->setVisible(!own_profile); @@ -1374,7 +1374,7 @@ void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avat // floater is dead, so panels are dead as well return; } - LLPanelProfile* panel_profile = floater_profile->findChild(PANEL_PROFILE_VIEW, TRUE); + LLPanelProfile* panel_profile = floater_profile->findChild(PANEL_PROFILE_VIEW, true); if (panel_profile) { panel_profile->setAvatarData(avatar_data); @@ -1421,7 +1421,7 @@ void LLPanelProfileSecondLife::onAvatarNameCache(const LLUUID& agent_id, const L //getChild("display_name")->setValue(av_name.getDisplayName()); //getChild("user_name")->setValue(av_name.getAccountName()); getChild("complete_name")->setValue(av_name.getCompleteName()); - mCopyMenuButton->setVisible(TRUE); + mCopyMenuButton->setVisible(true); // } @@ -1454,11 +1454,11 @@ void LLPanelProfileSecondLife::setProfileImageUploaded(const LLUUID &image_asset { imagep->setLoadedCallback(onImageLoaded, MAX_DISCARD_LEVEL, - FALSE, - FALSE, + false, + false, new LLHandle(getHandle()), NULL, - FALSE); + false); } LLFloater *floater = mFloaterProfileTextureHandle.get(); @@ -1541,19 +1541,19 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data) { imagep->setLoadedCallback(onImageLoaded, MAX_DISCARD_LEVEL, - FALSE, - FALSE, + false, + false, new LLHandle(getHandle()), NULL, - FALSE); + false); } if (getSelfProfile()) { mAllowPublish = avatar_data->flags & AVATAR_ALLOW_PUBLISH; // Fix LL UI/UX design accident - //mShowInSearchCombo->setValue((BOOL)mAllowPublish); - mShowInSearchCheckbox->setValue((BOOL)mAllowPublish); + //mShowInSearchCombo->setValue((bool)mAllowPublish); + mShowInSearchCheckbox->setValue((bool)mAllowPublish); // } } @@ -1566,7 +1566,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data) if (avatar_data->partner_id.notNull()) { // Fix LL UI/UX design accident - //childSetVisible("partner_layout", TRUE); + //childSetVisible("partner_layout", true); //LLStringUtil::format_map_t args; //args["[LINK]"] = LLSLURL("agent", avatar_data->partner_id, "inspect").getSLURLString(); //std::string partner_text = getString("partner_text", args); @@ -1577,7 +1577,7 @@ void LLPanelProfileSecondLife::fillPartnerData(const LLAvatarData* avatar_data) else { // Fix LL UI/UX design accident - //childSetVisible("partner_layout", FALSE); + //childSetVisible("partner_layout", false); partner_text_ctrl->setText(getString("no_partner_text")); } } @@ -1658,8 +1658,8 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data // Fix LL UI/UX design accident //getChild("badge_icon")->setValue("Profile_Badge_Linden"); //getChild("badge_text")->setValue(getString("BadgeLinden")); - //childSetVisible("badge_layout", TRUE); - //childSetVisible("partner_spacer_layout", FALSE); + //childSetVisible("badge_layout", true); + //childSetVisible("partner_spacer_layout", false); setBadge("Profile_Badge_Linden", "BadgeLinden"); } else if (avatar_data->born_on < sl_release) @@ -1667,8 +1667,8 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data // Fix LL UI/UX design accident //getChild("badge_icon")->setValue("Profile_Badge_Beta"); //getChild("badge_text")->setValue(getString("BadgeBeta")); - //childSetVisible("badge_layout", TRUE); - //childSetVisible("partner_spacer_layout", FALSE); + //childSetVisible("badge_layout", true); + //childSetVisible("partner_spacer_layout", false); setBadge("Profile_Badge_Beta", "BadgeBeta"); } else if (customer_lower == "beta_lifetime") @@ -1676,8 +1676,8 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data // Fix LL UI/UX design accident //getChild("badge_icon")->setValue("Profile_Badge_Beta_Lifetime"); //getChild("badge_text")->setValue(getString("BadgeBetaLifetime")); - //childSetVisible("badge_layout", TRUE); - //childSetVisible("partner_spacer_layout", FALSE); + //childSetVisible("badge_layout", true); + //childSetVisible("partner_spacer_layout", false); setBadge("Profile_Badge_Beta_Lifetime", "BadgeBetaLifetime"); } else if (customer_lower == "lifetime") @@ -1685,8 +1685,8 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data // Fix LL UI/UX design accident //getChild("badge_icon")->setValue("Profile_Badge_Lifetime"); //getChild("badge_text")->setValue(getString("BadgeLifetime")); - //childSetVisible("badge_layout", TRUE); - //childSetVisible("partner_spacer_layout", FALSE); + //childSetVisible("badge_layout", true); + //childSetVisible("partner_spacer_layout", false); setBadge("Profile_Badge_Lifetime", "BadgeLifetime"); } else if (customer_lower == "secondlifetime_premium") @@ -1694,8 +1694,8 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data // Fix LL UI/UX design accident //getChild("badge_icon")->setValue("Profile_Badge_Premium_Lifetime"); //getChild("badge_text")->setValue(getString("BadgePremiumLifetime")); - //childSetVisible("badge_layout", TRUE); - //childSetVisible("partner_spacer_layout", FALSE); + //childSetVisible("badge_layout", true); + //childSetVisible("partner_spacer_layout", false); setBadge("Profile_Badge_Premium_Lifetime", "BadgePremiumLifetime"); } else if (customer_lower == "secondlifetime_premium_plus") @@ -1703,8 +1703,8 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data // Fix LL UI/UX design accident //getChild("badge_icon")->setValue("Profile_Badge_Pplus_Lifetime"); //getChild("badge_text")->setValue(getString("BadgePremiumPlusLifetime")); - //childSetVisible("badge_layout", TRUE); - //childSetVisible("partner_spacer_layout", FALSE); + //childSetVisible("badge_layout", true); + //childSetVisible("partner_spacer_layout", false); setBadge("Profile_Badge_Pplus_Lifetime", "BadgePremiumPlusLifetime"); } // Add Firestorm team badge @@ -1715,9 +1715,9 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data // else { - childSetVisible("badge_layout", FALSE); + childSetVisible("badge_layout", false); // Fix LL UI/UX design accident - //childSetVisible("partner_spacer_layout", TRUE); + //childSetVisible("partner_spacer_layout", true); } } @@ -1796,7 +1796,7 @@ void LLPanelProfileSecondLife::fillAgeData(const LLDate &born_on) getChild("user_age")->setValue(register_date); } -void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep) +void LLPanelProfileSecondLife::onImageLoaded(bool success, LLViewerFetchedTexture *imagep) { // Fix LL UI/UX design accident //LLRect imageRect = mSecondLifePicLayout->getRect(); @@ -1817,12 +1817,12 @@ void LLPanelProfileSecondLife::onImageLoaded(BOOL success, LLViewerFetchedTextur } //static -void LLPanelProfileSecondLife::onImageLoaded(BOOL success, +void LLPanelProfileSecondLife::onImageLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata) { if (!userdata) return; @@ -1864,7 +1864,7 @@ void LLPanelProfileSecondLife::onChange(EStatusType status, const std::string &c return; } - mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(getAvatarId()) ? LLAvatarTracker::instance().isBuddyOnline(getAvatarId()) : TRUE); + mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(getAvatarId()) ? LLAvatarTracker::instance().isBuddyOnline(getAvatarId()) : true); } void LLPanelProfileSecondLife::setAvatarId(const LLUUID& avatar_id) @@ -1947,10 +1947,10 @@ void LLPanelProfileSecondLife::setLoaded() if (getSelfProfile()) { // Fix LL UI/UX design accident - //mShowInSearchCombo->setEnabled(TRUE); - mShowInSearchCheckbox->setEnabled(TRUE); + //mShowInSearchCombo->setEnabled(true); + mShowInSearchCheckbox->setEnabled(true); // - mDescriptionEdit->setEnabled(TRUE); + mDescriptionEdit->setEnabled(true); } } @@ -1959,9 +1959,9 @@ void LLPanelProfileSecondLife::updateButtons() { if (getSelfProfile()) { - mShowInSearchCheckbox->setVisible(TRUE); - mShowInSearchCheckbox->setEnabled(TRUE); - mDescriptionEdit->setEnabled(TRUE); + mShowInSearchCheckbox->setVisible(true); + mShowInSearchCheckbox->setEnabled(true); + mDescriptionEdit->setEnabled(true); } else { @@ -2374,8 +2374,8 @@ void LLPanelProfileSecondLife::onAvatarNameCacheSetName(const LLUUID& agent_id, void LLPanelProfileSecondLife::setDescriptionText(const std::string &text) { - mSaveDescriptionChanges->setEnabled(FALSE); - mDiscardDescriptionChanges->setEnabled(FALSE); + mSaveDescriptionChanges->setEnabled(false); + mDiscardDescriptionChanges->setEnabled(false); mHasUnsavedDescriptionChanges = false; mDescriptionText = text; @@ -2384,8 +2384,8 @@ void LLPanelProfileSecondLife::setDescriptionText(const std::string &text) void LLPanelProfileSecondLife::onSetDescriptionDirty() { - mSaveDescriptionChanges->setEnabled(TRUE); - mDiscardDescriptionChanges->setEnabled(TRUE); + mSaveDescriptionChanges->setEnabled(true); + mDiscardDescriptionChanges->setEnabled(true); mHasUnsavedDescriptionChanges = true; } @@ -2435,7 +2435,7 @@ void LLPanelProfileSecondLife::onSaveDescriptionChanges() // floater is dead, so panels are dead as well return; } - LLPanelProfile* panel_profile = floater_profile->findChild(PANEL_PROFILE_VIEW, TRUE); + LLPanelProfile* panel_profile = floater_profile->findChild(PANEL_PROFILE_VIEW, true); if (!panel_profile) { LL_WARNS() << PANEL_PROFILE_VIEW << " not found" << LL_ENDL; @@ -2460,8 +2460,8 @@ void LLPanelProfileSecondLife::onSaveDescriptionChanges() LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL; } - mSaveDescriptionChanges->setEnabled(FALSE); - mDiscardDescriptionChanges->setEnabled(FALSE); + mSaveDescriptionChanges->setEnabled(false); + mDiscardDescriptionChanges->setEnabled(false); mHasUnsavedDescriptionChanges = false; } @@ -2481,15 +2481,15 @@ void LLPanelProfileSecondLife::onShowAgentPermissionsDialog() LLFloaterProfilePermissions * perms = new LLFloaterProfilePermissions(parent_floater, getAvatarId()); mFloaterPermissionsHandle = perms->getHandle(); perms->openFloater(); - perms->setVisibleAndFrontmost(TRUE); + perms->setVisibleAndFrontmost(true); parent_floater->addDependentFloater(mFloaterPermissionsHandle); } } else // already open { - floater->setMinimized(FALSE); - floater->setVisibleAndFrontmost(TRUE); + floater->setMinimized(false); + floater->setVisibleAndFrontmost(true); } } @@ -2517,7 +2517,7 @@ void LLPanelProfileSecondLife::onShowAgentProfileTexture() texture_view->resetAsset(); } texture_view->openFloater(); - texture_view->setVisibleAndFrontmost(TRUE); + texture_view->setVisibleAndFrontmost(true); parent_floater->addDependentFloater(mFloaterProfileTextureHandle); } @@ -2525,8 +2525,8 @@ void LLPanelProfileSecondLife::onShowAgentProfileTexture() else // already open { LLFloaterProfileTexture * texture_view = dynamic_cast(floater); - texture_view->setMinimized(FALSE); - texture_view->setVisibleAndFrontmost(TRUE); + texture_view->setMinimized(false); + texture_view->setVisibleAndFrontmost(true); if (mImageId.notNull()) { texture_view->loadAsset(mImageId); @@ -2555,12 +2555,12 @@ void LLPanelProfileSecondLife::onShowTexturePicker() mImageId, LLUUID::null, mImageId, - FALSE, - FALSE, + false, + false, getString("texture_picker_label"), // "SELECT PHOTO", // Fix LL UI/UX design accident PERM_NONE, PERM_NONE, - FALSE, + false, NULL); mFloaterTexturePickerHandle = texture_floaterp->getHandle(); @@ -2572,20 +2572,20 @@ void LLPanelProfileSecondLife::onShowTexturePicker() onCommitProfileImage(asset_id); } }); - texture_floaterp->setLocalTextureEnabled(FALSE); - texture_floaterp->setBakeTextureEnabled(FALSE); + texture_floaterp->setLocalTextureEnabled(false); + texture_floaterp->setBakeTextureEnabled(false); texture_floaterp->setCanApply(false, true, false); parent_floater->addDependentFloater(mFloaterTexturePickerHandle); texture_floaterp->openFloater(); - texture_floaterp->setFocus(TRUE); + texture_floaterp->setFocus(true); } } else { - floaterp->setMinimized(FALSE); - floaterp->setVisibleAndFrontmost(TRUE); + floaterp->setMinimized(false); + floaterp->setVisibleAndFrontmost(true); } } @@ -2640,11 +2640,11 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id) { imagep->setLoadedCallback(onImageLoaded, MAX_DISCARD_LEVEL, - FALSE, - FALSE, + false, + false, new LLHandle(getHandle()), NULL, - FALSE); + false); } // @@ -2741,7 +2741,7 @@ void LLPanelProfileWeb::updateData() { setIsLoading(); - mWebBrowser->setVisible(TRUE); + mWebBrowser->setVisible(true); mPerformanceTimer.start(); mWebBrowser->navigateTo(mURLWebProfile, HTTP_CONTENT_TEXT_HTML); } @@ -2787,7 +2787,7 @@ void LLPanelProfileWeb::onCommitLoad(LLUICtrl* ctrl) LLSD::String valstr = ctrl->getValue().asString(); if (valstr.empty()) { - mWebBrowser->setVisible(TRUE); + mWebBrowser->setVisible(true); mPerformanceTimer.start(); mWebBrowser->navigateTo( mURLHome, HTTP_CONTENT_TEXT_HTML ); } @@ -2886,7 +2886,7 @@ void LLPanelProfileFirstLife::onOpen(const LLSD& key) if (!getSelfProfile()) { // Otherwise as the only focusable element it will be selected - mDescriptionEdit->setTabStop(FALSE); + mDescriptionEdit->setTabStop(false); } // Allow proper texture swatch handling @@ -2957,12 +2957,12 @@ void LLPanelProfileFirstLife::onChangePhoto() mImageId, LLUUID::null, mImageId, - FALSE, - FALSE, + false, + false, getString("texture_picker_label"), // "SELECT PHOTO", // Fix LL UI/UX design accident PERM_NONE, PERM_NONE, - FALSE, + false, NULL); mFloaterTexturePickerHandle = texture_floaterp->getHandle(); @@ -2974,19 +2974,19 @@ void LLPanelProfileFirstLife::onChangePhoto() onCommitPhoto(asset_id); } }); - texture_floaterp->setLocalTextureEnabled(FALSE); + texture_floaterp->setLocalTextureEnabled(false); texture_floaterp->setCanApply(false, true, false); parent_floater->addDependentFloater(mFloaterTexturePickerHandle); texture_floaterp->openFloater(); - texture_floaterp->setFocus(TRUE); + texture_floaterp->setFocus(true); } } else { - floaterp->setMinimized(FALSE); - floaterp->setVisibleAndFrontmost(TRUE); + floaterp->setMinimized(false); + floaterp->setVisibleAndFrontmost(true); } } @@ -3058,8 +3058,8 @@ void LLPanelProfileFirstLife::onCommitPhoto(const LLUUID& id) void LLPanelProfileFirstLife::setDescriptionText(const std::string &text) { - mSaveChanges->setEnabled(FALSE); - mDiscardChanges->setEnabled(FALSE); + mSaveChanges->setEnabled(false); + mDiscardChanges->setEnabled(false); mHasUnsavedChanges = false; mCurrentDescription = text; @@ -3068,8 +3068,8 @@ void LLPanelProfileFirstLife::setDescriptionText(const std::string &text) void LLPanelProfileFirstLife::onSetDescriptionDirty() { - mSaveChanges->setEnabled(TRUE); - mDiscardChanges->setEnabled(TRUE); + mSaveChanges->setEnabled(true); + mDiscardChanges->setEnabled(true); mHasUnsavedChanges = true; } @@ -3094,7 +3094,7 @@ void LLPanelProfileFirstLife::onSaveDescriptionChanges() // floater is dead, so panels are dead as well return; } - LLPanelProfile* panel_profile = floater_profile->findChild(PANEL_PROFILE_VIEW, TRUE); + LLPanelProfile* panel_profile = floater_profile->findChild(PANEL_PROFILE_VIEW, true); if (!panel_profile) { LL_WARNS() << PANEL_PROFILE_VIEW << " not found" << LL_ENDL; @@ -3118,8 +3118,8 @@ void LLPanelProfileFirstLife::onSaveDescriptionChanges() LL_WARNS("AvatarProperties") << "Failed to update profile data, no cap found" << LL_ENDL; } - mSaveChanges->setEnabled(FALSE); - mDiscardChanges->setEnabled(FALSE); + mSaveChanges->setEnabled(false); + mDiscardChanges->setEnabled(false); mHasUnsavedChanges = false; } @@ -3211,8 +3211,8 @@ void LLPanelProfileFirstLife::setLoaded() if (getSelfProfile()) { - mDescriptionEdit->setEnabled(TRUE); - mPicture->setEnabled(TRUE); + mDescriptionEdit->setEnabled(true); + mPicture->setEnabled(true); mRemovePhoto->setEnabled(mImageId.notNull()); } } @@ -3294,8 +3294,8 @@ void LLPanelProfileNotes::setNotesText(const std::string &text) } // - mSaveChanges->setEnabled(FALSE); - mDiscardChanges->setEnabled(FALSE); + mSaveChanges->setEnabled(false); + mDiscardChanges->setEnabled(false); mHasUnsavedChanges = false; mCurrentNotes = text; @@ -3304,8 +3304,8 @@ void LLPanelProfileNotes::setNotesText(const std::string &text) void LLPanelProfileNotes::onSetNotesDirty() { - mSaveChanges->setEnabled(TRUE); - mDiscardChanges->setEnabled(TRUE); + mSaveChanges->setEnabled(true); + mDiscardChanges->setEnabled(true); mHasUnsavedChanges = true; } @@ -3333,8 +3333,8 @@ void LLPanelProfileNotes::onSaveNotesChanges() FSRadar::getInstance()->updateNotes(getAvatarId(), mCurrentNotes); // Update notes in radar when edited - mSaveChanges->setEnabled(FALSE); - mDiscardChanges->setEnabled(FALSE); + mSaveChanges->setEnabled(false); + mDiscardChanges->setEnabled(false); mHasUnsavedChanges = false; } @@ -3346,7 +3346,7 @@ void LLPanelProfileNotes::onDiscardNotesChanges() void LLPanelProfileNotes::processProperties(LLAvatarNotes* avatar_notes) { setNotesText(avatar_notes->notes); - mNotesEditor->setEnabled(TRUE); + mNotesEditor->setEnabled(true); setLoaded(); } // Restore UDP profiles diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index 94e12dc0a0..739a3158f6 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -171,13 +171,13 @@ protected: */ void fillAgeData(const LLDate &born_on); - void onImageLoaded(BOOL success, LLViewerFetchedTexture *imagep); - static void onImageLoaded(BOOL success, + void onImageLoaded(bool success, LLViewerFetchedTexture *imagep); + static void onImageLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata); /** diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp index 4702f8c57c..0a8f8531e5 100644 --- a/indra/newview/llpanelprofileclassifieds.cpp +++ b/indra/newview/llpanelprofileclassifieds.cpp @@ -137,7 +137,7 @@ public: // get the ID for the classified LLUUID classified_id; - if (!classified_id.set(params[0], FALSE)) + if (!classified_id.set(params[0], false)) { return false; } @@ -252,11 +252,11 @@ void LLPanelProfileClassifieds::onOpen(const LLSD& key) bool own_profile = getSelfProfile(); if (own_profile) { - mNewButton->setVisible(TRUE); - mNewButton->setEnabled(FALSE); + mNewButton->setVisible(true); + mNewButton->setEnabled(false); - mDeleteButton->setVisible(TRUE); - mDeleteButton->setEnabled(FALSE); + mDeleteButton->setVisible(true); + mDeleteButton->setEnabled(false); } childSetVisible("buttons_header", own_profile); @@ -277,7 +277,7 @@ void LLPanelProfileClassifieds::selectClassified(const LLUUID& classified_id, bo mTabContainer->selectTabPanel(classified_panel); if (edit) { - classified_panel->setEditMode(TRUE); + classified_panel->setEditMode(true); } break; } @@ -295,7 +295,7 @@ void LLPanelProfileClassifieds::createClassified() { if (getIsLoaded()) { - mNoItemsLabel->setVisible(FALSE); + mNoItemsLabel->setVisible(false); LLPanelProfileClassified* classified_panel = LLPanelProfileClassified::create(); classified_panel->onOpen(LLSD()); mTabContainer->addTabPanel( @@ -330,7 +330,7 @@ bool LLPanelProfileClassifieds::postBuild() void LLPanelProfileClassifieds::onClickNewBtn() { - mNoItemsLabel->setVisible(FALSE); + mNoItemsLabel->setVisible(false); LLPanelProfileClassified* classified_panel = LLPanelProfileClassified::create(); classified_panel->onOpen(LLSD()); mTabContainer->addTabPanel( @@ -379,7 +379,7 @@ void LLPanelProfileClassifieds::callbackDeleteClassified(const LLSD& notificatio updateButtons(); - BOOL no_data = !mTabContainer->getTabCount(); + bool no_data = !mTabContainer->getTabCount(); mNoItemsLabel->setVisible(no_data); } } @@ -492,7 +492,7 @@ void LLPanelProfileClassifieds::updateData() { setIsLoading(); mNoItemsLabel->setValue(LLTrans::getString("PicksClassifiedsLoadingText")); - mNoItemsLabel->setVisible(TRUE); + mNoItemsLabel->setVisible(true); LLAvatarPropertiesProcessor::getInstance()->sendAvatarClassifiedsRequest(avatar_id); } @@ -754,7 +754,7 @@ void LLPanelProfileClassified::onOpen(const LLSD& key) mSaveButton->setLabelArg("[LABEL]", getString("publish_label")); - setEditMode(TRUE); + setEditMode(true); enableSave(true); enableEditing(true); resetDirty(); @@ -827,7 +827,7 @@ void LLPanelProfileClassified::processProperties(void* data, EAvatarProcessorTyp if (mIsNewWithErrors) { // We just published it - setEditMode(FALSE); + setEditMode(false); } mIsNewWithErrors = false; mIsNew = false; @@ -875,13 +875,13 @@ void LLPanelProfileClassified::processProperties(void* data, EAvatarProcessorTyp if (mEditOnLoad) { - setEditMode(TRUE); + setEditMode(true); } } } -void LLPanelProfileClassified::setEditMode(BOOL edit_mode) +void LLPanelProfileClassified::setEditMode(bool edit_mode) { mEditMode = edit_mode; @@ -917,7 +917,7 @@ void LLPanelProfileClassified::updateInfoRect() // info_scroll_content_panel contains both info and edit panel // info panel can be very large and scroll bar will carry over. // Resize info panel to prevent scroll carry over when in edit mode. - mInfoScroll->reshape(mInfoScroll->getRect().getWidth(), DEFAULT_EDIT_CLASSIFIED_SCROLL_HEIGHT, FALSE); + mInfoScroll->reshape(mInfoScroll->getRect().getWidth(), DEFAULT_EDIT_CLASSIFIED_SCROLL_HEIGHT, false); } else { @@ -927,7 +927,7 @@ void LLPanelProfileClassified::updateInfoRect() S32 delta_height = new_height - visible_rect.getHeight() + 5; LLRect rect = mInfoScroll->getRect(); - mInfoScroll->reshape(rect.getWidth(), rect.getHeight() + delta_height, FALSE); + mInfoScroll->reshape(rect.getWidth(), rect.getHeight() + delta_height, false); } } @@ -971,7 +971,7 @@ S32 LLPanelProfileClassified::getClassifiedFee() void LLPanelProfileClassified::onEditClick() { - setEditMode(TRUE); + setEditMode(true); } void LLPanelProfileClassified::onCancelClick() @@ -997,7 +997,7 @@ void LLPanelProfileClassified::onCancelClick() setInfoLoaded(false); - setEditMode(FALSE); + setEditMode(false); } void LLPanelProfileClassified::onSaveClick() @@ -1087,8 +1087,8 @@ void LLPanelProfileClassified::resetData() getChild("click_through_text")->setValue(LLStringUtil::null); mEditButton->setValue(LLStringUtil::null); getChild("creation_date")->setValue(LLStringUtil::null); - mContentTypeM->setVisible(FALSE); - mContentTypeG->setVisible(FALSE); + mContentTypeM->setVisible(false); + mContentTypeG->setVisible(false); } void LLPanelProfileClassified::setClassifiedName(const std::string& name) @@ -1478,7 +1478,7 @@ void LLPanelProfileClassified::doSave() if (!isNew() && !isNewWithErrors()) { - setEditMode(FALSE); + setEditMode(false); return; } @@ -1528,12 +1528,12 @@ void LLPanelProfileClassified::notifyInvalidName() void LLPanelProfileClassified::onTexturePickerMouseEnter() { - mEditIcon->setVisible(TRUE); + mEditIcon->setVisible(true); } void LLPanelProfileClassified::onTexturePickerMouseLeave() { - mEditIcon->setVisible(FALSE); + mEditIcon->setVisible(false); } void LLPanelProfileClassified::onTextureSelected() diff --git a/indra/newview/llpanelprofileclassifieds.h b/indra/newview/llpanelprofileclassifieds.h index 046d45d55a..43df3c3e47 100644 --- a/indra/newview/llpanelprofileclassifieds.h +++ b/indra/newview/llpanelprofileclassifieds.h @@ -200,7 +200,7 @@ public: S32 getPriceForListing() { return mPriceForListing; } - void setEditMode(BOOL edit_mode); + void setEditMode(bool edit_mode); bool getEditMode() {return mEditMode;} static void setClickThrough( diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index 307d61708f..1c458e3c51 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -121,7 +121,7 @@ public: // get the ID for the pick_id LLUUID pick_id; - if (!pick_id.set(params[0], FALSE)) + if (!pick_id.set(params[0], false)) { return false; } @@ -176,11 +176,11 @@ void LLPanelProfilePicks::onOpen(const LLSD& key) bool own_profile = getSelfProfile(); if (own_profile) { - mNewButton->setVisible(TRUE); - mNewButton->setEnabled(FALSE); + mNewButton->setVisible(true); + mNewButton->setEnabled(false); - mDeleteButton->setVisible(TRUE); - mDeleteButton->setEnabled(FALSE); + mDeleteButton->setVisible(true); + mDeleteButton->setEnabled(false); } childSetVisible("buttons_header", own_profile); @@ -192,7 +192,7 @@ void LLPanelProfilePicks::createPick(const LLPickData &data) { if (canAddNewPick()) { - mNoItemsLabel->setVisible(FALSE); + mNoItemsLabel->setVisible(false); LLPanelProfilePick* pick_panel = LLPanelProfilePick::create(); pick_panel->setAvatarId(getAvatarId()); pick_panel->processProperties(&data); @@ -454,7 +454,7 @@ void LLPanelProfilePicks::updateData() if (!getIsLoaded()) { mNoItemsLabel->setValue(LLTrans::getString("PicksClassifiedsLoadingText")); - mNoItemsLabel->setVisible(TRUE); + mNoItemsLabel->setVisible(true); } } @@ -581,23 +581,23 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id) setSnapshotId(snapshot_id); setPickLocation(createLocationText(getLocationNotice(), pick_name, region_name, getPosGlobal())); - enableSaveButton(TRUE); + enableSaveButton(true); } else { LLAvatarPropertiesProcessor::getInstance()->sendPickInfoRequest(getAvatarId(), getPickId()); - enableSaveButton(FALSE); + enableSaveButton(false); } resetDirty(); if (getSelfProfile()) { - mPickName->setEnabled(TRUE); - mPickDescription->setEnabled(TRUE); + mPickName->setEnabled(true); + mPickDescription->setEnabled(true); // Make sure the "Set Location" button is only visible when viewing own picks - // mSetCurrentLocationButton->setVisible(TRUE); + // mSetCurrentLocationButton->setVisible(true); childSetVisible("set_to_curr_location_btn_lp", true); // } @@ -605,7 +605,7 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id) { // Make sure the "Set Location" button is only visible when viewing own picks childSetVisible("set_to_curr_location_btn_lp", false); - mSnapshotCtrl->setEnabled(FALSE); + mSnapshotCtrl->setEnabled(false); } } @@ -675,7 +675,7 @@ void LLPanelProfilePick::processProperties(const LLPickData* pick_info) setSnapshotId(pick_info->snapshot_id); if (!getSelfProfile()) { - mSnapshotCtrl->setEnabled(FALSE); + mSnapshotCtrl->setEnabled(false); } setPickName(pick_info->name); setPickDesc(pick_info->desc); @@ -703,7 +703,7 @@ void LLPanelProfilePick::apply() void LLPanelProfilePick::setSnapshotId(const LLUUID& id) { mSnapshotCtrl->setImageAssetID(id); - mSnapshotCtrl->setValid(TRUE); + mSnapshotCtrl->setValid(true); } void LLPanelProfilePick::setPickName(const std::string& name) @@ -741,7 +741,7 @@ void LLPanelProfilePick::onClickTeleport() } } -void LLPanelProfilePick::enableSaveButton(BOOL enable) +void LLPanelProfilePick::enableSaveButton(bool enable) { childSetVisible("save_changes_lp", enable); @@ -752,7 +752,7 @@ void LLPanelProfilePick::enableSaveButton(BOOL enable) void LLPanelProfilePick::onSnapshotChanged() { - enableSaveButton(TRUE); + enableSaveButton(true); } void LLPanelProfilePick::onPickChanged(LLUICtrl* ctrl) @@ -812,7 +812,7 @@ void LLPanelProfilePick::onClickSetLocation() setPickLocation(createLocationText(getLocationNotice(), parcel_name, region_name, getPosGlobal())); mLocationChanged = true; - enableSaveButton(TRUE); + enableSaveButton(true); } void LLPanelProfilePick::onClickSave() @@ -826,7 +826,7 @@ void LLPanelProfilePick::onClickCancel() { LLAvatarPropertiesProcessor::getInstance()->sendPickInfoRequest(getAvatarId(), getPickId()); mLocationChanged = false; - enableSaveButton(FALSE); + enableSaveButton(false); } std::string LLPanelProfilePick::getLocationNotice() @@ -880,14 +880,14 @@ void LLPanelProfilePick::sendUpdate() pick_data.creator_id = gAgentID;; //legacy var need to be deleted - pick_data.top_pick = FALSE; + pick_data.top_pick = false; pick_data.parcel_id = mParcelId; pick_data.name = getPickName(); pick_data.desc = mPickDescription->getValue().asString(); pick_data.snapshot_id = mSnapshotCtrl->getImageAssetID(); pick_data.pos_global = getPosGlobal(); pick_data.sort_order = 0; - pick_data.enabled = TRUE; + pick_data.enabled = true; LLAvatarPropertiesProcessor::getInstance()->sendPickInfoUpdate(&pick_data); diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h index 9a0d9cdc96..4f1af5e768 100644 --- a/indra/newview/llpanelprofilepicks.h +++ b/indra/newview/llpanelprofilepicks.h @@ -191,7 +191,7 @@ protected: /** * Enables/disables "Save" button */ - void enableSaveButton(BOOL enable); + void enableSaveButton(bool enable); /** * Called when snapshot image changes. diff --git a/indra/newview/llpanelpulldown.cpp b/indra/newview/llpanelpulldown.cpp index 102ccb9bea..f26a9dc362 100644 --- a/indra/newview/llpanelpulldown.cpp +++ b/indra/newview/llpanelpulldown.cpp @@ -51,8 +51,8 @@ void LLPanelPulldown::onMouseEnter(S32 x, S32 y, MASK mask) /*virtual*/ void LLPanelPulldown::onTopLost() { - setFocus(FALSE); // drop focus to prevent transfer to parent - setVisible(FALSE); + setFocus(false); // drop focus to prevent transfer to parent + setVisible(false); } /*virtual*/ @@ -114,7 +114,7 @@ void LLPanelPulldown::draw() if (alpha == 0.f) { - setFocus(FALSE); // drop focus to prevent transfer to parent - setVisible(FALSE); + setFocus(false); // drop focus to prevent transfer to parent + setVisible(false); } } diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index efb936fdb2..6445186fba 100644 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -147,7 +147,7 @@ S32 LLPanelSnapshot::getTypedPreviewHeight() const return getChild(getHeightSpinnerName())->getValue().asInteger(); } -void LLPanelSnapshot::enableAspectRatioCheckbox(BOOL enable) +void LLPanelSnapshot::enableAspectRatioCheckbox(bool enable) { llassert(!getAspectRatioCBName().empty()); getChild(getAspectRatioCBName())->setEnabled(enable); diff --git a/indra/newview/llpanelsnapshot.h b/indra/newview/llpanelsnapshot.h index 8af52a462e..4e2de425d9 100644 --- a/indra/newview/llpanelsnapshot.h +++ b/indra/newview/llpanelsnapshot.h @@ -61,7 +61,7 @@ public: virtual LLSpinCtrl* getWidthSpinner(); virtual LLSpinCtrl* getHeightSpinner(); virtual LLComboBox* getImageSizeComboBox(); // Store settings at logout - virtual void enableAspectRatioCheckbox(BOOL enable); + virtual void enableAspectRatioCheckbox(bool enable); virtual LLSnapshotModel::ESnapshotFormat getImageFormat() const; virtual LLSnapshotModel::ESnapshotType getSnapshotType(); virtual void updateControls(const LLSD& info) = 0; ///< Update controls from saved settings diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index f62b60ff27..46bbf9e7d3 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -155,7 +155,7 @@ void LLPanelSnapshotInventory::onOpen(const LLSD& key) if (LLAgentBenefitsMgr::current().getTextureUploadCost() == 0 || gAgent.getRegion()->getCentralBakeVersion() > 0) { - gSavedSettings.setBOOL("TemporaryUpload", FALSE); + gSavedSettings.setBOOL("TemporaryUpload", false); } getChild("inventory_temp_upload")->setVisible(LLAgentBenefitsMgr::current().getTextureUploadCost() > 0 && gAgent.getRegion()->getCentralBakeVersion() == 0); // @@ -171,7 +171,7 @@ void LLPanelSnapshotInventory::updateControls(const LLSD& info) void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) { - BOOL current_window_selected = (getChild(getImageSizeComboName())->getCurrentIndex() == 3); + bool current_window_selected = (getChild(getImageSizeComboName())->getCurrentIndex() == 3); getChild(getWidthSpinnerName())->setVisible(!current_window_selected); getChild(getHeightSpinnerName())->setVisible(!current_window_selected); } diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 801555adc3..92f3cfe3dd 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -386,7 +386,7 @@ LLTeleportHistoryFlatItemStorage::getFlatItemForPersistentItem ( item->setLocalPos(local_pos); // item->setHighlightedText(hl); - item->setVisible(TRUE); + item->setVisible(true); item->updateTitle(); item->updateTimestamp(); } diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index 7043e3d7db..dc459ab831 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -64,7 +64,7 @@ public: LLToggleableMenu* getSortingMenu() override; LLToggleableMenu* getCreateMenu() override; - bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override { return false; } + bool handleDragAndDropToTrash(bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept) override { return false; } // Separate search filter for standalone TP history void setIsStandAlone(bool standalone) { mIsStandAlone = standalone; } diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 924ec421c6..6f54565837 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -257,7 +257,7 @@ void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text) LLRect rect = mParcelInfoText->getRect(); rect.setOriginAndSize(rect.mLeft, rect.mBottom, new_text_width, rect.getHeight()); - mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), TRUE); + mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), true); mParcelInfoText->setRect(rect); layoutParcelIcons(); diff --git a/indra/newview/llpaneltopinfobar.h b/indra/newview/llpaneltopinfobar.h index e480f4089f..6afb54031d 100644 --- a/indra/newview/llpaneltopinfobar.h +++ b/indra/newview/llpaneltopinfobar.h @@ -164,7 +164,7 @@ private: { if (LLPanelTopInfoBar::instanceExists()) { - LLPanelTopInfoBar::getInstance()->setEnabled(FALSE); + LLPanelTopInfoBar::getInstance()->setEnabled(false); } } diff --git a/indra/newview/llpanelvoicedevicesettings.cpp b/indra/newview/llpanelvoicedevicesettings.cpp index 62be2f3d45..9711ff6988 100644 --- a/indra/newview/llpanelvoicedevicesettings.cpp +++ b/indra/newview/llpanelvoicedevicesettings.cpp @@ -50,7 +50,7 @@ LLPanelVoiceDeviceSettings::LLPanelVoiceDeviceSettings() mCtrlOutputDevices = NULL; mInputDevice = gSavedSettings.getString("VoiceInputAudioDevice"); mOutputDevice = gSavedSettings.getString("VoiceOutputAudioDevice"); - mDevicesUpdated = FALSE; //obsolete + mDevicesUpdated = false; //obsolete mUseTuningMode = true; // grab "live" mic volume level @@ -124,7 +124,7 @@ void LLPanelVoiceDeviceSettings::draw() LLView* bar_view = getChild(view_name); if (bar_view) { - gl_rect_2d(bar_view->getRect(), LLColor4::grey, TRUE); + gl_rect_2d(bar_view->getRect(), LLColor4::grey, true); LLColor4 color; if (power_bar_idx < discrete_power) @@ -138,7 +138,7 @@ void LLPanelVoiceDeviceSettings::draw() LLRect color_rect = bar_view->getRect(); color_rect.stretch(-1); - gl_rect_2d(color_rect, color, TRUE); + gl_rect_2d(color_rect, color, true); } } } @@ -247,7 +247,7 @@ void LLPanelVoiceDeviceSettings::refresh() } // Fix invalid input audio device preference. - if (!mCtrlInputDevices->setSelectedByValue(mInputDevice, TRUE)) + if (!mCtrlInputDevices->setSelectedByValue(mInputDevice, true)) { mCtrlInputDevices->setValue(DEFAULT_DEVICE); gSavedSettings.setString("VoiceInputAudioDevice", DEFAULT_DEVICE); @@ -268,7 +268,7 @@ void LLPanelVoiceDeviceSettings::refresh() } // Fix invalid output audio device preference. - if (!mCtrlOutputDevices->setSelectedByValue(mOutputDevice, TRUE)) + if (!mCtrlOutputDevices->setSelectedByValue(mOutputDevice, true)) { mCtrlOutputDevices->setValue(DEFAULT_DEVICE); gSavedSettings.setString("VoiceOutputAudioDevice", DEFAULT_DEVICE); diff --git a/indra/newview/llpanelvoicedevicesettings.h b/indra/newview/llpanelvoicedevicesettings.h index 490d20b2ab..4aa32dfa4f 100644 --- a/indra/newview/llpanelvoicedevicesettings.h +++ b/indra/newview/llpanelvoicedevicesettings.h @@ -61,7 +61,7 @@ protected: std::string mOutputDevice; class LLComboBox *mCtrlInputDevices; class LLComboBox *mCtrlOutputDevices; - BOOL mDevicesUpdated; + bool mDevicesUpdated; bool mUseTuningMode; std::map mLocalizedDeviceNames; }; diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 88e0ea9867..36279f73ca 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -226,7 +226,7 @@ LLPanelVolume::LLPanelVolume() : LLPanel(), mComboMaterialItemCount(0) { - setMouseOpaque(FALSE); + setMouseOpaque(false); } @@ -289,10 +289,10 @@ void LLPanelVolume::getState( ) LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); // BUG? Check for all objects being editable? - BOOL editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced(); - BOOL single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) + bool editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced(); + bool single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) && LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1; - BOOL single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) && + bool single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) && LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1; // Select Single Message @@ -310,26 +310,26 @@ void LLPanelVolume::getState( ) } // Light properties - BOOL is_light = volobjp && volobjp->getIsLight(); + bool is_light = volobjp && volobjp->getIsLight(); getChild("Light Checkbox Ctrl")->setValue(is_light); getChildView("Light Checkbox Ctrl")->setEnabled(editable && single_volume && volobjp); if (is_light && editable && single_volume) { - //mLabelColor ->setEnabled( TRUE ); + //mLabelColor ->setEnabled( true ); LLColorSwatchCtrl* LightColorSwatch = getChild("colorswatch"); if(LightColorSwatch) { - LightColorSwatch->setEnabled( TRUE ); - LightColorSwatch->setValid( TRUE ); + LightColorSwatch->setEnabled( true ); + LightColorSwatch->setValid( true ); LightColorSwatch->set(volobjp->getLightSRGBBaseColor()); } LLTextureCtrl* LightTextureCtrl = getChild("light texture control"); if (LightTextureCtrl) { - LightTextureCtrl->setEnabled(TRUE); - LightTextureCtrl->setValid(TRUE); + LightTextureCtrl->setEnabled(true); + LightTextureCtrl->setValid(true); LightTextureCtrl->setImageAssetID(volobjp->getLightTextureID()); } @@ -361,14 +361,14 @@ void LLPanelVolume::getState( ) LLColorSwatchCtrl* LightColorSwatch = getChild("colorswatch"); if(LightColorSwatch) { - LightColorSwatch->setEnabled( FALSE ); - LightColorSwatch->setValid( FALSE ); + LightColorSwatch->setEnabled( false ); + LightColorSwatch->setValid( false ); } LLTextureCtrl* LightTextureCtrl = getChild("light texture control"); if (LightTextureCtrl) { - LightTextureCtrl->setEnabled(FALSE); - LightTextureCtrl->setValid(FALSE); + LightTextureCtrl->setEnabled(false); + LightTextureCtrl->setValid(false); if (objectp->isAttachment()) { @@ -390,7 +390,7 @@ void LLPanelVolume::getState( ) } // Reflection Probe - BOOL is_probe = volobjp && volobjp->isReflectionProbe(); + bool is_probe = volobjp && volobjp->isReflectionProbe(); getChild("Reflection Probe")->setValue(is_probe); getChildView("Reflection Probe")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh()); @@ -427,9 +427,9 @@ void LLPanelVolume::getState( ) } // Animated Mesh - BOOL is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject(); + bool is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject(); getChild("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh); - BOOL enabled_animated_object_box = FALSE; + bool enabled_animated_object_box = false; if (root_volobjp && root_volobjp == volobjp) { enabled_animated_object_box = single_root_volume && root_volobjp && root_volobjp->canBeAnimatedObject() && editable; @@ -477,7 +477,7 @@ void LLPanelVolume::getState( ) } // Flexible properties - BOOL is_flexible = volobjp && volobjp->isFlexible(); + bool is_flexible = volobjp && volobjp->isFlexible(); getChild("Flexible1D Checkbox Ctrl")->setValue(is_flexible); if (is_flexible || (volobjp && volobjp->canBeFlexible())) { @@ -555,7 +555,7 @@ void LLPanelVolume::getState( ) std::string LEGACY_FULLBRIGHT_DESC = LLTrans::getString("Fullbright"); if (editable && single_volume && material_same) { - mComboMaterial->setEnabled( TRUE ); + mComboMaterial->setEnabled( true ); if (material_code == LL_MCODE_LIGHT) { if (mComboMaterial->getItemCount() == mComboMaterialItemCount) @@ -576,7 +576,7 @@ void LLPanelVolume::getState( ) } else { - mComboMaterial->setEnabled( FALSE ); + mComboMaterial->setEnabled( false ); } // Physics properties @@ -597,7 +597,7 @@ void LLPanelVolume::getState( ) mComboPhysicsShapeType->removeall(); mComboPhysicsShapeType->add(getString("None"), LLSD(1)); - BOOL isMesh = FALSE; + bool isMesh = false; LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); if (sculpt_params) { @@ -642,7 +642,7 @@ void LLPanelVolume::getState( ) bool LLPanelVolume::precommitValidate( const LLSD& data ) { // TODO: Richard will fill this in later. - return TRUE; // FALSE means that validation failed and new value should not be commited. + return true; // false means that validation failed and new value should not be commited. } @@ -698,14 +698,14 @@ void LLPanelVolume::clearCtrls() LLColorSwatchCtrl* LightColorSwatch = getChild("colorswatch"); if(LightColorSwatch) { - LightColorSwatch->setEnabled( FALSE ); - LightColorSwatch->setValid( FALSE ); + LightColorSwatch->setEnabled( false ); + LightColorSwatch->setValid( false ); } LLTextureCtrl* LightTextureCtrl = getChild("light texture control"); if(LightTextureCtrl) { - LightTextureCtrl->setEnabled( FALSE ); - LightTextureCtrl->setValid( FALSE ); + LightTextureCtrl->setEnabled( false ); + LightTextureCtrl->setValid( false ); } getChildView("Light Intensity")->setEnabled(false); @@ -728,21 +728,21 @@ void LLPanelVolume::clearCtrls() getChildView("FlexForceY")->setEnabled(false); getChildView("FlexForceZ")->setEnabled(false); - mSpinPhysicsGravity->setEnabled(FALSE); - mSpinPhysicsFriction->setEnabled(FALSE); - mSpinPhysicsDensity->setEnabled(FALSE); - mSpinPhysicsRestitution->setEnabled(FALSE); + mSpinPhysicsGravity->setEnabled(false); + mSpinPhysicsFriction->setEnabled(false); + mSpinPhysicsDensity->setEnabled(false); + mSpinPhysicsRestitution->setEnabled(false); // physics view changes getChildView("PhysicsViewToggle")->setEnabled(true); // - mComboMaterial->setEnabled( FALSE ); + mComboMaterial->setEnabled( false ); // Extended copy & paste buttons //mMenuClipboardFeatures->setEnabled(false); //mMenuClipboardLight->setEnabled(false); - mBtnCopyFeatures->setEnabled(FALSE); - mBtnPasteFeatures->setEnabled(FALSE); + mBtnCopyFeatures->setEnabled(false); + mBtnPasteFeatures->setEnabled(false); // } @@ -759,7 +759,7 @@ void LLPanelVolume::sendIsLight() } LLVOVolume *volobjp = (LLVOVolume *)objectp; - BOOL value = getChild("Light Checkbox Ctrl")->getValue(); + bool value = getChild("Light Checkbox Ctrl")->getValue(); volobjp->setIsLight(value); LL_INFOS() << "update light sent" << LL_ENDL; } @@ -781,8 +781,8 @@ void LLPanelVolume::sendIsReflectionProbe() } LLVOVolume* volobjp = (LLVOVolume*)objectp; - BOOL value = getChild("Reflection Probe")->getValue(); - BOOL old_value = volobjp->isReflectionProbe(); + bool value = getChild("Reflection Probe")->getValue(); + bool old_value = volobjp->isReflectionProbe(); if (value && value != old_value) { // defer to notification util as to whether or not we *really* make this object a reflection probe @@ -801,7 +801,7 @@ void LLPanelVolume::sendIsReflectionProbe() if (in_linkeset) { // In linkset with a phantom flag - objectp->setFlags(FLAGS_PHANTOM, FALSE); + objectp->setFlags(FLAGS_PHANTOM, false); } } volobjp->setIsReflectionProbe(value); @@ -882,8 +882,8 @@ void LLPanelVolume::sendIsFlexible() } LLVOVolume *volobjp = (LLVOVolume *)objectp; - BOOL is_flexible = getChild("Flexible1D Checkbox Ctrl")->getValue(); - //BOOL is_flexible = mCheckFlexible1D->get(); + bool is_flexible = getChild("Flexible1D Checkbox Ctrl")->getValue(); + //bool is_flexible = mCheckFlexible1D->get(); if (is_flexible) { @@ -1101,10 +1101,10 @@ void LLPanelVolume::onPasteFeatures() bool is_root = objectp->isRoot(); // Not sure if phantom should go under physics, but doesn't fit elsewhere - BOOL is_phantom = clipboard["is_phantom"].asBoolean() && is_root; + bool is_phantom = clipboard["is_phantom"].asBoolean() && is_root; LLSelectMgr::getInstance()->selectionUpdatePhantom(is_phantom); - BOOL is_physical = clipboard["is_physical"].asBoolean() && is_root; + bool is_physical = clipboard["is_physical"].asBoolean() && is_root; LLSelectMgr::getInstance()->selectionUpdatePhysics(is_physical); if (clipboard.has("physics")) @@ -1119,7 +1119,7 @@ void LLPanelVolume::onPasteFeatures() objectp->setPhysicsFriction(clipboard["physics"]["friction"].asReal()); objectp->setPhysicsDensity(clipboard["physics"]["density"].asReal()); objectp->setPhysicsRestitution(clipboard["physics"]["restitution"].asReal()); - objectp->updateFlags(TRUE); + objectp->updateFlags(true); } // Flexible @@ -1127,7 +1127,7 @@ void LLPanelVolume::onPasteFeatures() if (is_flexible && volobjp->canBeFlexible()) { LLVOVolume *volobjp = (LLVOVolume *)objectp; - BOOL update_shape = FALSE; + bool update_shape = false; // do before setParameterEntry or it will think that it is already flexi update_shape = volobjp->setIsFlexible(is_flexible); @@ -1246,7 +1246,7 @@ void LLPanelVolume::onPasteLight() { if (clipboard.has("light")) { - volobjp->setIsLight(TRUE); + volobjp->setIsLight(true); volobjp->setLightIntensity((F32)clipboard["light"]["intensity"].asReal()); volobjp->setLightRadius((F32)clipboard["light"]["radius"].asReal()); volobjp->setLightFalloff((F32)clipboard["light"]["falloff"].asReal()); @@ -1257,7 +1257,7 @@ void LLPanelVolume::onPasteLight() } else { - volobjp->setIsLight(FALSE); + volobjp->setIsLight(false); } if (clipboard.has("spot")) @@ -1272,7 +1272,7 @@ void LLPanelVolume::onPasteLight() if (clipboard.has("reflection_probe")) { - volobjp->setIsReflectionProbe(TRUE); + volobjp->setIsReflectionProbe(true); volobjp->setReflectionProbeIsBox(clipboard["reflection_probe"]["is_box"].asBoolean()); volobjp->setReflectionProbeAmbiance((F32)clipboard["reflection_probe"]["ambiance"].asReal()); volobjp->setReflectionProbeNearClip((F32)clipboard["reflection_probe"]["near_clip"].asReal()); @@ -1287,7 +1287,7 @@ void LLPanelVolume::onPasteLight() if (in_linkeset) { // In linkset with a phantom flag - objectp->setFlags(FLAGS_PHANTOM, FALSE); + objectp->setFlags(FLAGS_PHANTOM, false); } } @@ -1437,9 +1437,9 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata ) else if (volobjp->isLightSpotlight()) { //no longer a spot light setLightTextureID(id, item_id, volobjp); - //self->getChildView("Light FOV")->setEnabled(FALSE); - //self->getChildView("Light Focus")->setEnabled(FALSE); - //self->getChildView("Light Ambiance")->setEnabled(FALSE); + //self->getChildView("Light FOV")->setEnabled(false); + //self->getChildView("Light Focus")->setEnabled(false); + //self->getChildView("Light Ambiance")->setEnabled(false); } } @@ -1482,7 +1482,7 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata) path = LL_PCODE_PATH_CIRCLE; F32 scale = volobjp->getScale().mV[0]; - volobjp->setScale(LLVector3(scale, scale, scale), FALSE); + volobjp->setScale(LLVector3(scale, scale, scale), false); LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_ROTATION | UPD_POSITION | UPD_SCALE); } else @@ -1516,7 +1516,7 @@ void LLPanelVolume::setLightTextureID(const LLUUID &asset_id, const LLUUID &item if (item && volobjp->isAttachment()) { const LLPermissions& perm = item->getPermissions(); - BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; + bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false; if (!unrestricted) { // Attachments are in world and in inventory simultaneously, @@ -1586,7 +1586,7 @@ void LLPanelVolume::onCommitAnimatedMeshCheckbox(LLUICtrl *, void*) return; } LLVOVolume *volobjp = (LLVOVolume *)objectp; - BOOL animated_mesh = getChild("Animated Mesh Checkbox Ctrl")->getValue(); + bool animated_mesh = getChild("Animated Mesh Checkbox Ctrl")->getValue(); U32 flags = volobjp->getExtendedMeshFlags(); U32 new_flags = flags; if (animated_mesh) @@ -1645,6 +1645,6 @@ void LLPanelVolume::handleResponseChangeToFlexible(const LLSD &pNotification, co } else { - getChild("Flexible1D Checkbox Ctrl")->setValue(FALSE); + getChild("Flexible1D Checkbox Ctrl")->setValue(false); } } diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp index 55825eed76..65ca14e4e0 100644 --- a/indra/newview/llpanelwearing.cpp +++ b/indra/newview/llpanelwearing.cpp @@ -224,18 +224,18 @@ protected: void updateMenuItemsVisibility(LLContextMenu* menu) { - menu->setItemVisible("touch_attach", TRUE); + menu->setItemVisible("touch_attach", true); menu->setItemEnabled("touch_attach", 1 == mUUIDs.size()); - menu->setItemVisible("edit_item", TRUE); + menu->setItemVisible("edit_item", true); menu->setItemEnabled("edit_item", 1 == mUUIDs.size()); - menu->setItemVisible("take_off", FALSE); - menu->setItemVisible("detach", TRUE); + menu->setItemVisible("take_off", false); + menu->setItemVisible("detach", true); // [SL:KB] - Patch: Inventory-AttachmentEdit - Checked: 2010-09-04 (Catznip-2.2.0a) | Added: Catznip-2.1.2a - menu->setItemVisible("take_off_or_detach", FALSE); + menu->setItemVisible("take_off_or_detach", false); // [/SL:KB] - menu->setItemVisible("edit_outfit_separator", FALSE); - menu->setItemVisible("show_original", FALSE); - menu->setItemVisible("edit_outfit", FALSE); + menu->setItemVisible("edit_outfit_separator", false); + menu->setItemVisible("show_original", false); + menu->setItemVisible("edit_outfit", false); } LLPanelWearing* mPanelWearing; diff --git a/indra/newview/llparcelselection.cpp b/indra/newview/llparcelselection.cpp index 5c62159b93..47fcc91e49 100644 --- a/indra/newview/llparcelselection.cpp +++ b/indra/newview/llparcelselection.cpp @@ -36,8 +36,8 @@ // LLParcelSelection::LLParcelSelection() : mParcel(NULL), - mSelectedMultipleOwners(FALSE), - mWholeParcelSelected(FALSE), + mSelectedMultipleOwners(false), + mWholeParcelSelected(false), mSelectedSelfCount(0), mSelectedOtherCount(0), mSelectedPublicCount(0) @@ -46,8 +46,8 @@ LLParcelSelection::LLParcelSelection() : LLParcelSelection::LLParcelSelection(LLParcel* parcel) : mParcel(parcel), - mSelectedMultipleOwners(FALSE), - mWholeParcelSelected(FALSE), + mSelectedMultipleOwners(false), + mWholeParcelSelected(false), mSelectedSelfCount(0), mSelectedOtherCount(0), mSelectedPublicCount(0) @@ -58,13 +58,13 @@ LLParcelSelection::~LLParcelSelection() { } -BOOL LLParcelSelection::getMultipleOwners() const +bool LLParcelSelection::getMultipleOwners() const { return mSelectedMultipleOwners; } -BOOL LLParcelSelection::getWholeParcelSelected() const +bool LLParcelSelection::getWholeParcelSelected() const { return mWholeParcelSelected; } diff --git a/indra/newview/llparcelselection.h b/indra/newview/llparcelselection.h index dcd23f4b3d..f3adbd462c 100644 --- a/indra/newview/llparcelselection.h +++ b/indra/newview/llparcelselection.h @@ -60,18 +60,18 @@ public: bool hasOthersSelected() const; // Does the selection have multiple land owners in it? - BOOL getMultipleOwners() const; + bool getMultipleOwners() const; // Is the entire parcel selected, or just a part? - BOOL getWholeParcelSelected() const; + bool getWholeParcelSelected() const; private: void setParcel(LLParcel* parcel) { mParcel = parcel; } private: LLParcel* mParcel; - BOOL mSelectedMultipleOwners; - BOOL mWholeParcelSelected; + bool mSelectedMultipleOwners; + bool mWholeParcelSelected; S32 mSelectedSelfCount; S32 mSelectedOtherCount; S32 mSelectedPublicCount; diff --git a/indra/newview/llpathfindingcharacter.cpp b/indra/newview/llpathfindingcharacter.cpp index 00f2ebc4bb..b609afce60 100644 --- a/indra/newview/llpathfindingcharacter.cpp +++ b/indra/newview/llpathfindingcharacter.cpp @@ -47,7 +47,7 @@ LLPathfindingCharacter::LLPathfindingCharacter(const std::string &pUUID, const LLSD& pCharacterData) : LLPathfindingObject(pUUID, pCharacterData), mCPUTime(0U), - mIsHorizontal(FALSE), + mIsHorizontal(false), mLength(0.0f), mRadius(0.0f) { diff --git a/indra/newview/llpathfindingcharacter.h b/indra/newview/llpathfindingcharacter.h index 7cf9f401b0..c0a9de8adb 100644 --- a/indra/newview/llpathfindingcharacter.h +++ b/indra/newview/llpathfindingcharacter.h @@ -44,7 +44,7 @@ public: inline F32 getCPUTime() const {return mCPUTime;}; - inline BOOL isHorizontal() const {return mIsHorizontal;}; + inline bool isHorizontal() const {return mIsHorizontal;}; inline F32 getLength() const {return mLength;}; inline F32 getRadius() const {return mRadius;}; @@ -55,7 +55,7 @@ private: F32 mCPUTime; - BOOL mIsHorizontal; + bool mIsHorizontal; F32 mLength; F32 mRadius; }; diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp index 50b76378f5..5562ac1baf 100644 --- a/indra/newview/llpathfindinglinkset.cpp +++ b/indra/newview/llpathfindinglinkset.cpp @@ -61,10 +61,10 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLSD& pTerrainData) : LLPathfindingObject(), mIsTerrain(true), mLandImpact(0U), - mIsModifiable(FALSE), - mCanBeVolume(FALSE), - mIsScripted(FALSE), - mHasIsScripted(TRUE), + mIsModifiable(false), + mCanBeVolume(false), + mIsScripted(false), + mHasIsScripted(true), mLinksetUse(kUnknown), mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE), mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE), @@ -78,10 +78,10 @@ LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD& : LLPathfindingObject(pUUID, pLinksetData), mIsTerrain(false), mLandImpact(0U), - mIsModifiable(TRUE), - mCanBeVolume(TRUE), - mIsScripted(FALSE), - mHasIsScripted(FALSE), + mIsModifiable(true), + mCanBeVolume(true), + mIsScripted(false), + mHasIsScripted(false), mLinksetUse(kUnknown), mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE), mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE), @@ -131,14 +131,14 @@ LLPathfindingLinkset& LLPathfindingLinkset::operator =(const LLPathfindingLinkse return *this; } -BOOL LLPathfindingLinkset::isPhantom() const +bool LLPathfindingLinkset::isPhantom() const { return isPhantom(getLinksetUse()); } LLPathfindingLinkset::ELinksetUse LLPathfindingLinkset::getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse) { - BOOL isPhantom = LLPathfindingLinkset::isPhantom(pLinksetUse); + bool isPhantom = LLPathfindingLinkset::isPhantom(pLinksetUse); ENavMeshGenerationCategory navMeshGenerationCategory = getNavMeshGenerationCategory(pLinksetUse); return getLinksetUse(!isPhantom, navMeshGenerationCategory); @@ -259,9 +259,9 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) llassert(mWalkabilityCoefficientD <= MAX_WALKABILITY_VALUE); } -BOOL LLPathfindingLinkset::isPhantom(ELinksetUse pLinksetUse) +bool LLPathfindingLinkset::isPhantom(ELinksetUse pLinksetUse) { - BOOL retVal; + bool retVal; switch (pLinksetUse) { diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h index 308a3a1e0f..0896b989ce 100644 --- a/indra/newview/llpathfindinglinkset.h +++ b/indra/newview/llpathfindinglinkset.h @@ -56,15 +56,15 @@ public: inline bool isTerrain() const {return mIsTerrain;}; inline U32 getLandImpact() const {return mLandImpact;}; - BOOL isModifiable() const {return mIsModifiable;}; - BOOL isPhantom() const; - BOOL canBeVolume() const {return mCanBeVolume;}; + bool isModifiable() const {return mIsModifiable;}; + bool isPhantom() const; + bool canBeVolume() const {return mCanBeVolume;}; static ELinksetUse getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse); inline ELinksetUse getLinksetUse() const {return mLinksetUse;}; - inline BOOL isScripted() const {return mIsScripted;}; - inline BOOL hasIsScripted() const {return mHasIsScripted;}; + inline bool isScripted() const {return mIsScripted;}; + inline bool hasIsScripted() const {return mHasIsScripted;}; inline S32 getWalkabilityCoefficientA() const {return mWalkabilityCoefficientA;}; inline S32 getWalkabilityCoefficientB() const {return mWalkabilityCoefficientB;}; @@ -92,7 +92,7 @@ private: void parseLinksetData(const LLSD &pLinksetData); void parsePathfindingData(const LLSD &pLinksetData); - static BOOL isPhantom(ELinksetUse pLinksetUse); + static bool isPhantom(ELinksetUse pLinksetUse); static ELinksetUse getLinksetUse(bool pIsPhantom, ENavMeshGenerationCategory pNavMeshGenerationCategory); static ENavMeshGenerationCategory getNavMeshGenerationCategory(ELinksetUse pLinksetUse); static LLSD convertCategoryToLLSD(ENavMeshGenerationCategory pNavMeshGenerationCategory); @@ -100,10 +100,10 @@ private: bool mIsTerrain; U32 mLandImpact; - BOOL mIsModifiable; - BOOL mCanBeVolume; - BOOL mIsScripted; - BOOL mHasIsScripted; + bool mIsModifiable; + bool mCanBeVolume; + bool mIsScripted; + bool mHasIsScripted; ELinksetUse mLinksetUse; S32 mWalkabilityCoefficientA; S32 mWalkabilityCoefficientB; diff --git a/indra/newview/llpathfindinglinksetlist.cpp b/indra/newview/llpathfindinglinksetlist.cpp index eb7b95552e..beceacb94a 100644 --- a/indra/newview/llpathfindinglinksetlist.cpp +++ b/indra/newview/llpathfindinglinksetlist.cpp @@ -141,15 +141,15 @@ bool LLPathfindingLinksetList::isShowCannotBeVolumeWarning(LLPathfindingLinkset: return isShowWarning; } -void LLPathfindingLinksetList::determinePossibleStates(BOOL &pCanBeWalkable, BOOL &pCanBeStaticObstacle, BOOL &pCanBeDynamicObstacle, - BOOL &pCanBeMaterialVolume, BOOL &pCanBeExclusionVolume, BOOL &pCanBeDynamicPhantom) const +void LLPathfindingLinksetList::determinePossibleStates(bool &pCanBeWalkable, bool &pCanBeStaticObstacle, bool &pCanBeDynamicObstacle, + bool &pCanBeMaterialVolume, bool &pCanBeExclusionVolume, bool &pCanBeDynamicPhantom) const { - pCanBeWalkable = FALSE; - pCanBeStaticObstacle = FALSE; - pCanBeDynamicObstacle = FALSE; - pCanBeMaterialVolume = FALSE; - pCanBeExclusionVolume = FALSE; - pCanBeDynamicPhantom = FALSE; + pCanBeWalkable = false; + pCanBeStaticObstacle = false; + pCanBeDynamicObstacle = false; + pCanBeMaterialVolume = false; + pCanBeExclusionVolume = false; + pCanBeDynamicPhantom = false; for (const_iterator objectIter = begin(); !(pCanBeWalkable && pCanBeStaticObstacle && pCanBeDynamicObstacle && pCanBeMaterialVolume && pCanBeExclusionVolume && pCanBeDynamicPhantom) && (objectIter != end()); @@ -160,36 +160,36 @@ void LLPathfindingLinksetList::determinePossibleStates(BOOL &pCanBeWalkable, BOO if (linkset->isTerrain()) { - pCanBeWalkable = TRUE; + pCanBeWalkable = true; } else { if (linkset->isModifiable()) { - pCanBeWalkable = TRUE; - pCanBeStaticObstacle = TRUE; - pCanBeDynamicObstacle = TRUE; - pCanBeDynamicPhantom = TRUE; + pCanBeWalkable = true; + pCanBeStaticObstacle = true; + pCanBeDynamicObstacle = true; + pCanBeDynamicPhantom = true; if (linkset->canBeVolume()) { - pCanBeMaterialVolume = TRUE; - pCanBeExclusionVolume = TRUE; + pCanBeMaterialVolume = true; + pCanBeExclusionVolume = true; } } else if (linkset->isPhantom()) { - pCanBeDynamicPhantom = TRUE; + pCanBeDynamicPhantom = true; if (linkset->canBeVolume()) { - pCanBeMaterialVolume = TRUE; - pCanBeExclusionVolume = TRUE; + pCanBeMaterialVolume = true; + pCanBeExclusionVolume = true; } } else { - pCanBeWalkable = TRUE; - pCanBeStaticObstacle = TRUE; - pCanBeDynamicObstacle = TRUE; + pCanBeWalkable = true; + pCanBeStaticObstacle = true; + pCanBeDynamicObstacle = true; } } } diff --git a/indra/newview/llpathfindinglinksetlist.h b/indra/newview/llpathfindinglinksetlist.h index 1d38e4c11a..ef1559261e 100644 --- a/indra/newview/llpathfindinglinksetlist.h +++ b/indra/newview/llpathfindinglinksetlist.h @@ -46,8 +46,8 @@ public: bool isShowPhantomToggleWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const; bool isShowCannotBeVolumeWarning(LLPathfindingLinkset::ELinksetUse pLinksetUse) const; - void determinePossibleStates(BOOL &pCanBeWalkable, BOOL &pCanBeStaticObstacle, BOOL &pCanBeDynamicObstacle, - BOOL &pCanBeMaterialVolume, BOOL &pCanBeExclusionVolume, BOOL &pCanBeDynamicPhantom) const; + void determinePossibleStates(bool &pCanBeWalkable, bool &pCanBeStaticObstacle, bool &pCanBeDynamicObstacle, + bool &pCanBeMaterialVolume, bool &pCanBeExclusionVolume, bool &pCanBeDynamicPhantom) const; protected: diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 17b8ec0683..a9563c7c17 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -363,7 +363,7 @@ void LLPathfindingManager::requestGetAgentState() if (currentRegion == NULL) { - mAgentStateSignal(FALSE); + mAgentStateSignal(false); } else { @@ -373,7 +373,7 @@ void LLPathfindingManager::requestGetAgentState() } else if (!isPathfindingEnabledForRegion(currentRegion)) { - mAgentStateSignal(FALSE); + mAgentStateSignal(false); } else { @@ -708,7 +708,7 @@ void LLPathfindingManager::handleNavMeshStatusUpdate(const LLPathfindingNavMeshS } } -void LLPathfindingManager::handleAgentState(BOOL pCanRebakeRegion) +void LLPathfindingManager::handleAgentState(bool pCanRebakeRegion) { mAgentStateSignal(pCanRebakeRegion); } @@ -831,7 +831,7 @@ void LLAgentStateChangeNode::post(ResponsePtr pResponse, const LLSD &pContext, c llassert(pInput.get(SIM_MESSAGE_BODY_FIELD).isMap()); llassert(pInput.get(SIM_MESSAGE_BODY_FIELD).has(AGENT_STATE_CAN_REBAKE_REGION_FIELD)); llassert(pInput.get(SIM_MESSAGE_BODY_FIELD).get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).isBoolean()); - BOOL canRebakeRegion = pInput.get(SIM_MESSAGE_BODY_FIELD).get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).asBoolean(); + bool canRebakeRegion = pInput.get(SIM_MESSAGE_BODY_FIELD).get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).asBoolean(); LLPathfindingManager::getInstance()->handleAgentState(canRebakeRegion); } diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h index bb44f780c8..ac781cedcc 100644 --- a/indra/newview/llpathfindingmanager.h +++ b/indra/newview/llpathfindingmanager.h @@ -83,8 +83,8 @@ public: void requestGetCharacters(request_id_t pRequestId, object_request_callback_t pCharactersCallback) const; - typedef boost::function agent_state_callback_t; - typedef boost::signals2::signal agent_state_signal_t; + typedef boost::function agent_state_callback_t; + typedef boost::signals2::signal agent_state_signal_t; typedef boost::signals2::connection agent_state_slot_t; agent_state_slot_t registerAgentStateListener(agent_state_callback_t pAgentStateCallback); @@ -114,7 +114,7 @@ private: //void handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion, bool pIsGetStatusOnly); void handleNavMeshStatusUpdate(const LLPathfindingNavMeshStatus &pNavMeshStatus); - void handleAgentState(BOOL pCanRebakeRegion); + void handleAgentState(bool pCanRebakeRegion); LLPathfindingNavMeshPtr getNavMeshForRegion(const LLUUID &pRegionUUID); LLPathfindingNavMeshPtr getNavMeshForRegion(LLViewerRegion *pRegion); diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h index b8d3ca2364..12dd18f986 100644 --- a/indra/newview/llpathfindingobject.h +++ b/indra/newview/llpathfindingobject.h @@ -56,10 +56,10 @@ public: inline const LLUUID& getUUID() const {return mUUID;}; inline const std::string& getName() const {return mName;}; inline const std::string& getDescription() const {return mDescription;}; - inline BOOL hasOwner() const {return mOwnerUUID.notNull();}; + inline bool hasOwner() const {return mOwnerUUID.notNull();}; inline bool hasOwnerName() const {return mHasOwnerName;}; std::string getOwnerName() const; - inline BOOL isGroupOwned() const {return mIsGroupOwned;}; + inline bool isGroupOwned() const {return mIsGroupOwned;}; inline const LLVector3& getLocation() const {return mLocation;}; typedef boost::function name_callback_t; @@ -84,7 +84,7 @@ private: bool mHasOwnerName; LLAvatarName mOwnerName; LLAvatarNameCache::callback_connection_t mAvatarNameCacheConnection; - BOOL mIsGroupOwned; + bool mIsGroupOwned; LLVector3 mLocation; name_signal_t mOwnerNameSignal; }; diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp index a1012bff5a..4e16a51d71 100644 --- a/indra/newview/llpathfindingpathtool.cpp +++ b/indra/newview/llpathfindingpathtool.cpp @@ -76,14 +76,14 @@ bool LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask) : UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD); computeFinalPoints(pX, pY, pMask); mIsLeftMouseButtonHeld = true; - setMouseCapture(TRUE); + setMouseCapture(true); returnVal = true; } else if (!isCameraModKeys(pMask)) { gViewerWindow->setCursor(UI_CURSOR_TOOLNO); mIsLeftMouseButtonHeld = true; - setMouseCapture(TRUE); + setMouseCapture(true); returnVal = true; } } @@ -99,7 +99,7 @@ bool LLPathfindingPathTool::handleMouseUp(S32 pX, S32 pY, MASK pMask) if (mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld) { computeFinalPoints(pX, pY, pMask); - setMouseCapture(FALSE); + setMouseCapture(false); returnVal = true; } mIsLeftMouseButtonHeld = false; @@ -109,7 +109,7 @@ bool LLPathfindingPathTool::handleMouseUp(S32 pX, S32 pY, MASK pMask) bool LLPathfindingPathTool::handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask) { - setMouseCapture(TRUE); + setMouseCapture(true); mIsMiddleMouseButtonHeld = true; gViewerWindow->setCursor(UI_CURSOR_TOOLNO); @@ -120,7 +120,7 @@ bool LLPathfindingPathTool::handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask) { if (!mIsLeftMouseButtonHeld && mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld) { - setMouseCapture(FALSE); + setMouseCapture(false); } mIsMiddleMouseButtonHeld = false; @@ -129,7 +129,7 @@ bool LLPathfindingPathTool::handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask) bool LLPathfindingPathTool::handleRightMouseDown(S32 pX, S32 pY, MASK pMask) { - setMouseCapture(TRUE); + setMouseCapture(true); mIsRightMouseButtonHeld = true; gViewerWindow->setCursor(UI_CURSOR_TOOLNO); @@ -140,7 +140,7 @@ bool LLPathfindingPathTool::handleRightMouseUp(S32 pX, S32 pY, MASK pMask) { if (!mIsLeftMouseButtonHeld && !mIsMiddleMouseButtonHeld && mIsRightMouseButtonHeld) { - setMouseCapture(FALSE); + setMouseCapture(false); } mIsRightMouseButtonHeld = false; @@ -178,7 +178,7 @@ bool LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask) return returnVal; } -BOOL LLPathfindingPathTool::handleKey(KEY pKey, MASK pMask) +bool LLPathfindingPathTool::handleKey(KEY pKey, MASK pMask) { // Eat the escape key or else the camera tool will pick up and reset to default view. This, // in turn, will cause some other methods to get called. And one of those methods will reset diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index c3b163abd9..afb3ec8514 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -76,7 +76,7 @@ public: virtual bool handleHover(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleKey(KEY pKey, MASK pMask); + virtual bool handleKey(KEY pKey, MASK pMask); EPathStatus getPathStatus() const; diff --git a/indra/newview/llphysicsmotion.cpp b/indra/newview/llphysicsmotion.cpp index 307936b1d3..bf1868529a 100644 --- a/indra/newview/llphysicsmotion.cpp +++ b/indra/newview/llphysicsmotion.cpp @@ -120,7 +120,7 @@ public: } } - BOOL initialize(); + bool initialize(); ~LLPhysicsMotion() {} @@ -217,20 +217,20 @@ default_controller_map_t initDefaultController() default_controller_map_t LLPhysicsMotion::sDefaultController = initDefaultController(); -BOOL LLPhysicsMotion::initialize() +bool LLPhysicsMotion::initialize() { if (!mJointState->setJoint(mCharacter->getJoint(mJointName.c_str()))) - return FALSE; + return false; mJointState->setUsage(LLJointState::ROT); mParamDriver = (LLViewerVisualParam*)mCharacter->getVisualParam(mParamDriverName.c_str()); if (mParamDriver == NULL) { LL_INFOS() << "Failure reading in [ " << mParamDriverName << " ]" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } LLPhysicsMotionController::LLPhysicsMotionController(const LLUUID &id) : @@ -282,7 +282,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -305,7 +305,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -328,7 +328,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -350,7 +350,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -373,7 +373,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -396,7 +396,7 @@ LLMotion::LLMotionInitStatus LLPhysicsMotionController::onInitialize(LLCharacter controller); if (!motion->initialize()) { - llassert_always(FALSE); + llassert_always(false); return STATUS_FAILURE; } addMotion(motion); @@ -485,7 +485,7 @@ bool LLPhysicsMotionController::onUpdate(F32 time, U8* joint_mask) return true; } -// Return TRUE if character has to update visual params. +// Return true if character has to update visual params. bool LLPhysicsMotion::onUpdate(F32 time) { // static FILE *mFileWrite = fopen("c:\\temp\\avatar_data.txt","w"); @@ -530,7 +530,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; @@ -712,7 +712,7 @@ bool LLPhysicsMotion::onUpdate(F32 time) const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor); const F32 pixel_area = sqrtf(mCharacter->getPixelArea()); - const BOOL is_self = (dynamic_cast(mCharacter) != NULL); + const bool is_self = (dynamic_cast(mCharacter) != NULL); if ((pixel_area > area_for_this_setting) || is_self) { const F32 position_diff_local = llabs(mPositionLastUpdate_local-position_new_local_clamped); diff --git a/indra/newview/llphysicsmotion.h b/indra/newview/llphysicsmotion.h index 976f23cd44..259a9abde6 100644 --- a/indra/newview/llphysicsmotion.h +++ b/indra/newview/llphysicsmotion.h @@ -91,13 +91,13 @@ 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(); // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. + // 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 diff --git a/indra/newview/llplacesfolderview.cpp b/indra/newview/llplacesfolderview.cpp index 6bf4a7512d..0d9fd5ac8b 100644 --- a/indra/newview/llplacesfolderview.cpp +++ b/indra/newview/llplacesfolderview.cpp @@ -39,7 +39,7 @@ LLPlacesFolderView::LLPlacesFolderView(const LLFolderView::Params& p) // we do not need auto select functionality in places landmarks, so override default behavior. // this disables applying of the LLSelectFirstFilteredItem in LLFolderView::doIdle. // Fixed issues: EXT-1631, EXT-4994. - mAutoSelectOverride = TRUE; + mAutoSelectOverride = true; } bool LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask) diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index dcafa5dd6a..4be71c64da 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -49,7 +49,7 @@ LLPlacesInventoryPanel::LLPlacesInventoryPanel(const Params& p) : { mInvFVBridgeBuilder = &PLACES_INVENTORY_BUILDER; mSavedFolderState = new LLSaveFolderState(); - mSavedFolderState->setApply(FALSE); + mSavedFolderState->setApply(false); } @@ -91,14 +91,14 @@ LLFolderView * LLPlacesInventoryPanel::createFolderRoot(LLUUID root_id ) // save current folder open state void LLPlacesInventoryPanel::saveFolderState() { - mSavedFolderState->setApply(FALSE); + mSavedFolderState->setApply(false); mFolderRoot.get()->applyFunctorRecursively(*mSavedFolderState); } // re-open folders which state was saved void LLPlacesInventoryPanel::restoreFolderState() { - mSavedFolderState->setApply(TRUE); + mSavedFolderState->setApply(true); mFolderRoot.get()->applyFunctorRecursively(*mSavedFolderState); LLOpenFoldersWithSelection opener; mFolderRoot.get()->applyFunctorRecursively(opener); diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index 40caa5045f..22c9b191a3 100644 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -94,12 +94,12 @@ void LLPopupView::draw() LLPanel::draw(); } -BOOL LLPopupView::handleMouseEvent(boost::function func, +bool LLPopupView::handleMouseEvent(boost::function func, boost::function predicate, S32 x, S32 y, bool close_popups) { - BOOL handled = FALSE; + bool handled = false; // make a copy of list of popups, in case list is modified during mouse event handling popup_list_t popups(mPopups); @@ -120,7 +120,7 @@ BOOL LLPopupView::handleMouseEvent(boost::function func { if (func(popup, popup_x, popup_y)) { - handled = TRUE; + handled = true; break; } } diff --git a/indra/newview/llpopupview.h b/indra/newview/llpopupview.h index 6697aa9ac1..665271668a 100644 --- a/indra/newview/llpopupview.h +++ b/indra/newview/llpopupview.h @@ -55,7 +55,7 @@ public: popup_list_t getCurrentPopups() { return mPopups; } private: - BOOL handleMouseEvent(boost::function, boost::function, S32 x, S32 y, bool close_popups); + bool handleMouseEvent(boost::function, boost::function, S32 x, S32 y, bool close_popups); popup_list_t mPopups; }; #endif //LL_LLROOTVIEW_H diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index d538519005..80f9518099 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -495,7 +495,7 @@ bool LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory, bool sts = true; combo->clearRows(); - combo->setEnabled(TRUE); + combo->setEnabled(true); std::list preset_names; loadPresetNamesFromDir(subdirectory, preset_names, default_option); diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index ae745524b2..fd2604ac34 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -69,12 +69,12 @@ LLPreview::LLPreview(const LLSD& key) mItemUUID(key.has("itemid") ? key.get("itemid").asUUID() : key.asUUID()), mObjectUUID(), // set later by setObjectID() mCopyToInvBtn( NULL ), - mForceClose(FALSE), - mUserResized(FALSE), - mCloseAfterSave(FALSE), + mForceClose(false), + mUserResized(false), + mCloseAfterSave(false), mAssetStatus(PREVIEW_ASSET_UNLOADED), - mDirty(TRUE), - mSaveDialogShown(FALSE) + mDirty(true), + mSaveDialogShown(false) { mAuxItem = new LLInventoryItem; // don't necessarily steal focus on creation -- sometimes these guys pop up without user action @@ -170,7 +170,7 @@ void LLPreview::onCommit() if (!item->isFinished()) { // We are attempting to save an item that was never loaded - LL_WARNS() << "LLPreview::onCommit() called with mIsComplete == FALSE" + LL_WARNS() << "LLPreview::onCommit() called with mIsComplete == false" << " Type: " << item->getType() << " ID: " << item->getUUID() << LL_ENDL; @@ -214,7 +214,7 @@ void LLPreview::onCommit() if( obj ) { LLSelectMgr::getInstance()->deselectAll(); - LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, FALSE ); + LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, false ); LLSelectMgr::getInstance()->selectionSetObjectDescription( getChild("desc")->getValue().asString() ); LLSelectMgr::getInstance()->deselectAll(); @@ -227,7 +227,7 @@ void LLPreview::onCommit() void LLPreview::changed(U32 mask) { - mDirty = TRUE; + mDirty = true; } void LLPreview::setNotecardInfo(const LLUUID& notecard_inv_id, @@ -242,7 +242,7 @@ void LLPreview::draw() LLFloater::draw(); if (mDirty) { - mDirty = FALSE; + mDirty = false; refreshFromItem(); } } @@ -275,7 +275,7 @@ void LLPreview::refreshFromItem() } // static -BOOL LLPreview::canModify(const LLUUID taskUUID, const LLInventoryItem* item) +bool LLPreview::canModify(const LLUUID taskUUID, const LLInventoryItem* item) { const LLViewerObject* object = nullptr; if (taskUUID.notNull()) @@ -287,12 +287,12 @@ BOOL LLPreview::canModify(const LLUUID taskUUID, const LLInventoryItem* item) } // static -BOOL LLPreview::canModify(const LLViewerObject* object, const LLInventoryItem* item) +bool LLPreview::canModify(const LLViewerObject* object, const LLInventoryItem* item) { if (object && !object->permModify()) { // No permission to edit in-world inventory - return FALSE; + return false; } return item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE); @@ -313,7 +313,7 @@ void LLPreview::onRadio(LLUICtrl*, void* userdata) } // static -void LLPreview::hide(const LLUUID& item_uuid, BOOL no_saving /* = FALSE */ ) +void LLPreview::hide(const LLUUID& item_uuid, bool no_saving /* = false */ ) { // FIRE-14195: Deleting item from inventory doesn't close preview //LLFloater* floater = LLFloaterReg::findInstance("preview", LLSD(item_uuid)); @@ -331,7 +331,7 @@ void LLPreview::hide(const LLUUID& item_uuid, BOOL no_saving /* = FALSE */ ) { if ( no_saving ) { - preview->mForceClose = TRUE; + preview->mForceClose = true; } preview->closeFloater(); } @@ -346,7 +346,7 @@ void LLPreview::dirty(const LLUUID& item_uuid) LLPreview* preview = dynamic_cast(floater); if(preview) { - preview->mDirty = TRUE; + preview->mDirty = true; } } @@ -425,7 +425,7 @@ void LLPreview::onOpen(const LLSD& key) dynamic_cast(this) || dynamic_cast(this))) { - getHost()->setCanResize(FALSE); + getHost()->setCanResize(false); } // } @@ -496,7 +496,7 @@ void LLPreview::onDiscardBtn(void* data) const LLInventoryItem* item = self->getItem(); if (!item) return; - self->mForceClose = TRUE; + self->mForceClose = true; self->closeFloater(); // Move the item to the trash @@ -552,7 +552,7 @@ LLMultiPreview::LLMultiPreview() } setTitle(LLTrans::getString("MultiPreviewTitle")); buildTabContainer(); - setCanResize(TRUE); + setCanResize(true); } void LLMultiPreview::onOpen(const LLSD& key) @@ -601,7 +601,7 @@ void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click) LLPreviewTexture* texture_preview = dynamic_cast(opened_floater); if (texture_preview) { - texture_preview->setUpdateDimensions(TRUE); + texture_preview->setUpdateDimensions(true); } // @@ -624,7 +624,7 @@ void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click) } else { - pSearchFloater->setVisible(FALSE); + pSearchFloater->setVisible(false); } } // [/SL:KB] diff --git a/indra/newview/llpreview.h b/indra/newview/llpreview.h index 7e6a0ff92f..ce21cd5630 100644 --- a/indra/newview/llpreview.h +++ b/indra/newview/llpreview.h @@ -76,7 +76,7 @@ public: void setAssetId(const LLUUID& asset_id); const LLInventoryItem* getItem() const; // searches if not constructed with it - static void hide(const LLUUID& item_uuid, BOOL no_saving = FALSE ); + static void hide(const LLUUID& item_uuid, bool no_saving = false ); static void dirty(const LLUUID& item_uuid); virtual bool handleMouseDown(S32 x, S32 y, MASK mask); @@ -92,7 +92,7 @@ public: static void onDiscardBtn(void* data); /*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false); - void userResized() { mUserResized = TRUE; }; + void userResized() { mUserResized = true; }; virtual void loadAsset() { mAssetStatus = PREVIEW_ASSET_LOADED; } virtual EAssetStatus getAssetStatus() { return mAssetStatus;} @@ -106,8 +106,8 @@ public: // We can't modify Item or description in preview if either in-world Object // or Item itself is unmodifiable - static BOOL canModify(const LLUUID taskUUID, const LLInventoryItem* item); - static BOOL canModify(const LLViewerObject* object, const LLInventoryItem* item); + static bool canModify(const LLUUID taskUUID, const LLInventoryItem* item); + static bool canModify(const LLViewerObject* object, const LLInventoryItem* item); protected: virtual void onCommit(); @@ -117,8 +117,8 @@ protected: // for LLInventoryObserver virtual void changed(U32 mask); - BOOL mDirty; - BOOL mSaveDialogShown; + bool mDirty; + bool mSaveDialogShown; protected: LLUUID mItemUUID; @@ -135,13 +135,13 @@ protected: LLButton* mCopyToInvBtn; // Close without saving changes - BOOL mForceClose; + bool mForceClose; - BOOL mUserResized; + bool mUserResized; // When closing springs a "Want to save?" dialog, we want // to keep the preview open until the save completes. - BOOL mCloseAfterSave; + bool mCloseAfterSave; EAssetStatus mAssetStatus; diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 08c91bf811..ffac99d670 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -64,9 +64,9 @@ bool LLPreviewAnim::postBuild() //pAdvancedStatsTextBox = getChild("AdvancedStats"); //// Assume that advanced stats start visible (for XUI preview tool's purposes) - //pAdvancedStatsTextBox->setVisible(FALSE); + //pAdvancedStatsTextBox->setVisible(false); //LLRect rect = getRect(); - //reshape(rect.getWidth(), rect.getHeight() - pAdvancedStatsTextBox->getRect().getHeight() - ADVANCED_VPAD, FALSE); + //reshape(rect.getWidth(), rect.getHeight() - pAdvancedStatsTextBox->getRect().getHeight() - ADVANCED_VPAD, false); // // Make advanced animation preview optional @@ -210,10 +210,10 @@ void LLPreviewAnim::cleanup() { this->mItemID = LLUUID::null; this->mDidStart = false; - getChild("Inworld")->setValue(FALSE); - getChild("Locally")->setValue(FALSE); - getChild("Inworld")->setEnabled(TRUE); - getChild("Locally")->setEnabled(TRUE); + getChild("Inworld")->setValue(false); + getChild("Locally")->setValue(false); + getChild("Inworld")->setEnabled(true); + getChild("Locally")->setEnabled(true); } // virtual @@ -231,19 +231,19 @@ void LLPreviewAnim::onClose(bool app_quitting) // Improved animation preview //void LLPreviewAnim::showAdvanced() //{ -// BOOL was_visible = pAdvancedStatsTextBox->getVisible(); +// bool was_visible = pAdvancedStatsTextBox->getVisible(); // // if (was_visible) // { -// pAdvancedStatsTextBox->setVisible(FALSE); +// pAdvancedStatsTextBox->setVisible(false); // LLRect rect = getRect(); -// reshape(rect.getWidth(), rect.getHeight() - pAdvancedStatsTextBox->getRect().getHeight() - ADVANCED_VPAD, FALSE); +// reshape(rect.getWidth(), rect.getHeight() - pAdvancedStatsTextBox->getRect().getHeight() - ADVANCED_VPAD, false); // } // else // { -// pAdvancedStatsTextBox->setVisible(TRUE); +// pAdvancedStatsTextBox->setVisible(true); // LLRect rect = getRect(); -// reshape(rect.getWidth(), rect.getHeight() + pAdvancedStatsTextBox->getRect().getHeight() + ADVANCED_VPAD, FALSE); +// reshape(rect.getWidth(), rect.getHeight() + pAdvancedStatsTextBox->getRect().getHeight() + ADVANCED_VPAD, false); // // LLMotion *motion = NULL; // const LLInventoryItem* item = getItem(); diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index c3b344d2c0..f74136d36e 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -199,7 +199,7 @@ bool LLPreviewGesture::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, sound->mSoundName = item->getName(); } updateLabel(line); - mDirty = TRUE; + mDirty = true; refresh(); } *accept = ACCEPT_YES_COPY_MULTI; @@ -236,7 +236,7 @@ bool LLPreviewGesture::canClose() { if(!mSaveDialogShown) { - mSaveDialogShown = TRUE; + mSaveDialogShown = true; // Bring up view-modal dialog: Save changes? Yes, No, Cancel LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewGesture::handleSaveChangesDialog, this, _1, _2) ); @@ -268,19 +268,19 @@ void LLPreviewGesture::onVisibilityChanged ( const LLSD& new_visibility ) bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const LLSD& response) { - mSaveDialogShown = FALSE; + mSaveDialogShown = false; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch(option) { case 0: // "Yes" LLGestureMgr::instance().stopGesture(mPreviewGesture); - mCloseAfterSave = TRUE; + mCloseAfterSave = true; onClickSave(this); break; case 1: // "No" LLGestureMgr::instance().stopGesture(mPreviewGesture); - mDirty = FALSE; // Force the dirty flag because user has clicked NO on confirm save dialog... + mDirty = false; // Force the dirty flag because user has clicked NO on confirm save dialog... closeFloater(); break; @@ -313,7 +313,7 @@ LLPreviewGesture::LLPreviewGesture(const LLSD& key) mSaveBtn(NULL), mPreviewBtn(NULL), mPreviewGesture(NULL), - mDirty(FALSE) + mDirty(false) { NONE_LABEL = LLTrans::getString("---"); SHIFT_LABEL = LLTrans::getString("KBShift"); @@ -628,39 +628,39 @@ void LLPreviewGesture::refresh() if (mPreviewGesture || !is_complete) { - getChildView("desc")->setEnabled(FALSE); - //mDescEditor->setEnabled(FALSE); - mTriggerEditor->setEnabled(FALSE); - mReplaceText->setEnabled(FALSE); - mReplaceEditor->setEnabled(FALSE); - mModifierCombo->setEnabled(FALSE); - mKeyCombo->setEnabled(FALSE); - mLibraryList->setEnabled(FALSE); - mAddBtn->setEnabled(FALSE); - mUpBtn->setEnabled(FALSE); - mDownBtn->setEnabled(FALSE); - mDeleteBtn->setEnabled(FALSE); - mStepList->setEnabled(FALSE); - mOptionsText->setEnabled(FALSE); - mAnimationCombo->setEnabled(FALSE); - mAnimationRadio->setEnabled(FALSE); - mSoundCombo->setEnabled(FALSE); - mChatEditor->setEnabled(FALSE); - mWaitAnimCheck->setEnabled(FALSE); - mWaitTimeCheck->setEnabled(FALSE); - mWaitTimeEditor->setEnabled(FALSE); - mActiveCheck->setEnabled(FALSE); - mSaveBtn->setEnabled(FALSE); + getChildView("desc")->setEnabled(false); + //mDescEditor->setEnabled(false); + mTriggerEditor->setEnabled(false); + mReplaceText->setEnabled(false); + mReplaceEditor->setEnabled(false); + mModifierCombo->setEnabled(false); + mKeyCombo->setEnabled(false); + mLibraryList->setEnabled(false); + mAddBtn->setEnabled(false); + mUpBtn->setEnabled(false); + mDownBtn->setEnabled(false); + mDeleteBtn->setEnabled(false); + mStepList->setEnabled(false); + mOptionsText->setEnabled(false); + mAnimationCombo->setEnabled(false); + mAnimationRadio->setEnabled(false); + mSoundCombo->setEnabled(false); + mChatEditor->setEnabled(false); + mWaitAnimCheck->setEnabled(false); + mWaitTimeCheck->setEnabled(false); + mWaitTimeEditor->setEnabled(false); + mActiveCheck->setEnabled(false); + mSaveBtn->setEnabled(false); // Make sure preview button is enabled, so we can stop it - mPreviewBtn->setEnabled(TRUE); + mPreviewBtn->setEnabled(true); return; } - BOOL modifiable = item->getPermissions().allowModifyBy(gAgent.getID()); + bool modifiable = item->getPermissions().allowModifyBy(gAgent.getID()); getChildView("desc")->setEnabled(modifiable); - mTriggerEditor->setEnabled(TRUE); + mTriggerEditor->setEnabled(true); mLibraryList->setEnabled(modifiable); mStepList->setEnabled(modifiable); mOptionsText->setEnabled(modifiable); @@ -671,27 +671,27 @@ void LLPreviewGesture::refresh() mWaitAnimCheck->setEnabled(modifiable); mWaitTimeCheck->setEnabled(modifiable); mWaitTimeEditor->setEnabled(modifiable); - mActiveCheck->setEnabled(TRUE); + mActiveCheck->setEnabled(true); const std::string& trigger = mTriggerEditor->getText(); - BOOL have_trigger = !trigger.empty(); + bool have_trigger = !trigger.empty(); const std::string& replace = mReplaceEditor->getText(); - BOOL have_replace = !replace.empty(); + bool have_replace = !replace.empty(); LLScrollListItem* library_item = mLibraryList->getFirstSelected(); - BOOL have_library = (library_item != NULL); + bool have_library = (library_item != NULL); LLScrollListItem* step_item = mStepList->getFirstSelected(); S32 step_index = mStepList->getFirstSelectedIndex(); S32 step_count = mStepList->getItemCount(); - BOOL have_step = (step_item != NULL); + bool have_step = (step_item != NULL); mReplaceText->setEnabled(have_trigger || have_replace); mReplaceEditor->setEnabled(have_trigger || have_replace); - mModifierCombo->setEnabled(TRUE); - mKeyCombo->setEnabled(TRUE); + mModifierCombo->setEnabled(true); + mKeyCombo->setEnabled(true); mAddBtn->setEnabled(modifiable && have_library); mUpBtn->setEnabled(modifiable && have_step && step_index > 0); @@ -699,13 +699,13 @@ void LLPreviewGesture::refresh() mDeleteBtn->setEnabled(modifiable && have_step); // Assume all not visible - mAnimationCombo->setVisible(FALSE); - mAnimationRadio->setVisible(FALSE); - mSoundCombo->setVisible(FALSE); - mChatEditor->setVisible(FALSE); - mWaitAnimCheck->setVisible(FALSE); - mWaitTimeCheck->setVisible(FALSE); - mWaitTimeEditor->setVisible(FALSE); + mAnimationCombo->setVisible(false); + mAnimationRadio->setVisible(false); + mSoundCombo->setVisible(false); + mChatEditor->setVisible(false); + mWaitAnimCheck->setVisible(false); + mWaitTimeCheck->setVisible(false); + mWaitTimeEditor->setVisible(false); std::string optionstext; @@ -721,8 +721,8 @@ void LLPreviewGesture::refresh() { LLGestureStepAnimation* anim_step = (LLGestureStepAnimation*)step; optionstext = getString("step_anim"); - mAnimationCombo->setVisible(TRUE); - mAnimationRadio->setVisible(TRUE); + mAnimationCombo->setVisible(true); + mAnimationRadio->setVisible(true); mAnimationRadio->setSelectedIndex((anim_step->mFlags & ANIM_FLAG_STOP) ? 1 : 0); mAnimationCombo->setCurrentByID(anim_step->mAnimAssetID); break; @@ -731,7 +731,7 @@ void LLPreviewGesture::refresh() { LLGestureStepSound* sound_step = (LLGestureStepSound*)step; optionstext = getString("step_sound"); - mSoundCombo->setVisible(TRUE); + mSoundCombo->setVisible(true); mSoundCombo->setCurrentByID(sound_step->mSoundAssetID); break; } @@ -739,7 +739,7 @@ void LLPreviewGesture::refresh() { LLGestureStepChat* chat_step = (LLGestureStepChat*)step; optionstext = getString("step_chat"); - mChatEditor->setVisible(TRUE); + mChatEditor->setVisible(true); mChatEditor->setText(chat_step->mChatText); break; } @@ -747,11 +747,11 @@ void LLPreviewGesture::refresh() { LLGestureStepWait* wait_step = (LLGestureStepWait*)step; optionstext = getString("step_wait"); - mWaitAnimCheck->setVisible(TRUE); + mWaitAnimCheck->setVisible(true); mWaitAnimCheck->set(wait_step->mFlags & WAIT_FLAG_ALL_ANIM); - mWaitTimeCheck->setVisible(TRUE); + mWaitTimeCheck->setVisible(true); mWaitTimeCheck->set(wait_step->mFlags & WAIT_FLAG_TIME); - mWaitTimeEditor->setVisible(TRUE); + mWaitTimeEditor->setVisible(true); std::string buffer = llformat("%.1f", (double)wait_step->mWaitSeconds); mWaitTimeEditor->setText(buffer); break; @@ -763,7 +763,7 @@ void LLPreviewGesture::refresh() mOptionsText->setText(optionstext); - BOOL active = LLGestureMgr::instance().isGestureActive(mItemUUID); + bool active = LLGestureMgr::instance().isGestureActive(mItemUUID); mActiveCheck->set(active); // Can only preview if there are steps @@ -799,7 +799,7 @@ void LLPreviewGesture::initDefaultGesture() mStepList->selectFirstItem(); // this is *new* content, so we are dirty - mDirty = TRUE; + mDirty = true; } @@ -832,7 +832,7 @@ void LLPreviewGesture::loadAsset() // window if the download gets stalled. LLUUID* item_idp = new LLUUID(mItemUUID); - const BOOL high_priority = TRUE; + const bool high_priority = true; gAssetStorage->getAssetData(asset_id, LLAssetType::AT_GESTURE, onLoadComplete, @@ -864,7 +864,7 @@ void LLPreviewGesture::onLoadComplete(const LLUUID& asset_uuid, LLMultiGesture* gesture = new LLMultiGesture(); LLDataPackerAsciiBuffer dp(&buffer[0], size+1); - BOOL ok = gesture->deserialize(dp); + bool ok = gesture->deserialize(dp); if (ok) { @@ -873,7 +873,7 @@ void LLPreviewGesture::onLoadComplete(const LLUUID& asset_uuid, self->mStepList->selectFirstItem(); - self->mDirty = FALSE; + self->mDirty = false; self->refresh(); self->refreshFromItem(); // to update description and title } @@ -1153,7 +1153,7 @@ void LLPreviewGesture::saveIfNeeded() LLLineEditor* descEditor = getChild("desc"); LLSaveInfo* info = new LLSaveInfo(mItemUUID, mObjectUUID, descEditor->getText(), tid); - gAssetStorage->storeAssetData(tid, LLAssetType::AT_GESTURE, onSaveComplete, info, FALSE); + gAssetStorage->storeAssetData(tid, LLAssetType::AT_GESTURE, onSaveComplete, info, false); } } @@ -1354,7 +1354,7 @@ void LLPreviewGesture::onCommitKeyorModifier() //mKeyCombo->setEnabledByValue(LLKeyboard::stringFromKey(KEY_F10), mModifierCombo->getSimple() != CTRL_LABEL); //mModifierCombo->setEnabledByValue(CTRL_LABEL, mKeyCombo->getSimple() != LLKeyboard::stringFromKey(KEY_F10)); // - mDirty = TRUE; + mDirty = true; refresh(); } @@ -1373,7 +1373,7 @@ void LLPreviewGesture::updateLabel(LLScrollListItem* item) void LLPreviewGesture::onCommitSetDirty(LLUICtrl* ctrl, void* data) { LLPreviewGesture* self = (LLPreviewGesture*)data; - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } @@ -1432,7 +1432,7 @@ void LLPreviewGesture::onCommitAnimation(LLUICtrl* ctrl, void* data) // Update the UI label in the list updateLabel(step_item); - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } } @@ -1463,7 +1463,7 @@ void LLPreviewGesture::onCommitAnimationTrigger(LLUICtrl* ctrl, void *data) // Update the UI label in the list updateLabel(step_item); - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } } @@ -1489,7 +1489,7 @@ void LLPreviewGesture::onCommitSound(LLUICtrl* ctrl, void* data) // Update the UI label in the list updateLabel(step_item); - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } } @@ -1513,7 +1513,7 @@ void LLPreviewGesture::onCommitChat(LLUICtrl* ctrl, void* data) // Update the UI label in the list updateLabel(step_item); - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } @@ -1549,7 +1549,7 @@ void LLPreviewGesture::onCommitWait(LLUICtrl* ctrl, void* data) // Update the UI label in the list updateLabel(step_item); - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } @@ -1564,7 +1564,7 @@ void LLPreviewGesture::onCommitWaitTime(LLUICtrl* ctrl, void* data) LLGestureStep* step = (LLGestureStep*)step_item->getUserdata(); if (step->getType() != STEP_WAIT) return; - self->mWaitTimeCheck->set(TRUE); + self->mWaitTimeCheck->set(true); onCommitWait(ctrl, data); } @@ -1597,7 +1597,7 @@ void LLPreviewGesture::onClickAdd(void* data) } self->addStep( (EStepType)library_item_index ); - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } @@ -1638,7 +1638,7 @@ LLScrollListItem* LLPreviewGesture::addStep( const EStepType step_type ) mLibraryList->deselectAllItems(); mStepList->deselectAllItems(); - step_item->setSelected(TRUE); + step_item->setSelected(true); return step_item; } @@ -1698,7 +1698,7 @@ void LLPreviewGesture::onClickUp(void* data) if (selected_index > 0) { self->mStepList->swapWithPrevious(selected_index); - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } } @@ -1715,7 +1715,7 @@ void LLPreviewGesture::onClickDown(void* data) if (selected_index < count-1) { self->mStepList->swapWithNext(selected_index); - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } } @@ -1735,7 +1735,7 @@ void LLPreviewGesture::onClickDelete(void* data) self->mStepList->deleteSingleItem(selected_index); - self->mDirty = TRUE; + self->mDirty = true; self->refresh(); } } diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index a9a0ecc452..818879335a 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -163,7 +163,7 @@ private: LLButton* mPreviewBtn; LLMultiGesture* mPreviewGesture; - BOOL mDirty; + bool mDirty; }; #endif // LL_LLPREVIEWGESTURE_H diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 933caedfc1..52b5083f4d 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -114,7 +114,7 @@ bool LLPreviewNotecard::postBuild() mEditor->makePristine(); childSetAction("Save", onClickSave, this); - getChildView("lock")->setVisible( FALSE); + getChildView("lock")->setVisible( false); childSetAction("Delete", onClickDelete, this); getChildView("Delete")->setEnabled(false); @@ -130,7 +130,7 @@ bool LLPreviewNotecard::postBuild() if (item) { getChild("desc")->setValue(item->getDescription()); - BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID()); + bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID()); getChildView("Delete")->setEnabled(!source_library); } getChild("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); @@ -167,7 +167,7 @@ void LLPreviewNotecard::setEnabled(bool enabled) void LLPreviewNotecard::draw() { LLViewerTextEditor* editor = getChild("Notecard Editor"); - BOOL changed = !editor->isPristine(); + bool changed = !editor->isPristine(); getChildView("Save")->setEnabled(changed && getEnabled()); @@ -194,7 +194,7 @@ bool LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) if(('F' == key) && (MASK_CONTROL == (mask & MASK_CONTROL))) { LLFloaterSearchReplace::show(getEditor()); - return TRUE; + return true; } // [/SL:KB] @@ -214,7 +214,7 @@ bool LLPreviewNotecard::canClose() { if(!mSaveDialogShown) { - mSaveDialogShown = TRUE; + mSaveDialogShown = true; // Bring up view-modal dialog: Save changes? Yes, No, Cancel LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLPreviewNotecard::handleSaveChangesDialog,this, _1, _2)); } @@ -301,10 +301,10 @@ void LLPreviewNotecard::loadAsset() if(item) { LLPermissions perm(item->getPermissions()); - BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); - BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); - BOOL allow_modify = canModify(mObjectUUID, item); - BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID()); + bool is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); + bool allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); + bool allow_modify = canModify(mObjectUUID, item); + bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID()); if (allow_copy || gAgent.isGodlike()) { @@ -313,7 +313,7 @@ void LLPreviewNotecard::loadAsset() { editor->setText(LLStringUtil::null); editor->makePristine(); - editor->setEnabled(TRUE); + editor->setEnabled(true); mAssetStatus = PREVIEW_ASSET_LOADED; } else @@ -334,7 +334,7 @@ void LLPreviewNotecard::loadAsset() mAssetID.setNull(); editor->setText(getString("no_object")); editor->makePristine(); - editor->setEnabled(FALSE); + editor->setEnabled(false); mAssetStatus = PREVIEW_ASSET_LOADED; return; } @@ -356,7 +356,7 @@ void LLPreviewNotecard::loadAsset() item->getType(), &onLoadComplete, (void*)user_data, - TRUE); + true); mAssetStatus = PREVIEW_ASSET_LOADING; } } @@ -365,20 +365,20 @@ void LLPreviewNotecard::loadAsset() mAssetID.setNull(); editor->setText(getString("not_allowed")); editor->makePristine(); - editor->setEnabled(FALSE); + editor->setEnabled(false); mAssetStatus = PREVIEW_ASSET_LOADED; } if(!allow_modify) { - editor->setEnabled(FALSE); - getChildView("lock")->setVisible( TRUE); - getChildView("Edit")->setEnabled(FALSE); + editor->setEnabled(false); + getChildView("lock")->setVisible( true); + getChildView("Edit")->setEnabled(false); } if((allow_modify || is_owner) && !source_library) { - getChildView("Delete")->setEnabled(TRUE); + getChildView("Delete")->setEnabled(true); } } else if (mObjectUUID.notNull() && mItemUUID.notNull()) @@ -409,7 +409,7 @@ void LLPreviewNotecard::loadAsset() { editor->setText(LLStringUtil::null); editor->makePristine(); - editor->setEnabled(TRUE); + editor->setEnabled(true); // Don't set asset status here; we may not have set the item id yet // (e.g. when this gets called initially) //mAssetStatus = PREVIEW_ASSET_LOADED; @@ -455,7 +455,7 @@ void LLPreviewNotecard::onLoadComplete(const LLUUID& asset_uuid, } previewEditor->makePristine(); - BOOL modifiable = preview->canModify(preview->mObjectID, preview->getItem()); + bool modifiable = preview->canModify(preview->mObjectID, preview->getItem()); // Force spell checker to check again after saving a NC, // or misspelled words wouldn't be shown previewEditor->onSpellCheckSettingsChange(); @@ -677,7 +677,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync) gAssetStorage->storeAssetData(tid, LLAssetType::AT_NOTECARD, &onSaveComplete, (void*)info, - FALSE); + false); // FIRE-9039: Close notecard after choosing "Save" in close confirmation //return true; } @@ -806,17 +806,17 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data bool LLPreviewNotecard::handleSaveChangesDialog(const LLSD& notification, const LLSD& response) { - mSaveDialogShown = FALSE; + mSaveDialogShown = false; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch(option) { case 0: // "Yes" - mCloseAfterSave = TRUE; + mCloseAfterSave = true; LLPreviewNotecard::onClickSave((void*)this); break; case 1: // "No" - mForceClose = TRUE; + mForceClose = true; closeFloater(); break; @@ -845,7 +845,7 @@ bool LLPreviewNotecard::handleConfirmDeleteDialog(const LLSD& notification, cons if (item != NULL) { const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - gInventory.changeItemParent(item, trash_id, FALSE); + gInventory.changeItemParent(item, trash_id, false); } } else @@ -863,7 +863,7 @@ bool LLPreviewNotecard::handleConfirmDeleteDialog(const LLSD& notification, cons } // close floater, ignore unsaved changes - mForceClose = TRUE; + mForceClose = true; closeFloater(); return false; } diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index ae9b6afe97..84903a41fb 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -383,8 +383,8 @@ LLScriptEdCore::LLScriptEdCore( const LLHandle& floater_handle, void (*load_callback)(void*), // FIRE-7514: Script in external editor needs to be saved twice - //void (*save_callback)(void*, BOOL), - void (*save_callback)(void*, BOOL, bool), + //void (*save_callback)(void*, bool), + void (*save_callback)(void*, bool, bool), // void (*search_replace_callback) (void* userdata), void* userdata, @@ -398,10 +398,10 @@ LLScriptEdCore::LLScriptEdCore( mSaveCallback( save_callback ), mSearchReplaceCallback( search_replace_callback ), mUserdata( userdata ), - mForceClose( FALSE ), + mForceClose( false ), mLastHelpToken(NULL), mLiveHelpHistorySize(0), - mEnableSave(FALSE), + mEnableSave(false), mLiveFile(NULL), mLive(live), mContainer(container), @@ -416,12 +416,12 @@ LLScriptEdCore::LLScriptEdCore( mFontNameChangedCallbackConnection(), mFontSizeChangedCallbackConnection(), // - mHasScriptData(FALSE), - mScriptRemoved(FALSE), - mSaveDialogShown(FALSE) + mHasScriptData(false), + mScriptRemoved(false), + mSaveDialogShown(false) { setFollowsAll(); - setBorderVisible(FALSE); + setBorderVisible(false); // NaCl - Script Preprocessor if (gSavedSettings.getBOOL("_NACL_LSLPreprocessor")) @@ -481,7 +481,7 @@ void LLLiveLSLEditor::experienceChanged() if(mScriptEd->getAssociatedExperience() != mExperiences->getSelectedValue().asUUID()) { mScriptEd->enableSave(getIsModifiable()); - //getChildView("Save_btn")->setEnabled(TRUE); + //getChildView("Save_btn")->setEnabled(true); mScriptEd->setAssociatedExperience(mExperiences->getSelectedValue().asUUID()); updateExperiencePanel(); } @@ -556,7 +556,7 @@ bool LLScriptEdCore::postBuild() { mPostEditor = getChild("Post Editor"); mPostEditor->setFollowsAll(); - mPostEditor->setEnabled(TRUE); + mPostEditor->setEnabled(true); mPreprocTab = getChild("Tabset"); mPreprocTab->setCommitCallback(boost::bind(&LLScriptEdCore::onPreprocTabChanged, this, _2)); @@ -573,7 +573,7 @@ bool LLScriptEdCore::postBuild() childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this); // Advanced Script Editor - //childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,FALSE)); + //childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,false)); childSetAction("prefs_btn", boost::bind(&LLScriptEdCore::onBtnPrefs, this)); // childSetAction("Edit_btn", boost::bind(&LLScriptEdCore::openInExternalEditor, this)); @@ -721,8 +721,8 @@ void LLScriptEdCore::initMenu() menuItem = getChild("Save"); // FIRE-7514: Script in external editor needs to be saved twice - //menuItem->setClickCallback(boost::bind(&LLScriptEdCore::doSave, this, FALSE)); - menuItem->setClickCallback(boost::bind(&LLScriptEdCore::doSave, this, FALSE, true)); + //menuItem->setClickCallback(boost::bind(&LLScriptEdCore::doSave, this, false)); + menuItem->setClickCallback(boost::bind(&LLScriptEdCore::doSave, this, false, true)); // menuItem->setEnableCallback(boost::bind(&LLScriptEdCore::hasChanged, this)); @@ -822,8 +822,8 @@ void LLScriptEdCore::initMenu() void LLScriptEdCore::initButtonBar() { - mSaveBtn->setClickedCallback(boost::bind(&LLScriptEdCore::doSave, this, FALSE, true)); - mSaveBtn2->setClickedCallback(boost::bind(&LLScriptEdCore::doSave, this, FALSE, true)); // support extra save button + mSaveBtn->setClickedCallback(boost::bind(&LLScriptEdCore::doSave, this, false, true)); + mSaveBtn2->setClickedCallback(boost::bind(&LLScriptEdCore::doSave, this, false, true)); // support extra save button mCutBtn->setClickedCallback(boost::bind(&LLScriptEdCore::performAction, this, "Cut")); mCopyBtn->setClickedCallback(boost::bind(&LLScriptEdCore::performAction, this, "Copy")); mPasteBtn->setClickedCallback(boost::bind(&LLScriptEdCore::performAction, this, "Paste")); @@ -978,7 +978,7 @@ bool LLScriptEdCore::enableAction(const std::string& action) } // NaCl End -void LLScriptEdCore::setScriptText(const std::string& text, BOOL is_valid) +void LLScriptEdCore::setScriptText(const std::string& text, bool is_valid) { if (mEditor) { @@ -1125,7 +1125,7 @@ bool LLScriptEdCore::hasChanged() void LLScriptEdCore::draw() { // Advanced Script Editor - //BOOL script_changed = hasChanged(); + //bool script_changed = hasChanged(); //mSaveBtn->setEnabled(script_changed && !mScriptRemoved); updateButtonBar(); // @@ -1134,7 +1134,7 @@ void LLScriptEdCore::draw() { S32 line = 0; S32 column = 0; - mEditor->getCurrentLineAndColumn( &line, &column, FALSE ); // don't include wordwrap + mEditor->getCurrentLineAndColumn( &line, &column, false ); // don't include wordwrap LLStringUtil::format_map_t args; std::string cursor_pos; args["[LINE]"] = llformat ("%d", line); @@ -1147,7 +1147,7 @@ void LLScriptEdCore::draw() { S32 line = 0; S32 column = 0; - mPostEditor->getCurrentLineAndColumn( &line, &column, FALSE ); // don't include wordwrap + mPostEditor->getCurrentLineAndColumn( &line, &column, false); // don't include wordwrap LLStringUtil::format_map_t args; std::string cursor_pos; args["[LINE]"] = llformat ("%d", line); @@ -1166,7 +1166,7 @@ void LLScriptEdCore::draw() LLPanel::draw(); } -void LLScriptEdCore::updateDynamicHelp(BOOL immediate) +void LLScriptEdCore::updateDynamicHelp(bool immediate) { LLFloater* help_floater = mLiveHelpHandle.get(); if (!help_floater) return; @@ -1317,21 +1317,21 @@ void LLScriptEdCore::addHelpItemToHistory(const std::string& help_string) mLiveHelpHistorySize++; } -BOOL LLScriptEdCore::canClose() +bool LLScriptEdCore::canClose() { if(mForceClose || !hasChanged() || mScriptRemoved) { - return TRUE; + return true; } else { if(!mSaveDialogShown) { - mSaveDialogShown = TRUE; + mSaveDialogShown = true; // Bring up view-modal dialog: Save changes? Yes, No, Cancel LLNotificationsUtil::add("SaveChanges", LLSD(), LLSD(), boost::bind(&LLScriptEdCore::handleSaveChangesDialog, this, _1, _2)); } - return FALSE; + return false; } } @@ -1344,17 +1344,17 @@ void LLScriptEdCore::setEnableEditing(bool enable) bool LLScriptEdCore::handleSaveChangesDialog(const LLSD& notification, const LLSD& response ) { - mSaveDialogShown = FALSE; + mSaveDialogShown = false; S32 option = LLNotificationsUtil::getSelectedOption(notification, response); switch( option ) { case 0: // "Yes" // close after saving - doSave( TRUE ); + doSave( true ); break; case 1: // "No" - mForceClose = TRUE; + mForceClose = true; // This will close immediately because mForceClose is true, so we won't // infinite loop with these dialogs. JC ((LLFloater*) getParent())->closeFloater(); @@ -1386,7 +1386,7 @@ void LLScriptEdCore::onBtnDynamicHelp() LLFloater* parent = dynamic_cast(getParent()); llassert(parent); if (parent) - parent->addDependentFloater(live_help_floater, TRUE); + parent->addDependentFloater(live_help_floater, true); live_help_floater->childSetCommitCallback("lock_check", onCheckLock, this); live_help_floater->getChild("lock_check")->setValue(gSavedSettings.getBOOL("ScriptHelpFollowsCursor")); live_help_floater->childSetCommitCallback("history_combo", onHelpComboCommit, this); @@ -1394,7 +1394,7 @@ void LLScriptEdCore::onBtnDynamicHelp() live_help_floater->childSetAction("fwd_btn", onClickForward, this); LLMediaCtrl* browser = live_help_floater->getChild("lsl_guide_html"); - browser->setAlwaysRefresh(TRUE); + browser->setAlwaysRefresh(true); LLComboBox* help_combo = live_help_floater->getChild("history_combo"); LLKeywordToken *token; @@ -1414,12 +1414,12 @@ void LLScriptEdCore::onBtnDynamicHelp() mLiveHelpHistorySize = 0; } - BOOL visible = TRUE; - BOOL take_focus = TRUE; + bool visible = true; + bool take_focus = true; live_help_floater->setVisible(visible); live_help_floater->setFrontmost(take_focus); - updateDynamicHelp(TRUE); + updateDynamicHelp(true); } //static @@ -1503,13 +1503,13 @@ void LLScriptEdCore::onBtnInsertFunction(LLUICtrl *ui, void* userdata) { self->mEditor->insertText(self->mFunctions->getSimple()); } - self->mEditor->setFocus(TRUE); + self->mEditor->setFocus(true); self->setHelpPage(self->mFunctions->getSimple()); } // FIRE-7514: Script in external editor needs to be saved twice -//void LLScriptEdCore::doSave( BOOL close_after_save ) -void LLScriptEdCore::doSave(BOOL close_after_save, bool sync /*= true*/) +//void LLScriptEdCore::doSave( bool close_after_save ) +void LLScriptEdCore::doSave(bool close_after_save, bool sync /*= true*/) // { // NaCl - LSL Preprocessor @@ -1535,7 +1535,7 @@ void LLScriptEdCore::doSave(BOOL close_after_save, bool sync /*= true*/) } // NaCl - LSL Preprocessor -void LLScriptEdCore::doSaveComplete( void* userdata, BOOL close_after_save, bool sync) +void LLScriptEdCore::doSaveComplete( void* userdata, bool close_after_save, bool sync) { add( LLStatViewer::LSL_SAVES,1 ); @@ -1641,14 +1641,14 @@ void LLScriptEdCore::onErrorList(LLUICtrl*, void* user_data) if (gSavedSettings.getBOOL("_NACL_LSLPreprocessor") && self->mPostEditor && self->mPreprocTab) { self->mPreprocTab->selectTabByName("Preprocessed"); - self->getChild("Preprocessed")->setFocus(TRUE); - self->mPostEditor->setFocus(TRUE); + self->getChild("Preprocessed")->setFocus(true); + self->mPostEditor->setFocus(true); self->mPostEditor->setCursor(row, column); } else { self->mEditor->setCursor(row, column); - self->mEditor->setFocus(TRUE); + self->mEditor->setFocus(true); } // NaCl End } @@ -1662,7 +1662,7 @@ bool LLScriptEdCore::handleReloadFromServerDialog(const LLSD& notification, cons case 0: // "Yes" if( mLoadCallback ) { - setScriptText(getString("loading"), FALSE); + setScriptText(getString("loading"), false); mLoadCallback(mUserdata); } break; @@ -1720,12 +1720,12 @@ bool LLScriptEdCore::handleKeyHere(KEY key, MASK mask) if (!hasChanged()) { LL_INFOS() << "Save Not Needed" << LL_ENDL; - return TRUE; + return true; } - doSave(FALSE); + doSave(false); // NaCl End - //mSaveCallback(mUserdata, FALSE); + //mSaveCallback(mUserdata, false); } return true; @@ -1802,8 +1802,8 @@ void LLScriptEdCore::saveScriptToFile(const std::vector& filenames, fout << (scriptText); fout.close(); // FIRE-7514: Script in external editor needs to be saved twice - //self->mSaveCallback(self->mUserdata, FALSE); - self->mSaveCallback(self->mUserdata, FALSE, true); + //self->mSaveCallback(self->mUserdata, false); + self->mSaveCallback(self->mUserdata, false, true); // } } @@ -1818,7 +1818,7 @@ bool LLScriptEdCore::canLoadOrSaveToFile( void* userdata ) bool LLScriptEdCore::enableSaveToFileMenu(void* userdata) { LLScriptEdCore* self = (LLScriptEdCore*)userdata; - if (!self || !self->mEditor) return FALSE; + if (!self || !self->mEditor) return false; return self->mEditor->canLoadOrSaveToFile(); } @@ -1826,7 +1826,7 @@ bool LLScriptEdCore::enableSaveToFileMenu(void* userdata) bool LLScriptEdCore::enableLoadFromFileMenu(void* userdata) { LLScriptEdCore* self = (LLScriptEdCore*)userdata; - return (self && self->mEditor) ? self->mEditor->canLoadOrSaveToFile() : FALSE; + return (self && self->mEditor) ? self->mEditor->canLoadOrSaveToFile() : false; } LLUUID LLScriptEdCore::getAssociatedExperience()const @@ -1860,26 +1860,26 @@ void LLLiveLSLEditor::updateExperiencePanel() { if(mScriptEd->getAssociatedExperience().isNull()) { - mExperienceEnabled->set(FALSE); - mExperiences->setVisible(FALSE); + mExperienceEnabled->set(false); + mExperiences->setVisible(false); if(mExperienceIds.size()>0) { - mExperienceEnabled->setEnabled(TRUE); + mExperienceEnabled->setEnabled(true); mExperienceEnabled->setToolTip(getString("add_experiences")); } else { - mExperienceEnabled->setEnabled(FALSE); + mExperienceEnabled->setEnabled(false); mExperienceEnabled->setToolTip(getString("no_experiences")); } - getChild("view_profile")->setVisible(FALSE); + getChild("view_profile")->setVisible(false); } else { mExperienceEnabled->setToolTip(getString("experience_enabled")); mExperienceEnabled->setEnabled(getIsModifiable()); - mExperiences->setVisible(TRUE); - mExperienceEnabled->set(TRUE); + mExperiences->setVisible(true); + mExperienceEnabled->set(true); getChild("view_profile")->setToolTip(getString("show_experience_profile")); buildExperienceList(); } @@ -1936,20 +1936,20 @@ void LLLiveLSLEditor::buildExperienceList() item=mExperiences->add(getString("loading"), associated, ADD_TOP); last = associated; } - item->setEnabled(FALSE); + item->setEnabled(false); } if(last.notNull()) { - mExperiences->setEnabled(FALSE); + mExperiences->setEnabled(false); LLExperienceCache::instance().get(last, boost::bind(&LLLiveLSLEditor::buildExperienceList, this)); } else { - mExperiences->setEnabled(TRUE); - mExperiences->sortByName(TRUE); + mExperiences->setEnabled(true); + mExperiences->sortByName(true); mExperiences->setCurrentByIndex(mExperiences->getCurrentIndex()); - getChild("view_profile")->setVisible(TRUE); + getChild("view_profile")->setVisible(true); } } @@ -2107,7 +2107,7 @@ bool LLScriptEdContainer::onExternalChange(const std::string& filename) // to pass sync = false - we don't need to update the external editor in this // case or the next save will be ignored! //saveIfNeeded(false); - mScriptEd->doSave(FALSE, false); + mScriptEd->doSave(false, false); // return true; } @@ -2188,7 +2188,7 @@ void LLPreviewLSL::draw() if(!item) { setTitle(LLTrans::getString("ScriptWasDeleted")); - mScriptEd->setItemRemoved(TRUE); + mScriptEd->setItemRemoved(true); } LLPreview::draw(); @@ -2256,7 +2256,7 @@ void LLPreviewLSL::loadAsset() // then it might be part of the inventory library. If it's in the // library, then you can see the script, but not modify it. const LLInventoryItem* item = gInventory.getItem(mItemUUID); - BOOL is_library = item + bool is_library = item && !gInventory.isObjectDescendentOf(mItemUUID, gInventory.getRootFolderID()); if(!item) @@ -2266,9 +2266,9 @@ void LLPreviewLSL::loadAsset() } if(item) { - BOOL is_copyable = gAgent.allowOperation(PERM_COPY, + bool is_copyable = gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE); - BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY, + bool is_modifiable = gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE); if (gAgent.isGodlike() || (is_copyable && (is_modifiable || is_library))) { @@ -2283,14 +2283,14 @@ void LLPreviewLSL::loadAsset() item->getType(), &LLPreviewLSL::onLoadComplete, (void*)new_uuid, - TRUE); + true); mAssetStatus = PREVIEW_ASSET_LOADING; } else { - mScriptEd->setScriptText(mScriptEd->getString("can_not_view"), FALSE); + mScriptEd->setScriptText(mScriptEd->getString("can_not_view"), false); mScriptEd->mEditor->makePristine(); - mScriptEd->mFunctions->setEnabled(FALSE); + mScriptEd->mFunctions->setEnabled(false); mAssetStatus = PREVIEW_ASSET_LOADED; } getChildView("lock")->setVisible( !is_modifiable); @@ -2298,8 +2298,8 @@ void LLPreviewLSL::loadAsset() } else { - mScriptEd->setScriptText(std::string(HELLO_LSL), TRUE); - mScriptEd->setEnableEditing(TRUE); + mScriptEd->setScriptText(std::string(HELLO_LSL), true); + mScriptEd->setEnableEditing(true); mAssetStatus = PREVIEW_ASSET_LOADED; } } @@ -2341,8 +2341,8 @@ void LLPreviewLSL::onLoad(void* userdata) // static // FIRE-7514: Script in external editor needs to be saved twice -//void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save) -void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save, bool sync) +//void LLPreviewLSL::onSave(void* userdata, bool close_after_save) +void LLPreviewLSL::onSave(void* userdata, bool close_after_save, bool sync) // { LLPreviewLSL* self = (LLPreviewLSL*)userdata; @@ -2451,7 +2451,7 @@ void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/) std::string url = gAgent.getRegion()->getCapability("UpdateScriptAgent"); // NaCL - LSL Preprocessor - mScriptEd->enableSave(FALSE); // Clear the enable save flag (FIRE-10173) + mScriptEd->enableSave(false); // Clear the enable save flag (FIRE-10173) bool domono = gSavedSettings.getBOOL("FSSaveInventoryScriptsAsMono"); if (gSavedSettings.getBOOL("_NACL_LSLPreprocessor")) { @@ -2525,12 +2525,12 @@ void LLPreviewLSL::onLoadComplete(const LLUUID& asset_uuid, LLAssetType::EType t // put a EOS at the end buffer[file_length] = 0; - preview->mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE); + preview->mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), true); preview->mScriptEd->mEditor->makePristine(); std::string script_name = DEFAULT_SCRIPT_NAME; LLInventoryItem* item = gInventory.getItem(*item_uuid); - BOOL is_modifiable = FALSE; + bool is_modifiable = false; if (item) { if (!item->getName().empty()) @@ -2539,7 +2539,7 @@ void LLPreviewLSL::onLoadComplete(const LLUUID& asset_uuid, LLAssetType::EType t } if (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE)) { - is_modifiable = TRUE; + is_modifiable = true; } } preview->mScriptEd->setScriptName(script_name); @@ -2602,13 +2602,13 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata) LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) : LLScriptEdContainer(key), - mAskedForRunningInfo(FALSE), - mHaveRunningInfo(FALSE), - mCloseAfterSave(FALSE), + mAskedForRunningInfo(false), + mHaveRunningInfo(false), + mCloseAfterSave(false), mPendingUploads(0), - mIsModifiable(FALSE), + mIsModifiable(false), mIsNew(false), - mIsSaving(FALSE) + mIsSaving(false) { mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this); } @@ -2666,7 +2666,7 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id, // [/SL:KB] getChild("running")->set(is_script_running); - mIsSaving = FALSE; + mIsSaving = false; closeIfNeeded(); } @@ -2699,7 +2699,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors) } // [/SL:KB] - mIsSaving = FALSE; + mIsSaving = false; closeIfNeeded(); } @@ -2731,9 +2731,9 @@ void LLLiveLSLEditor::loadAsset() if(!isGodlike && (!copyManipulate || !mIsModifiable)) { mItem = new LLViewerInventoryItem(item); - mScriptEd->setScriptText(getString("not_allowed"), FALSE); + mScriptEd->setScriptText(getString("not_allowed"), false); mScriptEd->mEditor->makePristine(); - mScriptEd->enableSave(FALSE); + mScriptEd->enableSave(false); mAssetStatus = PREVIEW_ASSET_LOADED; } else if(copyManipulate || isGodlike) @@ -2752,24 +2752,24 @@ void LLLiveLSLEditor::loadAsset() item->getType(), &LLLiveLSLEditor::onLoadComplete, (void*)user_data, - TRUE); + true); LLMessageSystem* msg = gMessageSystem; msg->newMessageFast(_PREHASH_GetScriptRunning); msg->nextBlockFast(_PREHASH_Script); msg->addUUIDFast(_PREHASH_ObjectID, mObjectUUID); msg->addUUIDFast(_PREHASH_ItemID, mItemUUID); msg->sendReliable(object->getRegion()->getHost()); - mAskedForRunningInfo = TRUE; + mAskedForRunningInfo = true; mAssetStatus = PREVIEW_ASSET_LOADING; } } if(mItem.isNull()) { - mScriptEd->setScriptText(LLStringUtil::null, FALSE); + mScriptEd->setScriptText(LLStringUtil::null, false); mScriptEd->mEditor->makePristine(); mAssetStatus = PREVIEW_ASSET_LOADED; - mIsModifiable = FALSE; + mIsModifiable = false; } refreshFromItem(); @@ -2791,8 +2791,8 @@ void LLLiveLSLEditor::loadAsset() } else { - mScriptEd->setScriptText(std::string(HELLO_LSL), TRUE); - mScriptEd->enableSave(FALSE); + mScriptEd->setScriptText(std::string(HELLO_LSL), true); + mScriptEd->enableSave(false); LLPermissions perm; perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, gAgent.getGroupID()); perm.initMasks(PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, PERM_MOVE | PERM_TRANSFER); @@ -2839,7 +2839,7 @@ void LLLiveLSLEditor::onLoadComplete(const LLUUID& asset_id, // instance->loadScriptText(asset_id, type); - instance->mScriptEd->setEnableEditing(TRUE); + instance->mScriptEd->setEnableEditing(true); instance->mAssetStatus = PREVIEW_ASSET_LOADED; instance->mScriptEd->setAssetID(asset_id); @@ -2885,7 +2885,7 @@ void LLLiveLSLEditor::loadScriptText(const LLUUID &uuid, LLAssetType::EType type buffer[file_length] = '\0'; - mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE); + mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), true); mScriptEd->makeEditorPristine(); std::string script_name = DEFAULT_SCRIPT_NAME; @@ -2904,7 +2904,7 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata ) LLLiveLSLEditor* self = (LLLiveLSLEditor*) userdata; LLViewerObject* object = gObjectList.findObject( self->mObjectUUID ); LLCheckBoxCtrl* runningCheckbox = self->getChild("running"); - BOOL running = runningCheckbox->get(); + bool running = runningCheckbox->get(); //self->mRunningCheckbox->get(); if( object ) { @@ -2979,14 +2979,14 @@ void LLLiveLSLEditor::draw() else { runningCheckbox->setLabel(getString("public_objects_can_not_run")); - runningCheckbox->setEnabled(FALSE); + runningCheckbox->setEnabled(false); // *FIX: Set it to false so that the ui is correct for // a box that is released to public. It could be // incorrect after a release/claim cycle, but will be // correct after clicking on it. - runningCheckbox->set(FALSE); - mMonoCheckbox->set(FALSE); + runningCheckbox->set(false); + mMonoCheckbox->set(false); } } else if(!object) @@ -2994,10 +2994,10 @@ void LLLiveLSLEditor::draw() // HACK: Display this information in the title bar. // Really ought to put in main window. setTitle(LLTrans::getString("ObjectOutOfRange")); - runningCheckbox->setEnabled(FALSE); - mMonoCheckbox->setEnabled(FALSE); + runningCheckbox->setEnabled(false); + mMonoCheckbox->setEnabled(false); // object may have fallen out of range. - mHaveRunningInfo = FALSE; + mHaveRunningInfo = false; } LLPreview::draw(); @@ -3018,15 +3018,15 @@ void LLLiveLSLEditor::onSearchReplace(void* userdata) struct LLLiveLSLSaveData { - LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, BOOL active); + LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, bool active); LLUUID mSaveObjectID; LLPointer mItem; - BOOL mActive; + bool mActive; }; LLLiveLSLSaveData::LLLiveLSLSaveData(const LLUUID& id, const LLViewerInventoryItem* item, - BOOL active) : + bool active) : mSaveObjectID(id), mActive(active) { @@ -3107,7 +3107,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/) mPendingUploads = 0; // save the script - mScriptEd->enableSave(FALSE); + mScriptEd->enableSave(false); mScriptEd->mEditor->makePristine(); // FIRE-10172: Fix LSL editor error display //mScriptEd->mErrorList->deleteAllItems(); @@ -3118,7 +3118,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/) mScriptEd->sync(); } bool isRunning = getChild("running")->get(); - mIsSaving = TRUE; + mIsSaving = true; getWindow()->incBusyCount(); mPendingUploads++; @@ -3169,8 +3169,8 @@ void LLLiveLSLEditor::onLoad(void* userdata) // static // FIRE-7514: Script in external editor needs to be saved twice -//void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save) -void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save, bool sync) +//void LLLiveLSLEditor::onSave(void* userdata, bool close_after_save) +void LLLiveLSLEditor::onSave(void* userdata, bool close_after_save, bool sync) // { LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; @@ -3201,7 +3201,7 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**) LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance("preview_scriptedit", floater_key); if(instance) { - instance->mHaveRunningInfo = TRUE; + instance->mHaveRunningInfo = true; bool running; msg->getBOOLFast(_PREHASH_Script, _PREHASH_Running, running); LLCheckBoxCtrl* runningCheckbox = instance->getChild("running"); @@ -3222,13 +3222,13 @@ void LLLiveLSLEditor::onMonoCheckboxClicked(LLUICtrl*, void* userdata) self->mScriptEd->enableSave(self->getIsModifiable()); } -BOOL LLLiveLSLEditor::monoChecked() const +bool LLLiveLSLEditor::monoChecked() const { if(NULL != mMonoCheckbox) { - return mMonoCheckbox->getValue()? TRUE : FALSE; + return mMonoCheckbox->getValue()? true : false; } - return FALSE; + return false; } void LLLiveLSLEditor::setAssociatedExperience( LLHandle editor, const LLSD& experience ) diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 829d0bdb24..28112be96f 100644 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -99,8 +99,8 @@ protected: const LLHandle& floater_handle, void (*load_callback)(void* userdata), // FIRE-7514: Script in external editor needs to be saved twice - //void (*save_callback)(void* userdata, BOOL close_after_save), - void (*save_callback)(void* userdata, BOOL close_after_save, bool sync), + //void (*save_callback)(void* userdata, bool close_after_save), + void (*save_callback)(void* userdata, bool close_after_save, bool sync), // void (*search_replace_callback)(void* userdata), void* userdata, @@ -114,14 +114,14 @@ public: virtual void draw(); /*virtual*/ bool postBuild(); - BOOL canClose(); + bool canClose(); void setEnableEditing(bool enable); bool canLoadOrSaveToFile( void* userdata ); - void setScriptText(const std::string& text, BOOL is_valid); + void setScriptText(const std::string& text, bool is_valid); // NaCL - LSL Preprocessor std::string getScriptText(); - void doSaveComplete(void* userdata, BOOL close_after_save, bool sync); + void doSaveComplete(void* userdata, bool close_after_save, bool sync); // NaCl End void makeEditorPristine(); bool loadScriptText(const std::string& filename); @@ -129,8 +129,8 @@ public: void sync(); // FIRE-7514: Script in external editor needs to be saved twice - //void doSave( BOOL close_after_save ); - void doSave(BOOL close_after_save, bool sync = true); + //void doSave( bool close_after_save ); + void doSave(bool close_after_save, bool sync = true); // bool handleSaveChangesDialog(const LLSD& notification, const LLSD& response); @@ -186,7 +186,7 @@ private: // Show keyword help on F1 virtual bool handleKeyHere(KEY key, MASK mask); - void enableSave(BOOL b) {mEnableSave = b;} + void enableSave(bool b) {mEnableSave = b;} // Advanced Script Editor void initButtonBar(); @@ -204,7 +204,7 @@ private: // Show keyword help on F1 protected: void deleteBridges(); void setHelpPage(const std::string& help_string); - void updateDynamicHelp(BOOL immediate = FALSE); + void updateDynamicHelp(bool immediate = false); bool isKeyword(LLKeywordToken* token); void addHelpItemToHistory(const std::string& help_string); static void onErrorList(LLUICtrl*, void* user_data); @@ -218,13 +218,13 @@ private: LLScriptEditor* mEditor; void (*mLoadCallback)(void* userdata); // FIRE-7514: Script in external editor needs to be saved twice - //void (*mSaveCallback)(void* userdata, BOOL close_after_save); - void (*mSaveCallback)(void* userdata, BOOL close_after_save, bool sync); + //void (*mSaveCallback)(void* userdata, bool close_after_save); + void (*mSaveCallback)(void* userdata, bool close_after_save, bool sync); // void (*mSearchReplaceCallback) (void* userdata); void* mUserdata; LLComboBox *mFunctions; - BOOL mForceClose; + bool mForceClose; LLPanel* mCodePanel; LLScrollListCtrl* mErrorList; std::vector mBridges; @@ -232,12 +232,12 @@ private: LLKeywordToken* mLastHelpToken; LLFrameTimer mLiveHelpTimer; S32 mLiveHelpHistorySize; - BOOL mEnableSave; - BOOL mHasScriptData; + bool mEnableSave; + bool mHasScriptData; LLLiveLSLFile* mLiveFile; LLUUID mAssociatedExperience; - BOOL mScriptRemoved; - BOOL mSaveDialogShown; + bool mScriptRemoved; + bool mSaveDialogShown; LLUUID mAssetID; LLTextBox* mLineCol; @@ -327,8 +327,8 @@ protected: static void onSearchReplace(void* userdata); static void onLoad(void* userdata); // FIRE-7514: Script in external editor needs to be saved twice - //static void onSave(void* userdata, BOOL close_after_save); - static void onSave(void* userdata, BOOL close_after_save, bool sync); + //static void onSave(void* userdata, bool close_after_save); + static void onSave(void* userdata, bool close_after_save, bool sync); // static void onLoadComplete(const LLUUID& uuid, @@ -365,7 +365,7 @@ public: /*virtual*/ bool postBuild(); - void setIsNew() { mIsNew = TRUE; } + void setIsNew() { mIsNew = true; } // [SL:KB] - Patch: UI-FloaterSearchReplace | Checked: 2010-11-05 (Catznip-2.3.0a) | Added: Catznip-2.3.0a LLScriptEditor* getEditor() { return (mScriptEd) ? mScriptEd->mEditor : NULL; } @@ -388,14 +388,14 @@ private: virtual void loadAsset(); /*virtual*/ void saveIfNeeded(bool sync = true); - BOOL monoChecked() const; + bool monoChecked() const; static void onSearchReplace(void* userdata); static void onLoad(void* userdata); // FIRE-7514: Script in external editor needs to be saved twice - //static void onSave(void* userdata, BOOL close_after_save); - static void onSave(void* userdata, BOOL close_after_save, bool sync); + //static void onSave(void* userdata, bool close_after_save); + static void onSave(void* userdata, bool close_after_save, bool sync); // static void onLoadComplete(const LLUUID& asset_uuid, @@ -417,20 +417,20 @@ private: bool mIsNew; //LLUUID mTransmitID; //LLCheckBoxCtrl* mRunningCheckbox; - BOOL mAskedForRunningInfo; - BOOL mHaveRunningInfo; + bool mAskedForRunningInfo; + bool mHaveRunningInfo; //LLButton* mResetButton; LLPointer mItem; - BOOL mCloseAfterSave; + bool mCloseAfterSave; // need to save both text and script, so need to decide when done S32 mPendingUploads; - BOOL mIsSaving; + bool mIsSaving; - BOOL getIsModifiable() const { return mIsModifiable; } // Evaluated on load assert + bool getIsModifiable() const { return mIsModifiable; } // Evaluated on load assert LLCheckBoxCtrl* mMonoCheckbox; - BOOL mIsModifiable; + bool mIsModifiable; LLComboBox* mExperiences; diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index e2734b5ff3..3cb17bc04a 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -91,16 +91,16 @@ std::string checkFileExtension(const std::string& filename, LLPreviewTexture::EF LLPreviewTexture::LLPreviewTexture(const LLSD& key) : LLPreview((key.has("uuid") ? key.get("uuid") : key)), // Changed for texture preview mode - mLoadingFullImage( FALSE ), - mShowKeepDiscard(FALSE), - mCopyToInv(FALSE), - mIsCopyable(FALSE), - mIsFullPerm(FALSE), - mUpdateDimensions(TRUE), + mLoadingFullImage( false ), + mShowKeepDiscard(false), + mCopyToInv(false), + mIsCopyable(false), + mIsFullPerm(false), + mUpdateDimensions(true), mLastHeight(0), mLastWidth(0), mAspectRatio(0.f), - mPreviewToSave(FALSE), + mPreviewToSave(false), mImage(NULL), mImageOldBoostLevel(LLGLTexture::BOOST_NONE), mShowingButtons(false), @@ -110,16 +110,16 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) updateImageID(); if (key.has("save_as")) { - mPreviewToSave = TRUE; + mPreviewToSave = true; } // Texture preview mode if (key.has("preview_only")) { - mShowKeepDiscard = FALSE; - mCopyToInv = FALSE; - mIsCopyable = FALSE; - mPreviewToSave = FALSE; - mIsFullPerm = FALSE; + mShowKeepDiscard = false; + mCopyToInv = false; + mIsCopyable = false; + mPreviewToSave = false; + mIsFullPerm = false; } } @@ -205,7 +205,7 @@ bool LLPreviewTexture::postBuild() getChild("desc")->setValue(item->getDescription()); getChild("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); } - BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID()); + bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID()); if (source_library) { getChildView("Discard")->setEnabled(false); @@ -231,9 +231,9 @@ bool LLPreviewTexture::postBuild() // trying to mark text if (findChild("uploader")) { - getChild("uploader")->setEnabled(FALSE); - getChild("upload_time")->setEnabled(FALSE); - getChild("uuid")->setEnabled(FALSE); + getChild("uploader")->setEnabled(false); + getChild("upload_time")->setEnabled(false); + getChild("uuid")->setEnabled(false); } // @@ -446,7 +446,7 @@ void LLPreviewTexture::saveTextureToFile(const std::vector& filenam const LLInventoryItem* item = getItem(); if (item && mPreviewToSave) { - mPreviewToSave = FALSE; + mPreviewToSave = false; LLFloaterReg::showTypedInstance("preview_texture", item->getUUID()); } @@ -455,7 +455,7 @@ void LLPreviewTexture::saveTextureToFile(const std::vector& filenam //mSaveFileName = filenames[0]; mSaveFileName = checkFileExtension(filenames[0], format); // - mLoadingFullImage = TRUE; + mLoadingFullImage = true; getWindow()->incBusyCount(); mImage->forceToSaveRawImage(0);//re-fetch the raw image if the old one is removed. @@ -463,7 +463,7 @@ void LLPreviewTexture::saveTextureToFile(const std::vector& filenam //mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSave, mImage->setLoadedCallback(callback, // - 0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList); + 0, true, false, new LLUUID(mItemUUID), &mCallbackTextureList); // FIRE-22851: Show texture "Save as" file picker subsequently instead all at once saveMultiple(remaining_ids); @@ -505,22 +505,22 @@ void LLPreviewTexture::saveMultipleToFile(const std::string& file_name) mSaveFileName = filepath; - mLoadingFullImage = TRUE; + mLoadingFullImage = true; getWindow()->incBusyCount(); mImage->forceToSaveRawImage(0);//re-fetch the raw image if the old one is removed. // Allow to use user-defined default save format for textures //mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSavePNG, - // 0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList); + // 0, true, false, new LLUUID(mItemUUID), &mCallbackTextureList); if (gSavedSettings.getBOOL("FSTextureDefaultSaveAsFormat")) { mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSavePNG, - 0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList); + 0, true, false, new LLUUID(mItemUUID), &mCallbackTextureList); } else { mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSaveTGA, - 0, TRUE, FALSE, new LLUUID(mItemUUID), &mCallbackTextureList); + 0, true, false, new LLUUID(mItemUUID), &mCallbackTextureList); } // } @@ -607,7 +607,7 @@ void LLPreviewTexture::onFocusReceived() void LLPreviewTexture::openToSave() { - mPreviewToSave = TRUE; + mPreviewToSave = true; } // Texture preview mode @@ -623,12 +623,12 @@ void LLPreviewTexture::openToSave() // // static -void LLPreviewTexture::onFileLoadedForSaveTGA(BOOL success, +void LLPreviewTexture::onFileLoadedForSaveTGA(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata) { LLUUID* item_uuid = (LLUUID*) userdata; @@ -642,7 +642,7 @@ void LLPreviewTexture::onFileLoadedForSaveTGA(BOOL success, if( self ) { self->getWindow()->decBusyCount(); - self->mLoadingFullImage = FALSE; + self->mLoadingFullImage = false; } } @@ -698,12 +698,12 @@ void LLPreviewTexture::onFileLoadedForSaveTGA(BOOL success, } // static -void LLPreviewTexture::onFileLoadedForSavePNG(BOOL success, +void LLPreviewTexture::onFileLoadedForSavePNG(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata) { LLUUID* item_uuid = (LLUUID*) userdata; @@ -717,7 +717,7 @@ void LLPreviewTexture::onFileLoadedForSavePNG(BOOL success, if( self ) { self->getWindow()->decBusyCount(); - self->mLoadingFullImage = FALSE; + self->mLoadingFullImage = false; } } @@ -797,25 +797,25 @@ void LLPreviewTexture::updateDimensions() // Reshape the floater only when required if (mUpdateDimensions) { - mUpdateDimensions = FALSE; + mUpdateDimensions = false; // : Show image at full resolution if possible //reshape floater //reshape(getRect().getWidth(), getRect().getHeight()); - //gFloaterView->adjustToFitScreen(this, FALSE); + //gFloaterView->adjustToFitScreen(this, false); // Move dimensions panel into correct position depending // if any of the buttons is shown LLView* button_panel = getChildView("button_panel"); LLView* dimensions_panel = getChildView("dimensions_panel"); - dimensions_panel->setVisible(TRUE); + dimensions_panel->setVisible(true); if (!getChildView("Keep")->getVisible() && !getChildView("Discard")->getVisible() && !getChildView("btn_refresh")->getVisible() && // FIRE-20150: Add refresh button to texture preview !getChildView("save_tex_btn")->getVisible()) { - button_panel->setVisible(FALSE); + button_panel->setVisible(false); if (mShowingButtons) { dimensions_panel->translate(0, -button_panel->getRect().mTop); @@ -824,7 +824,7 @@ void LLPreviewTexture::updateDimensions() } else { - button_panel->setVisible(TRUE); + button_panel->setVisible(true); if (!mShowingButtons) { dimensions_panel->translate(0, button_panel->getRect().mTop); @@ -839,7 +839,7 @@ void LLPreviewTexture::updateDimensions() bool adjust_height = false; if (mImage->mComment.find("a") != mImage->mComment.end()) { - getChildView("uploader_date_time")->setVisible(TRUE); + getChildView("uploader_date_time")->setVisible(true); LLUUID id = LLUUID(mImage->mComment["a"]); std::string name; LLAvatarName avatar_name; @@ -868,7 +868,7 @@ void LLPreviewTexture::updateDimensions() { if (!adjust_height) { - getChildView("uploader_date_time")->setVisible(TRUE); + getChildView("uploader_date_time")->setVisible(true); adjust_height = true; } std::string date_time = mImage->mComment["z"]; @@ -882,7 +882,7 @@ void LLPreviewTexture::updateDimensions() // add extra space for uploader and date_time if (adjust_height) { - getChildView("openprofile")->setVisible(TRUE); + getChildView("openprofile")->setVisible(true); additional_height += (getChild("uploader_date_time")->getTextBoundingRect().getHeight()); } } @@ -891,7 +891,7 @@ void LLPreviewTexture::updateDimensions() // AnsaStorm skin if (mImage->mComment.find("a") != mImage->mComment.end()) { - getChild("openprofile")->setEnabled(TRUE); + getChild("openprofile")->setEnabled(true); LLUUID id = LLUUID(mImage->mComment["a"]); std::string name; LLAvatarName avatar_name; @@ -933,14 +933,14 @@ void LLPreviewTexture::updateDimensions() LLView* uploadtime_view = getChildView("upload_time"); LLView* uuid_view = getChildView("uuid"); - uploader_view->setVisible(TRUE); - uploadtime_view->setVisible(TRUE); - uuid_view->setVisible(TRUE); - getChildView("openprofile")->setVisible(TRUE); - getChildView("copyuuid")->setVisible(TRUE); - getChildView("uploader_label")->setVisible(TRUE); - getChildView("upload_time_label")->setVisible(TRUE); - getChildView("uuid_label")->setVisible(TRUE); + uploader_view->setVisible(true); + uploadtime_view->setVisible(true); + uuid_view->setVisible(true); + getChildView("openprofile")->setVisible(true); + getChildView("copyuuid")->setVisible(true); + getChildView("uploader_label")->setVisible(true); + getChildView("upload_time_label")->setVisible(true); + getChildView("uuid_label")->setVisible(true); additional_height = uploader_view->getRect().getHeight() + uploadtime_view->getRect().getHeight() + uuid_view->getRect().getHeight() + 3 * PREVIEW_VPAD; } @@ -971,7 +971,7 @@ void LLPreviewTexture::updateDimensions() host->growToFit(floater_target_width, floater_target_height); } reshape(floater_target_width, floater_target_height); - gFloaterView->adjustToFitScreen(this, FALSE); + gFloaterView->adjustToFitScreen(this, false); // : Show image at full resolution if possible LLRect dim_rect(getChildView("dimensions")->getRect()); @@ -982,8 +982,8 @@ void LLPreviewTexture::updateDimensions() if (mIsFullPerm) { LLView* copy_uuid_btn = getChildView("copyuuid"); - copy_uuid_btn->setVisible(TRUE); - copy_uuid_btn->setEnabled(TRUE); + copy_uuid_btn->setVisible(true); + copy_uuid_btn->setEnabled(true); } // } @@ -1002,7 +1002,7 @@ void LLPreviewTexture::callbackLoadName(const LLUUID& agent_id, const LLAvatarNa { mUploaderDateTime.setArg("[UPLOADER]", av_name.getCompleteName()); getChild("uploader_date_time")->setText(mUploaderDateTime.getString()); - mUpdateDimensions = TRUE; + mUpdateDimensions = true; } else if (findChild("uploader")) { @@ -1027,17 +1027,17 @@ void LLPreviewTexture::onButtonClickUUID() } /* static */ -void LLPreviewTexture::onTextureLoaded(BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +void LLPreviewTexture::onTextureLoaded(bool success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata) { LLPreviewTexture* self = (LLPreviewTexture*)userdata; - self->mUpdateDimensions = TRUE; + self->mUpdateDimensions = true; } // texture comment decoder // Return true if everything went fine, false if we somewhat modified the ratio as we bumped on border values bool LLPreviewTexture::setAspectRatio(const F32 width, const F32 height) { - mUpdateDimensions = TRUE; + mUpdateDimensions = true; // We don't allow negative width or height. Also, if height is positive but too small, we reset to default // A default 0.f value for mAspectRatio means "unconstrained" in the rest of the code @@ -1089,10 +1089,10 @@ void LLPreviewTexture::loadAsset() // mImage->forceToSaveRawImage(0) ; // texture comment decoder - mImage->setLoadedCallback(LLPreviewTexture::onTextureLoaded, 0, TRUE, FALSE, this, &mCallbackTextureList); + mImage->setLoadedCallback(LLPreviewTexture::onTextureLoaded, 0, true, false, this, &mCallbackTextureList); // mAssetStatus = PREVIEW_ASSET_LOADING; - mUpdateDimensions = TRUE; + mUpdateDimensions = true; updateDimensions(); getChildView("save_tex_btn")->setEnabled(canSaveAs()); getChildView("save_tex_btn")->setVisible(canSaveAs()); @@ -1104,7 +1104,7 @@ void LLPreviewTexture::loadAsset() else { // check that we can remove item - BOOL source_library = gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID()); + bool source_library = gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID()); if (source_library) { getChildView("Discard")->setEnabled(false); @@ -1172,7 +1172,7 @@ void LLPreviewTexture::adjustAspectRatio() } } - mUpdateDimensions = TRUE; + mUpdateDimensions = true; } void LLPreviewTexture::updateImageID() @@ -1185,9 +1185,9 @@ void LLPreviewTexture::updateImageID() // here's the old logic... //mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID(); // here's the new logic... 'cos we hate disappearing buttons. - mShowKeepDiscard = TRUE; + mShowKeepDiscard = true; - mCopyToInv = FALSE; + mCopyToInv = false; LLPermissions perm(item->getPermissions()); mIsCopyable = perm.allowCopyBy(gAgent.getID(), gAgent.getGroupID()) && perm.allowTransferTo(gAgent.getID()); mIsFullPerm = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); @@ -1195,10 +1195,10 @@ void LLPreviewTexture::updateImageID() else // not an item, assume it's an asset id { mImageID = mItemUUID; - mShowKeepDiscard = FALSE; - mCopyToInv = TRUE; - mIsCopyable = TRUE; - mIsFullPerm = TRUE; + mShowKeepDiscard = false; + mCopyToInv = true; + mIsCopyable = true; + mIsFullPerm = true; } } diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 5bd70116c1..858810ea9a 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -68,20 +68,20 @@ public: virtual void onFocusReceived(); static void onFileLoadedForSaveTGA( - BOOL success, + bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata ); static void onFileLoadedForSavePNG( - BOOL success, + bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, - BOOL final, + bool final, void* userdata ); void openToSave(); @@ -102,11 +102,11 @@ public: void callbackLoadName(const LLUUID& agent_id, const LLAvatarName& av_name); void onButtonClickProfile(); void onButtonClickUUID(); - static void onTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + static void onTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata); // // For requesting dimensions update - void setUpdateDimensions(BOOL update) { mUpdateDimensions = update; } + void setUpdateDimensions(bool update) { mUpdateDimensions = update; } // FIRE-20150: Add refresh button to texture preview void onButtonRefresh(); @@ -130,18 +130,18 @@ private: S32 mImageOldBoostLevel; std::string mSaveFileName; LLFrameTimer mSavedFileTimer; - BOOL mLoadingFullImage; - BOOL mShowKeepDiscard; - BOOL mCopyToInv; + bool mLoadingFullImage; + bool mShowKeepDiscard; + bool mCopyToInv; // Save the image once it's loaded. - BOOL mPreviewToSave; + bool mPreviewToSave; // This is stored off in a member variable, because the save-as // button and drag and drop functionality need to know. - BOOL mIsCopyable; - BOOL mIsFullPerm; - BOOL mUpdateDimensions; + bool mIsCopyable; + bool mIsFullPerm; + bool mUpdateDimensions; S32 mLastHeight; S32 mLastWidth; F32 mAspectRatio; diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp index a82fce44f0..e7773d0638 100644 --- a/indra/newview/llprogressview.cpp +++ b/indra/newview/llprogressview.cpp @@ -199,20 +199,20 @@ void LLProgressView::revealIntroPanel() std::string intro_url = gSavedSettings.getString("PostFirstLoginIntroURL"); if ( intro_url.length() > 0 && gSavedSettings.getBOOL("BrowserJavascriptEnabled") && - gSavedSettings.getBOOL("PostFirstLoginIntroViewed" ) == FALSE ) + gSavedSettings.getBOOL("PostFirstLoginIntroViewed" ) == false ) { // hide the progress bar getChild("stack1")->setVisible(false); // navigate to intro URL and reveal widget mMediaCtrl->navigateTo( intro_url ); - mMediaCtrl->setVisible( TRUE ); + mMediaCtrl->setVisible( true ); // flag as having seen the new user post login intro gSavedSettings.setBOOL("PostFirstLoginIntroViewed", true ); - mMediaCtrl->setFocus(TRUE); + mMediaCtrl->setFocus(true); } mFadeFromLoginTimer.start(); @@ -249,20 +249,20 @@ void LLProgressView::setVisible(bool visible) // showing progress view else if (visible && (!getVisible() || mFadeToWorldTimer.getStarted())) { - setFocus(TRUE); + setFocus(true); mFadeToWorldTimer.stop(); LLPanel::setVisible(true); } } // Fade teleport screens -void LLProgressView::fade(BOOL in) +void LLProgressView::fade(bool in) { if(in) { mFadeFromLoginTimer.start(); mFadeToWorldTimer.stop(); - setVisible(TRUE); + setVisible(true); } else { @@ -330,7 +330,7 @@ void LLProgressView::drawLogos(F32 alpha) iter->mDrawRect.getHeight(), iter->mTexturep.get(), UI_VERTEX_COLOR % alpha, - FALSE, + false, iter->mClipRect, iter->mOffsetRect); } @@ -377,7 +377,7 @@ void LLProgressView::draw() gFocusMgr.releaseFocusIfNeeded( this ); // turn off panel that hosts intro so we see the world - setVisible(FALSE); + setVisible(false); // stop observing events since we no longer care mMediaCtrl->remObserver( this ); @@ -447,7 +447,7 @@ void LLProgressView::loadLogo(const std::string &path, raw->expandToPowerOfTwo(); TextureData data; - data.mTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); + data.mTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false); data.mDrawRect = pos_rect; data.mClipRect = clip_rect; data.mOffsetRect = offset_rect; @@ -584,7 +584,7 @@ void LLProgressView::initStartTexture(S32 location_id, bool is_in_production) { // HACK: getLocalTexture allows only power of two dimentions raw->expandToPowerOfTwo(); - gStartTexture = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); + gStartTexture = LLViewerTextureManager::getLocalTexture(raw.get(), false); } } @@ -601,8 +601,8 @@ void LLProgressView::initTextures(S32 location_id, bool is_in_production) initStartTexture(location_id, is_in_production); initLogos(); - childSetVisible("panel_icons", mLogosList.empty() ? FALSE : TRUE); - childSetVisible("panel_top_spacer", mLogosList.empty() ? TRUE : FALSE); + childSetVisible("panel_icons", mLogosList.empty() ? false : true); + childSetVisible("panel_top_spacer", mLogosList.empty() ? true : false); } void LLProgressView::releaseTextures() @@ -610,11 +610,11 @@ void LLProgressView::releaseTextures() gStartTexture = NULL; mLogosList.clear(); - childSetVisible("panel_top_spacer", TRUE); - childSetVisible("panel_icons", FALSE); + childSetVisible("panel_top_spacer", true); + childSetVisible("panel_icons", false); } -void LLProgressView::setCancelButtonVisible(BOOL b, const std::string& label) +void LLProgressView::setCancelButtonVisible(bool b, const std::string& label) { mCancelBtn->setVisible( b ); mCancelBtn->setEnabled( b ); @@ -636,8 +636,8 @@ void LLProgressView::onCancelButtonClicked(void*) else { gAgent.teleportCancel(); - sInstance->mCancelBtn->setEnabled(FALSE); - sInstance->setVisible(FALSE); + sInstance->mCancelBtn->setEnabled(false); + sInstance->setVisible(false); } } diff --git a/indra/newview/llprogressview.h b/indra/newview/llprogressview.h index 48fa640846..1e84774fb7 100644 --- a/indra/newview/llprogressview.h +++ b/indra/newview/llprogressview.h @@ -71,7 +71,7 @@ public: // turns on (under certain circumstances) the into video after login void revealIntroPanel(); - void fade(BOOL in); // ## Zi: Fade teleport screens + void fade(bool in); // ## Zi: Fade teleport screens void setStartupComplete(); @@ -79,7 +79,7 @@ public: void initTextures(S32 location_id, bool is_in_production); void releaseTextures(); - void setCancelButtonVisible(BOOL b, const std::string& label); + void setCancelButtonVisible(bool b, const std::string& label); static void onCancelButtonClicked( void* ); static void onClickMessage(void*); diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index aa905bf2f8..47f01a170c 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -36,8 +36,8 @@ #include "llenvironment.h" #include "llstartup.h" -extern BOOL gCubeSnapshot; -extern BOOL gTeleportDisplay; +extern bool gCubeSnapshot; +extern bool gTeleportDisplay; static U32 sUpdateCount = 0; @@ -1282,7 +1282,7 @@ void LLReflectionMapManager::initReflectionMaps() mTexture->allocate(mProbeResolution, 3, mReflectionProbeCount + 2); mIrradianceMaps = new LLCubeMapArray(); - mIrradianceMaps->allocate(LL_IRRADIANCE_MAP_RESOLUTION, 3, mReflectionProbeCount, FALSE); + mIrradianceMaps->allocate(LL_IRRADIANCE_MAP_RESOLUTION, 3, mReflectionProbeCount, false); } // reset probe state diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp index 6caec6ec4a..a03c66bef7 100644 --- a/indra/newview/llregioninfomodel.cpp +++ b/indra/newview/llregioninfomodel.cpp @@ -92,8 +92,8 @@ void LLRegionInfoModel::sendRegionTerrain(const LLUUID& invoice) const // strings[8] = from estate, float sun_hour // *NOTE: this resets estate sun info. - BOOL estate_global_time = true; - BOOL estate_fixed_sun = false; + bool estate_global_time = true; + bool estate_fixed_sun = false; F32 estate_sun_hour = 0.f; buffer = llformat("%f", mWaterHeight); diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 2c3c7dc149..b5e2a99007 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -154,7 +154,7 @@ void LLSceneMonitor::generateDitheringTexture(S32 width, S32 height) } } - mDitheringTexture = LLViewerTextureManager::getLocalTexture(image_raw.get(), FALSE) ; + mDitheringTexture = LLViewerTextureManager::getLocalTexture(image_raw.get(), false) ; mDitheringTexture->setAddressMode(LLTexUnit::TAM_WRAP); mDitheringTexture->setFilteringOption(LLTexUnit::TFO_POINT); @@ -686,7 +686,7 @@ LLSceneMonitorView::LLSceneMonitorView(const LLRect& rect) : LLFloater(LLSD()) { setRect(rect); - setVisible(FALSE); + setVisible(false); setCanMinimize(false); setCanClose(true); diff --git a/indra/newview/llsceneview.cpp b/indra/newview/llsceneview.cpp index d9df846a5c..852b28bef5 100644 --- a/indra/newview/llsceneview.cpp +++ b/indra/newview/llsceneview.cpp @@ -46,7 +46,7 @@ LLSceneView::LLSceneView(const LLRect& rect) : LLFloater(LLSD()) { setRect(rect); - setVisible(FALSE); + setVisible(false); setCanMinimize(false); setCanClose(true); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index e44000d9fb..806d49528e 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -69,11 +69,11 @@ LLRect LLScreenChannelBase::getChannelRect() if (gSavedSettings.getBOOL("InternalShowGroupNoticesTopRight")) { mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container"); - gViewerWindow->getRootView()->getChildView("chiclet_container_bottom")->setVisible(FALSE); + gViewerWindow->getRootView()->getChildView("chiclet_container_bottom")->setVisible(false); } else { - gViewerWindow->getRootView()->getChildView("chiclet_container")->setVisible(FALSE); + gViewerWindow->getRootView()->getChildView("chiclet_container")->setVisible(false); mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container_bottom"); } // Group notices, IMs and chiclets position @@ -123,7 +123,7 @@ LLScreenChannelBase::LLScreenChannelBase(const Params& p) mID = p.id; setMouseOpaque( false ); - setVisible(FALSE); + setVisible(false); } bool LLScreenChannelBase::postBuild() @@ -142,12 +142,12 @@ bool LLScreenChannelBase::postBuild() if (gSavedSettings.getBOOL("InternalShowGroupNoticesTopRight")) { mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container"); - gViewerWindow->getRootView()->getChildView("chiclet_container_bottom")->setVisible(FALSE); + gViewerWindow->getRootView()->getChildView("chiclet_container_bottom")->setVisible(false); } else { mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container_bottom"); - gViewerWindow->getRootView()->getChildView("chiclet_container")->setVisible(FALSE); + gViewerWindow->getRootView()->getChildView("chiclet_container")->setVisible(false); } // } @@ -206,7 +206,7 @@ void LLScreenChannelBase::init(S32 channel_left, S32 channel_right) // top and bottom set by updateRect() setRect(LLRect(channel_left, 0, channel_right, 0)); updateRect(); - setVisible(TRUE); + setVisible(true); } void LLScreenChannelBase::updateRect() @@ -657,7 +657,7 @@ void LLScreenChannel::showToastsBottom() LLDockableFloater* floater = dynamic_cast(LLDockableFloater::getInstanceHandle().get()); // Show toasts in front of other floaters - BOOL toasts_in_front = gSavedSettings.getBOOL("FSShowToastsInFront"); + bool toasts_in_front = gSavedSettings.getBOOL("FSShowToastsInFront"); // Use a local variable instead of mToastList. // mToastList can be modified during recursive calls and then all iteratos will be invalidated. @@ -746,7 +746,7 @@ void LLScreenChannel::showToastsBottom() { // HACK // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts - toast->setVisible(TRUE); + toast->setVisible(true); } // Show toasts in front of other floaters //if(!toast->hasFocus()) @@ -802,7 +802,7 @@ void LLScreenChannel::showToastsCentre() toast_rect.setLeftTopAndSize(getRect().mLeft - toast_rect.getWidth() / 2, bottom + toast_rect.getHeight() / 2 + gSavedSettings.getS32("ToastGap"), toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); - toast->setVisible(TRUE); + toast->setVisible(true); } } @@ -821,7 +821,7 @@ void LLScreenChannel::showToastsTop() LLDockableFloater* floater = dynamic_cast(LLDockableFloater::getInstanceHandle().get()); // Show toasts in front of other floaters - BOOL toasts_in_front = gSavedSettings.getBOOL("FSShowToastsInFront"); + bool toasts_in_front = gSavedSettings.getBOOL("FSShowToastsInFront"); // Use a local variable instead of mToastList. // mToastList can be modified during recursive calls and then all iteratos will be invalidated. @@ -908,7 +908,7 @@ void LLScreenChannel::showToastsTop() { // HACK // EXT-2653: it is necessary to prevent overlapping for secondary showed toasts - toast->setVisible(TRUE); + toast->setVisible(true); } // Show toasts in front of other floaters //if (!toast->hasFocus()) @@ -971,7 +971,7 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) mStartUpToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true); text_box->setValue(text); - text_box->setVisible(TRUE); + text_box->setVisible(true); text_box->reshapeToFitText(); text_box->setOrigin(text_box->getRect().mLeft, (wrapper_panel->getRect().getHeight() - text_box->getRect().getHeight())/2); @@ -981,7 +981,7 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) addChild(mStartUpToastPanel); - mStartUpToastPanel->setVisible(TRUE); + mStartUpToastPanel->setVisible(true); } // static -------------------------------------------------------------------------- @@ -1016,7 +1016,7 @@ void LLScreenChannel::closeStartUpToast() { if(mStartUpToastPanel != NULL) { - mStartUpToastPanel->setVisible(FALSE); + mStartUpToastPanel->setVisible(false); mStartUpToastPanel = NULL; } } @@ -1048,7 +1048,7 @@ void LLScreenChannel::hideToastsFromScreen() LLToast* toast = it->getToast(); if (toast) { - toast->setVisible(FALSE); + toast->setVisible(false); } else { diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 23473fdfe6..b2bd155320 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -122,7 +122,7 @@ void LLScriptEditor::drawLineNumbers() const LLFontGL *num_font = getFont(); // const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum )); - BOOL is_cur_line = cursor_line == line.mLineNum; + bool is_cur_line = cursor_line == line.mLineNum; const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL; const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor; num_font->render( diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index 7fed3479d2..dc922a4042 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -100,8 +100,8 @@ bool LLScriptFloater::toggle(const LLUUID& notification_id) } else { - floater->setVisible(TRUE); - floater->setFocus(FALSE); + floater->setVisible(true); + floater->setFocus(false); } } // create and show new floater @@ -130,7 +130,7 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id) floater->createForm(notification_id); //LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445) - floater->setAutoFocus(FALSE); + floater->setAutoFocus(false); if(LLScriptFloaterManager::OBJ_SCRIPT == LLScriptFloaterManager::getObjectType(notification_id)) { @@ -143,7 +143,7 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id) } //LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445) - LLFloaterReg::showTypedInstance("script_floater", notification_id, FALSE); + LLFloaterReg::showTypedInstance("script_floater", notification_id, false); return floater; } @@ -229,7 +229,7 @@ void LLScriptFloater::onStackClicked() const LLUUID& next_notification = DialogStack::instance().flip(getNotificationId()); floater = LLFloaterReg::getTypedInstance("script_floater", next_notification); } - gFloaterView->bringToFront(floater, TRUE); + gFloaterView->bringToFront(floater, true); } // @@ -944,11 +944,11 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id) floater->createForm(notification_id); //LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445) - floater->setAutoFocus(FALSE); + floater->setAutoFocus(false); eDialogPosition dialog_position = (eDialogPosition)gSavedSettings.getS32("ScriptDialogsPosition"); - BOOL chicletsDisabled = gSavedSettings.getBOOL("FSDisableIMChiclets"); + bool chicletsDisabled = gSavedSettings.getBOOL("FSDisableIMChiclets"); if (dialog_position == POS_DOCKED && chicletsDisabled) { @@ -1036,7 +1036,7 @@ LLScriptFloater* LLScriptFloater::show(const LLUUID& notification_id) } //LLDialog(LLGiveInventory and LLLoadURL) should no longer steal focus (see EXT-5445) - LLFloaterReg::showTypedInstance("script_floater", notification_id, FALSE); + LLFloaterReg::showTypedInstance("script_floater", notification_id, false); if (!floater->isDocked()) { diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index e34a8d1c9f..de82002106 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -50,7 +50,7 @@ const S32 LLScrollingPanelParam::PARAM_HINT_HEIGHT = 128; S32 LLScrollingPanelParam::sUpdateDelayFrames = 0; LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_params, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints ) + LLViewerJointMesh* mesh, LLViewerVisualParam* param, bool allow_modify, LLWearable* wearable, LLJoint* jointp, bool use_hints ) : LLScrollingPanelParamBase( panel_params, mesh, param, allow_modify, wearable, jointp, use_hints) { // *HACK To avoid hard coding texture position, lets use border's position for texture. @@ -66,8 +66,8 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param pos_x = getChild("right_border")->getRect().mLeft + left_border->getBorderWidth(); mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), wearable, max_weight, jointp ); - mHintMin->setAllowsUpdates( FALSE ); - mHintMax->setAllowsUpdates( FALSE ); + mHintMin->setAllowsUpdates( false ); + mHintMax->setAllowsUpdates( false ); std::string min_name = LLTrans::getString(param->getMinDisplayName()); std::string max_name = LLTrans::getString(param->getMaxDisplayName()); @@ -92,8 +92,8 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param more->setHeldDownDelay( PARAM_STEP_TIME_THRESHOLD ); } - setVisible(FALSE); - setBorderVisible( FALSE ); + setVisible(false); + setBorderVisible( false ); } LLScrollingPanelParam::~LLScrollingPanelParam() @@ -149,8 +149,8 @@ void LLScrollingPanelParam::draw() getChildView("right_border")->setVisible( !mHintMax->getVisible()); // Draw all the children except for the labels - getChildView("min param text")->setVisible( FALSE ); - getChildView("max param text")->setVisible( FALSE ); + getChildView("min param text")->setVisible( false ); + getChildView("max param text")->setVisible( false ); LLPanel::draw(); // If we're in a focused floater, don't apply the floater's alpha to visual param hint, @@ -176,10 +176,10 @@ void LLScrollingPanelParam::draw() // Draw labels on top of the buttons - getChildView("min param text")->setVisible( TRUE ); + getChildView("min param text")->setVisible( true ); drawChild(getChild("min param text")); - getChildView("max param text")->setVisible( TRUE ); + getChildView("max param text")->setVisible( true ); drawChild(getChild("max param text")); } diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h index 59780e16fe..6a510026da 100644 --- a/indra/newview/llscrollingpanelparam.h +++ b/indra/newview/llscrollingpanelparam.h @@ -41,7 +41,7 @@ class LLScrollingPanelParam : public LLScrollingPanelParamBase { public: LLScrollingPanelParam( const LLPanel::Params& panel_params, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = TRUE ); + LLViewerJointMesh* mesh, LLViewerVisualParam* param, bool allow_modify, LLWearable* wearable, LLJoint* jointp, bool use_hints = true ); virtual ~LLScrollingPanelParam(); void draw() override; @@ -79,7 +79,7 @@ public: protected: LLTimer mMouseDownTimer; // timer for how long mouse has been held down on a hint. F32 mLastHeldTime; - BOOL mAllowModify; + bool mAllowModify; }; #endif diff --git a/indra/newview/llscrollingpanelparambase.cpp b/indra/newview/llscrollingpanelparambase.cpp index ef5b946f2f..a0e1043c13 100644 --- a/indra/newview/llscrollingpanelparambase.cpp +++ b/indra/newview/llscrollingpanelparambase.cpp @@ -40,7 +40,7 @@ #include "llvoavatarself.h" LLScrollingPanelParamBase::LLScrollingPanelParamBase( const LLPanel::Params& panel_params, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints) + LLViewerJointMesh* mesh, LLViewerVisualParam* param, bool allow_modify, LLWearable* wearable, LLJoint* jointp, bool use_hints) : LLScrollingPanel( panel_params ), mParam(param), mAllowModify(allow_modify), @@ -58,8 +58,8 @@ LLScrollingPanelParamBase::LLScrollingPanelParamBase( const LLPanel::Params& pan getChildView("param slider")->setEnabled(mAllowModify); childSetCommitCallback("param slider", LLScrollingPanelParamBase::onSliderMoved, this); - setVisible(FALSE); - setBorderVisible( FALSE ); + setVisible(false); + setBorderVisible( false ); } LLScrollingPanelParamBase::~LLScrollingPanelParamBase() diff --git a/indra/newview/llscrollingpanelparambase.h b/indra/newview/llscrollingpanelparambase.h index 5a441985d3..fd686636f2 100644 --- a/indra/newview/llscrollingpanelparambase.h +++ b/indra/newview/llscrollingpanelparambase.h @@ -42,7 +42,7 @@ class LLScrollingPanelParamBase : public LLScrollingPanel { public: LLScrollingPanelParamBase( const LLPanel::Params& panel_params, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp, BOOL use_hints = FALSE ); + LLViewerJointMesh* mesh, LLViewerVisualParam* param, bool allow_modify, LLWearable* wearable, LLJoint* jointp, bool use_hints = false ); virtual ~LLScrollingPanelParamBase(); void updatePanel(bool allow_modify) override; @@ -55,7 +55,7 @@ public: public: LLViewerVisualParam* mParam; protected: - BOOL mAllowModify; + bool mAllowModify; LLWearable *mWearable; }; diff --git a/indra/newview/llsearchableui.cpp b/indra/newview/llsearchableui.cpp index 7548b178b9..a71e4a79eb 100644 --- a/indra/newview/llsearchableui.cpp +++ b/indra/newview/llsearchableui.cpp @@ -136,7 +136,7 @@ void ll::statusbar::SearchableItem::setNotHighlighted( ) if (mWasHiddenBySearch) { - mMenu->setVisible(TRUE); + mMenu->setVisible(true); mWasHiddenBySearch = false; } } @@ -171,7 +171,7 @@ bool ll::statusbar::SearchableItem::hightlightAndHide(LLWString const &aFilter, if (mCtrl && !bVisible && !bHighlighted) { mWasHiddenBySearch = true; - mMenu->setVisible(FALSE); + mMenu->setVisible(false); } return bVisible || bHighlighted; } diff --git a/indra/newview/llsearchcombobox.cpp b/indra/newview/llsearchcombobox.cpp index 16542b993f..06cd3f6842 100644 --- a/indra/newview/llsearchcombobox.cpp +++ b/indra/newview/llsearchcombobox.cpp @@ -71,7 +71,7 @@ LLSearchComboBox::LLSearchComboBox(const Params&p) button_params.click_callback.function(boost::bind(&LLSearchComboBox::onSelectionCommit, this)); mSearchButton = LLUICtrlFactory::create(button_params); mTextEntry->addChild(mSearchButton); - mTextEntry->setPassDelete(TRUE); + mTextEntry->setPassDelete(true); setButtonVisible(p.dropdown_button_visible); mTextEntry->setCommitCallback(boost::bind(&LLComboBox::onTextCommit, this, _2)); @@ -124,7 +124,7 @@ void LLSearchComboBox::onTextEntry(LLLineEditor* line_editor) void LLSearchComboBox::focusTextEntry() { - // We can't use "mTextEntry->setFocus(TRUE)" instead because + // We can't use "mTextEntry->setFocus(true)" instead because // if the "select_on_focus" parameter is true it places the cursor // at the beginning (after selecting text), thus screwing up updateSelection(). if (mTextEntry) @@ -164,9 +164,9 @@ void LLSearchComboBox::onSelectionCommit() setControlValue(search_query); } -BOOL LLSearchComboBox::remove(const std::string& name) +bool LLSearchComboBox::remove(const std::string& name) { - BOOL found = mList->selectItemByLabel(name, FALSE); + bool found = mList->selectItemByLabel(name, false); if (found) { diff --git a/indra/newview/llsearchcombobox.h b/indra/newview/llsearchcombobox.h index 28850979c0..3d572d84df 100644 --- a/indra/newview/llsearchcombobox.h +++ b/indra/newview/llsearchcombobox.h @@ -50,7 +50,7 @@ public: /** * Removes an entry from combo box, case insensitive */ - BOOL remove(const std::string& name); + bool remove(const std::string& name); /** * Clears search history diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp index 63e97d1ad7..28c242dc01 100644 --- a/indra/newview/llsechandler_basic.cpp +++ b/indra/newview/llsechandler_basic.cpp @@ -767,7 +767,7 @@ bool _cert_subdomain_wildcard_match(const std::string& subdomain, if(subdomain.substr(0, wildcard_pos) != wildcard.substr(0, wildcard_pos)) { // the first portions of the strings didn't match - return FALSE; + return false; } // as the portion of the wildcard string before the * matched, we need to check the @@ -776,7 +776,7 @@ bool _cert_subdomain_wildcard_match(const std::string& subdomain, if(new_wildcard_string.empty()) { // we had nothing after the *, so it's an automatic match - return TRUE; + return true; } // grab the portion of the remaining wildcard string before the next '*'. We need to find this @@ -793,14 +793,14 @@ bool _cert_subdomain_wildcard_match(const std::string& subdomain, new_subdomain = new_subdomain.substr(sub_pos, std::string::npos); if(_cert_subdomain_wildcard_match(new_subdomain, new_wildcard_string)) { - return TRUE; + return true; } sub_pos = new_subdomain.find_first_of(new_wildcard_match_string, 1); } // didn't find any instances of the match string that worked in the subdomain, so fail. - return FALSE; + return false; } @@ -845,7 +845,7 @@ bool _cert_hostname_wildcard_match(const std::string& hostname, const std::strin if(!_cert_subdomain_wildcard_match(new_hostname.substr(subdomain_pos+1, std::string::npos), cn_part)) { - return FALSE; + return false; } new_hostname = new_hostname.substr(0, subdomain_pos); new_cn = new_cn.substr(0, subcn_pos); @@ -857,7 +857,7 @@ bool _cert_hostname_wildcard_match(const std::string& hostname, const std::strin if(new_cn == "*") { // if it's just a '*' we support all child domains as well, so '*. - return TRUE; + return true; } return _cert_subdomain_wildcard_match(new_hostname, new_cn); @@ -873,10 +873,10 @@ bool _LLSDArrayIncludesValue(const LLSD& llsd_set, LLSD llsd_value) { if(valueCompareLLSD((*set_value), llsd_value)) { - return TRUE; + return true; } } - return FALSE; + return false; } void _validateCert(int validation_policy, @@ -983,7 +983,7 @@ void _validateCert(int validation_policy, bool _verify_signature(LLPointer parent, LLPointer child) { - bool verify_result = FALSE; + bool verify_result = false; LLSD cert1, cert2; parent->getLLSD(cert1); child->getLLSD(cert2); @@ -1942,7 +1942,7 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs) { if (lhs.type() != rhs.type()) { - return FALSE; + return false; } if (lhs.isMap()) { @@ -1954,7 +1954,7 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs) { if (!rhs.has(litt->first)) { - return FALSE; + return false; } } @@ -1966,14 +1966,14 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs) { if (!lhs.has(ritt->first)) { - return FALSE; + return false; } if (!valueCompareLLSD(lhs[ritt->first], ritt->second)) { - return FALSE; + return false; } } - return TRUE; + return true; } else if (lhs.isArray()) { @@ -1985,7 +1985,7 @@ bool valueCompareLLSD(const LLSD& lhs, const LLSD& rhs) { if (!valueCompareLLSD(*ritt, *litt)) { - return FALSE; + return false; } ritt++; } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index c5122169e8..910ec3cad3 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -130,14 +130,14 @@ const S32 MAX_OBJECTS_PER_PACKET = 254; // Globals // -//BOOL gDebugSelectMgr = FALSE; +//bool gDebugSelectMgr = false; -//BOOL gHideSelectedObjects = FALSE; -//BOOL gAllowSelectAvatar = FALSE; +//bool gHideSelectedObjects = false; +//bool gAllowSelectAvatar = false; -BOOL LLSelectMgr::sRectSelectInclusive = TRUE; -BOOL LLSelectMgr::sRenderHiddenSelections = TRUE; -BOOL LLSelectMgr::sRenderLightRadius = FALSE; +bool LLSelectMgr::sRectSelectInclusive = true; +bool LLSelectMgr::sRenderHiddenSelections = true; +bool LLSelectMgr::sRenderLightRadius = false; F32 LLSelectMgr::sHighlightThickness = 0.f; F32 LLSelectMgr::sHighlightUScale = 0.f; F32 LLSelectMgr::sHighlightVScale = 0.f; @@ -231,12 +231,12 @@ void LLSelectMgr::cleanupGlobals() // LLSelectMgr() //----------------------------------------------------------------------------- LLSelectMgr::LLSelectMgr() - : mHideSelectedObjects(LLCachedControl(gSavedSettings, "HideSelectedObjects", FALSE)), - mRenderHighlightSelections(LLCachedControl(gSavedSettings, "RenderHighlightSelections", TRUE)), - mAllowSelectAvatar( LLCachedControl(gSavedSettings, "AllowSelectAvatar", FALSE)), - mDebugSelectMgr(LLCachedControl(gSavedSettings, "DebugSelectMgr", FALSE)) + : mHideSelectedObjects(LLCachedControl(gSavedSettings, "HideSelectedObjects", false)), + mRenderHighlightSelections(LLCachedControl(gSavedSettings, "RenderHighlightSelections", true)), + mAllowSelectAvatar( LLCachedControl(gSavedSettings, "AllowSelectAvatar", false)), + mDebugSelectMgr(LLCachedControl(gSavedSettings, "DebugSelectMgr", false)) { - mTEMode = FALSE; + mTEMode = false; mTextureChannel = LLRender::DIFFUSE_MAP; mLastCameraPos.clearVec(); @@ -257,7 +257,7 @@ LLSelectMgr::LLSelectMgr() sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius"); - mRenderSilhouettes = TRUE; + mRenderSilhouettes = true; mGridMode = GRID_MODE_WORLD; gSavedSettings.setS32("GridMode", (S32)GRID_MODE_WORLD); @@ -266,8 +266,8 @@ LLSelectMgr::LLSelectMgr() mHoverObjects = new LLObjectSelection(); mHighlightedObjects = new LLObjectSelection(); - mForceSelection = FALSE; - mShowSelection = FALSE; + mForceSelection = false; + mShowSelection = false; // show/hide build highlight mFSShowHideHighlight = FS_SHOW_HIDE_HIGHLIGHT_NORMAL; @@ -542,7 +542,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3 //----------------------------------------------------------------------------- // Select the object, parents and children. //----------------------------------------------------------------------------- -LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end, BOOL ignore_select_owned) +LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, bool add_to_end, bool ignore_select_owned) { llassert( obj ); @@ -623,7 +623,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, // Select the object, parents and children. //----------------------------------------------------------------------------- LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(const std::vector& object_list, - BOOL send_to_sim) + bool send_to_sim) { // Collect all of the objects, children included std::vector objects; @@ -663,7 +663,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(const std::vectorgetCurrentTool(); @@ -716,7 +716,7 @@ BOOL LLSelectMgr::removeObjectFromSelections(const LLUUID &id) if( tool_editing_object && tool_editing_object->mID == id) { tool->stopEditing(); - object_found = TRUE; + object_found = true; } // Iterate through selected objects list and kill the object @@ -735,15 +735,15 @@ BOOL LLSelectMgr::removeObjectFromSelections(const LLUUID &id) } // lose the selection, don't tell simulator, it knows - deselectObjectAndFamily(object, FALSE); - object_found = TRUE; + deselectObjectAndFamily(object, false); + object_found = true; break; // must break here, may have removed multiple objects from list } else if (object->isAvatar() && object->getParent() && ((LLViewerObject*)object->getParent())->mID == id) { // It's possible the item being removed has an avatar sitting on it // So remove the avatar that is sitting on the object. - deselectObjectAndFamily(object, FALSE); + deselectObjectAndFamily(object, false); break; // must break here, may have removed multiple objects from list } } @@ -904,7 +904,7 @@ bool LLSelectMgr::enableLinkObjects() // Allow only if the avie isn't sitting on any of the selected objects LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); RlvSelectIsSittingOn f(gAgentAvatarp); - if (hSel->getFirstRootNode(&f, TRUE) != NULL) + if (hSel->getFirstRootNode(&f, true) != NULL) new_value = false; } // [/RLVa:KB] @@ -926,14 +926,14 @@ bool LLSelectMgr::enableUnlinkObjects() // Allow only if the avie isn't sitting on any of the selected objects LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); RlvSelectIsSittingOn f(gAgentAvatarp); - if (hSel->getFirstRootNode(&f, TRUE) != NULL) + if (hSel->getFirstRootNode(&f, true) != NULL) new_value = false; } // [/RLVa:KB] return new_value; } -void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim, BOOL include_entire_object) +void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, bool send_to_sim, bool include_entire_object) { // bail if nothing selected or if object wasn't selected in the first place if(!object) return; @@ -975,7 +975,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s //----------------------------------------------------------- LLViewerRegion* regionp = object->getRegion(); - BOOL start_new_message = TRUE; + bool start_new_message = true; S32 select_count = 0; LLMessageSystem* msg = gMessageSystem; @@ -988,7 +988,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); select_count++; - start_new_message = FALSE; + start_new_message = false; } msg->nextBlockFast(_PREHASH_ObjectData); @@ -1003,7 +1003,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s { msg->sendReliable(regionp->getHost() ); select_count = 0; - start_new_message = TRUE; + start_new_message = true; } } @@ -1016,7 +1016,7 @@ void LLSelectMgr::deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_s updateSelectionCenter(); } -void LLSelectMgr::deselectObjectOnly(LLViewerObject* object, BOOL send_to_sim) +void LLSelectMgr::deselectObjectOnly(LLViewerObject* object, bool send_to_sim) { // bail if nothing selected or if object wasn't selected in the first place if (!object) return; @@ -1050,7 +1050,7 @@ void LLSelectMgr::deselectObjectOnly(LLViewerObject* object, BOOL send_to_sim) // addAsFamily //----------------------------------------------------------------------------- -void LLSelectMgr::addAsFamily(std::vector& objects, BOOL add_to_end) +void LLSelectMgr::addAsFamily(std::vector& objects, bool add_to_end) { for (std::vector::iterator iter = objects.begin(); iter != objects.end(); ++iter) @@ -1066,7 +1066,7 @@ void LLSelectMgr::addAsFamily(std::vector& objects, BOOL add_to if (!objectp->isSelected()) { - LLSelectNode *nodep = new LLSelectNode(objectp, TRUE); + LLSelectNode *nodep = new LLSelectNode(objectp, true); if (add_to_end) { mSelectedObjects->addNodeAtEnd(nodep); @@ -1075,11 +1075,11 @@ void LLSelectMgr::addAsFamily(std::vector& objects, BOOL add_to { mSelectedObjects->addNode(nodep); } - objectp->setSelected(TRUE); + objectp->setSelected(true); if (objectp->getNumTEs() > 0) { - nodep->selectAllTEs(TRUE); + nodep->selectAllTEs(true); objectp->setAllTESelected(true); } else @@ -1094,7 +1094,7 @@ void LLSelectMgr::addAsFamily(std::vector& objects, BOOL add_to LLSelectNode* select_node = mSelectedObjects->findNode(objectp); if (select_node) { - select_node->setTransient(FALSE); + select_node->setTransient(false); } } } @@ -1104,7 +1104,7 @@ void LLSelectMgr::addAsFamily(std::vector& objects, BOOL add_to //----------------------------------------------------------------------------- // addAsIndividual() - a single object, face, etc //----------------------------------------------------------------------------- -void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, BOOL undoable) +void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, bool undoable) { // check to see if object is already in list LLSelectNode *nodep = mSelectedObjects->findNode(objectp); @@ -1112,23 +1112,23 @@ void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, BOOL undoab // if not in list, add it if (!nodep) { - nodep = new LLSelectNode(objectp, TRUE); + nodep = new LLSelectNode(objectp, true); mSelectedObjects->addNode(nodep); llassert_always(nodep->getObject()); } else { // make this a full-fledged selection - nodep->setTransient(FALSE); + nodep->setTransient(false); // Move it to the front of the list mSelectedObjects->moveNodeToFront(nodep); } // Make sure the object is tagged as selected - objectp->setSelected( TRUE ); + objectp->setSelected( true ); // And make sure we don't consider it as part of a family - nodep->mIndividualSelection = TRUE; + nodep->mIndividualSelection = true; // Handle face selection if (objectp->getNumTEs() <= 0) @@ -1137,12 +1137,12 @@ void LLSelectMgr::addAsIndividual(LLViewerObject *objectp, S32 face, BOOL undoab } else if (face == SELECT_ALL_TES) { - nodep->selectAllTEs(TRUE); + nodep->selectAllTEs(true); objectp->setAllTESelected(true); } else if (0 <= face && face < SELECT_MAX_TES) { - nodep->selectTE(face, TRUE); + nodep->selectTE(face, true); objectp->setTESelected(face, true); } else @@ -1202,8 +1202,8 @@ LLObjectSelectionHandle LLSelectMgr::setHoverObject(LLViewerObject *objectp, S32 { continue; } - LLSelectNode* nodep = new LLSelectNode(cur_objectp, FALSE); - nodep->selectTE(face, TRUE); + LLSelectNode* nodep = new LLSelectNode(cur_objectp, false); + nodep->selectTE(face, true); mHoverObjects->addNodeAtEnd(nodep); } @@ -1380,7 +1380,7 @@ LLObjectSelectionHandle LLSelectMgr::selectHighlightedObjects() mSelectedObjects->addNode(new_nodep); // flag this object as selected - objectp->setSelected(TRUE); + objectp->setSelected(true); objectp->setAllTESelected(true); mSelectedObjects->mSelectType = getSelectTypeForObject(objectp); @@ -1409,7 +1409,7 @@ LLObjectSelectionHandle LLSelectMgr::selectHighlightedObjects() void LLSelectMgr::deselectHighlightedObjects() { - BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); + bool select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); for (std::set >::iterator iter = mRectSelectedObjects.begin(); iter != mRectSelectedObjects.end(); iter++) { @@ -1433,7 +1433,7 @@ void LLSelectMgr::deselectHighlightedObjects() void LLSelectMgr::addGridObject(LLViewerObject* objectp) { - LLSelectNode* nodep = new LLSelectNode(objectp, FALSE); + LLSelectNode* nodep = new LLSelectNode(objectp, false); mGridObjects.addNodeAtEnd(nodep); LLViewerObject::const_child_list_t& child_list = objectp->getChildren(); @@ -1441,7 +1441,7 @@ void LLSelectMgr::addGridObject(LLViewerObject* objectp) iter != child_list.end(); iter++) { LLViewerObject* child = *iter; - nodep = new LLSelectNode(child, FALSE); + nodep = new LLSelectNode(child, false); mGridObjects.addNodeAtEnd(nodep); } } @@ -1495,7 +1495,7 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & LLVector4a min_extents(F32_MAX); LLVector4a max_extents(-F32_MAX); - BOOL grid_changed = FALSE; + bool grid_changed = false; for (LLObjectSelection::iterator iter = mGridObjects.begin(); iter != mGridObjects.end(); ++iter) { @@ -1506,7 +1506,7 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & const LLVector4a* ext = drawable->getSpatialExtents(); update_min_max(min_extents, max_extents, ext[0]); update_min_max(min_extents, max_extents, ext[1]); - grid_changed = TRUE; + grid_changed = true; } } if (grid_changed) @@ -1528,7 +1528,7 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & } else // GRID_MODE_WORLD or just plain default { - const BOOL non_root_ok = TRUE; + const bool non_root_ok = true; LLViewerObject* first_object = mSelectedObjects->getFirstRootObject(non_root_ok); mGridOrigin.clearVec(); @@ -1578,7 +1578,7 @@ void LLSelectMgr::remove(std::vector& objects) LLSelectNode* nodep = mSelectedObjects->findNode(objectp); if (nodep) { - objectp->setSelected(FALSE); + objectp->setSelected(false); mSelectedObjects->removeNode(nodep); nodep = NULL; } @@ -1591,7 +1591,7 @@ void LLSelectMgr::remove(std::vector& objects) //----------------------------------------------------------------------------- // remove() - a single object //----------------------------------------------------------------------------- -void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable) +void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, bool undoable) { // get object node (and verify it is in the selected list) LLSelectNode *nodep = mSelectedObjects->findNode(objectp); @@ -1606,14 +1606,14 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable) // Remove all faces (or the object doesn't have faces) so remove the node mSelectedObjects->removeNode(nodep); nodep = NULL; - objectp->setSelected( FALSE ); + objectp->setSelected( false ); } else if (0 <= te && te < SELECT_MAX_TES) { // ...valid face, check to see if it was on if (nodep->isTESelected(te)) { - nodep->selectTE(te, FALSE); + nodep->selectTE(te, false); objectp->setTESelected(te, false); } else @@ -1623,7 +1623,7 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable) } // ...check to see if this operation turned off all faces - BOOL found = FALSE; + bool found = false; for (S32 i = 0; i < nodep->getObject()->getNumTEs(); i++) { found = found || nodep->isTESelected(i); @@ -1634,7 +1634,7 @@ void LLSelectMgr::remove(LLViewerObject *objectp, S32 te, BOOL undoable) { mSelectedObjects->removeNode(nodep); nodep = NULL; - objectp->setSelected( FALSE ); + objectp->setSelected( false ); // *FIXME: Doesn't update simulator that object is no longer selected } } @@ -1658,7 +1658,7 @@ void LLSelectMgr::removeAll() iter != mSelectedObjects->end(); iter++ ) { LLViewerObject *objectp = (*iter)->getObject(); - objectp->setSelected( FALSE ); + objectp->setSelected( false ); } mSelectedObjects->deleteAllNodes(); @@ -1674,7 +1674,7 @@ void LLSelectMgr::promoteSelectionToRoot() { std::set selection_set; - BOOL selection_changed = FALSE; + bool selection_changed = false; for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); ) @@ -1685,7 +1685,7 @@ void LLSelectMgr::promoteSelectionToRoot() if (nodep->mIndividualSelection) { - selection_changed = TRUE; + selection_changed = true; } LLViewerObject* parentp = object; @@ -1951,7 +1951,7 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid) if (mItem && objectp->isAttachment()) { const LLPermissions& perm = mItem->getPermissions(); - BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; + bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false; if (!unrestricted) { // Attachments are in world and in inventory simultaneously, @@ -1973,7 +1973,7 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid) // Texture picker defaults aren't inventory items // * Don't need to worry about permissions for them // * Can just apply the texture and be done with it. - objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); + objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } return true; @@ -2001,7 +2001,7 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid) { object->sendTEUpdate(); // 1 particle effect per object - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(object); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -2049,7 +2049,7 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id) if (mItem && objectp->isAttachment()) { const LLPermissions& perm = mItem->getPermissions(); - BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; + bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false; if (!unrestricted) { // Attachments are in world and in inventory simultaneously, @@ -2061,7 +2061,7 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id) if (mItem) { // If success, the material may be copied into the object's inventory - BOOL success = LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null); + bool success = LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null); if (!success) { return false; @@ -2109,7 +2109,7 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id) if (!mItem) { // 1 particle effect per object - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(object); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -2267,7 +2267,7 @@ void LLSelectMgr::selectionRevertShinyColors() getSelection()->applyToObjects(&sendfunc); } -BOOL LLSelectMgr::selectionRevertTextures() +bool LLSelectMgr::selectionRevertTextures() { struct f : public LLSelectedTEFunctor { @@ -2285,11 +2285,11 @@ BOOL LLSelectMgr::selectionRevertTextures() if (id.isNull()) { // this was probably a no-copy texture, leave image as-is - return FALSE; + return false; } else { - object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); + object->setTEImage(te, LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } } @@ -2297,7 +2297,7 @@ BOOL LLSelectMgr::selectionRevertTextures() return true; } } setfunc(mSelectedObjects); - BOOL revert_successful = getSelection()->applyToTEs(&setfunc); + bool revert_successful = getSelection()->applyToTEs(&setfunc); LLSelectMgrSendFunctor sendfunc; getSelection()->applyToObjects(&sendfunc); @@ -2380,8 +2380,8 @@ void LLSelectMgr::selectionSetBumpmap(U8 bumpmap, const LLUUID &image_id) return; } const LLPermissions& perm = item->getPermissions(); - BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; - BOOL attached = object->isAttachment(); + bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false; + bool attached = object->isAttachment(); if (attached && !unrestricted) { // Attachments are in world and in inventory simultaneously, @@ -2452,8 +2452,8 @@ void LLSelectMgr::selectionSetShiny(U8 shiny, const LLUUID &image_id) return; } const LLPermissions& perm = item->getPermissions(); - BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; - BOOL attached = object->isAttachment(); + bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false; + bool attached = object->isAttachment(); if (attached && !unrestricted) { // Attachments are in world and in inventory simultaneously, @@ -2718,9 +2718,9 @@ LLPermissions* LLSelectMgr::findObjectPermissions(const LLViewerObject* object) //----------------------------------------------------------------------------- // selectionGetGlow() //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectionGetGlow(F32 *glow) +bool LLSelectMgr::selectionGetGlow(F32 *glow) { - BOOL identical; + bool identical; F32 lglow = 0.f; struct f1 : public LLSelectedTEGetFunctor { @@ -2747,7 +2747,7 @@ void LLSelectMgr::selectionSetPhysicsType(U8 type) if (object->permModify()) { object->setPhysicsShapeType(mType); - object->updateFlags(TRUE); + object->updateFlags(true); } return true; } @@ -2766,7 +2766,7 @@ void LLSelectMgr::selectionSetFriction(F32 friction) if (object->permModify()) { object->setPhysicsFriction(mFriction); - object->updateFlags(TRUE); + object->updateFlags(true); } return true; } @@ -2785,7 +2785,7 @@ void LLSelectMgr::selectionSetGravity(F32 gravity ) if (object->permModify()) { object->setPhysicsGravity(mGravity); - object->updateFlags(TRUE); + object->updateFlags(true); } return true; } @@ -2804,7 +2804,7 @@ void LLSelectMgr::selectionSetDensity(F32 density ) if (object->permModify()) { object->setPhysicsDensity(mDensity); - object->updateFlags(TRUE); + object->updateFlags(true); } return true; } @@ -2823,7 +2823,7 @@ void LLSelectMgr::selectionSetRestitution(F32 restitution) if (object->permModify()) { object->setPhysicsRestitution(mRestitution); - object->updateFlags(TRUE); + object->updateFlags(true); } return true; } @@ -2856,8 +2856,8 @@ void LLSelectMgr::selectionSetMaterial(U8 material) getSelection()->applyToObjects(&sendfunc); } -// TRUE if all selected objects have this PCode -BOOL LLSelectMgr::selectionAllPCode(LLPCode code) +// true if all selected objects have this PCode +bool LLSelectMgr::selectionAllPCode(LLPCode code) { struct f : public LLSelectedObjectFunctor { @@ -2867,19 +2867,19 @@ BOOL LLSelectMgr::selectionAllPCode(LLPCode code) { if (object->getPCode() != mCode) { - return FALSE; + return false; } return true; } } func(code); - BOOL res = getSelection()->applyToObjects(&func); + bool res = getSelection()->applyToObjects(&func); return res; } bool LLSelectMgr::selectionGetIncludeInSearch(bool* include_in_search_out) { LLViewerObject *object = mSelectedObjects->getFirstRootObject(); - if (!object) return FALSE; + if (!object) return false; bool include_in_search = object->getIncludeInSearch(); @@ -2919,12 +2919,12 @@ void LLSelectMgr::selectionSetIncludeInSearch(bool include_in_search) SEND_ONLY_ROOTS); } -BOOL LLSelectMgr::selectionGetClickAction(U8 *out_action) +bool LLSelectMgr::selectionGetClickAction(U8 *out_action) { LLViewerObject *object = mSelectedObjects->getFirstObject(); if (!object) { - return FALSE; + return false; } U8 action = object->getClickAction(); @@ -2943,7 +2943,7 @@ BOOL LLSelectMgr::selectionGetClickAction(U8 *out_action) return true; } } func(action); - BOOL res = getSelection()->applyToObjects(&func); + bool res = getSelection()->applyToObjects(&func); return res; } @@ -3072,7 +3072,7 @@ void LLSelectMgr::selectionTexScaleAutofit(F32 repeats_per_meter) U32 s_axis, t_axis; if (!LLPrimitive::getTESTAxes(te, &s_axis, &t_axis)) { - return TRUE; + return true; } F32 new_s = object->getScale().mV[s_axis] * mRepeatsPerMeter; @@ -3097,7 +3097,7 @@ void LLSelectMgr::selectionTexScaleAutofit(F32 repeats_per_meter) //----------------------------------------------------------------------------- // adjustTexturesByScale() //----------------------------------------------------------------------------- -void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch) +void LLSelectMgr::adjustTexturesByScale(bool send_to_sim, bool stretch) { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++) @@ -3120,7 +3120,7 @@ void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch) continue; } - BOOL send = FALSE; + bool send = false; for (U8 te_num = 0; te_num < object->getNumTEs(); te_num++) { @@ -3130,7 +3130,7 @@ void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch) if( !tep ) continue; - BOOL planar = tep->getTexGen() == LLTextureEntry::TEX_GEN_PLANAR; + bool planar = tep->getTexGen() == LLTextureEntry::TEX_GEN_PLANAR; if (planar == stretch) { // Figure out how S,T changed with scale operation @@ -3214,9 +3214,9 @@ void LLSelectMgr::adjustTexturesByScale(BOOL send_to_sim, BOOL stretch) //----------------------------------------------------------------------------- // selectGetAllRootsValid() -// Returns TRUE if the viewer has information on all selected objects +// Returns true if the viewer has information on all selected objects //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetAllRootsValid() +bool LLSelectMgr::selectGetAllRootsValid() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); ++iter ) @@ -3224,18 +3224,18 @@ BOOL LLSelectMgr::selectGetAllRootsValid() LLSelectNode* node = *iter; if( !node->mValid ) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- // selectGetAllValid() -// Returns TRUE if the viewer has information on all selected objects +// Returns true if the viewer has information on all selected objects //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetAllValid() +bool LLSelectMgr::selectGetAllValid() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); ++iter ) @@ -3243,19 +3243,19 @@ BOOL LLSelectMgr::selectGetAllValid() LLSelectNode* node = *iter; if( !node->mValid ) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetAllValidAndObjectsFound() - return TRUE if selections are +// selectGetAllValidAndObjectsFound() - return true if selections are // valid and objects are found. // // For EXT-3114 - same as selectGetModify() without the modify check. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetAllValidAndObjectsFound() +bool LLSelectMgr::selectGetAllValidAndObjectsFound() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3264,17 +3264,17 @@ BOOL LLSelectMgr::selectGetAllValidAndObjectsFound() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetModify() - return TRUE if current agent can modify all +// selectGetModify() - return true if current agent can modify all // selected objects. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetModify() +bool LLSelectMgr::selectGetModify() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3283,21 +3283,21 @@ BOOL LLSelectMgr::selectGetModify() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } if( !object->permModify() ) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetRootsModify() - return TRUE if current agent can modify all +// selectGetRootsModify() - return true if current agent can modify all // selected root objects. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetRootsModify() +bool LLSelectMgr::selectGetRootsModify() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -3306,30 +3306,30 @@ BOOL LLSelectMgr::selectGetRootsModify() LLViewerObject* object = node->getObject(); if( !node->mValid ) { - return FALSE; + return false; } if( !object->permModify() ) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetSameRegion() - return TRUE if all objects are in same region +// selectGetSameRegion() - return true if all objects are in same region //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetSameRegion() +bool LLSelectMgr::selectGetSameRegion() { if (getSelection()->isEmpty()) { - return TRUE; + return true; } LLViewerObject* object = getSelection()->getFirstObject(); if (!object) { - return FALSE; + return false; } LLViewerRegion* current_region = object->getRegion(); @@ -3340,18 +3340,18 @@ BOOL LLSelectMgr::selectGetSameRegion() object = node->getObject(); if (!node->mValid || !object || current_region != object->getRegion()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetNonPermanentEnforced() - return TRUE if all objects are not +// selectGetNonPermanentEnforced() - return true if all objects are not // permanent enforced //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetNonPermanentEnforced() +bool LLSelectMgr::selectGetNonPermanentEnforced() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3360,21 +3360,21 @@ BOOL LLSelectMgr::selectGetNonPermanentEnforced() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } if( object->isPermanentEnforced()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetRootsNonPermanentEnforced() - return TRUE if all root objects are +// selectGetRootsNonPermanentEnforced() - return true if all root objects are // not permanent enforced //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetRootsNonPermanentEnforced() +bool LLSelectMgr::selectGetRootsNonPermanentEnforced() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -3383,21 +3383,21 @@ BOOL LLSelectMgr::selectGetRootsNonPermanentEnforced() LLViewerObject* object = node->getObject(); if( !node->mValid ) { - return FALSE; + return false; } if( object->isPermanentEnforced()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetPermanent() - return TRUE if all objects are permanent +// selectGetPermanent() - return true if all objects are permanent //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetPermanent() +bool LLSelectMgr::selectGetPermanent() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3406,21 +3406,21 @@ BOOL LLSelectMgr::selectGetPermanent() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } if( !object->flagObjectPermanent()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetRootsPermanent() - return TRUE if all root objects are +// selectGetRootsPermanent() - return true if all root objects are // permanent //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetRootsPermanent() +bool LLSelectMgr::selectGetRootsPermanent() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -3429,21 +3429,21 @@ BOOL LLSelectMgr::selectGetRootsPermanent() LLViewerObject* object = node->getObject(); if( !node->mValid ) { - return FALSE; + return false; } if( !object->flagObjectPermanent()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetCharacter() - return TRUE if all objects are character +// selectGetCharacter() - return true if all objects are character //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetCharacter() +bool LLSelectMgr::selectGetCharacter() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3452,21 +3452,21 @@ BOOL LLSelectMgr::selectGetCharacter() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } if( !object->flagCharacter()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetRootsCharacter() - return TRUE if all root objects are +// selectGetRootsCharacter() - return true if all root objects are // character //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetRootsCharacter() +bool LLSelectMgr::selectGetRootsCharacter() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -3475,21 +3475,21 @@ BOOL LLSelectMgr::selectGetRootsCharacter() LLViewerObject* object = node->getObject(); if( !node->mValid ) { - return FALSE; + return false; } if( !object->flagCharacter()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetNonPathfinding() - return TRUE if all objects are not pathfinding +// selectGetNonPathfinding() - return true if all objects are not pathfinding //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetNonPathfinding() +bool LLSelectMgr::selectGetNonPathfinding() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3498,21 +3498,21 @@ BOOL LLSelectMgr::selectGetNonPathfinding() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } if( object->flagObjectPermanent() || object->flagCharacter()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetRootsNonPathfinding() - return TRUE if all root objects are not +// selectGetRootsNonPathfinding() - return true if all root objects are not // pathfinding //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetRootsNonPathfinding() +bool LLSelectMgr::selectGetRootsNonPathfinding() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -3521,21 +3521,21 @@ BOOL LLSelectMgr::selectGetRootsNonPathfinding() LLViewerObject* object = node->getObject(); if( !node->mValid ) { - return FALSE; + return false; } if( object->flagObjectPermanent() || object->flagCharacter()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetNonPermanent() - return TRUE if all objects are not permanent +// selectGetNonPermanent() - return true if all objects are not permanent //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetNonPermanent() +bool LLSelectMgr::selectGetNonPermanent() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3544,21 +3544,21 @@ BOOL LLSelectMgr::selectGetNonPermanent() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } if( object->flagObjectPermanent()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetRootsNonPermanent() - return TRUE if all root objects are not +// selectGetRootsNonPermanent() - return true if all root objects are not // permanent //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetRootsNonPermanent() +bool LLSelectMgr::selectGetRootsNonPermanent() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -3567,21 +3567,21 @@ BOOL LLSelectMgr::selectGetRootsNonPermanent() LLViewerObject* object = node->getObject(); if( !node->mValid ) { - return FALSE; + return false; } if( object->flagObjectPermanent()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetNonCharacter() - return TRUE if all objects are not character +// selectGetNonCharacter() - return true if all objects are not character //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetNonCharacter() +bool LLSelectMgr::selectGetNonCharacter() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3590,21 +3590,21 @@ BOOL LLSelectMgr::selectGetNonCharacter() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } if( object->flagCharacter()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetRootsNonCharacter() - return TRUE if all root objects are not +// selectGetRootsNonCharacter() - return true if all root objects are not // character //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetRootsNonCharacter() +bool LLSelectMgr::selectGetRootsNonCharacter() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -3613,23 +3613,23 @@ BOOL LLSelectMgr::selectGetRootsNonCharacter() LLViewerObject* object = node->getObject(); if( !node->mValid ) { - return FALSE; + return false; } if( object->flagCharacter()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetEditableLinksets() - return TRUE if all objects are editable +// selectGetEditableLinksets() - return true if all objects are editable // pathfinding linksets //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetEditableLinksets() +bool LLSelectMgr::selectGetEditableLinksets() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3638,7 +3638,7 @@ BOOL LLSelectMgr::selectGetEditableLinksets() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } if (object->flagUsePhysics() || object->flagTemporaryOnRez() || @@ -3651,17 +3651,17 @@ BOOL LLSelectMgr::selectGetEditableLinksets() !object->permYouOwner() && !object->permMove())) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetViewableCharacters() - return TRUE if all objects are characters +// selectGetViewableCharacters() - return true if all objects are characters // viewable within the pathfinding characters floater //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetViewableCharacters() +bool LLSelectMgr::selectGetViewableCharacters() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -3670,22 +3670,22 @@ BOOL LLSelectMgr::selectGetViewableCharacters() LLViewerObject* object = node->getObject(); if( !object || !node->mValid ) { - return FALSE; + return false; } if( !object->flagCharacter() || (object->getRegion() != gAgent.getRegion())) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetRootsTransfer() - return TRUE if current agent can transfer all +// selectGetRootsTransfer() - return true if current agent can transfer all // selected root objects. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetRootsTransfer() +bool LLSelectMgr::selectGetRootsTransfer() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -3694,21 +3694,21 @@ BOOL LLSelectMgr::selectGetRootsTransfer() LLViewerObject* object = node->getObject(); if( !node->mValid ) { - return FALSE; + return false; } if(!object->permTransfer()) { - return FALSE; + return false; } } - return TRUE; + return true; } //----------------------------------------------------------------------------- -// selectGetRootsCopy() - return TRUE if current agent can copy all +// selectGetRootsCopy() - return true if current agent can copy all // selected root objects. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetRootsCopy() +bool LLSelectMgr::selectGetRootsCopy() { for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -3717,14 +3717,14 @@ BOOL LLSelectMgr::selectGetRootsCopy() LLViewerObject* object = node->getObject(); if( !node->mValid ) { - return FALSE; + return false; } if(!object->permCopy()) { - return FALSE; + return false; } } - return TRUE; + return true; } struct LLSelectGetFirstTest @@ -3807,7 +3807,7 @@ protected: } }; -BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name) +bool LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name) { LLSelectGetFirstCreator test; getFirst(&test); @@ -3815,7 +3815,7 @@ BOOL LLSelectMgr::selectGetCreator(LLUUID& result_id, std::string& name) if (test.mFirstValue.isNull()) { name = LLTrans::getString("AvatarNameNobody"); - return FALSE; + return false; } result_id = test.mFirstValue; @@ -3847,14 +3847,14 @@ protected: } }; -BOOL LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) +bool LLSelectMgr::selectGetOwner(LLUUID& result_id, std::string& name) { LLSelectGetFirstOwner test; getFirst(&test); if (test.mFirstValue.isNull()) { - return FALSE; + return false; } result_id = test.mFirstValue; @@ -3892,14 +3892,14 @@ protected: } }; -BOOL LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name) +bool LLSelectMgr::selectGetLastOwner(LLUUID& result_id, std::string& name) { LLSelectGetFirstLastOwner test; getFirst(&test); if (test.mFirstValue.isNull()) { - return FALSE; + return false; } result_id = test.mFirstValue; @@ -3929,7 +3929,7 @@ protected: } }; -BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id) +bool LLSelectMgr::selectGetGroup(LLUUID& result_id) { LLSelectGetFirstGroup test; getFirst(&test); @@ -3941,7 +3941,7 @@ BOOL LLSelectMgr::selectGetGroup(LLUUID& result_id) //----------------------------------------------------------------------------- // selectIsGroupOwned() // Only operates on root nodes unless editing linked parts. -// Returns TRUE if the first selected is group owned. +// Returns true if the first selected is group owned. //----------------------------------------------------------------------------- struct LLSelectGetFirstGroupOwner : public LLSelectGetFirstTest { @@ -3956,29 +3956,29 @@ protected: } }; -BOOL LLSelectMgr::selectIsGroupOwned() +bool LLSelectMgr::selectIsGroupOwned() { LLSelectGetFirstGroupOwner test; getFirst(&test); - return test.mFirstValue.notNull() ? TRUE : FALSE; + return test.mFirstValue.notNull() ? true : false; } //----------------------------------------------------------------------------- // selectGetPerm() // Only operates on root nodes. -// Returns TRUE if all have valid data. -// mask_on has bits set to TRUE where all permissions are TRUE -// mask_off has bits set to TRUE where all permissions are FALSE +// Returns true if all have valid data. +// mask_on has bits set to true where all permissions are true +// mask_off has bits set to true where all permissions are false // if a bit is off both in mask_on and mask_off, the values differ within // the selection. //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetPerm(U8 which_perm, U32* mask_on, U32* mask_off) +bool LLSelectMgr::selectGetPerm(U8 which_perm, U32* mask_on, U32* mask_off) { U32 mask; U32 mask_and = 0xffffffff; U32 mask_or = 0x00000000; - BOOL all_valid = FALSE; + bool all_valid = false; for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++) @@ -3987,11 +3987,11 @@ BOOL LLSelectMgr::selectGetPerm(U8 which_perm, U32* mask_on, U32* mask_off) if (!node->mValid) { - all_valid = FALSE; + all_valid = false; break; } - all_valid = TRUE; + all_valid = true; switch( which_perm ) { @@ -4020,26 +4020,26 @@ BOOL LLSelectMgr::selectGetPerm(U8 which_perm, U32* mask_on, U32* mask_off) if (all_valid) { - // ...TRUE through all ANDs means all TRUE + // ...true through all ANDs means all true *mask_on = mask_and; - // ...FALSE through all ORs means all FALSE + // ...false through all ORs means all false *mask_off = ~mask_or; - return TRUE; + return true; } else { *mask_on = 0; *mask_off = 0; - return FALSE; + return false; } } -BOOL LLSelectMgr::selectGetPermissions(LLPermissions& result_perm) +bool LLSelectMgr::selectGetPermissions(LLPermissions& result_perm) { - BOOL first = TRUE; + bool first = true; LLPermissions perm; for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -4047,13 +4047,13 @@ BOOL LLSelectMgr::selectGetPermissions(LLPermissions& result_perm) LLSelectNode* node = *iter; if (!node->mValid) { - return FALSE; + return false; } if (first) { perm = *(node->mPermissions); - first = FALSE; + first = false; } else { @@ -4063,7 +4063,7 @@ BOOL LLSelectMgr::selectGetPermissions(LLPermissions& result_perm) result_perm = perm; - return TRUE; + return true; } @@ -4081,9 +4081,9 @@ void LLSelectMgr::selectDelete() S32 deleteable_count = 0; - BOOL locked_but_deleteable_object = FALSE; - BOOL no_copy_but_deleteable_object = FALSE; - BOOL all_owned_by_you = TRUE; + bool locked_but_deleteable_object = false; + bool no_copy_but_deleteable_object = false; + bool all_owned_by_you = true; for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++) @@ -4100,15 +4100,15 @@ void LLSelectMgr::selectDelete() // Check to see if you can delete objects which are locked. if(!obj->permMove()) { - locked_but_deleteable_object = TRUE; + locked_but_deleteable_object = true; } if(!obj->permCopy()) { - no_copy_but_deleteable_object = TRUE; + no_copy_but_deleteable_object = true; } if(!obj->permYouOwner()) { - all_owned_by_you = FALSE; + all_owned_by_you = false; } } @@ -4203,7 +4203,7 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response, // VEFFECT: Delete Object - one effect for all deletes if (LLSelectMgr::getInstance()->mSelectedObjects->mSelectType != SELECT_TYPE_HUD) { - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true); effectp->setPositionGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal() ); effectp->setColor(LLColor4U(gAgent.getEffectColor())); F32 duration = 0.5f; @@ -4239,11 +4239,11 @@ void LLSelectMgr::selectForceDelete() packDeleteHeader, packObjectLocalID, logNoOp, - (void*)TRUE, + (void*)true, SEND_ONLY_ROOTS); } -BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify) +bool LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify) { move = true; modify = true; @@ -4262,7 +4262,7 @@ BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify) { move = false; modify = false; - return FALSE; + return false; } LLViewerObject *root_object = object->getRootEdit(); @@ -4287,23 +4287,23 @@ BOOL LLSelectMgr::selectGetEditMoveLinksetPermissions(bool &move, bool &modify) // Optimize: Once move and modify are both false, there is no reason to continue checking - neither will become true again if (!move && !modify) { - return TRUE; + return true; } // } - return TRUE; + return true; } void LLSelectMgr::selectGetAggregateSaleInfo(U32 &num_for_sale, - BOOL &is_for_sale_mixed, - BOOL &is_sale_price_mixed, + bool &is_for_sale_mixed, + bool &is_sale_price_mixed, S32 &total_sale_price, S32 &individual_sale_price) { num_for_sale = 0; - is_for_sale_mixed = FALSE; - is_sale_price_mixed = FALSE; + is_for_sale_mixed = false; + is_sale_price_mixed = false; total_sale_price = 0; individual_sale_price = 0; @@ -4325,9 +4325,9 @@ void LLSelectMgr::selectGetAggregateSaleInfo(U32 &num_for_sale, // Set mixed if the fields don't match the first node's fields. if (node_for_sale != first_node_for_sale) - is_for_sale_mixed = TRUE; + is_for_sale_mixed = true; if (node_sale_price != first_node_sale_price) - is_sale_price_mixed = TRUE; + is_sale_price_mixed = true; if (node_for_sale) { @@ -4339,16 +4339,16 @@ void LLSelectMgr::selectGetAggregateSaleInfo(U32 &num_for_sale, individual_sale_price = first_node_sale_price; if (is_for_sale_mixed) { - is_sale_price_mixed = TRUE; + is_sale_price_mixed = true; individual_sale_price = 0; } } -// returns TRUE if all nodes are valid. method also stores an +// returns true if all nodes are valid. method also stores an // accumulated sale info. -BOOL LLSelectMgr::selectGetSaleInfo(LLSaleInfo& result_sale_info) +bool LLSelectMgr::selectGetSaleInfo(LLSaleInfo& result_sale_info) { - BOOL first = TRUE; + bool first = true; LLSaleInfo sale_info; for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -4356,13 +4356,13 @@ BOOL LLSelectMgr::selectGetSaleInfo(LLSaleInfo& result_sale_info) LLSelectNode* node = *iter; if (!node->mValid) { - return FALSE; + return false; } if (first) { sale_info = node->mSaleInfo; - first = FALSE; + first = false; } else { @@ -4372,12 +4372,12 @@ BOOL LLSelectMgr::selectGetSaleInfo(LLSaleInfo& result_sale_info) result_sale_info = sale_info; - return TRUE; + return true; } -BOOL LLSelectMgr::selectGetAggregatePermissions(LLAggregatePermissions& result_perm) +bool LLSelectMgr::selectGetAggregatePermissions(LLAggregatePermissions& result_perm) { - BOOL first = TRUE; + bool first = true; LLAggregatePermissions perm; for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -4385,13 +4385,13 @@ BOOL LLSelectMgr::selectGetAggregatePermissions(LLAggregatePermissions& result_p LLSelectNode* node = *iter; if (!node->mValid) { - return FALSE; + return false; } if (first) { perm = node->mAggregatePerm; - first = FALSE; + first = false; } else { @@ -4401,12 +4401,12 @@ BOOL LLSelectMgr::selectGetAggregatePermissions(LLAggregatePermissions& result_p result_perm = perm; - return TRUE; + return true; } -BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& result_perm) +bool LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& result_perm) { - BOOL first = TRUE; + bool first = true; LLAggregatePermissions perm; for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++ ) @@ -4414,14 +4414,14 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r LLSelectNode* node = *iter; if (!node->mValid) { - return FALSE; + return false; } LLAggregatePermissions t_perm = node->getObject()->permYouOwner() ? node->mAggregateTexturePermOwner : node->mAggregateTexturePerm; if (first) { perm = t_perm; - first = FALSE; + first = false; } else { @@ -4431,16 +4431,16 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r result_perm = perm; - return TRUE; + return true; } -BOOL LLSelectMgr::isMovableAvatarSelected() +bool LLSelectMgr::isMovableAvatarSelected() { if (mAllowSelectAvatar) { - return (getSelection()->getObjectCount() == 1) && (getSelection()->getFirstRootObject()->isAvatar()) && getSelection()->getFirstMoveableNode(TRUE); + return (getSelection()->getObjectCount() == 1) && (getSelection()->getFirstRootObject()->isAvatar()) && getSelection()->getFirstMoveableNode(true); } - return FALSE; + return false; } //-------------------------------------------------------------------- @@ -4456,7 +4456,7 @@ struct LLDuplicateData U32 flags; }; -void LLSelectMgr::selectDuplicate(const LLVector3& offset, BOOL select_copy) +void LLSelectMgr::selectDuplicate(const LLVector3& offset, bool select_copy) { // if (mSelectedObjects->isAttachment()) // [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Added: RLVa-1.2.0a @@ -4496,7 +4496,7 @@ void LLSelectMgr::selectDuplicate(const LLVector3& offset, BOOL select_copy) iter != getSelection()->root_end(); iter++ ) { LLSelectNode* node = *iter; - node->mDuplicated = TRUE; + node->mDuplicated = true; node->mDuplicatePos = node->getObject()->getPositionGlobal(); node->mDuplicateRot = node->getObject()->getRotation(); } @@ -4581,22 +4581,22 @@ struct LLDuplicateOnRayData { LLVector3 mRayStartRegion; LLVector3 mRayEndRegion; - BOOL mBypassRaycast; - BOOL mRayEndIsIntersection; + bool mBypassRaycast; + bool mRayEndIsIntersection; LLUUID mRayTargetID; - BOOL mCopyCenters; - BOOL mCopyRotates; + bool mCopyCenters; + bool mCopyRotates; U32 mFlags; }; void LLSelectMgr::selectDuplicateOnRay(const LLVector3 &ray_start_region, const LLVector3 &ray_end_region, - BOOL bypass_raycast, - BOOL ray_end_is_intersection, + bool bypass_raycast, + bool ray_end_is_intersection, const LLUUID &ray_target_id, - BOOL copy_centers, - BOOL copy_rotates, - BOOL select_copy) + bool copy_centers, + bool copy_rotates, + bool select_copy) { if (mSelectedObjects->isAttachment()) { @@ -4718,12 +4718,12 @@ struct LLOwnerData { LLUUID owner_id; LLUUID group_id; - BOOL override; + bool override; }; void LLSelectMgr::sendOwner(const LLUUID& owner_id, const LLUUID& group_id, - BOOL override) + bool override) { LLOwnerData data; @@ -4805,16 +4805,16 @@ void LLSelectMgr::packBuyObjectIDs(LLSelectNode* node, void* data) struct LLPermData { U8 mField; - BOOL mSet; + bool mSet; U32 mMask; - BOOL mOverride; + bool mOverride; }; // TODO: Make this able to fail elegantly. void LLSelectMgr::selectionSetObjectPermissions(U8 field, - BOOL set, + bool set, U32 mask, - BOOL override) + bool override) { LLPermData data; @@ -4923,7 +4923,7 @@ void LLSelectMgr::convertTransient() for (node_it = mSelectedObjects->begin(); node_it != mSelectedObjects->end(); ++node_it) { LLSelectNode *nodep = *node_it; - nodep->setTransient(FALSE); + nodep->setTransient(false); } } @@ -4941,7 +4941,7 @@ void LLSelectMgr::deselectAllIfTooFar() return (!pNode->isTransient()) && (pObj) && (!RlvActions::canEdit(pObj)) && (pObj->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID()); } } f; - if (mSelectedObjects->getFirstRootNode(&f, TRUE)) + if (mSelectedObjects->getFirstRootNode(&f, true)) deselectAll(); } // [/RLVa:KB] @@ -4972,7 +4972,7 @@ void LLSelectMgr::deselectAllIfTooFar() // [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f static RlvCachedBehaviourModifier s_nFartouchDist(RLV_MODIFIER_FARTOUCHDIST); - BOOL fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && LLToolMgr::instance().inEdit(); + bool fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && LLToolMgr::instance().inEdit(); if ( (gSavedSettings.getBOOL("LimitSelectDistance") || (fRlvFartouch) ) // [/RLVa:KB] && (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar()) @@ -5112,7 +5112,7 @@ void LLSelectMgr::sendAttach(LLObjectSelectionHandle selection_handle, U8 attach return; } - BOOL build_mode = LLToolMgr::getInstance()->inEdit(); + bool build_mode = LLToolMgr::getInstance()->inEdit(); // Special case: Attach to default location for this object. if (0 == attachment_point || get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL)) @@ -5346,7 +5346,7 @@ void LLSelectMgr::saveSelectedObjectTextures() { virtual bool apply(LLSelectNode* node) { - node->mValid = FALSE; + node->mValid = false; return true; } } func; @@ -5429,9 +5429,9 @@ void LLSelectMgr::saveSelectedObjectTransform(EActionType action_type) struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor { - LLSelectMgrApplyFlags(U32 flags, BOOL state) : mFlags(flags), mState(state) {} + LLSelectMgrApplyFlags(U32 flags, bool state) : mFlags(flags), mState(state) {} U32 mFlags; - BOOL mState; + bool mState; virtual bool apply(LLViewerObject* object) { if ( object->permModify()) @@ -5450,19 +5450,19 @@ struct LLSelectMgrApplyFlags : public LLSelectedObjectFunctor } }; -void LLSelectMgr::selectionUpdatePhysics(BOOL physics) +void LLSelectMgr::selectionUpdatePhysics(bool physics) { LLSelectMgrApplyFlags func( FLAGS_USE_PHYSICS, physics); getSelection()->applyToObjects(&func); } -void LLSelectMgr::selectionUpdateTemporary(BOOL is_temporary) +void LLSelectMgr::selectionUpdateTemporary(bool is_temporary) { LLSelectMgrApplyFlags func( FLAGS_TEMPORARY_ON_REZ, is_temporary); getSelection()->applyToObjects(&func); } -void LLSelectMgr::selectionUpdatePhantom(BOOL is_phantom) +void LLSelectMgr::selectionUpdatePhantom(bool is_phantom) { LLSelectMgrApplyFlags func( FLAGS_PHANTOM, is_phantom); getSelection()->applyToObjects(&func); @@ -5533,7 +5533,7 @@ void LLSelectMgr::packDuplicateHeader(void* data) // static void LLSelectMgr::packDeleteHeader(void* userdata) { - BOOL force = (BOOL)(intptr_t)userdata; + bool force = (bool)(intptr_t)userdata; gMessageSystem->nextBlockFast(_PREHASH_AgentData); gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); @@ -5750,7 +5750,7 @@ void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle, { if (node->getObject()) { - BOOL is_root = node->getObject()->isRootEdit(); + bool is_root = node->getObject()->isRootEdit(); if ((mRoots && is_root) || (!mRoots && !is_root)) { nodes_to_send.push(node); @@ -5760,8 +5760,8 @@ void LLSelectMgr::sendListToRegions(LLObjectSelectionHandle selected_handle, } }; struct push_all pushall(nodes_to_send); - struct push_some pushroots(nodes_to_send, TRUE); - struct push_some pushnonroots(nodes_to_send, FALSE); + struct push_some pushroots(nodes_to_send, true); + struct push_some pushnonroots(nodes_to_send, false); switch(send_type) { @@ -6039,8 +6039,8 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data if (save_textures) { - BOOL can_copy = FALSE; - BOOL can_transfer = FALSE; + bool can_copy = false; + bool can_transfer = false; LLAggregatePermissions::EValue value = LLAggregatePermissions::AP_NONE; if(node->getObject()->permYouOwner()) @@ -6048,12 +6048,12 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data value = ag_texture_perms_owner.getValue(PERM_COPY); if (value == LLAggregatePermissions::AP_EMPTY || value == LLAggregatePermissions::AP_ALL) { - can_copy = TRUE; + can_copy = true; } value = ag_texture_perms_owner.getValue(PERM_TRANSFER); if (value == LLAggregatePermissions::AP_EMPTY || value == LLAggregatePermissions::AP_ALL) { - can_transfer = TRUE; + can_transfer = true; } } else @@ -6061,12 +6061,12 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data value = ag_texture_perms.getValue(PERM_COPY); if (value == LLAggregatePermissions::AP_EMPTY || value == LLAggregatePermissions::AP_ALL) { - can_copy = TRUE; + can_copy = true; } value = ag_texture_perms.getValue(PERM_TRANSFER); if (value == LLAggregatePermissions::AP_EMPTY || value == LLAggregatePermissions::AP_ALL) { - can_transfer = TRUE; + can_transfer = true; } } @@ -6106,7 +6106,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data } } - node->mValid = TRUE; + node->mValid = true; node->mPermissions->init(creator_id, owner_id, last_owner_id, group_id); node->mPermissions->initMasks(base_mask, owner_mask, everyone_mask, group_mask, next_owner_mask); @@ -6204,7 +6204,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use if (node) { - node->mValid = TRUE; + node->mValid = true; node->mPermissions->init(LLUUID::null, owner_id, last_owner_id, group_id); node->mPermissions->initMasks(base_mask, owner_mask, everyone_mask, group_mask, next_owner_mask); @@ -6266,7 +6266,7 @@ void LLSelectMgr::updateSilhouettes() if (!mSilhouetteImagep) { - mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI); + mSilhouetteImagep = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI); } mHighlightedObjects->cleanupNodes(); @@ -6302,7 +6302,7 @@ void LLSelectMgr::updateSilhouettes() // persists from frame to frame to avoid regenerating object silhouettes // mHighlightedObjects includes all siblings of rect selected objects - BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); + bool select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); // generate list of roots from current object selection for (std::set >::iterator iter = mRectSelectedObjects.begin(); @@ -6379,12 +6379,12 @@ void LLSelectMgr::updateSilhouettes() continue; } - LLSelectNode* rect_select_root_node = new LLSelectNode(objectp, TRUE); - rect_select_root_node->selectAllTEs(TRUE); + LLSelectNode* rect_select_root_node = new LLSelectNode(objectp, true); + rect_select_root_node->selectAllTEs(true); if (!select_linked_set) { - rect_select_root_node->mIndividualSelection = TRUE; + rect_select_root_node->mIndividualSelection = true; } else { @@ -6399,8 +6399,8 @@ void LLSelectMgr::updateSilhouettes() continue; } - LLSelectNode* rect_select_node = new LLSelectNode(child_objectp, TRUE); - rect_select_node->selectAllTEs(TRUE); + LLSelectNode* rect_select_node = new LLSelectNode(child_objectp, true); + rect_select_node->selectAllTEs(true); mHighlightedObjects->addNodeAtEnd(rect_select_node); } } @@ -6412,7 +6412,7 @@ void LLSelectMgr::updateSilhouettes() num_sils_genned = 0; // render silhouettes for highlighted objects - //BOOL subtracting_from_selection = (gKeyboard->currentMask(TRUE) == MASK_CONTROL); + //bool subtracting_from_selection = (gKeyboard->currentMask(true) == MASK_CONTROL); for (S32 pass = 0; pass < 2; pass++) { for (LLObjectSelection::iterator iter = mHighlightedObjects->begin(); @@ -6424,8 +6424,8 @@ void LLSelectMgr::updateSilhouettes() continue; // do roots first, then children so that root flags are cleared ASAP - BOOL roots_only = (pass == 0); - BOOL is_root = objectp->isRootEdit(); + bool roots_only = (pass == 0); + bool is_root = objectp->isRootEdit(); if (roots_only != is_root) { continue; @@ -6499,8 +6499,8 @@ void LLSelectMgr::updateSelectionSilhouette(LLObjectSelectionHandle object_handl if (!objectp) continue; // do roots first, then children so that root flags are cleared ASAP - BOOL roots_only = (pass == 0); - BOOL is_root = (objectp->isRootEdit()); + bool roots_only = (pass == 0); + bool is_root = (objectp->isRootEdit()); if (roots_only != is_root || objectp->mDrawable.isNull()) { continue; @@ -6530,7 +6530,7 @@ void LLSelectMgr::updateSelectionSilhouette(LLObjectSelectionHandle object_handl } } } -void LLSelectMgr::renderSilhouettes(BOOL for_hud) +void LLSelectMgr::renderSilhouettes(bool for_hud) { // show/hide build highlight // if (!mRenderSilhouettes || !mRenderHighlightSelections) @@ -6590,7 +6590,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.pushMatrix(); - BOOL is_hud_object = objectp->isHUDAttachment(); + bool is_hud_object = objectp->isHUDAttachment(); if (!is_hud_object) { @@ -6711,8 +6711,8 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) } else if (node->isTransient()) { - BOOL oldHidden = LLSelectMgr::sRenderHiddenSelections; - LLSelectMgr::sRenderHiddenSelections = FALSE; + bool oldHidden = LLSelectMgr::sRenderHiddenSelections; + LLSelectMgr::sRenderHiddenSelections = false; node->renderOneSilhouette(sContextSilhouetteColor); LLSelectMgr::sRenderHiddenSelections = oldHidden; } @@ -6732,7 +6732,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) if (mHighlightedObjects->getNumNodes()) { // render silhouettes for highlighted objects - BOOL subtracting_from_selection = (gKeyboard->currentMask(TRUE) == MASK_CONTROL); + bool subtracting_from_selection = (gKeyboard->currentMask(true) == MASK_CONTROL); for (S32 pass = 0; pass < 2; pass++) { for (LLObjectSelection::iterator iter = mHighlightedObjects->begin(); @@ -6793,15 +6793,15 @@ void LLSelectMgr::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_ // // Utility classes // -LLSelectNode::LLSelectNode(LLViewerObject* object, BOOL glow) +LLSelectNode::LLSelectNode(LLViewerObject* object, bool glow) : mObject(object), - mIndividualSelection(FALSE), - mTransient(FALSE), - mValid(FALSE), + mIndividualSelection(false), + mTransient(false), + mValid(false), mPermissions(new LLPermissions()), mInventorySerial(0), - mSilhouetteExists(FALSE), - mDuplicated(FALSE), + mSilhouetteExists(false), + mDuplicated(false), mTESelectMask(0), mLastTESelected(0), mName(LLStringUtil::null), @@ -6891,13 +6891,13 @@ LLSelectNode::~LLSelectNode() mPermissions = NULL; } -void LLSelectNode::selectAllTEs(BOOL b) +void LLSelectNode::selectAllTEs(bool b) { mTESelectMask = b ? TE_SELECT_MASK_ALL : 0x0; mLastTESelected = 0; } -void LLSelectNode::selectTE(S32 te_index, BOOL selected) +void LLSelectNode::selectTE(S32 te_index, bool selected) { if (te_index < 0 || te_index >= SELECT_MAX_TES) { @@ -6915,11 +6915,11 @@ void LLSelectNode::selectTE(S32 te_index, BOOL selected) mLastTESelected = te_index; } -BOOL LLSelectNode::isTESelected(S32 te_index) const +bool LLSelectNode::isTESelected(S32 te_index) const { if (te_index < 0 || te_index >= mObject->getNumTEs()) { - return FALSE; + return false; } return (mTESelectMask & (0x1 << te_index)) != 0; } @@ -7062,7 +7062,7 @@ void LLSelectNode::saveTextureScaleRatios(LLRender::eTexIndex index_to_query) // This implementation should be similar to LLTask::allowOperationOnTask -BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const +bool LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const { // Extract ownership. bool object_is_group_owned = false; @@ -7146,7 +7146,7 @@ BOOL LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power) if (PERM_OWNER == op) { // This this was just a check for ownership, we can now return the answer. - return (proxy_agent_id == object_owner_id ? TRUE : FALSE); + return (proxy_agent_id == object_owner_id ? true : false); } // check permissions to see if the agent can operate @@ -7183,7 +7183,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) return; } - BOOL is_hud_object = objectp->isHUDAttachment(); + bool is_hud_object = objectp->isHUDAttachment(); if (mSilhouetteVertices.size() == 0 || mSilhouetteNormals.size() != mSilhouetteVertices.size()) { @@ -7425,7 +7425,7 @@ void LLSelectMgr::updateSelectionCenter() // nothing selected, probably grabbing // Ignore by setting to avatar origin. mSelectionCenterGlobal.clearVec(); - mShowSelection = FALSE; + mShowSelection = false; mSelectionBBox = LLBBox(); resetAgentHUDZoom(); } @@ -7439,7 +7439,7 @@ void LLSelectMgr::updateSelectionCenter() resetAgentHUDZoom(); } - mShowSelection = FALSE; + mShowSelection = false; LLBBox bbox; // have stuff selected @@ -7448,7 +7448,7 @@ void LLSelectMgr::updateSelectionCenter() // Initialize the bounding box to the root prim, so the BBox orientation // matches the root prim's (affecting the orientation of the manipulators). - bbox.addBBoxAgent( (mSelectedObjects->getFirstRootObject(TRUE))->getBoundingBoxAgent() ); + bbox.addBBoxAgent( (mSelectedObjects->getFirstRootObject(true))->getBoundingBoxAgent() ); for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); iter != mSelectedObjects->end(); iter++) @@ -7463,7 +7463,7 @@ void LLSelectMgr::updateSelectionCenter() !root->isChild(gAgentAvatarp) && // not the object you're sitting on !object->isAvatar()) // not another avatar { - mShowSelection = TRUE; + mShowSelection = true; } bbox.addBBoxAgent( object->getBoundingBoxAgent() ); @@ -7617,7 +7617,7 @@ bool LLSelectMgr::canUndo() const //----------------------------------------------------------------------------- void LLSelectMgr::undo() { - BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); + bool select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); LLUUID group_id(gAgent.getGroupID()); sendListToRegions("Undo", packAgentAndSessionAndGroupID, packObjectID, logNoOp, &group_id, select_linked_set ? SEND_ONLY_ROOTS : SEND_CHILDREN_FIRST); } @@ -7635,7 +7635,7 @@ bool LLSelectMgr::canRedo() const //----------------------------------------------------------------------------- void LLSelectMgr::redo() { - BOOL select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); + bool select_linked_set = !gSavedSettings.getBOOL("EditLinkedParts"); LLUUID group_id(gAgent.getGroupID()); sendListToRegions("Redo", packAgentAndSessionAndGroupID, packObjectID, logNoOp, &group_id, select_linked_set ? SEND_ONLY_ROOTS : SEND_CHILDREN_FIRST); } @@ -7707,7 +7707,7 @@ bool LLSelectMgr::canDuplicate() const void LLSelectMgr::duplicate() { LLVector3 offset(0.5f, 0.5f, 0.f); - selectDuplicate(offset, TRUE); + selectDuplicate(offset, true); } ESelectType LLSelectMgr::getSelectTypeForObject(LLViewerObject* object) @@ -7746,17 +7746,17 @@ void LLSelectMgr::validateSelection() getSelection()->applyToObjects(&func); } -BOOL LLSelectMgr::canSelectObject(LLViewerObject* object, BOOL ignore_select_owned) +bool LLSelectMgr::canSelectObject(LLViewerObject* object, bool ignore_select_owned) { // Never select dead objects if (!object || object->isDead()) { - return FALSE; + return false; } if (mForceSelection) { - return TRUE; + return true; } if(!ignore_select_owned) @@ -7765,38 +7765,38 @@ BOOL LLSelectMgr::canSelectObject(LLViewerObject* object, BOOL ignore_select_own (gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced()))) { // only select my own objects - return FALSE; + return false; } } // FIRE-14593: Option to select only copyable objects if (!object->permCopy() && gSavedSettings.getBOOL("FSSelectCopyableOnly")) { - return FALSE; + return false; } // // FIRE-17696: Option to select only locked objects if (gSavedSettings.getBOOL("FSSelectLockedOnly") && object->permMove() && !object->isPermanentEnforced()) { - return FALSE; + return false; } // // Can't select orphans - if (object->isOrphaned()) return FALSE; + if (object->isOrphaned()) return false; // Can't select avatars - if (object->isAvatar()) return FALSE; + if (object->isAvatar()) return false; // Can't select land - if (object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH) return FALSE; + if (object->getPCode() == LLViewerObject::LL_VO_SURFACE_PATCH) return false; ESelectType selection_type = getSelectTypeForObject(object); - if (mSelectedObjects->getObjectCount() > 0 && mSelectedObjects->mSelectType != selection_type) return FALSE; + if (mSelectedObjects->getObjectCount() > 0 && mSelectedObjects->mSelectType != selection_type) return false; - return TRUE; + return true; } -BOOL LLSelectMgr::setForceSelection(BOOL force) +bool LLSelectMgr::setForceSelection(bool force) { std::swap(mForceSelection,force); return force; @@ -7980,7 +7980,7 @@ LLSelectNode* LLObjectSelection::findNode(LLViewerObject* objectp) //----------------------------------------------------------------------------- // isEmpty() //----------------------------------------------------------------------------- -BOOL LLObjectSelection::isEmpty() const +bool LLObjectSelection::isEmpty() const { return (mList.size() == 0); } @@ -8370,9 +8370,9 @@ bool LLObjectSelection::applyToRootNodes(LLSelectedNodeFunctor *func, bool first return result; } -BOOL LLObjectSelection::isMultipleTESelected() +bool LLObjectSelection::isMultipleTESelected() { - BOOL te_selected = FALSE; + bool te_selected = false; // ...all faces for (LLObjectSelection::iterator iter = begin(); iter != end(); iter++) @@ -8384,19 +8384,19 @@ BOOL LLObjectSelection::isMultipleTESelected() { if(te_selected) { - return TRUE; + return true; } - te_selected = TRUE; + te_selected = true; } } } - return FALSE; + return false; } //----------------------------------------------------------------------------- // contains() //----------------------------------------------------------------------------- -BOOL LLObjectSelection::contains(LLViewerObject* object) +bool LLObjectSelection::contains(LLViewerObject* object) { return findNode(object) != NULL; } @@ -8405,7 +8405,7 @@ BOOL LLObjectSelection::contains(LLViewerObject* object) //----------------------------------------------------------------------------- // contains() //----------------------------------------------------------------------------- -BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te) +bool LLObjectSelection::contains(LLViewerObject* object, S32 te) { if (te == SELECT_ALL_TES) { @@ -8419,10 +8419,10 @@ BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te) // Optimization if (nodep->getTESelectMask() == TE_SELECT_MASK_ALL) { - return TRUE; + return true; } - BOOL all_selected = TRUE; + bool all_selected = true; for (S32 i = 0; i < object->getNumTEs(); i++) { all_selected = all_selected && nodep->isTESelected(i); @@ -8430,7 +8430,7 @@ BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te) return all_selected; } } - return FALSE; + return false; } else { @@ -8440,15 +8440,15 @@ BOOL LLObjectSelection::contains(LLViewerObject* object, S32 te) LLSelectNode* nodep = *iter; if (nodep->getObject() == object && nodep->isTESelected(te)) { - return TRUE; + return true; } } - return FALSE; + return false; } } -// returns TRUE is any node is currenly worn as an attachment -BOOL LLObjectSelection::isAttachment() +// returns true is any node is currenly worn as an attachment +bool LLObjectSelection::isAttachment() { return (mSelectType == SELECT_TYPE_ATTACHMENT || mSelectType == SELECT_TYPE_HUD); } @@ -8489,7 +8489,7 @@ LLSelectNode* LLObjectSelection::getFirstNode(LLSelectedNodeFunctor* func) return NULL; } -LLSelectNode* LLObjectSelection::getFirstRootNode(LLSelectedNodeFunctor* func, BOOL non_root_ok) +LLSelectNode* LLObjectSelection::getFirstRootNode(LLSelectedNodeFunctor* func, bool non_root_ok) { for (root_iterator iter = root_begin(); iter != root_end(); ++iter) { @@ -8511,7 +8511,7 @@ LLSelectNode* LLObjectSelection::getFirstRootNode(LLSelectedNodeFunctor* func, B //----------------------------------------------------------------------------- // getFirstSelectedObject //----------------------------------------------------------------------------- -LLViewerObject* LLObjectSelection::getFirstSelectedObject(LLSelectedNodeFunctor* func, BOOL get_parent) +LLViewerObject* LLObjectSelection::getFirstSelectedObject(LLSelectedNodeFunctor* func, bool get_parent) { LLSelectNode* res = getFirstNode(func); if (res && get_parent) @@ -8537,7 +8537,7 @@ LLViewerObject* LLObjectSelection::getFirstObject() //----------------------------------------------------------------------------- // getFirstRootObject() //----------------------------------------------------------------------------- -LLViewerObject* LLObjectSelection::getFirstRootObject(BOOL non_root_ok) +LLViewerObject* LLObjectSelection::getFirstRootObject(bool non_root_ok) { LLSelectNode* res = getFirstRootNode(NULL, non_root_ok); return res ? res->getObject() : NULL; @@ -8546,7 +8546,7 @@ LLViewerObject* LLObjectSelection::getFirstRootObject(BOOL non_root_ok) //----------------------------------------------------------------------------- // getFirstMoveableNode() //----------------------------------------------------------------------------- -LLSelectNode* LLObjectSelection::getFirstMoveableNode(BOOL get_root_first) +LLSelectNode* LLObjectSelection::getFirstMoveableNode(bool get_root_first) { struct f : public LLSelectedNodeFunctor { @@ -8556,14 +8556,14 @@ LLSelectNode* LLObjectSelection::getFirstMoveableNode(BOOL get_root_first) return obj && obj->permMove() && !obj->isPermanentEnforced(); } } func; - LLSelectNode* res = get_root_first ? getFirstRootNode(&func, TRUE) : getFirstNode(&func); + LLSelectNode* res = get_root_first ? getFirstRootNode(&func, true) : getFirstNode(&func); return res; } //----------------------------------------------------------------------------- // getFirstCopyableObject() //----------------------------------------------------------------------------- -LLViewerObject* LLObjectSelection::getFirstCopyableObject(BOOL get_parent) +LLViewerObject* LLObjectSelection::getFirstCopyableObject(bool get_parent) { struct f : public LLSelectedNodeFunctor { @@ -8611,7 +8611,7 @@ LLViewerObject* LLObjectSelection::getFirstDeleteableObject() //----------------------------------------------------------------------------- // getFirstEditableObject() //----------------------------------------------------------------------------- -LLViewerObject* LLObjectSelection::getFirstEditableObject(BOOL get_parent) +LLViewerObject* LLObjectSelection::getFirstEditableObject(bool get_parent) { struct f : public LLSelectedNodeFunctor { @@ -8627,7 +8627,7 @@ LLViewerObject* LLObjectSelection::getFirstEditableObject(BOOL get_parent) //----------------------------------------------------------------------------- // getFirstMoveableObject() //----------------------------------------------------------------------------- -LLViewerObject* LLObjectSelection::getFirstMoveableObject(BOOL get_parent) +LLViewerObject* LLObjectSelection::getFirstMoveableObject(bool get_parent) { struct f : public LLSelectedNodeFunctor { @@ -8643,7 +8643,7 @@ LLViewerObject* LLObjectSelection::getFirstMoveableObject(BOOL get_parent) //----------------------------------------------------------------------------- // getFirstUndoEnabledObject() //----------------------------------------------------------------------------- -LLViewerObject* LLObjectSelection::getFirstUndoEnabledObject(BOOL get_parent) +LLViewerObject* LLObjectSelection::getFirstUndoEnabledObject(bool get_parent) { struct f : public LLSelectedNodeFunctor { @@ -8777,7 +8777,7 @@ bool LLSelectMgr::selectionMove(const LLVector3& displ, if (enable_pos && enable_rot && obj->mDrawable.notNull()) { - gPipeline.markMoved(obj->mDrawable, TRUE); + gPipeline.markMoved(obj->mDrawable, true); } } @@ -8856,10 +8856,10 @@ void LLSelectMgr::sendSelectionMove() // Warning when trying to duplicate while in edit linked parts/select face mode //----------------------------------------------------------------------------- -// selectGetNoIndividual() - returns TRUE if current selection does not contain +// selectGetNoIndividual() - returns true if current selection does not contain // individual selections (edit linked parts, select face) //----------------------------------------------------------------------------- -BOOL LLSelectMgr::selectGetNoIndividual() +bool LLSelectMgr::selectGetNoIndividual() { for (LLObjectSelection::iterator iter = getSelection()->begin(); iter != getSelection()->end(); iter++ ) @@ -8867,10 +8867,10 @@ BOOL LLSelectMgr::selectGetNoIndividual() LLSelectNode* node = *iter; if(node->mIndividualSelection) { - return FALSE; + return false; } } - return TRUE; + return true; } // diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index c67e8d9f6b..3d47ecf961 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -102,7 +102,7 @@ const S32 SELECT_ALL_TES = -1; const S32 SELECT_MAX_TES = 32; // Do something to all objects in the selection manager. -// The BOOL return value can be used to indicate if all +// The bool return value can be used to indicate if all // objects are identical (gathering information) or if // the operation was successful. struct LLSelectedObjectFunctor @@ -112,7 +112,7 @@ struct LLSelectedObjectFunctor }; // Do something to all select nodes in the selection manager. -// The BOOL return value can be used to indicate if all +// The bool return value can be used to indicate if all // objects are identical (gathering information) or if // the operation was successful. struct LLSelectedNodeFunctor @@ -187,20 +187,20 @@ void pushWireframe(LLDrawable* drawable); class LLSelectNode { public: - LLSelectNode(LLViewerObject* object, BOOL do_glow); + LLSelectNode(LLViewerObject* object, bool do_glow); LLSelectNode(const LLSelectNode& nodep); ~LLSelectNode(); - void selectAllTEs(BOOL b); - void selectTE(S32 te_index, BOOL selected); - BOOL isTESelected(S32 te_index) const; + void selectAllTEs(bool b); + void selectTE(S32 te_index, bool selected); + bool isTESelected(S32 te_index) const; bool hasSelectedTE() const { return TE_SELECT_MASK_ALL & mTESelectMask; } S32 getLastSelectedTE() const; S32 getLastOperatedTE() const { return mLastTESelected; } S32 getTESelectMask() { return mTESelectMask; } void renderOneSilhouette(const LLColor4 &color); - void setTransient(BOOL transient) { mTransient = transient; } - BOOL isTransient() const { return mTransient; } + void setTransient(bool transient) { mTransient = transient; } + bool isTransient() const { return mTransient; } LLViewerObject* getObject(); void setObject(LLViewerObject* object); // *NOTE: invalidate stored textures and colors when # faces change @@ -217,13 +217,13 @@ public: // overrides get applied in live material editor void saveGLTFMaterials(const uuid_vec_t& materials, const gltf_materials_vec_t& override_materials); - BOOL allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const; + bool allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const; public: - BOOL mIndividualSelection; // For root objects and objects individually selected + bool mIndividualSelection; // For root objects and objects individually selected - BOOL mTransient; - BOOL mValid; // is extra information valid? + bool mTransient; + bool mValid; // is extra information valid? LLPermissions* mPermissions; LLSaleInfo mSaleInfo; LLAggregatePermissions mAggregatePerm; @@ -240,7 +240,7 @@ public: LLVector3 mLastScale; LLQuaternion mSavedRotation; // for interactively modifying object rotation LLQuaternion mLastRotation; - BOOL mDuplicated; + bool mDuplicated; LLVector3d mDuplicatePos; LLQuaternion mDuplicateRot; LLUUID mItemID; @@ -257,7 +257,7 @@ public: std::vector mTextureScaleRatios; std::vector mSilhouetteVertices; // array of vertices to render silhouette of object std::vector mSilhouetteNormals; // array of normals to render silhouette of object - BOOL mSilhouetteExists; // need to generate silhouette? + bool mSilhouetteExists; // need to generate silhouette? protected: LLPointer mObject; @@ -334,21 +334,21 @@ public: void updateEffects(); - BOOL isEmpty() const; + bool isEmpty() const; LLSelectNode* getFirstNode(LLSelectedNodeFunctor* func = NULL); - LLSelectNode* getFirstRootNode(LLSelectedNodeFunctor* func = NULL, BOOL non_root_ok = FALSE); - LLViewerObject* getFirstSelectedObject(LLSelectedNodeFunctor* func, BOOL get_parent = FALSE); + LLSelectNode* getFirstRootNode(LLSelectedNodeFunctor* func = NULL, bool non_root_ok = false); + LLViewerObject* getFirstSelectedObject(LLSelectedNodeFunctor* func, bool get_parent = false); LLViewerObject* getFirstObject(); - LLViewerObject* getFirstRootObject(BOOL non_root_ok = FALSE); + LLViewerObject* getFirstRootObject(bool non_root_ok = false); - LLSelectNode* getFirstMoveableNode(BOOL get_root_first = FALSE); + LLSelectNode* getFirstMoveableNode(bool get_root_first = false); - LLViewerObject* getFirstEditableObject(BOOL get_parent = FALSE); - LLViewerObject* getFirstCopyableObject(BOOL get_parent = FALSE); + LLViewerObject* getFirstEditableObject(bool get_parent = false); + LLViewerObject* getFirstCopyableObject(bool get_parent = false); LLViewerObject* getFirstDeleteableObject(); - LLViewerObject* getFirstMoveableObject(BOOL get_parent = FALSE); - LLViewerObject* getFirstUndoEnabledObject(BOOL get_parent = FALSE); + LLViewerObject* getFirstMoveableObject(bool get_parent = false); + LLViewerObject* getFirstUndoEnabledObject(bool get_parent = false); /// Return the object that lead to this selection, possible a child LLViewerObject* getPrimaryObject() { return mPrimaryObject; } @@ -374,19 +374,19 @@ public: S32 getTECount(); S32 getRootObjectCount(); - BOOL isMultipleTESelected(); - BOOL contains(LLViewerObject* object); - BOOL contains(LLViewerObject* object, S32 te); + bool isMultipleTESelected(); + bool contains(LLViewerObject* object); + bool contains(LLViewerObject* object, S32 te); - // returns TRUE is any node is currenly worn as an attachment - BOOL isAttachment(); + // returns true is any node is currenly worn as an attachment + bool isAttachment(); bool checkAnimatedObjectEstTris(); bool checkAnimatedObjectLinkable(); // Apply functors to various subsets of the selected objects - // If firstonly is FALSE, returns the AND of all apply() calls. - // Else returns TRUE immediately if any apply() call succeeds (i.e. OR with early exit) + // If firstonly is false, returns the AND of all apply() calls. + // Else returns true immediately if any apply() call succeeds (i.e. OR with early exit) bool applyToRootObjects(LLSelectedObjectFunctor* func, bool firstonly = false); bool applyToObjects(LLSelectedObjectFunctor* func); bool applyToTEs(LLSelectedTEFunctor* func, bool firstonly = false); @@ -501,9 +501,9 @@ private: class LLSelectMgr : public LLEditMenuHandler, public LLSimpleton, public nd::selection::PropertiesServer { public: - static BOOL sRectSelectInclusive; // do we need to surround an object to pick it? - static BOOL sRenderHiddenSelections; // do we show selection silhouettes that are occluded? - static BOOL sRenderLightRadius; // do we show the radius of selected lights? + static bool sRectSelectInclusive; // do we need to surround an object to pick it? + static bool sRenderHiddenSelections; // do we show selection silhouettes that are occluded? + static bool sRenderLightRadius; // do we show the radius of selected lights? static F32 sHighlightThickness; static F32 sHighlightUScale; @@ -583,7 +583,7 @@ public: // Returns the previous value of mForceSelection - BOOL setForceSelection(BOOL force); + bool setForceSelection(bool force); //////////////////////////////////////////////////////////////// // Selection methods @@ -598,13 +598,13 @@ public: // // *NOTE: You must hold on to the object selection handle, otherwise // the objects will be automatically deselected in 1 frame. - LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE, BOOL ignore_select_owned = FALSE); + LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, bool add_to_end = false, bool ignore_select_owned = false); // For when you want just a child object. LLObjectSelectionHandle selectObjectOnly(LLViewerObject* object, S32 face = SELECT_ALL_TES); // Same as above, but takes a list of objects. Used by rectangle select. - LLObjectSelectionHandle selectObjectAndFamily(const std::vector& object_list, BOOL send_to_sim = TRUE); + LLObjectSelectionHandle selectObjectAndFamily(const std::vector& object_list, bool send_to_sim = true); // converts all objects currently highlighted to a selection, and returns it LLObjectSelectionHandle selectHighlightedObjects(); @@ -621,8 +621,8 @@ public: // Remove //////////////////////////////////////////////////////////////// - void deselectObjectOnly(LLViewerObject* object, BOOL send_to_sim = TRUE); - void deselectObjectAndFamily(LLViewerObject* object, BOOL send_to_sim = TRUE, BOOL include_entire_object = FALSE); + void deselectObjectOnly(LLViewerObject* object, bool send_to_sim = true); + void deselectObjectAndFamily(LLViewerObject* object, bool send_to_sim = true, bool include_entire_object = false); // Send deselect messages to simulator, then clear the list void deselectAll(); @@ -641,7 +641,7 @@ public: void unhighlightObjectAndFamily(LLViewerObject *objectp); void unhighlightAll(); - BOOL removeObjectFromSelections(const LLUUID &id); + bool removeObjectFromSelections(const LLUUID &id); //////////////////////////////////////////////////////////////// // Selection editing @@ -674,10 +674,10 @@ public: EGridMode getGridMode() { return mGridMode; } void getGrid(LLVector3& origin, LLQuaternion& rotation, LLVector3 &scale, bool for_snap_guides = false); - BOOL getTEMode() const { return mTEMode; } - void setTEMode(BOOL b) { mTEMode = b; } + bool getTEMode() const { return mTEMode; } + void setTEMode(bool b) { mTEMode = b; } - BOOL shouldShowSelection() const { return mShowSelection; } + bool shouldShowSelection() const { return mShowSelection; } LLBBox getBBoxOfSelection() const; LLBBox getSavedBBoxOfSelection() const { return mSavedSelectionBBox; } @@ -686,8 +686,8 @@ public: void cleanup(); void updateSilhouettes(); - void renderSilhouettes(BOOL for_hud); - void enableSilhouette(BOOL enable) { mRenderSilhouettes = enable; } + void renderSilhouettes(bool for_hud); + void enableSilhouette(bool enable) { mRenderSilhouettes = enable; } // show/hide build highlight void setFSShowHideHighlight(EFSShowHideHighlight state) { mFSShowHideHighlight = state; } @@ -701,15 +701,15 @@ public: void saveSelectedShinyColors(); void saveSelectedObjectTextures(); - void selectionUpdatePhysics(BOOL use_physics); - void selectionUpdateTemporary(BOOL is_temporary); - void selectionUpdatePhantom(BOOL is_ghost); + void selectionUpdatePhysics(bool use_physics); + void selectionUpdateTemporary(bool is_temporary); + void selectionUpdatePhantom(bool is_ghost); void selectionDump(); - BOOL selectionAllPCode(LLPCode code); // all objects have this PCode - BOOL selectionGetClickAction(U8 *out_action); + bool selectionAllPCode(LLPCode code); // all objects have this PCode + bool selectionGetClickAction(U8 *out_action); bool selectionGetIncludeInSearch(bool* include_in_search_out); // true if all selected objects have same - BOOL selectionGetGlow(F32 *glow); + bool selectionGetGlow(F32 *glow); void selectionSetPhysicsType(U8 type); void selectionSetGravity(F32 gravity); @@ -724,7 +724,7 @@ public: void selectionSetAlphaOnly(const F32 alpha); // Set only the alpha channel void selectionRevertColors(); void selectionRevertShinyColors(); - BOOL selectionRevertTextures(); + bool selectionRevertTextures(); void selectionRevertGLTFMaterials(); void selectionSetBumpmap( U8 bumpmap, const LLUUID &image_id ); void selectionSetTexGen( U8 texgen ); @@ -737,14 +737,14 @@ public: void selectionSetMaterialParams(LLSelectedTEMaterialFunctor* material_func, int specific_te = -1); void selectionRemoveMaterial(); - void selectionSetObjectPermissions(U8 perm_field, BOOL set, U32 perm_mask, BOOL override = FALSE); + void selectionSetObjectPermissions(U8 perm_field, bool set, U32 perm_mask, bool override = false); void selectionSetObjectName(const std::string& name); void selectionSetObjectDescription(const std::string& desc); void selectionSetObjectCategory(const LLCategory& category); void selectionSetObjectSaleInfo(const LLSaleInfo& sale_info); void selectionTexScaleAutofit(F32 repeats_per_meter); - void adjustTexturesByScale(BOOL send_to_sim, BOOL stretch); + void adjustTexturesByScale(bool send_to_sim, bool stretch); bool selectionMove(const LLVector3& displ, F32 rx, F32 ry, F32 rz, U32 update_type); @@ -756,116 +756,116 @@ public: // will make sure all selected object meet current criteria, or deselect them otherwise void validateSelection(); - // returns TRUE if it is possible to select this object - BOOL canSelectObject(LLViewerObject* object, BOOL ignore_select_owned = FALSE); + // returns true if it is possible to select this object + bool canSelectObject(LLViewerObject* object, bool ignore_select_owned = false); - // Returns TRUE if the viewer has information on all selected objects - BOOL selectGetAllRootsValid(); - BOOL selectGetAllValid(); - BOOL selectGetAllValidAndObjectsFound(); + // Returns true if the viewer has information on all selected objects + bool selectGetAllRootsValid(); + bool selectGetAllValid(); + bool selectGetAllValidAndObjectsFound(); - // returns TRUE if you can modify all selected objects. - BOOL selectGetRootsModify(); - BOOL selectGetModify(); + // returns true if you can modify all selected objects. + bool selectGetRootsModify(); + bool selectGetModify(); - // returns TRUE if all objects are in same region - BOOL selectGetSameRegion(); + // returns true if all objects are in same region + bool selectGetSameRegion(); - // returns TRUE if is all objects are non-permanent-enforced - BOOL selectGetRootsNonPermanentEnforced(); - BOOL selectGetNonPermanentEnforced(); + // returns true if is all objects are non-permanent-enforced + bool selectGetRootsNonPermanentEnforced(); + bool selectGetNonPermanentEnforced(); - // returns TRUE if is all objects are permanent - BOOL selectGetRootsPermanent(); - BOOL selectGetPermanent(); + // returns true if is all objects are permanent + bool selectGetRootsPermanent(); + bool selectGetPermanent(); - // returns TRUE if is all objects are character - BOOL selectGetRootsCharacter(); - BOOL selectGetCharacter(); + // returns true if is all objects are character + bool selectGetRootsCharacter(); + bool selectGetCharacter(); - // returns TRUE if is all objects are not permanent - BOOL selectGetRootsNonPathfinding(); - BOOL selectGetNonPathfinding(); + // returns true if is all objects are not permanent + bool selectGetRootsNonPathfinding(); + bool selectGetNonPathfinding(); - // returns TRUE if is all objects are not permanent - BOOL selectGetRootsNonPermanent(); - BOOL selectGetNonPermanent(); + // returns true if is all objects are not permanent + bool selectGetRootsNonPermanent(); + bool selectGetNonPermanent(); - // returns TRUE if is all objects are not character - BOOL selectGetRootsNonCharacter(); - BOOL selectGetNonCharacter(); + // returns true if is all objects are not character + bool selectGetRootsNonCharacter(); + bool selectGetNonCharacter(); - BOOL selectGetEditableLinksets(); - BOOL selectGetViewableCharacters(); + bool selectGetEditableLinksets(); + bool selectGetViewableCharacters(); - // returns TRUE if selected objects can be transferred. - BOOL selectGetRootsTransfer(); + // returns true if selected objects can be transferred. + bool selectGetRootsTransfer(); - // returns TRUE if selected objects can be copied. - BOOL selectGetRootsCopy(); + // returns true if selected objects can be copied. + bool selectGetRootsCopy(); - BOOL selectGetCreator(LLUUID& id, std::string& name); // TRUE if all have same creator, returns id - BOOL selectGetOwner(LLUUID& id, std::string& name); // TRUE if all objects have same owner, returns id - BOOL selectGetLastOwner(LLUUID& id, std::string& name); // TRUE if all objects have same owner, returns id + bool selectGetCreator(LLUUID& id, std::string& name); // true if all have same creator, returns id + bool selectGetOwner(LLUUID& id, std::string& name); // true if all objects have same owner, returns id + bool selectGetLastOwner(LLUUID& id, std::string& name); // true if all objects have same owner, returns id - // returns TRUE if all are the same. id is stuffed with + // returns true if all are the same. id is stuffed with // the value found if available. - BOOL selectGetGroup(LLUUID& id); - BOOL selectGetPerm( U8 which_perm, U32* mask_on, U32* mask_off); // TRUE if all have data, returns two masks, each indicating which bits are all on and all off + bool selectGetGroup(LLUUID& id); + bool selectGetPerm( U8 which_perm, U32* mask_on, U32* mask_off); // true if all have data, returns two masks, each indicating which bits are all on and all off - BOOL selectIsGroupOwned(); // TRUE if all root objects have valid data and are group owned. + bool selectIsGroupOwned(); // true if all root objects have valid data and are group owned. - // returns TRUE if all the nodes are valid. Accumulates + // returns true if all the nodes are valid. Accumulates // permissions in the parameter. - BOOL selectGetPermissions(LLPermissions& perm); + bool selectGetPermissions(LLPermissions& perm); - // returns TRUE if all the nodes are valid. Depends onto "edit linked" state + // returns true if all the nodes are valid. Depends onto "edit linked" state // Children in linksets are a bit special - they require not only move permission // but also modify if "edit linked" is set, since you move them relative to parent - BOOL selectGetEditMoveLinksetPermissions(bool &move, bool &modify); + bool selectGetEditMoveLinksetPermissions(bool &move, bool &modify); // Get a bunch of useful sale information for the object(s) selected. // "_mixed" is true if not all objects have the same setting. void selectGetAggregateSaleInfo(U32 &num_for_sale, - BOOL &is_for_sale_mixed, - BOOL &is_sale_price_mixed, + bool &is_for_sale_mixed, + bool &is_sale_price_mixed, S32 &total_sale_price, S32 &individual_sale_price); - // returns TRUE if all nodes are valid. - BOOL selectGetCategory(LLCategory& category); + // returns true if all nodes are valid. + bool selectGetCategory(LLCategory& category); - // returns TRUE if all nodes are valid. method also stores an + // returns true if all nodes are valid. method also stores an // accumulated sale info. - BOOL selectGetSaleInfo(LLSaleInfo& sale_info); + bool selectGetSaleInfo(LLSaleInfo& sale_info); - // returns TRUE if all nodes are valid. fills passed in object + // returns true if all nodes are valid. fills passed in object // with the aggregate permissions of the selection. - BOOL selectGetAggregatePermissions(LLAggregatePermissions& ag_perm); + bool selectGetAggregatePermissions(LLAggregatePermissions& ag_perm); - // returns TRUE if all nodes are valid. fills passed in object + // returns true if all nodes are valid. fills passed in object // with the aggregate permissions for texture inventory items of the selection. - BOOL selectGetAggregateTexturePermissions(LLAggregatePermissions& ag_perm); + bool selectGetAggregateTexturePermissions(LLAggregatePermissions& ag_perm); LLPermissions* findObjectPermissions(const LLViewerObject* object); - BOOL isMovableAvatarSelected(); + bool isMovableAvatarSelected(); void selectDelete(); // Delete on simulator void selectForceDelete(); // just delete, no into trash - void selectDuplicate(const LLVector3& offset, BOOL select_copy); // Duplicate on simulator + void selectDuplicate(const LLVector3& offset, bool select_copy); // Duplicate on simulator void repeatDuplicate(); void selectDuplicateOnRay(const LLVector3 &ray_start_region, const LLVector3 &ray_end_region, - BOOL bypass_raycast, - BOOL ray_end_is_intersection, + bool bypass_raycast, + bool ray_end_is_intersection, const LLUUID &ray_target_id, - BOOL copy_centers, - BOOL copy_rotates, - BOOL select_copy); + bool copy_centers, + bool copy_rotates, + bool select_copy); void sendMultipleUpdate(U32 type); // Position, rotation, scale all in one - void sendOwner(const LLUUID& owner_id, const LLUUID& group_id, BOOL override = FALSE); + void sendOwner(const LLUUID& owner_id, const LLUUID& group_id, bool override = false); void sendGroup(const LLUUID& group_id); // Category ID is the UUID of the folder you want to contain the purchase. @@ -904,16 +904,16 @@ public: // Internal list maintenance functions. TODO: Make these private! void remove(std::vector& objects); - void remove(LLViewerObject* object, S32 te = SELECT_ALL_TES, BOOL undoable = TRUE); + void remove(LLViewerObject* object, S32 te = SELECT_ALL_TES, bool undoable = true); void removeAll(); - void addAsIndividual(LLViewerObject* object, S32 te = SELECT_ALL_TES, BOOL undoable = TRUE); + void addAsIndividual(LLViewerObject* object, S32 te = SELECT_ALL_TES, bool undoable = true); void promoteSelectionToRoot(); void demoteSelectionToIndividuals(); private: void convertTransient(); // converts temporarily selected objects to full-fledged selections ESelectType getSelectTypeForObject(LLViewerObject* object); - void addAsFamily(std::vector& objects, BOOL add_to_end = FALSE); + void addAsFamily(std::vector& objects, bool add_to_end = false); void generateSilhouette(LLSelectNode *nodep, const LLVector3& view_point); void updateSelectionSilhouette(LLObjectSelectionHandle object_handle, S32& num_sils_genned, std::vector& changed_objects); // Send one message to each region containing an object on selection list. @@ -990,19 +990,19 @@ private: LLVector3 mGridScale; EGridMode mGridMode; - BOOL mTEMode; // render te + bool mTEMode; // render te LLRender::eTexIndex mTextureChannel; // diff, norm, or spec, depending on UI editing mode LLVector3d mSelectionCenterGlobal; LLBBox mSelectionBBox; LLVector3d mLastSentSelectionCenterGlobal; - BOOL mShowSelection; // do we send the selection center name value and do we animate this selection? + bool mShowSelection; // do we send the selection center name value and do we animate this selection? LLVector3d mLastCameraPos; // camera position from last generation of selection silhouette - BOOL mRenderSilhouettes; // do we render the silhouette + bool mRenderSilhouettes; // do we render the silhouette LLBBox mSavedSelectionBBox; LLFrameTimer mEffectsTimer; - BOOL mForceSelection; + bool mForceSelection; std::vector mPauseRequests; @@ -1012,9 +1012,9 @@ private: // Warning when trying to duplicate while in edit linked parts/select face mode public: - // returns TRUE if current selection does not contain individual selections + // returns true if current selection does not contain individual selections // (edit linked parts, select face) - BOOL selectGetNoIndividual(); + bool selectGetNoIndividual(); // }; @@ -1034,7 +1034,7 @@ template bool LLObjectSelection::getSelectedTEValue(LLSelectedTEGet T selected_value = T(); // Now iterate through all TEs to test for sameness - bool identical = TRUE; + bool identical = true; for (iterator iter = begin(); iter != end(); iter++) { LLSelectNode* node = *iter; @@ -1105,7 +1105,7 @@ template bool LLObjectSelection::isMultipleTEValue(LLSelectedTEGetF T selected_value = T(); // Now iterate through all TEs to test for sameness - bool unique = TRUE; + bool unique = true; for (iterator iter = begin(); iter != end(); iter++) { LLSelectNode* node = *iter; diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 61bf39fa61..1e5a67302a 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -165,7 +165,7 @@ void LLSetKeyBindDialog::setParent(LLKeyBindResponderInterface* parent, LLView* } // static -bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, BOOL down) +bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, bool down) { if (sRecordKeys) { @@ -183,7 +183,7 @@ bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, BOOL down) return false; } -bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down) +bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, bool down) { if ((key == 'Q' && mask == MASK_CONTROL) || key == KEY_ESCAPE) @@ -217,7 +217,7 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down) // Masks by themself are not allowed return false; } - if (down == TRUE) + if (down == true) { // Most keys are handled on 'down' event because menu is handled on 'down' // masks are exceptions to let other keys be handled @@ -294,8 +294,8 @@ bool LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic } if (result) { - setFocus(TRUE); - gFocusMgr.setKeystrokesOnly(TRUE); + setFocus(true); + gFocusMgr.setKeystrokesOnly(true); } // ignore selection related combinations else if (down && (mask & (MASK_SHIFT | MASK_CONTROL)) == 0) @@ -317,7 +317,7 @@ bool LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic && ((mKeyFilterMask & ALLOW_MASK_MOUSE) != 0 || mask == 0)) // reserved for selection { setKeyBind(clicktype, KEY_NONE, mask, pCheckBox->getValue().asBoolean()); - result = TRUE; + result = true; if (!down) { // wait for 'up' event before closing diff --git a/indra/newview/llsetkeybinddialog.h b/indra/newview/llsetkeybinddialog.h index 1e2c585d64..57ec65f7f3 100644 --- a/indra/newview/llsetkeybinddialog.h +++ b/indra/newview/llsetkeybinddialog.h @@ -68,7 +68,7 @@ public: // Wrapper around recordAndHandleKey // It does not record, it handles, but handleKey function is already in use - static bool recordKey(KEY key, MASK mask, BOOL down); + static bool recordKey(KEY key, MASK mask, bool down); bool handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down); static void onCancel(void* user_data); @@ -81,7 +81,7 @@ public: class Updater; private: - bool recordAndHandleKey(KEY key, MASK mask, BOOL down); + bool recordAndHandleKey(KEY key, MASK mask, bool down); void setKeyBind(EMouseClickType click, KEY key, MASK mask, bool all_modes); LLKeyBindResponderInterface *pParent; LLCheckBoxCtrl *pCheckBox; diff --git a/indra/newview/llsettingspicker.cpp b/indra/newview/llsettingspicker.cpp index ebe3bc4007..6054bd026c 100644 --- a/indra/newview/llsettingspicker.cpp +++ b/indra/newview/llsettingspicker.cpp @@ -78,7 +78,7 @@ LLFloaterSettingsPicker::LLFloaterSettingsPicker(LLView * owner, LLUUID initial_ mOwnerHandle = owner->getHandle(); buildFromFile(FLOATER_DEFINITION_XML); - setCanMinimize(FALSE); + setCanMinimize(false); } @@ -115,7 +115,7 @@ bool LLFloaterSettingsPicker::postBuild() // Disable auto selecting first filtered item because it takes away // selection from the item set by LLTextureCtrl owning this floater. - mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE); + mInventoryPanel->getRootFolder()->setAutoSelectOverride(true); // don't put keyboard focus on selected item, because the selection callback // will assume that this was user input @@ -127,7 +127,7 @@ bool LLFloaterSettingsPicker::postBuild() getChild(BTN_SELECT)->setEnabled(mSettingItemID.notNull()); } - mNoCopySettingsSelected = FALSE; + mNoCopySettingsSelected = false; childSetAction(BTN_CANCEL, [this](LLUICtrl*, const LLSD& param){ onButtonCancel(); }); childSetAction(BTN_SELECT, [this](LLUICtrl*, const LLSD& param){ onButtonSelect(); }); @@ -135,7 +135,7 @@ bool LLFloaterSettingsPicker::postBuild() getChild(PNL_COMBO)->setVisible(mTrackMode != TRACK_NONE); // update permission filter once UI is fully initialized - mSavedFolderState.setApply(FALSE); + mSavedFolderState.setApply(false); return true; } @@ -149,7 +149,7 @@ void LLFloaterSettingsPicker::onClose(bool app_quitting) LLView *owner = mOwnerHandle.get(); if (owner) { - owner->setFocus(TRUE); + owner->setFocus(true); } mSettingItemID.setNull(); mInventoryPanel->getRootFolder()->clearSelection(); @@ -218,7 +218,7 @@ void LLFloaterSettingsPicker::onFilterEdit(const std::string& search_string) return; } - mSavedFolderState.setApply(TRUE); + mSavedFolderState.setApply(true); mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState); // add folder with current item to list of previously opened folders LLOpenFoldersWithSelection opener; @@ -231,7 +231,7 @@ void LLFloaterSettingsPicker::onFilterEdit(const std::string& search_string) // first letter in search term, save existing folder open state if (!mInventoryPanel->getFilter().isNotDefault()) { - mSavedFolderState.setApply(FALSE); + mSavedFolderState.setApply(false); mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState); } } diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index fb5ca2c3f4..c8bbc420d2 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -69,7 +69,7 @@ #undef VERIFY_LEGACY_CONVERSION -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; //========================================================================= namespace diff --git a/indra/newview/llshareavatarhandler.cpp b/indra/newview/llshareavatarhandler.cpp index 8c5ebb75ef..fb7be7adff 100644 --- a/indra/newview/llshareavatarhandler.cpp +++ b/indra/newview/llshareavatarhandler.cpp @@ -54,7 +54,7 @@ public: //Get the ID LLUUID id; - if (!id.set( params[0], FALSE )) + if (!id.set( params[0], false )) { return false; } diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index dae566e880..351b323a75 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -200,8 +200,8 @@ void LLSidepanelAppearance::updateToVisibility(const LLSD &new_visibility) { if (new_visibility["visible"].asBoolean()) { - const BOOL is_outfit_edit_visible = mOutfitEdit && mOutfitEdit->getVisible(); - const BOOL is_wearable_edit_visible = mEditWearable && mEditWearable->getVisible(); + const bool is_outfit_edit_visible = mOutfitEdit && mOutfitEdit->getVisible(); + const bool is_wearable_edit_visible = mEditWearable && mEditWearable->getVisible(); if (is_outfit_edit_visible || is_wearable_edit_visible) { @@ -267,7 +267,7 @@ void LLSidepanelAppearance::onOpenOutfitButtonClicked() LLAccordionCtrlTab* tab_outfits = mPanelOutfitsInventory->findChild("tab_outfits"); if (tab_outfits) { - tab_outfits->changeOpenClose(FALSE); + tab_outfits->changeOpenClose(false); LLInventoryPanel *inventory_panel = tab_outfits->findChild("outfitslist_tab"); if (inventory_panel) { @@ -276,7 +276,7 @@ void LLSidepanelAppearance::onOpenOutfitButtonClicked() if (outfit_folder) { outfit_folder->setOpen(!outfit_folder->isOpen()); - root->setSelection(outfit_folder,TRUE); + root->setSelection(outfit_folder,true); root->scrollToShowSelection(); } } @@ -294,16 +294,16 @@ void LLSidepanelAppearance::onEditAppearanceButtonClicked() void LLSidepanelAppearance::showOutfitsInventoryPanel() { - toggleWearableEditPanel(FALSE); - toggleOutfitEditPanel(FALSE); - toggleMyOutfitsPanel(TRUE, ""); + toggleWearableEditPanel(false); + toggleOutfitEditPanel(false); + toggleMyOutfitsPanel(true, ""); } void LLSidepanelAppearance::showOutfitsInventoryPanel(const std::string &tab_name) { - toggleWearableEditPanel(FALSE); - toggleOutfitEditPanel(FALSE); - toggleMyOutfitsPanel(TRUE, tab_name); + toggleWearableEditPanel(false); + toggleOutfitEditPanel(false); + toggleMyOutfitsPanel(true, tab_name); } void LLSidepanelAppearance::showOutfitEditPanel() @@ -313,7 +313,7 @@ void LLSidepanelAppearance::showOutfitEditPanel() // Accordion's state must be reset in all cases except the one when user // is returning back to the mOutfitEdit panel from the mEditWearable panel. // The simplest way to control this is to check the visibility state of the mEditWearable - // BEFORE it is changed by the call to the toggleWearableEditPanel(FALSE, NULL, TRUE). + // BEFORE it is changed by the call to the toggleWearableEditPanel(false, NULL, true). if (mEditWearable != NULL && !mEditWearable->getVisible() && mOutfitEdit != NULL) { mOutfitEdit->resetAccordionState(); @@ -328,16 +328,16 @@ void LLSidepanelAppearance::showOutfitEditPanel() return; } - toggleMyOutfitsPanel(FALSE, ""); - toggleWearableEditPanel(FALSE, NULL, TRUE); // don't switch out of edit appearance mode - toggleOutfitEditPanel(TRUE); + toggleMyOutfitsPanel(false, ""); + toggleWearableEditPanel(false, NULL, true); // don't switch out of edit appearance mode + toggleOutfitEditPanel(true); } -void LLSidepanelAppearance::showWearableEditPanel(LLViewerWearable *wearable /* = NULL*/, BOOL disable_camera_switch) +void LLSidepanelAppearance::showWearableEditPanel(LLViewerWearable *wearable /* = NULL*/, bool disable_camera_switch) { - toggleMyOutfitsPanel(FALSE, ""); - toggleOutfitEditPanel(FALSE, TRUE); // don't switch out of edit appearance mode - toggleWearableEditPanel(TRUE, wearable, disable_camera_switch); + toggleMyOutfitsPanel(false, ""); + toggleOutfitEditPanel(false, true); // don't switch out of edit appearance mode + toggleWearableEditPanel(true, wearable, disable_camera_switch); } void LLSidepanelAppearance::toggleMyOutfitsPanel(bool visible, const std::string& tab_name) @@ -407,7 +407,7 @@ void LLSidepanelAppearance::toggleWearableEditPanel(bool visible, LLViewerWearab // If we're just switching between outfit and wearable editing or updating item, // don't end customization and don't switch camera // Don't end customization and don't switch camera without visibility change - BOOL change_state = !disable_camera_switch && mEditWearable->getVisible() != visible; + bool change_state = !disable_camera_switch && mEditWearable->getVisible() != visible; if (!wearable) { @@ -458,18 +458,18 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) std::string string_name = gAgentWearables.isCOFChangeInProgress() ? "Changing outfits" : "No Outfit"; mCurrentLookName->setText(getString(string_name)); - mOpenOutfitBtn->setEnabled(FALSE); + mOpenOutfitBtn->setEnabled(false); } else { mCurrentLookName->setText(name); // Can't just call update verbs since the folder link may not have been created yet. - mOpenOutfitBtn->setEnabled(TRUE); + mOpenOutfitBtn->setEnabled(true); } } //static -void LLSidepanelAppearance::editWearable(LLViewerWearable *wearable, LLView *data, BOOL disable_camera_switch) +void LLSidepanelAppearance::editWearable(LLViewerWearable *wearable, LLView *data, bool disable_camera_switch) { LLFloaterSidePanelContainer::showPanel("appearance", LLSD()); LLSidepanelAppearance *panel = dynamic_cast(data); diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 3f33a3e946..3541639c7d 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -58,7 +58,7 @@ public: void refreshCurrentOutfitName(const std::string& name = ""); - static void editWearable(LLViewerWearable *wearable, LLView *data, BOOL disable_camera_switch = FALSE); + static void editWearable(LLViewerWearable *wearable, LLView *data, bool disable_camera_switch = false); void fetchInventory(); void inventoryFetched(); @@ -66,7 +66,7 @@ public: void showOutfitsInventoryPanel(); // last selected void showOutfitsInventoryPanel(const std::string& tab_name); void showOutfitEditPanel(); - void showWearableEditPanel(LLViewerWearable *wearable = NULL, BOOL disable_camera_switch = FALSE); + void showWearableEditPanel(LLViewerWearable *wearable = NULL, bool disable_camera_switch = false); void setWearablesLoading(bool val); void showDefaultSubpart(); void updateScrollingPanelList(); diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 066411f1c6..35f77e5e38 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -486,7 +486,7 @@ void LLSidepanelInventory::onOpen(const LLSD& key) { // set focus on filter editor when side tray inventory shows up LLFilterEditor* filter_editor = mPanelMainInventory->getChild("inventory search editor"); - filter_editor->setFocus(TRUE); + filter_editor->setFocus(true); return; } } @@ -515,14 +515,14 @@ void LLSidepanelInventory::onBackButtonClicked() showInventoryPanel(); } -void LLSidepanelInventory::onSelectionChange(const std::deque &items, BOOL user_action) +void LLSidepanelInventory::onSelectionChange(const std::deque &items, bool user_action) { } void LLSidepanelInventory::showInventoryPanel() { - mInventoryPanel->setVisible(TRUE); + mInventoryPanel->setVisible(true); } void LLSidepanelInventory::initInventoryViews() @@ -633,7 +633,7 @@ void LLSidepanelInventory::selectAllItemsPanel() } -BOOL LLSidepanelInventory::isMainInventoryPanelActive() const +bool LLSidepanelInventory::isMainInventoryPanelActive() const { return mInventoryPanel->getVisible(); } diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index f8cce6cbdf..0950d87350 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -62,7 +62,7 @@ public: LLInventoryPanel* getInboxPanel() const { return mInventoryPanelInbox.get(); } LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; } - BOOL isMainInventoryPanelActive() const; + bool isMainInventoryPanelActive() const; void clearSelections(bool clearMain, bool clearInbox); std::set getInboxSelectionList(); @@ -95,7 +95,7 @@ protected: // Tracks highlighted (selected) item in inventory panel. LLInventoryItem *getSelectedItem(); U32 getSelectedCount(); - void onSelectionChange(const std::deque &items, BOOL user_action); + void onSelectionChange(const std::deque &items, bool user_action); // "wear", "teleport", etc. void performActionOnSelection(const std::string &action); diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp index 5650d3b622..20da837099 100644 --- a/indra/newview/llsidepanelinventorysubpanel.cpp +++ b/indra/newview/llsidepanelinventorysubpanel.cpp @@ -48,8 +48,8 @@ // Default constructor LLSidepanelInventorySubpanel::LLSidepanelInventorySubpanel(const LLPanel::Params& p) : LLPanel(p), - mIsDirty(TRUE), - mIsEditing(FALSE), + mIsDirty(true), + mIsEditing(false), mCancelBtn(NULL) { } @@ -79,22 +79,22 @@ void LLSidepanelInventorySubpanel::setVisible(bool visible) LLPanel::setVisible(visible); } -void LLSidepanelInventorySubpanel::setIsEditing(BOOL edit) +void LLSidepanelInventorySubpanel::setIsEditing(bool edit) { mIsEditing = edit; - mIsDirty = TRUE; + mIsDirty = true; } -BOOL LLSidepanelInventorySubpanel::getIsEditing() const +bool LLSidepanelInventorySubpanel::getIsEditing() const { - return TRUE; // Default everything to edit mode since we're not using an edit button anymore. + return true; // Default everything to edit mode since we're not using an edit button anymore. // return mIsEditing; } void LLSidepanelInventorySubpanel::reset() { - mIsDirty = TRUE; + mIsDirty = true; } void LLSidepanelInventorySubpanel::draw() @@ -103,7 +103,7 @@ void LLSidepanelInventorySubpanel::draw() { refresh(); updateVerbs(); - mIsDirty = FALSE; + mIsDirty = false; } LLPanel::draw(); @@ -111,8 +111,8 @@ void LLSidepanelInventorySubpanel::draw() void LLSidepanelInventorySubpanel::dirty() { - mIsDirty = TRUE; - setIsEditing(FALSE); + mIsDirty = true; + setIsEditing(false); } void LLSidepanelInventorySubpanel::updateVerbs() @@ -125,14 +125,14 @@ void LLSidepanelInventorySubpanel::updateVerbs() void LLSidepanelInventorySubpanel::onEditButtonClicked() { - setIsEditing(TRUE); + setIsEditing(true); refresh(); updateVerbs(); } void LLSidepanelInventorySubpanel::onCancelButtonClicked() { - setIsEditing(FALSE); + setIsEditing(false); refresh(); updateVerbs(); } diff --git a/indra/newview/llsidepanelinventorysubpanel.h b/indra/newview/llsidepanelinventorysubpanel.h index f6c18c727e..3c13842bc0 100644 --- a/indra/newview/llsidepanelinventorysubpanel.h +++ b/indra/newview/llsidepanelinventorysubpanel.h @@ -49,13 +49,13 @@ public: virtual void reset(); void dirty(); - void setIsEditing(BOOL edit); + void setIsEditing(bool edit); protected: virtual void refresh() = 0; virtual void save() = 0; virtual void updateVerbs(); - BOOL getIsEditing() const; + bool getIsEditing() const; // // UI Elements @@ -66,8 +66,8 @@ protected: LLButton* mCancelBtn; private: - BOOL mIsDirty; // item properties need to be updated - BOOL mIsEditing; // if we're in edit mode + bool mIsDirty; // item properties need to be updated + bool mIsEditing; // if we're in edit mode }; #endif // LL_LLSIDEPANELINVENTORYSUBPANEL_H diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index f725a05f85..34a4c6fad6 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -296,16 +296,16 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // do not enable the UI for incomplete items. bool is_complete = item->isFinished(); - const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType()); - const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD); - const BOOL is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS); + const bool cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType()); + const bool is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD); + const bool is_settings = (item->getInventoryType() == LLInventoryType::IT_SETTINGS); const LLPermissions& perm = item->getPermissions(); - const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, + const bool can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); - const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, + const bool can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_SET_SALE) && !cannot_restrict_permissions; - const BOOL is_link = item->getIsLinkType(); + const bool is_link = item->getIsLinkType(); const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); bool not_in_trash = (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id); @@ -314,7 +314,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // item in it. LLViewerObject* object = NULL; if(!mObjectID.isNull()) object = gObjectList.findObject(mObjectID); - BOOL is_obj_modify = TRUE; + bool is_obj_modify = true; if(object) { is_obj_modify = object->permOwnerModify(); @@ -322,10 +322,10 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if(item->getInventoryType() == LLInventoryType::IT_LSL) { - getChildView("LabelItemExperienceTitle")->setVisible(TRUE); + getChildView("LabelItemExperienceTitle")->setVisible(true); LLTextBox* tb = getChild("LabelItemExperience"); tb->setText(getString("loading_experience")); - tb->setVisible(TRUE); + tb->setVisible(true); std::string url = std::string(); if(object && object->getRegion()) { @@ -338,19 +338,19 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) ////////////////////// // ITEM NAME & DESC // ////////////////////// - BOOL is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm, + bool is_modifiable = gAgent.allowOperation(PERM_MODIFY, perm, GP_OBJECT_MANIPULATE) && is_obj_modify && is_complete && not_in_trash; - //getChildView("LabelItemNameTitle")->setEnabled(TRUE); // Doesn't exist as of 04-10-2023 + //getChildView("LabelItemNameTitle")->setEnabled(true); // Doesn't exist as of 04-10-2023 getChildView("LabelItemName")->setEnabled(is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards getChild("LabelItemName")->setValue(item->getName()); - getChildView("LabelItemDescTitle")->setEnabled(TRUE); + getChildView("LabelItemDescTitle")->setEnabled(true); getChildView("LabelItemDesc")->setEnabled(is_modifiable); getChild("LabelItemDesc")->setValue(item->getDescription()); getChild("item_thumbnail")->setValue(item->getThumbnailUUID()); - LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE); + LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), false); mItemTypeIcon->setImage(icon_img); // Style for creator and owner links @@ -409,16 +409,16 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // [/RLVa:KB] } - getChildView("LabelCreatorTitle")->setEnabled(TRUE); -// mLabelCreatorName->setEnabled(TRUE); + getChildView("LabelCreatorTitle")->setEnabled(true); +// mLabelCreatorName->setEnabled(true); // [RLVa:KB] - Checked: RLVa-2.0.1 mLabelCreatorName->setEnabled(fRlvCanShowCreator); // [/RLVa:KB] } else { - getChildView("LabelCreatorTitle")->setEnabled(FALSE); - mLabelCreatorName->setEnabled(FALSE); + getChildView("LabelCreatorTitle")->setEnabled(false); + mLabelCreatorName->setEnabled(false); mLabelCreatorName->setValue(getString("unknown_multiple")); } @@ -482,16 +482,16 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // [/RLVa:KB] } } - getChildView("LabelOwnerTitle")->setEnabled(TRUE); -// mLabelOwnerName->setEnabled(TRUE); + getChildView("LabelOwnerTitle")->setEnabled(true); +// mLabelOwnerName->setEnabled(true); // [RLVa:KB] - Checked: RLVa-2.0.1 mLabelOwnerName->setEnabled(fRlvCanShowOwner); // [/RLVa:KB] } else { - getChildView("LabelOwnerTitle")->setEnabled(FALSE); - mLabelOwnerName->setEnabled(FALSE); + getChildView("LabelOwnerTitle")->setEnabled(false); + mLabelOwnerName->setEnabled(false); mLabelOwnerName->setValue(getString("public")); } @@ -594,12 +594,12 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) U32 everyone_mask = perm.getMaskEveryone(); U32 next_owner_mask = perm.getMaskNextOwner(); - getChildView("CheckOwnerModify")->setEnabled(FALSE); - getChild("CheckOwnerModify")->setValue(LLSD((BOOL)(owner_mask & PERM_MODIFY))); - getChildView("CheckOwnerCopy")->setEnabled(FALSE); - getChild("CheckOwnerCopy")->setValue(LLSD((BOOL)(owner_mask & PERM_COPY))); - getChildView("CheckOwnerTransfer")->setEnabled(FALSE); - getChild("CheckOwnerTransfer")->setValue(LLSD((BOOL)(owner_mask & PERM_TRANSFER))); + getChildView("CheckOwnerModify")->setEnabled(false); + getChild("CheckOwnerModify")->setValue(LLSD((bool)(owner_mask & PERM_MODIFY))); + getChildView("CheckOwnerCopy")->setEnabled(false); + getChild("CheckOwnerCopy")->setValue(LLSD((bool)(owner_mask & PERM_COPY))); + getChildView("CheckOwnerTransfer")->setEnabled(false); + getChild("CheckOwnerTransfer")->setValue(LLSD((bool)(owner_mask & PERM_TRANSFER))); /////////////////////// // DEBUG PERMISSIONS // @@ -609,9 +609,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) { childSetVisible("layout_debug_permissions", true); - BOOL slam_perm = FALSE; - BOOL overwrite_group = FALSE; - BOOL overwrite_everyone = FALSE; + bool slam_perm = false; + bool overwrite_group = false; + bool overwrite_everyone = false; if (item->getType() == LLAssetType::AT_OBJECT) { @@ -668,42 +668,42 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // Check for ability to change values. if (is_link || cannot_restrict_permissions) { - getChildView("CheckShareWithGroup")->setEnabled(FALSE); - getChildView("CheckEveryoneCopy")->setEnabled(FALSE); + getChildView("CheckShareWithGroup")->setEnabled(false); + getChildView("CheckEveryoneCopy")->setEnabled(false); } else if (is_obj_modify && can_agent_manipulate) { - getChildView("CheckShareWithGroup")->setEnabled(TRUE); + getChildView("CheckShareWithGroup")->setEnabled(true); getChildView("CheckEveryoneCopy")->setEnabled((owner_mask & PERM_COPY) && (owner_mask & PERM_TRANSFER)); } else { - getChildView("CheckShareWithGroup")->setEnabled(FALSE); - getChildView("CheckEveryoneCopy")->setEnabled(FALSE); + getChildView("CheckShareWithGroup")->setEnabled(false); + getChildView("CheckEveryoneCopy")->setEnabled(false); } // Set values. - BOOL is_group_copy = (group_mask & PERM_COPY) ? TRUE : FALSE; - BOOL is_group_modify = (group_mask & PERM_MODIFY) ? TRUE : FALSE; - BOOL is_group_move = (group_mask & PERM_MOVE) ? TRUE : FALSE; + bool is_group_copy = (group_mask & PERM_COPY) ? true : false; + bool is_group_modify = (group_mask & PERM_MODIFY) ? true : false; + bool is_group_move = (group_mask & PERM_MOVE) ? true : false; if (is_group_copy && is_group_modify && is_group_move) { - getChild("CheckShareWithGroup")->setValue(LLSD((BOOL)TRUE)); + getChild("CheckShareWithGroup")->setValue(LLSD((bool)true)); LLCheckBoxCtrl* ctl = getChild("CheckShareWithGroup"); if(ctl) { - ctl->setTentative(FALSE); + ctl->setTentative(false); } } else if (!is_group_copy && !is_group_modify && !is_group_move) { - getChild("CheckShareWithGroup")->setValue(LLSD((BOOL)FALSE)); + getChild("CheckShareWithGroup")->setValue(LLSD((bool)false)); LLCheckBoxCtrl* ctl = getChild("CheckShareWithGroup"); if(ctl) { - ctl->setTentative(FALSE); + ctl->setTentative(false); } } else @@ -712,11 +712,11 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if(ctl) { ctl->setTentative(!ctl->getEnabled()); - ctl->set(TRUE); + ctl->set(true); } } - getChild("CheckEveryoneCopy")->setValue(LLSD((BOOL)(everyone_mask & PERM_COPY))); + getChild("CheckEveryoneCopy")->setValue(LLSD((bool)(everyone_mask & PERM_COPY))); /////////////// // SALE INFO // @@ -733,7 +733,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) { getChildView("CheckPurchase")->setEnabled(is_complete); - getChildView("NextOwnerLabel")->setEnabled(TRUE); + getChildView("NextOwnerLabel")->setEnabled(true); getChildView("CheckNextOwnerModify")->setEnabled((base_mask & PERM_MODIFY) && !cannot_restrict_permissions); getChildView("CheckNextOwnerCopy")->setEnabled((base_mask & PERM_COPY) && !cannot_restrict_permissions && !is_settings); getChildView("CheckNextOwnerTransfer")->setEnabled((next_owner_mask & PERM_COPY) && !cannot_restrict_permissions); @@ -743,15 +743,15 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) } else { - getChildView("CheckPurchase")->setEnabled(FALSE); + getChildView("CheckPurchase")->setEnabled(false); - getChildView("NextOwnerLabel")->setEnabled(FALSE); - getChildView("CheckNextOwnerModify")->setEnabled(FALSE); - getChildView("CheckNextOwnerCopy")->setEnabled(FALSE); - getChildView("CheckNextOwnerTransfer")->setEnabled(FALSE); + getChildView("NextOwnerLabel")->setEnabled(false); + getChildView("CheckNextOwnerModify")->setEnabled(false); + getChildView("CheckNextOwnerCopy")->setEnabled(false); + getChildView("CheckNextOwnerTransfer")->setEnabled(false); - combo_sale_type->setEnabled(FALSE); - edit_cost->setEnabled(FALSE); + combo_sale_type->setEnabled(false); + edit_cost->setEnabled(false); } // Hide any properties that are not relevant to settings @@ -775,9 +775,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // Set values. getChild("CheckPurchase")->setValue(is_for_sale); - getChild("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY))); - getChild("CheckNextOwnerCopy")->setValue(LLSD(BOOL(next_owner_mask & PERM_COPY))); - getChild("CheckNextOwnerTransfer")->setValue(LLSD(BOOL(next_owner_mask & PERM_TRANSFER))); + getChild("CheckNextOwnerModify")->setValue(LLSD(bool(next_owner_mask & PERM_MODIFY))); + getChild("CheckNextOwnerCopy")->setValue(LLSD(bool(next_owner_mask & PERM_COPY))); + getChild("CheckNextOwnerTransfer")->setValue(LLSD(bool(next_owner_mask & PERM_TRANSFER))); if (is_for_sale) { @@ -1143,10 +1143,10 @@ void LLSidepanelItemInfo::updateSaleInfo() LLSaleInfo sale_info(item->getSaleInfo()); if(!gAgent.allowOperation(PERM_TRANSFER, item->getPermissions(), GP_OBJECT_SET_SALE)) { - getChild("CheckPurchase")->setValue(LLSD((BOOL)FALSE)); + getChild("CheckPurchase")->setValue(LLSD((bool)false)); } - if((BOOL)getChild("CheckPurchase")->getValue()) + if((bool)getChild("CheckPurchase")->getValue()) { // turn on sale info LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_COPY; diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index efd5854891..3545125fbc 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -83,7 +83,7 @@ static LLPanelInjector t_task_info("sidepanel_task_info"); LLSidepanelTaskInfo::LLSidepanelTaskInfo() : mVisibleDebugPermissions(true) // space was allocated by default { - setMouseOpaque(FALSE); + setMouseOpaque(false); mSelectionUpdateSlot = LLSelectMgr::instance().mUpdateSignal.connect(boost::bind(&LLSidepanelTaskInfo::refreshAll, this)); gIdleCallbacks.addFunction(&LLSidepanelTaskInfo::onIdle, (void*)this); } @@ -187,26 +187,26 @@ bool LLSidepanelTaskInfo::postBuild() void LLSidepanelTaskInfo::disableAll() { mDACreatorName->setValue(LLStringUtil::null); - mDACreatorName->setEnabled(FALSE); + mDACreatorName->setEnabled(false); - mDAOwner->setEnabled(FALSE); + mDAOwner->setEnabled(false); mDAOwnerName->setValue(LLStringUtil::null); - mDAOwnerName->setEnabled(FALSE); + mDAOwnerName->setEnabled(false); mDAObjectName->setValue(LLStringUtil::null); - mDAObjectName->setEnabled(FALSE); - mDAName->setEnabled(FALSE); - mDADescription->setEnabled(FALSE); + mDAObjectName->setEnabled(false); + mDAName->setEnabled(false); + mDADescription->setEnabled(false); mDAObjectDescription->setValue(LLStringUtil::null); - mDAObjectDescription->setEnabled(FALSE); + mDAObjectDescription->setEnabled(false); - mDAPathfindingAttributes->setEnabled(FALSE); + mDAPathfindingAttributes->setEnabled(false); mDAPathfindingAttributes->setValue(LLStringUtil::null); - mDAButtonSetGroup->setEnabled(FALSE); - mDAButtonDeed->setEnabled(FALSE); + mDAButtonSetGroup->setEnabled(false); + mDAButtonDeed->setEnabled(false); - mDAPermModify->setEnabled(FALSE); + mDAPermModify->setEnabled(false); mDAPermModify->setValue(LLStringUtil::null); mDAEditCost->setValue(LLStringUtil::null); mDAComboSaleType->setValue(LLSaleInfo::FS_COPY); @@ -215,12 +215,12 @@ void LLSidepanelTaskInfo::disableAll() if (mVisibleDebugPermissions) { - mDAB->setVisible(FALSE); - mDAO->setVisible(FALSE); - mDAG->setVisible(FALSE); - mDAE->setVisible(FALSE); - mDAN->setVisible(FALSE); - mDAF->setVisible(FALSE); + mDAB->setVisible(false); + mDAO->setVisible(false); + mDAG->setVisible(false); + mDAE->setVisible(false); + mDAN->setVisible(false); + mDAF->setVisible(false); LLFloater* parent_floater = gFloaterView->getParentFloater(this); LLRect parent_rect = parent_floater->getRect(); @@ -230,45 +230,45 @@ void LLSidepanelTaskInfo::disableAll() mVisibleDebugPermissions = false; } - mOpenBtn->setEnabled(FALSE); - mPayBtn->setEnabled(FALSE); - mBuyBtn->setEnabled(FALSE); + mOpenBtn->setEnabled(false); + mPayBtn->setEnabled(false); + mBuyBtn->setEnabled(false); } void LLSidepanelTaskInfo::disablePermissions() { - mDACheckboxShareWithGroup->setValue(FALSE); - mDACheckboxShareWithGroup->setEnabled(FALSE); + mDACheckboxShareWithGroup->setValue(false); + mDACheckboxShareWithGroup->setEnabled(false); - mDACheckboxAllowEveryoneMove->setValue(FALSE); - mDACheckboxAllowEveryoneMove->setEnabled(FALSE); - mDACheckboxAllowEveryoneCopy->setValue(FALSE); - mDACheckboxAllowEveryoneCopy->setEnabled(FALSE); + mDACheckboxAllowEveryoneMove->setValue(false); + mDACheckboxAllowEveryoneMove->setEnabled(false); + mDACheckboxAllowEveryoneCopy->setValue(false); + mDACheckboxAllowEveryoneCopy->setEnabled(false); //Next owner can: - mDACheckboxNextOwnerCanModify->setValue(FALSE); - mDACheckboxNextOwnerCanModify->setEnabled(FALSE); - mDACheckboxNextOwnerCanCopy->setValue(FALSE); - mDACheckboxNextOwnerCanCopy->setEnabled(FALSE); - mDACheckboxNextOwnerCanTransfer->setValue(FALSE); - mDACheckboxNextOwnerCanTransfer->setEnabled(FALSE); + mDACheckboxNextOwnerCanModify->setValue(false); + mDACheckboxNextOwnerCanModify->setEnabled(false); + mDACheckboxNextOwnerCanCopy->setValue(false); + mDACheckboxNextOwnerCanCopy->setEnabled(false); + mDACheckboxNextOwnerCanTransfer->setValue(false); + mDACheckboxNextOwnerCanTransfer->setEnabled(false); //checkbox for sale - mDACheckboxForSale->setValue(FALSE); - mDACheckboxForSale->setEnabled(FALSE); + mDACheckboxForSale->setValue(false); + mDACheckboxForSale->setEnabled(false); //checkbox include in search - mDASearchCheck->setValue(FALSE); - mDASearchCheck->setEnabled(FALSE); + mDASearchCheck->setValue(false); + mDASearchCheck->setEnabled(false); - mDAComboSaleType->setEnabled(FALSE); + mDAComboSaleType->setEnabled(false); - mDAEditCost->setEnabled(FALSE); + mDAEditCost->setEnabled(false); - mDALabelClickAction->setEnabled(FALSE); + mDALabelClickAction->setEnabled(false); if (mDAComboClickAction) { - mDAComboClickAction->setEnabled(FALSE); + mDAComboClickAction->setEnabled(false); mDAComboClickAction->clear(); } } @@ -293,14 +293,14 @@ void LLSidepanelTaskInfo::refresh() btn_deed_to_group->setLabelUnselected(deedText); } - BOOL root_selected = TRUE; + bool root_selected = true; LLSelectNode* nodep = mObjectSelection->getFirstRootNode(); S32 object_count = mObjectSelection->getRootObjectCount(); if (!nodep || (object_count == 0)) { nodep = mObjectSelection->getFirstNode(); object_count = mObjectSelection->getObjectCount(); - root_selected = FALSE; + root_selected = false; } LLViewerObject* objectp = NULL; @@ -317,12 +317,12 @@ void LLSidepanelTaskInfo::refresh() } // figure out a few variables - const BOOL is_one_object = (object_count == 1); + const bool is_one_object = (object_count == 1); // BUG: fails if a root and non-root are both single-selected. - const BOOL is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || + const bool is_perm_modify = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsModify()) || LLSelectMgr::getInstance()->selectGetModify(); - const BOOL is_nonpermanent_enforced = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || + const bool is_nonpermanent_enforced = (mObjectSelection->getFirstRootNode() && LLSelectMgr::getInstance()->selectGetRootsNonPermanentEnforced()) || LLSelectMgr::getInstance()->selectGetNonPermanentEnforced(); S32 string_index = 0; @@ -347,7 +347,7 @@ void LLSidepanelTaskInfo::refresh() { ++string_index; } - getChildView("perm_modify")->setEnabled(TRUE); + getChildView("perm_modify")->setEnabled(true); getChild("perm_modify")->setValue(MODIFY_INFO_STRINGS[string_index]); std::string pfAttrName; @@ -375,14 +375,14 @@ void LLSidepanelTaskInfo::refresh() pfAttrName = "Pathfinding_Object_Attr_MultiSelect"; } - mDAPathfindingAttributes->setEnabled(TRUE); + mDAPathfindingAttributes->setEnabled(true); mDAPathfindingAttributes->setValue(LLTrans::getString(pfAttrName)); // Update creator text field - //getChildView("Creator:")->setEnabled(TRUE); // Doesn't exist as of 2015-11-26 + //getChildView("Creator:")->setEnabled(true); // Doesn't exist as of 2015-11-26 std::string creator_name; // [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a - BOOL creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); + bool creators_identical = LLSelectMgr::getInstance()->selectGetCreator(mCreatorID, creator_name); // [/RLVa:KB] // LLUUID creator_id; // LLSelectMgr::getInstance()->selectGetCreator(creator_id, creator_name); @@ -396,18 +396,18 @@ void LLSidepanelTaskInfo::refresh() // { // mDACreatorName->setValue(creator_name); // } -// mDACreatorName->setEnabled(TRUE); +// mDACreatorName->setEnabled(true); // [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row // Update owner text field - getChildView("Owner:")->setEnabled(TRUE); + getChildView("Owner:")->setEnabled(true); std::string owner_name; // RLVa change // LLUUID owner_id; -// const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); +// const bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); // if (owner_id.isNull()) - const BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); + const bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); if (mOwnerID.isNull()) // { @@ -455,40 +455,40 @@ void LLSidepanelTaskInfo::refresh() } getChild("Creator Name")->setValue(creator_name); - getChildView("Creator Name")->setEnabled(TRUE); + getChildView("Creator Name")->setEnabled(true); getChild("Owner Name")->setValue(owner_name); - getChildView("Owner Name")->setEnabled(TRUE); + getChildView("Owner Name")->setEnabled(true); // [/RLVa:KB] // update group text field - //getChildView("Group:")->setEnabled(TRUE); // Doesn't exist as of 2015-11-26 + //getChildView("Group:")->setEnabled(true); // Doesn't exist as of 2015-11-26 //getChild("Group Name")->setValue(LLStringUtil::null); // Doesn't exist as of 2015-11-26 LLUUID group_id; - BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); + bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (groups_identical) { if (mLabelGroupName) { - mLabelGroupName->setNameID(group_id,TRUE); - mLabelGroupName->setEnabled(TRUE); + mLabelGroupName->setNameID(group_id,true); + mLabelGroupName->setEnabled(true); } } else { if (mLabelGroupName) { - mLabelGroupName->setNameID(LLUUID::null, TRUE); + mLabelGroupName->setNameID(LLUUID::null, true); mLabelGroupName->refresh(LLUUID::null, std::string(), true); - mLabelGroupName->setEnabled(FALSE); + mLabelGroupName->setEnabled(false); } } getChildView("button set group")->setEnabled(owners_identical && (mOwnerID == gAgent.getID()) && is_nonpermanent_enforced); - getChildView("Name:")->setEnabled(TRUE); + getChildView("Name:")->setEnabled(true); LLLineEditor* LineEditorObjectName = getChild("Object Name"); - getChildView("Description:")->setEnabled(TRUE); + getChildView("Description:")->setEnabled(true); LLLineEditor* LineEditorObjectDesc = getChild("Object Description"); if (is_one_object) @@ -513,44 +513,44 @@ void LLSidepanelTaskInfo::refresh() } // figure out the contents of the name, description, & category - BOOL edit_name_desc = FALSE; + bool edit_name_desc = false; if (is_one_object && objectp->permModify() && !objectp->isPermanentEnforced()) { - edit_name_desc = TRUE; + edit_name_desc = true; } if (edit_name_desc) { - getChildView("Object Name")->setEnabled(TRUE); - getChildView("Object Description")->setEnabled(TRUE); + getChildView("Object Name")->setEnabled(true); + getChildView("Object Description")->setEnabled(true); } else { - getChildView("Object Name")->setEnabled(FALSE); - getChildView("Object Description")->setEnabled(FALSE); + getChildView("Object Name")->setEnabled(false); + getChildView("Object Description")->setEnabled(false); } S32 total_sale_price = 0; S32 individual_sale_price = 0; - BOOL is_for_sale_mixed = FALSE; - BOOL is_sale_price_mixed = FALSE; - U32 num_for_sale = FALSE; + bool is_for_sale_mixed = false; + bool is_sale_price_mixed = false; + U32 num_for_sale = false; LLSelectMgr::getInstance()->selectGetAggregateSaleInfo(num_for_sale, is_for_sale_mixed, is_sale_price_mixed, total_sale_price, individual_sale_price); - const BOOL self_owned = (gAgent.getID() == mOwnerID); - const BOOL group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ; - const BOOL public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned()); - const BOOL can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer(); - const BOOL can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy(); + const bool self_owned = (gAgent.getID() == mOwnerID); + const bool group_owned = LLSelectMgr::getInstance()->selectIsGroupOwned() ; + const bool public_owned = (mOwnerID.isNull() && !LLSelectMgr::getInstance()->selectIsGroupOwned()); + const bool can_transfer = LLSelectMgr::getInstance()->selectGetRootsTransfer(); + const bool can_copy = LLSelectMgr::getInstance()->selectGetRootsCopy(); if (!owners_identical) { - //getChildView("Cost")->setEnabled(FALSE); // Doesn't exist as of 2015-11-26 + //getChildView("Cost")->setEnabled(false); // Doesn't exist as of 2015-11-26 getChild("Edit Cost")->setValue(LLStringUtil::null); - getChildView("Edit Cost")->setEnabled(FALSE); + getChildView("Edit Cost")->setEnabled(false); } // You own these objects. else if (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id,GP_OBJECT_SET_SALE))) @@ -574,11 +574,11 @@ void LLSidepanelTaskInfo::refresh() // set to the actual cost. if ((num_for_sale > 0) && is_for_sale_mixed) { - edit_price->setTentative(TRUE); + edit_price->setTentative(true); } else if ((num_for_sale > 0) && is_sale_price_mixed) { - edit_price->setTentative(TRUE); + edit_price->setTentative(true); } else { @@ -587,15 +587,15 @@ void LLSidepanelTaskInfo::refresh() } // The edit fields are only enabled if you can sell this object // and the sale price is not mixed. - BOOL enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : FALSE; + bool enable_edit = (num_for_sale && can_transfer) ? !is_for_sale_mixed : false; //getChildView("Cost")->setEnabled(enable_edit); // Doesn't exist as of 2015-11-26 getChildView("Edit Cost")->setEnabled(enable_edit); } // Someone, not you, owns these objects. else if (!public_owned) { - //getChildView("Cost")->setEnabled(FALSE); // Doesn't exist as of 2015-11-26 - getChildView("Edit Cost")->setEnabled(FALSE); + //getChildView("Cost")->setEnabled(false); // Doesn't exist as of 2015-11-26 + getChildView("Edit Cost")->setEnabled(false); // Don't show a price if none of the items are for sale. if (num_for_sale) @@ -612,10 +612,10 @@ void LLSidepanelTaskInfo::refresh() // This is a public object. else { - //getChildView("Cost")->setEnabled(FALSE); // Doesn't exist as of 2015-11-26 + //getChildView("Cost")->setEnabled(false); // Doesn't exist as of 2015-11-26 getChild("Edit Cost")->setLabel(getString("Cost Default")); getChild("Edit Cost")->setValue(LLStringUtil::null); - getChildView("Edit Cost")->setEnabled(FALSE); + getChildView("Edit Cost")->setEnabled(false); } // Enable and disable the permissions checkboxes @@ -633,22 +633,22 @@ void LLSidepanelTaskInfo::refresh() U32 next_owner_mask_on = 0; U32 next_owner_mask_off = 0; - BOOL valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, + bool valid_base_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_BASE, &base_mask_on, &base_mask_off); - //BOOL valid_owner_perms =// + //bool valid_owner_perms =// LLSelectMgr::getInstance()->selectGetPerm(PERM_OWNER, &owner_mask_on, &owner_mask_off); - BOOL valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, + bool valid_group_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_GROUP, &group_mask_on, &group_mask_off); - BOOL valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, + bool valid_everyone_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_EVERYONE, &everyone_mask_on, &everyone_mask_off); - BOOL valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, + bool valid_next_perms = LLSelectMgr::getInstance()->selectGetPerm(PERM_NEXT_OWNER, &next_owner_mask_on, &next_owner_mask_off); @@ -666,19 +666,19 @@ void LLSidepanelTaskInfo::refresh() if (valid_base_perms) { mDAB->setValue("B: " + mask_to_string(base_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - mDAB->setVisible( TRUE); + mDAB->setVisible( true); mDAO->setValue("O: " + mask_to_string(owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - mDAO->setVisible( TRUE); + mDAO->setVisible( true); mDAG->setValue("G: " + mask_to_string(group_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - mDAG->setVisible( TRUE); + mDAG->setVisible( true); mDAE->setValue("E: " + mask_to_string(everyone_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - mDAE->setVisible( TRUE); + mDAE->setVisible( true); mDAN->setValue("N: " + mask_to_string(next_owner_mask_on, isOpenSim)); // remove misleading X for export when not in OpenSim - mDAN->setVisible( TRUE); + mDAN->setVisible( true); } U32 flag_mask = 0x0; @@ -688,7 +688,7 @@ void LLSidepanelTaskInfo::refresh() if (objectp->permTransfer()) flag_mask |= PERM_TRANSFER; mDAF->setValue("F:" + mask_to_string(flag_mask, isOpenSim)); // remove misleading X for export when not in OpenSim - mDAF->setVisible(TRUE); + mDAF->setVisible(true); if (!mVisibleDebugPermissions) { @@ -702,12 +702,12 @@ void LLSidepanelTaskInfo::refresh() } else if (mVisibleDebugPermissions) { - mDAB->setVisible(FALSE); - mDAO->setVisible(FALSE); - mDAG->setVisible(FALSE); - mDAE->setVisible(FALSE); - mDAN->setVisible(FALSE); - mDAF->setVisible(FALSE); + mDAB->setVisible(false); + mDAO->setVisible(false); + mDAG->setVisible(false); + mDAE->setVisible(false); + mDAN->setVisible(false); + mDAF->setVisible(false); LLFloater* parent_floater = gFloaterView->getParentFloater(this); LLRect parent_rect = parent_floater->getRect(); @@ -717,18 +717,18 @@ void LLSidepanelTaskInfo::refresh() mVisibleDebugPermissions = false; } - BOOL has_change_perm_ability = FALSE; - BOOL has_change_sale_ability = FALSE; + bool has_change_perm_ability = false; + bool has_change_sale_ability = false; if (valid_base_perms && is_nonpermanent_enforced && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_MANIPULATE)))) { - has_change_perm_ability = TRUE; + has_change_perm_ability = true; } if (valid_base_perms && is_nonpermanent_enforced && (self_owned || (group_owned && gAgent.hasPowerInGroup(group_id, GP_OBJECT_SET_SALE)))) { - has_change_sale_ability = TRUE; + has_change_sale_ability = true; } if (!has_change_perm_ability && !has_change_sale_ability && !root_selected) @@ -739,15 +739,15 @@ void LLSidepanelTaskInfo::refresh() if (has_change_perm_ability) { - getChildView("checkbox share with group")->setEnabled(TRUE); + getChildView("checkbox share with group")->setEnabled(true); getChildView("checkbox allow everyone move")->setEnabled(owner_mask_on & PERM_MOVE); getChildView("checkbox allow everyone copy")->setEnabled(owner_mask_on & PERM_COPY && owner_mask_on & PERM_TRANSFER); } else { - getChildView("checkbox share with group")->setEnabled(FALSE); - getChildView("checkbox allow everyone move")->setEnabled(FALSE); - getChildView("checkbox allow everyone copy")->setEnabled(FALSE); + getChildView("checkbox share with group")->setEnabled(false); + getChildView("checkbox allow everyone move")->setEnabled(false); + getChildView("checkbox allow everyone copy")->setEnabled(false); } if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER)) @@ -764,32 +764,32 @@ void LLSidepanelTaskInfo::refresh() } else { - getChildView("checkbox for sale")->setEnabled(FALSE); - getChildView("sale type")->setEnabled(FALSE); + getChildView("checkbox for sale")->setEnabled(false); + getChildView("sale type")->setEnabled(false); - getChildView("checkbox next owner can modify")->setEnabled(FALSE); - getChildView("checkbox next owner can copy")->setEnabled(FALSE); - getChildView("checkbox next owner can transfer")->setEnabled(FALSE); + getChildView("checkbox next owner can modify")->setEnabled(false); + getChildView("checkbox next owner can copy")->setEnabled(false); + getChildView("checkbox next owner can transfer")->setEnabled(false); } if (valid_group_perms) { if ((group_mask_on & PERM_COPY) && (group_mask_on & PERM_MODIFY) && (group_mask_on & PERM_MOVE)) { - getChild("checkbox share with group")->setValue(TRUE); - getChild("checkbox share with group")->setTentative( FALSE); + getChild("checkbox share with group")->setValue(true); + getChild("checkbox share with group")->setTentative( false); getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } else if ((group_mask_off & PERM_COPY) && (group_mask_off & PERM_MODIFY) && (group_mask_off & PERM_MOVE)) { - getChild("checkbox share with group")->setValue(FALSE); - getChild("checkbox share with group")->setTentative( FALSE); - getChildView("button deed")->setEnabled(FALSE); + getChild("checkbox share with group")->setValue(false); + getChild("checkbox share with group")->setTentative( false); + getChildView("button deed")->setEnabled(false); } else { - getChild("checkbox share with group")->setValue(TRUE); - getChild("checkbox share with group")->setTentative( TRUE); + getChild("checkbox share with group")->setValue(true); + getChild("checkbox share with group")->setTentative( true); getChildView("button deed")->setEnabled(gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED) && (group_mask_on & PERM_MOVE) && (owner_mask_on & PERM_TRANSFER) && !group_owned && can_transfer); } } @@ -799,35 +799,35 @@ void LLSidepanelTaskInfo::refresh() // Move if (everyone_mask_on & PERM_MOVE) { - getChild("checkbox allow everyone move")->setValue(TRUE); - getChild("checkbox allow everyone move")->setTentative( FALSE); + getChild("checkbox allow everyone move")->setValue(true); + getChild("checkbox allow everyone move")->setTentative( false); } else if (everyone_mask_off & PERM_MOVE) { - getChild("checkbox allow everyone move")->setValue(FALSE); - getChild("checkbox allow everyone move")->setTentative( FALSE); + getChild("checkbox allow everyone move")->setValue(false); + getChild("checkbox allow everyone move")->setTentative( false); } else { - getChild("checkbox allow everyone move")->setValue(TRUE); - getChild("checkbox allow everyone move")->setTentative( TRUE); + getChild("checkbox allow everyone move")->setValue(true); + getChild("checkbox allow everyone move")->setTentative( true); } // Copy == everyone can't copy if (everyone_mask_on & PERM_COPY) { - getChild("checkbox allow everyone copy")->setValue(TRUE); + getChild("checkbox allow everyone copy")->setValue(true); getChild("checkbox allow everyone copy")->setTentative( !can_copy || !can_transfer); } else if (everyone_mask_off & PERM_COPY) { - getChild("checkbox allow everyone copy")->setValue(FALSE); - getChild("checkbox allow everyone copy")->setTentative( FALSE); + getChild("checkbox allow everyone copy")->setValue(false); + getChild("checkbox allow everyone copy")->setTentative( false); } else { - getChild("checkbox allow everyone copy")->setValue(TRUE); - getChild("checkbox allow everyone copy")->setTentative( TRUE); + getChild("checkbox allow everyone copy")->setValue(true); + getChild("checkbox allow everyone copy")->setTentative( true); } } @@ -836,71 +836,71 @@ void LLSidepanelTaskInfo::refresh() // Modify == next owner canot modify if (next_owner_mask_on & PERM_MODIFY) { - getChild("checkbox next owner can modify")->setValue(TRUE); - getChild("checkbox next owner can modify")->setTentative( FALSE); + getChild("checkbox next owner can modify")->setValue(true); + getChild("checkbox next owner can modify")->setTentative( false); } else if (next_owner_mask_off & PERM_MODIFY) { - getChild("checkbox next owner can modify")->setValue(FALSE); - getChild("checkbox next owner can modify")->setTentative( FALSE); + getChild("checkbox next owner can modify")->setValue(false); + getChild("checkbox next owner can modify")->setTentative( false); } else { - getChild("checkbox next owner can modify")->setValue(TRUE); - getChild("checkbox next owner can modify")->setTentative( TRUE); + getChild("checkbox next owner can modify")->setValue(true); + getChild("checkbox next owner can modify")->setTentative( true); } // Copy == next owner cannot copy if (next_owner_mask_on & PERM_COPY) { - getChild("checkbox next owner can copy")->setValue(TRUE); + getChild("checkbox next owner can copy")->setValue(true); getChild("checkbox next owner can copy")->setTentative( !can_copy); } else if (next_owner_mask_off & PERM_COPY) { - getChild("checkbox next owner can copy")->setValue(FALSE); - getChild("checkbox next owner can copy")->setTentative( FALSE); + getChild("checkbox next owner can copy")->setValue(false); + getChild("checkbox next owner can copy")->setTentative( false); } else { - getChild("checkbox next owner can copy")->setValue(TRUE); - getChild("checkbox next owner can copy")->setTentative( TRUE); + getChild("checkbox next owner can copy")->setValue(true); + getChild("checkbox next owner can copy")->setTentative( true); } // Transfer == next owner cannot transfer if (next_owner_mask_on & PERM_TRANSFER) { - getChild("checkbox next owner can transfer")->setValue(TRUE); + getChild("checkbox next owner can transfer")->setValue(true); getChild("checkbox next owner can transfer")->setTentative( !can_transfer); } else if (next_owner_mask_off & PERM_TRANSFER) { - getChild("checkbox next owner can transfer")->setValue(FALSE); - getChild("checkbox next owner can transfer")->setTentative( FALSE); + getChild("checkbox next owner can transfer")->setValue(false); + getChild("checkbox next owner can transfer")->setTentative( false); } else { - getChild("checkbox next owner can transfer")->setValue(TRUE); - getChild("checkbox next owner can transfer")->setTentative( TRUE); + getChild("checkbox next owner can transfer")->setValue(true); + getChild("checkbox next owner can transfer")->setTentative( true); } } // reflect sale information LLSaleInfo sale_info; - BOOL valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); + bool valid_sale_info = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); LLSaleInfo::EForSale sale_type = sale_info.getSaleType(); LLComboBox* combo_sale_type = getChild("sale type"); if (valid_sale_info) { combo_sale_type->setValue( sale_type == LLSaleInfo::FS_NOT ? LLSaleInfo::FS_COPY : sale_type); - combo_sale_type->setTentative( FALSE); // unfortunately this doesn't do anything at the moment. + combo_sale_type->setTentative( false); // unfortunately this doesn't do anything at the moment. } else { // default option is sell copy, determined to be safest combo_sale_type->setValue( LLSaleInfo::FS_COPY); - combo_sale_type->setTentative( TRUE); // unfortunately this doesn't do anything at the moment. + combo_sale_type->setTentative( true); // unfortunately this doesn't do anything at the moment. } getChild("checkbox for sale")->setValue((num_for_sale != 0)); @@ -918,9 +918,9 @@ void LLSidepanelTaskInfo::refresh() } // Check search status of objects - const BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); + const bool all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); bool include_in_search; - const BOOL all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); + const bool all_include_in_search = LLSelectMgr::getInstance()->selectionGetIncludeInSearch(&include_in_search); getChildView("search_check")->setEnabled(has_change_sale_ability && all_volume); getChild("search_check")->setValue(include_in_search); getChild("search_check")->setTentative(!all_include_in_search); @@ -960,7 +960,7 @@ void LLSidepanelTaskInfo::onClickGroup() { LLUUID owner_id; std::string name; - BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name); + bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, name); LLFloater* parent_floater = gFloaterView->getParentFloater(this); if (owners_identical && (owner_id == gAgent.getID())) @@ -983,7 +983,7 @@ void LLSidepanelTaskInfo::cbGroupID(LLUUID group_id) { if (mLabelGroupName) { - mLabelGroupName->setNameID(group_id, TRUE); + mLabelGroupName->setNameID(group_id, true); } LLSelectMgr::getInstance()->sendGroup(group_id); } @@ -994,13 +994,13 @@ static bool callback_deed_to_group(const LLSD& notification, const LLSD& respons if (option == 0) { LLUUID group_id; - const BOOL groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); + const bool groups_identical = LLSelectMgr::getInstance()->selectGetGroup(group_id); if (group_id.notNull() && groups_identical && (gAgent.hasPowerInGroup(group_id, GP_OBJECT_DEED))) { - LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, FALSE); + LLSelectMgr::getInstance()->sendOwner(LLUUID::null, group_id, false); } } - return FALSE; + return false; } void LLSidepanelTaskInfo::onClickDeedToGroup(void *data) @@ -1021,7 +1021,7 @@ void LLSidepanelTaskInfo::onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 // Checkbox will have toggled itself // LLSidepanelTaskInfo* self = (LLSidepanelTaskInfo*)data; LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; - BOOL new_state = check->get(); + bool new_state = check->get(); LLSelectMgr::getInstance()->selectionSetObjectPermissions(field, new_state, perm); @@ -1251,7 +1251,7 @@ void LLSidepanelTaskInfo::onCommitIncludeInSearch(LLUICtrl* ctrl, void* data) void LLSidepanelTaskInfo::updateVerbs() { LLSafeHandle object_selection = LLSelectMgr::getInstance()->getSelection(); - const BOOL any_selected = (object_selection->getNumNodes() > 0); + const bool any_selected = (object_selection->getNumNodes() > 0); mOpenBtn->setVisible(true); mPayBtn->setVisible(true); @@ -1313,12 +1313,12 @@ void LLSidepanelTaskInfo::refreshAll() if (hasFocus()) { focus = gFocusMgr.getKeyboardFocus(); - setFocus(FALSE); + setFocus(false); } refresh(); if (focus) { - focus->setFocus(TRUE); + focus->setFocus(true); } } diff --git a/indra/newview/llsidetraypanelcontainer.cpp b/indra/newview/llsidetraypanelcontainer.cpp index f475766d3c..4cec761839 100644 --- a/indra/newview/llsidetraypanelcontainer.cpp +++ b/indra/newview/llsidetraypanelcontainer.cpp @@ -86,7 +86,7 @@ bool LLSideTrayPanelContainer::handleKeyHere(KEY key, MASK mask) // No key press handling code for Panel Container - this disables // Tab Container's Alt + Left/Right Button tab switching. - // Let default handler process key presses, don't simply return TRUE or FALSE + // Let default handler process key presses, don't simply return true or false // as this may brake some functionality as it did with Copy/Paste for // text_editor (ticket EXT-642). return LLPanel::handleKeyHere(key, mask); diff --git a/indra/newview/llsidetraypanelcontainer.h b/indra/newview/llsidetraypanelcontainer.h index e32e651b65..1e6e6dd487 100644 --- a/indra/newview/llsidetraypanelcontainer.h +++ b/indra/newview/llsidetraypanelcontainer.h @@ -31,7 +31,7 @@ /** * LLSideTrayPanelContainer class acts like LLTabContainer with invisible tabs. -* It is designed to make panel switching easier, avoid setVisible(TRUE) setVisible(FALSE) +* It is designed to make panel switching easier, avoid setVisible(true) setVisible(false) * calls and related workarounds. * use onOpen to open sub panel, pass the name of panel to open * in key[PARAM_SUB_PANEL_NAME]. diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp index 4926b86b14..f6382bf38a 100644 --- a/indra/newview/llsky.cpp +++ b/indra/newview/llsky.cpp @@ -73,7 +73,7 @@ LLSky::LLSky() mFogColor.mV[VALPHA] = 0.0f; mLightingGeneration = 0; - mUpdatedThisFrame = TRUE; + mUpdatedThisFrame = true; } @@ -207,7 +207,7 @@ void LLSky::init() gSky.setFogRatio(gSavedSettings.getF32("RenderFogRatio")); - mUpdatedThisFrame = TRUE; + mUpdatedThisFrame = true; } diff --git a/indra/newview/llsky.h b/indra/newview/llsky.h index cce645e2be..65495e4615 100644 --- a/indra/newview/llsky.h +++ b/indra/newview/llsky.h @@ -72,7 +72,7 @@ public: void updateSky(); S32 mLightingGeneration; - BOOL mUpdatedThisFrame; + bool mUpdatedThisFrame; void setFogRatio(const F32 fog_ratio); // Fog distance as fraction of cull distance. F32 getFogRatio() const; diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index fab39f4479..efdb5511e4 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -80,24 +80,24 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mBigThumbnailImage(NULL) , mThumbnailWidth(0), mThumbnailHeight(0), - mThumbnailSubsampled(FALSE), + mThumbnailSubsampled(false), mPreviewImageEncoded(NULL), mFormattedImage(NULL), mShineCountdown(0), mFlashAlpha(0.f), - mNeedsFlash(TRUE), + mNeedsFlash(true), mSnapshotQuality(gSavedSettings.getS32("SnapshotQuality")), mDataSize(0), mSnapshotType(LLSnapshotModel::SNAPSHOT_POSTCARD), mSnapshotFormat(LLSnapshotModel::ESnapshotFormat(gSavedSettings.getS32("SnapshotFormat"))), - mSnapshotUpToDate(FALSE), + mSnapshotUpToDate(false), mCameraPos(LLViewerCamera::getInstance()->getOrigin()), mCameraRot(LLViewerCamera::getInstance()->getQuaternion()), - mSnapshotActive(FALSE), + mSnapshotActive(false), mSnapshotBufferType(LLSnapshotModel::SNAPSHOT_TYPE_COLOR), mFilterName(""), - mAllowRenderUI(TRUE), - mAllowFullScreenPreview(TRUE), + mAllowRenderUI(true), + mAllowFullScreenPreview(true), mViewContainer(NULL), mFixedThumbnailWidth(0), mFixedThumbnailHeight(0), @@ -114,16 +114,16 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mWidth[1] = gViewerWindow->getWindowWidthRaw(); mHeight[0] = gViewerWindow->getWindowHeightRaw(); mHeight[1] = gViewerWindow->getWindowHeightRaw(); - mImageScaled[0] = FALSE; - mImageScaled[1] = FALSE; + mImageScaled[0] = false; + mImageScaled[1] = false; mMaxImageSize = MAX_SNAPSHOT_IMAGE_SIZE ; mKeepAspectRatio = gSavedSettings.getBOOL("KeepAspectForSnapshot") ; - mThumbnailUpdateLock = FALSE ; - mThumbnailUpToDate = FALSE ; - mBigThumbnailUpToDate = FALSE ; + mThumbnailUpdateLock = false ; + mThumbnailUpToDate = false ; + mBigThumbnailUpToDate = false ; - mForceUpdateSnapshot = FALSE; + mForceUpdateSnapshot = false; } LLSnapshotLivePreview::~LLSnapshotLivePreview() @@ -158,7 +158,7 @@ F32 LLSnapshotLivePreview::getImageAspect() return (mKeepAspectRatio ? ((F32)getRect().getWidth()) / ((F32)getRect().getHeight()) : ((F32)getWidth()) / ((F32)getHeight())); } -void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail, F32 delay) +void LLSnapshotLivePreview::updateSnapshot(bool new_snapshot, bool new_thumbnail, F32 delay) { LL_DEBUGS("Snapshot") << "updateSnapshot: mSnapshotUpToDate = " << getSnapshotUpToDate() << LL_ENDL; @@ -172,7 +172,7 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail setSize(mWidth[old_image_index], mHeight[old_image_index]); mFallAnimTimer.start(); } - mSnapshotUpToDate = FALSE; + mSnapshotUpToDate = false; // Update snapshot source rect depending on whether we keep the aspect ratio. LLRect& rect = mImageRect[mCurImageIndex]; @@ -217,8 +217,8 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail // Update thumbnail if requested. if (new_thumbnail) { - mThumbnailUpToDate = FALSE ; - mBigThumbnailUpToDate = FALSE; + mThumbnailUpToDate = false ; + mBigThumbnailUpToDate = false; } } @@ -246,7 +246,7 @@ void LLSnapshotLivePreview::drawPreviewRect(S32 offset_x, S32 offset_y, LLColor4 gGL.setLineWidth(2.0f * line_width) ; // Line width OGL core profile fix by Rye Mutt LLColor4 color(0.0f, 0.0f, 0.0f, 1.0f) ; gl_rect_2d( mPreviewRect.mLeft + offset_x, mPreviewRect.mTop + offset_y, - mPreviewRect.mRight + offset_x, mPreviewRect.mBottom + offset_y, color, FALSE ) ; + mPreviewRect.mRight + offset_x, mPreviewRect.mBottom + offset_y, color, false ) ; gGL.setLineWidth(line_width) ; // Line width OGL core profile fix by Rye Mutt //draw four alpha rectangles to cover areas outside of the snapshot image @@ -259,20 +259,20 @@ void LLSnapshotLivePreview::drawPreviewRect(S32 offset_x, S32 offset_y, LLColor4 dwr = mThumbnailWidth - mPreviewRect.getWidth() - dwl ; gl_rect_2d(mPreviewRect.mLeft + offset_x - dwl, mPreviewRect.mTop + offset_y, - mPreviewRect.mLeft + offset_x, mPreviewRect.mBottom + offset_y, alpha_color, TRUE ) ; + mPreviewRect.mLeft + offset_x, mPreviewRect.mBottom + offset_y, alpha_color, true ) ; gl_rect_2d( mPreviewRect.mRight + offset_x, mPreviewRect.mTop + offset_y, - mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mBottom + offset_y, alpha_color, TRUE ) ; + mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mBottom + offset_y, alpha_color, true ) ; } if(mThumbnailHeight > mPreviewRect.getHeight()) { S32 dh = (mThumbnailHeight - mPreviewRect.getHeight()) >> 1 ; gl_rect_2d(mPreviewRect.mLeft + offset_x - dwl, mPreviewRect.mBottom + offset_y , - mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mBottom + offset_y - dh, alpha_color, TRUE ) ; + mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mBottom + offset_y - dh, alpha_color, true ) ; dh = mThumbnailHeight - mPreviewRect.getHeight() - dh ; gl_rect_2d( mPreviewRect.mLeft + offset_x - dwl, mPreviewRect.mTop + offset_y + dh, - mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mTop + offset_y, alpha_color, TRUE ) ; + mPreviewRect.mRight + offset_x + dwr, mPreviewRect.mTop + offset_y, alpha_color, true ) ; } } } @@ -352,7 +352,7 @@ void LLSnapshotLivePreview::draw() } else { - mNeedsFlash = FALSE; + mNeedsFlash = false; } } else @@ -457,7 +457,7 @@ void LLSnapshotLivePreview::draw() gGL.getTexUnit(0)->bind(mViewerImage[old_image_index]); // calculate UV scale // *FIX get this to work with old image - BOOL rescale = !mImageScaled[old_image_index] && mViewerImage[mCurImageIndex].notNull(); + bool rescale = !mImageScaled[old_image_index] && mViewerImage[mCurImageIndex].notNull(); F32 uv_width = rescale ? llmin((F32)mWidth[old_image_index] / (F32)mViewerImage[mCurImageIndex]->getWidth(), 1.f) : 1.f; F32 uv_height = rescale ? llmin((F32)mHeight[old_image_index] / (F32)mViewerImage[mCurImageIndex]->getHeight(), 1.f) : 1.f; gGL.pushMatrix(); @@ -521,18 +521,18 @@ void LLSnapshotLivePreview::reshape(S32 width, S32 height, bool called_from_pare { // We usually resize only on window reshape, so give it a chance to redraw, assign delay updateSnapshot( - TRUE, // new snapshot is needed - FALSE, // thumbnail will be updated either way. + true, // new snapshot is needed + false, // thumbnail will be updated either way. AUTO_SNAPSHOT_TIME_DELAY); // shutter delay. } } } -BOOL LLSnapshotLivePreview::setThumbnailImageSize() +bool LLSnapshotLivePreview::setThumbnailImageSize() { if (getWidth() < 10 || getHeight() < 10) { - return FALSE ; + return false ; } S32 width = (mThumbnailSubsampled ? mPreviewImage->getWidth() : gViewerWindow->getWindowWidthRaw()); S32 height = (mThumbnailSubsampled ? mPreviewImage->getHeight() : gViewerWindow->getWindowHeightRaw()) ; @@ -558,7 +558,7 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize() if (mThumbnailWidth > width || mThumbnailHeight > height) { - return FALSE ;//if the window is too small, ignore thumbnail updating. + return false ;//if the window is too small, ignore thumbnail updating. } // Show miniature thumbnail on collapsed snapshot panel @@ -600,10 +600,10 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize() } mPreviewRect.set(left - 1, top + 1, right + 1, bottom - 1) ; - return TRUE ; + return true ; } -void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) +void LLSnapshotLivePreview::generateThumbnailImage(bool force_update) { if(mThumbnailUpdateLock) //in the process of updating { @@ -619,17 +619,17 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) } ////lock updating - mThumbnailUpdateLock = TRUE ; + mThumbnailUpdateLock = true ; if(!setThumbnailImageSize()) { - mThumbnailUpdateLock = FALSE ; - mThumbnailUpToDate = TRUE ; + mThumbnailUpdateLock = false ; + mThumbnailUpToDate = true ; return ; } // Invalidate the big thumbnail when we regenerate the small one - mBigThumbnailUpToDate = FALSE; + mBigThumbnailUpToDate = false; if(mThumbnailImage) { @@ -671,7 +671,7 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) // mAllowRenderUI && gSavedSettings.getBOOL("RenderUIInSnapshot"), gSavedSettings.getBOOL("RenderHUDInSnapshot"), - FALSE, + false, gSavedSettings.getBOOL("RenderSnapshotNoPost"), mSnapshotBufferType) ) { @@ -698,12 +698,12 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) } // Scale to a power of 2 so it can be mapped to a texture raw->expandToPowerOfTwo(); - mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); - mThumbnailUpToDate = TRUE ; + mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), false); + mThumbnailUpToDate = true ; } //unlock updating - mThumbnailUpdateLock = FALSE ; + mThumbnailUpdateLock = false ; } LLViewerTexture* LLSnapshotLivePreview::getBigThumbnailImage() @@ -746,38 +746,38 @@ LLViewerTexture* LLSnapshotLivePreview::getBigThumbnailImage() } // Scale to a power of 2 so it can be mapped to a texture raw->expandToPowerOfTwo(); - mBigThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); - mBigThumbnailUpToDate = TRUE ; + mBigThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), false); + mBigThumbnailUpToDate = true ; } return mBigThumbnailImage ; } // Called often. Checks whether it's time to grab a new snapshot and if so, does it. -// Returns TRUE if new snapshot generated, FALSE otherwise. +// Returns true if new snapshot generated, false otherwise. //static -BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) +bool LLSnapshotLivePreview::onIdle( void* snapshot_preview ) { LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview; if (previewp->getWidth() == 0 || previewp->getHeight() == 0) { LL_WARNS("Snapshot") << "Incorrect dimensions: " << previewp->getWidth() << "x" << previewp->getHeight() << LL_ENDL; - return FALSE; + return false; } if (previewp->mSnapshotDelayTimer.getStarted()) // Wait for a snapshot delay timer { if (!previewp->mSnapshotDelayTimer.hasExpired()) { - return FALSE; + return false; } previewp->mSnapshotDelayTimer.stop(); } if (LLToolCamera::getInstance()->hasMouseCapture()) // Hide full-screen preview while camming, either don't take snapshots while ALT-zoom active { - previewp->setVisible(FALSE); - return FALSE; + previewp->setVisible(false); + return false; } // If we're in freeze-frame and/or auto update mode and camera has moved, update snapshot. @@ -791,18 +791,18 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mCameraPos = new_camera_pos; previewp->mCameraRot = new_camera_rot; // request a new snapshot whenever the camera moves, with a time delay - BOOL new_snapshot = gSavedSettings.getBOOL("AutoSnapshot") || previewp->mForceUpdateSnapshot; + bool new_snapshot = gSavedSettings.getBOOL("AutoSnapshot") || previewp->mForceUpdateSnapshot; LL_DEBUGS("Snapshot") << "camera moved, updating thumbnail" << LL_ENDL; previewp->updateSnapshot( new_snapshot, // whether a new snapshot is needed or merely invalidate the existing one - FALSE, // or if 1st arg is false, whether to produce a new thumbnail image. + false, // or if 1st arg is false, whether to produce a new thumbnail image. new_snapshot ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true. - previewp->mForceUpdateSnapshot = FALSE; + previewp->mForceUpdateSnapshot = false; } if (previewp->getSnapshotUpToDate() && previewp->getThumbnailUpToDate()) { - return FALSE; + return false; } // time to produce a snapshot @@ -814,13 +814,13 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mPreviewImage = new LLImageRaw; } - previewp->mSnapshotActive = TRUE; + previewp->mSnapshotActive = true; - previewp->setVisible(FALSE); - previewp->setEnabled(FALSE); + previewp->setVisible(false); + previewp->setEnabled(false); previewp->getWindow()->incBusyCount(); - previewp->setImageScaled(FALSE); + previewp->setImageScaled(false); // grab the raw image if (gViewerWindow->rawSnapshot( @@ -831,7 +831,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->getSnapshotType() == LLSnapshotModel::SNAPSHOT_TEXTURE, previewp->mAllowRenderUI && gSavedSettings.getBOOL("RenderUIInSnapshot"), gSavedSettings.getBOOL("RenderHUDInSnapshot"), - FALSE, + false, gSavedSettings.getBOOL("RenderSnapshotNoPost"), previewp->mSnapshotBufferType, previewp->getMaxImageSize())) @@ -850,15 +850,15 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) } // The snapshot is updated now... - previewp->mSnapshotUpToDate = TRUE; + previewp->mSnapshotUpToDate = true; // We need to update the thumbnail though previewp->setThumbnailImageSize(); - previewp->generateThumbnailImage(TRUE) ; + previewp->generateThumbnailImage(true) ; } previewp->getWindow()->decBusyCount(); previewp->setVisible(gSavedSettings.getBOOL("UseFreezeFrame") && previewp->mAllowFullScreenPreview); // only show fullscreen preview when in freeze frame mode - previewp->mSnapshotActive = FALSE; + previewp->mSnapshotActive = false; LL_DEBUGS("Snapshot") << "done creating snapshot" << LL_ENDL; } @@ -873,7 +873,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mViewContainer->notify(LLSD().with("snapshot-updated", true)); } - return TRUE; + return true; } void LLSnapshotLivePreview::prepareFreezeFrame() @@ -897,15 +897,15 @@ void LLSnapshotLivePreview::prepareFreezeFrame() { // go ahead and shrink image to appropriate power of 2 for display scaled->biasedScaleToPowerOfTwo(1024); - setImageScaled(TRUE); + setImageScaled(true); } else { // expand image but keep original image data intact - scaled->expandToPowerOfTwo(1024, FALSE); + scaled->expandToPowerOfTwo(1024, false); } - mViewerImage[mCurImageIndex] = LLViewerTextureManager::getLocalTexture(scaled.get(), FALSE); + mViewerImage[mCurImageIndex] = LLViewerTextureManager::getLocalTexture(scaled.get(), false); LLPointer curr_preview_image = mViewerImage[mCurImageIndex]; gGL.getTexUnit(0)->bind(curr_preview_image); curr_preview_image->setFilteringOption(getSnapshotType() == LLSnapshotModel::SNAPSHOT_TEXTURE ? LLTexUnit::TFO_ANISOTROPIC : LLTexUnit::TFO_POINT); @@ -964,7 +964,7 @@ LLPointer LLSnapshotLivePreview::getEncodedImage() mPreviewImage->getComponents()); // Scale it as required by J2C scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE); - setImageScaled(TRUE); + setImageScaled(true); // Compress to J2C if (formatted->encode(scaled, 0.f)) { @@ -1095,7 +1095,7 @@ void LLSnapshotLivePreview::getSize(S32& w, S32& h) const h = getHeight(); } -void LLSnapshotLivePreview::saveTexture(BOOL outfit_snapshot, std::string name) +void LLSnapshotLivePreview::saveTexture(bool outfit_snapshot, std::string name) { LLImageDataSharedLock lock(mPreviewImage); @@ -1178,5 +1178,5 @@ void LLSnapshotLivePreview::saveLocal(LLPointer image, const s { sSaveLocalImage = image; - gViewerWindow->saveImageNumbered(sSaveLocalImage, FALSE, success_cb, failure_cb); + gViewerWindow->saveImageNumbered(sSaveLocalImage, false, success_cb, failure_cb); } diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index 048faed82e..469a767739 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -76,14 +76,14 @@ public: LLSnapshotModel::ESnapshotType getSnapshotType() const { return mSnapshotType; } LLSnapshotModel::ESnapshotFormat getSnapshotFormat() const { return mSnapshotFormat; } - BOOL getSnapshotUpToDate() const { return mSnapshotUpToDate; } - BOOL isSnapshotActive() { return mSnapshotActive; } + bool getSnapshotUpToDate() const { return mSnapshotUpToDate; } + bool isSnapshotActive() { return mSnapshotActive; } LLViewerTexture* getThumbnailImage() const { return mThumbnailImage ; } S32 getThumbnailWidth() const { return mThumbnailWidth ; } S32 getThumbnailHeight() const { return mThumbnailHeight ; } - BOOL getThumbnailLock() const { return mThumbnailUpdateLock ; } - BOOL getThumbnailUpToDate() const { return mThumbnailUpToDate ;} - void setThumbnailSubsampled(BOOL subsampled) { mThumbnailSubsampled = subsampled; } + bool getThumbnailLock() const { return mThumbnailUpdateLock ; } + bool getThumbnailUpToDate() const { return mThumbnailUpToDate ;} + void setThumbnailSubsampled(bool subsampled) { mThumbnailSubsampled = subsampled; } // Show miniature thumbnail on collapsed snapshot panel void setFixedThumbnailSize(S32 width, S32 height) { mFixedThumbnailWidth = width; mFixedThumbnailHeight = height; } @@ -91,20 +91,20 @@ public: LLViewerTexture* getCurrentImage(); F32 getImageAspect(); const LLRect& getImageRect() const { return mImageRect[mCurImageIndex]; } - BOOL isImageScaled() const { return mImageScaled[mCurImageIndex]; } - void setImageScaled(BOOL scaled) { mImageScaled[mCurImageIndex] = scaled; } + bool isImageScaled() const { return mImageScaled[mCurImageIndex]; } + void setImageScaled(bool scaled) { mImageScaled[mCurImageIndex] = scaled; } const LLVector3d& getPosTakenGlobal() const { return mPosTakenGlobal; } void setSnapshotType(LLSnapshotModel::ESnapshotType type) { mSnapshotType = type; } void setSnapshotFormat(LLSnapshotModel::ESnapshotFormat format); bool setSnapshotQuality(S32 quality, bool set_by_user = true); void setSnapshotBufferType(LLSnapshotModel::ESnapshotLayerType type) { mSnapshotBufferType = type; } - void setAllowRenderUI(BOOL allow) { mAllowRenderUI = allow; } - void setAllowFullScreenPreview(BOOL allow) { mAllowFullScreenPreview = allow; } + void setAllowRenderUI(bool allow) { mAllowRenderUI = allow; } + void setAllowFullScreenPreview(bool allow) { mAllowFullScreenPreview = allow; } void setFilter(std::string filter_name) { mFilterName = filter_name; } std::string getFilter() const { return mFilterName; } - void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f); - void saveTexture(BOOL outfit_snapshot = FALSE, std::string name = ""); + void updateSnapshot(bool new_snapshot, bool new_thumbnail = false, F32 delay = 0.f); + void saveTexture(bool outfit_snapshot = false, std::string name = ""); void saveLocal(const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb); LLPointer getFormattedImage(); @@ -113,8 +113,8 @@ public: /// Sets size of preview thumbnail image and the surrounding rect. void setThumbnailPlaceholderRect(const LLRect& rect) {mThumbnailPlaceholderRect = rect; } - BOOL setThumbnailImageSize() ; - void generateThumbnailImage(BOOL force_update = FALSE) ; + bool setThumbnailImageSize() ; + void generateThumbnailImage(bool force_update = false) ; void resetThumbnailImage() { mThumbnailImage = NULL ; } void drawPreviewRect(S32 offset_x, S32 offset_y, LLColor4 alpha_color = LLColor4(0.5f, 0.5f, 0.5f, 0.8f)); void prepareFreezeFrame(); @@ -123,8 +123,8 @@ public: S32 getBigThumbnailWidth() const { return mBigThumbnailWidth ; } S32 getBigThumbnailHeight() const { return mBigThumbnailHeight ; } - // Returns TRUE when snapshot generated, FALSE otherwise. - static BOOL onIdle( void* snapshot_preview ); + // Returns true when snapshot generated, false otherwise. + static bool onIdle( void* snapshot_preview ); private: LLView* mViewContainer; @@ -134,7 +134,7 @@ private: LLRect mImageRect[2]; S32 mWidth[2]; S32 mHeight[2]; - BOOL mImageScaled[2]; + bool mImageScaled[2]; S32 mMaxImageSize ; //thumbnail image @@ -142,15 +142,15 @@ private: S32 mThumbnailWidth ; S32 mThumbnailHeight ; LLRect mPreviewRect ; - BOOL mThumbnailUpdateLock ; - BOOL mThumbnailUpToDate ; + bool mThumbnailUpdateLock ; + bool mThumbnailUpToDate ; LLRect mThumbnailPlaceholderRect; - BOOL mThumbnailSubsampled; // TRUE if the thumbnail is a subsampled version of the mPreviewImage + bool mThumbnailSubsampled; // true if the thumbnail is a subsampled version of the mPreviewImage LLPointer mBigThumbnailImage ; S32 mBigThumbnailWidth; S32 mBigThumbnailHeight; - BOOL mBigThumbnailUpToDate; + bool mBigThumbnailUpToDate; // Show miniature thumbnail on collapsed snapshot panel S32 mFixedThumbnailWidth; @@ -164,23 +164,23 @@ private: LLPointer mPreviewImage; LLPointer mPreviewImageEncoded; LLPointer mFormattedImage; - BOOL mAllowRenderUI; - BOOL mAllowFullScreenPreview; + bool mAllowRenderUI; + bool mAllowFullScreenPreview; LLFrameTimer mSnapshotDelayTimer; S32 mShineCountdown; LLFrameTimer mShineAnimTimer; F32 mFlashAlpha; - BOOL mNeedsFlash; + bool mNeedsFlash; LLVector3d mPosTakenGlobal; S32 mSnapshotQuality; S32 mDataSize; LLSnapshotModel::ESnapshotType mSnapshotType; LLSnapshotModel::ESnapshotFormat mSnapshotFormat; - BOOL mSnapshotUpToDate; + bool mSnapshotUpToDate; LLFrameTimer mFallAnimTimer; LLVector3 mCameraPos; LLQuaternion mCameraRot; - BOOL mSnapshotActive; + bool mSnapshotActive; LLSnapshotModel::ESnapshotLayerType mSnapshotBufferType; std::string mFilterName; @@ -188,8 +188,8 @@ private: public: static std::set sList; - BOOL mKeepAspectRatio ; - BOOL mForceUpdateSnapshot; + bool mKeepAspectRatio ; + bool mForceUpdateSnapshot; }; #endif // LL_LLSNAPSHOTLIVEPREVIEW_H diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 2816671b8a..820fa361af 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -75,7 +75,7 @@ static F32 sCurMaxTexPriority = 1.f; //static counter for frame to switch LOD on -void sg_assert(BOOL expr) +void sg_assert(bool expr) { #if LL_OCTREE_PARANOIA_CHECK if (!expr) @@ -141,7 +141,7 @@ void LLSpatialGroup::clearDrawMap() mDrawMap.clear(); } -BOOL LLSpatialGroup::isHUDGroup() +bool LLSpatialGroup::isHUDGroup() { return getSpatialPartition() && getSpatialPartition()->isHUDPartition() ; } @@ -223,7 +223,7 @@ void LLSpatialGroup::validateDrawMap() #endif } -BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) +bool LLSpatialGroup::updateInGroup(LLDrawable *drawablep, bool immediate) { LL_PROFILE_ZONE_SCOPED; drawablep->updateSpatialExtents(); @@ -238,10 +238,10 @@ BOOL LLSpatialGroup::updateInGroup(LLDrawable *drawablep, BOOL immediate) unbound(); setState(OBJECT_DIRTY); //setState(GEOM_DIRTY); - return TRUE; + return true; } - return FALSE; + return false; } void LLSpatialGroup::expandExtents(const LLVector4a* addingExtents, const LLXformMatrix& currentTransform) @@ -298,11 +298,11 @@ void LLSpatialGroup::expandExtents(const LLVector4a* addingExtents, const LLXfor mBounds[1].mul(0.5f); } -BOOL LLSpatialGroup::addObject(LLDrawable *drawablep) +bool LLSpatialGroup::addObject(LLDrawable *drawablep) { if(!drawablep) { - return FALSE; + return false; } { drawablep->setGroup(this); @@ -319,7 +319,7 @@ BOOL LLSpatialGroup::addObject(LLDrawable *drawablep) } } - return TRUE; + return true; } void LLSpatialGroup::rebuildGeom() @@ -412,13 +412,13 @@ LLSpatialGroup* LLSpatialGroup::getParent() return (LLSpatialGroup*)LLViewerOctreeGroup::getParent(); } -BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) +bool LLSpatialGroup::removeObject(LLDrawable *drawablep, bool from_octree) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL if(!drawablep) { - return FALSE; + return false; } unbound(); @@ -449,7 +449,7 @@ BOOL LLSpatialGroup::removeObject(LLDrawable *drawablep, BOOL from_octree) clearDrawMap(); } } - return TRUE; + return true; } void LLSpatialGroup::shift(const LLVector4a &offset) @@ -734,14 +734,14 @@ F32 LLSpatialGroup::getUpdateUrgency() const } } -BOOL LLSpatialGroup::changeLOD() +bool LLSpatialGroup::changeLOD() { LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL if (hasState(ALPHA_DIRTY | OBJECT_DIRTY)) { //a rebuild is going to happen, update distance and LoD - return TRUE; + return true; } if (getSpatialPartition()->mSlopRatio > 0.f) @@ -770,16 +770,16 @@ BOOL LLSpatialGroup::changeLOD() << " fab ratio " << fabsf(ratio) << " slop " << getSpatialPartition()->mSlopRatio << LL_ENDL; - return TRUE; + return true; } } if (needsUpdate()) { - return TRUE; + return true; } - return FALSE; + return false; } void LLSpatialGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry* entry) @@ -791,7 +791,7 @@ void LLSpatialGroup::handleInsertion(const TreeNode* node, LLViewerOctreeEntry* void LLSpatialGroup::handleRemoval(const TreeNode* node, LLViewerOctreeEntry* entry) { - removeObject((LLDrawable*)entry->getDrawable(), TRUE); + removeObject((LLDrawable*)entry->getDrawable(), true); LLViewerOctreeGroup::handleRemoval(node, entry); } @@ -932,15 +932,15 @@ void LLSpatialGroup::destroyGLState(bool keep_occlusion) //============================================== -LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, LLViewerRegion* regionp) +LLSpatialPartition::LLSpatialPartition(U32 data_mask, bool render_by_group, LLViewerRegion* regionp) : mRenderByGroup(render_by_group), mBridge(NULL) { mRegionp = regionp; mPartitionType = LLViewerRegion::PARTITION_NONE; mVertexDataMask = data_mask; - mDepthMask = FALSE; + mDepthMask = false; mSlopRatio = 0.25f; - mInfiniteFarClip = FALSE; + mInfiniteFarClip = false; new LLSpatialGroup(mOctree, this); } @@ -951,7 +951,7 @@ LLSpatialPartition::~LLSpatialPartition() cleanup(); } -LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) +LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, bool was_visible) { LL_PROFILE_ZONE_SCOPED; drawablep->updateSpatialExtents(); @@ -977,7 +977,7 @@ LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible) return group; } -BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) +bool LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) { LL_PROFILE_ZONE_SCOPED; if (!curp->removeObject(drawablep)) @@ -991,10 +991,10 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) assert_octree_valid(mOctree); - return TRUE; + return true; } -void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate) +void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, bool immediate) { LL_PROFILE_ZONE_SCOPED; // sanity check submitted by open source user bushing Spatula @@ -1005,7 +1005,7 @@ void LLSpatialPartition::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL return; } - BOOL was_visible = curp ? curp->isVisible() : FALSE; + bool was_visible = curp ? curp->isVisible() : false; if (curp && curp->getSpatialPartition() != this) { @@ -1157,7 +1157,7 @@ class LLOctreeCullVisExtents: public LLOctreeCullShadow { public: LLOctreeCullVisExtents(LLCamera* camera, LLVector4a& min, LLVector4a& max) - : LLOctreeCullShadow(camera), mMin(min), mMax(max), mEmpty(TRUE) { } + : LLOctreeCullShadow(camera), mMin(min), mMax(max), mEmpty(true) { } virtual bool earlyFail(LLViewerOctreeGroup* base_group) { @@ -1210,7 +1210,7 @@ public: { if (AABBInFrustumObjectBounds(group) > 0) { - mEmpty = FALSE; + mEmpty = false; const LLVector4a* exts = group->getObjectExtents(); update_min_max(mMin, mMax, exts[0]); update_min_max(mMin, mMax, exts[1]); @@ -1218,14 +1218,14 @@ public: } else { - mEmpty = FALSE; + mEmpty = false; const LLVector4a* exts = group->getExtents(); update_min_max(mMin, mMax, exts[0]); update_min_max(mMin, mMax, exts[1]); } } - BOOL mEmpty; + bool mEmpty; LLVector4a& mMin; LLVector4a& mMax; }; @@ -1234,7 +1234,7 @@ class LLOctreeCullDetectVisible: public LLOctreeCullShadow { public: LLOctreeCullDetectVisible(LLCamera* camera) - : LLOctreeCullShadow(camera), mResult(FALSE) { } + : LLOctreeCullShadow(camera), mResult(false) { } virtual bool earlyFail(LLViewerOctreeGroup* base_group) { @@ -1255,11 +1255,11 @@ public: { if (base_group->isVisible()) { - mResult = TRUE; + mResult = true; } } - BOOL mResult; + bool mResult; }; class LLOctreeSelect : public LLOctreeCull @@ -1287,7 +1287,7 @@ public: { if (drawable->isSpatialBridge()) { - drawable->setVisible(*mCamera, mResults, TRUE); + drawable->setVisible(*mCamera, mResults, true); } else { @@ -1412,7 +1412,7 @@ void LLSpatialPartition::restoreGL() { } -BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax) +bool LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL; LLVector4a visMina, visMaxa; @@ -1432,14 +1432,14 @@ BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, return vis.mEmpty; } -BOOL LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera) +bool LLSpatialPartition::visibleObjectsInFrustum(LLCamera& camera) { LLOctreeCullDetectVisible vis(&camera); vis.traverse(mOctree); return vis.mResult; } -S32 LLSpatialPartition::cull(LLCamera &camera, std::vector* results, BOOL for_select) +S32 LLSpatialPartition::cull(LLCamera &camera, std::vector* results, bool for_select) { LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL; #if LL_OCTREE_PARANOIA_CHECK @@ -1460,7 +1460,7 @@ S32 LLSpatialPartition::cull(LLCamera &camera, std::vector* result return 0; } -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; S32 LLSpatialPartition::cull(LLCamera &camera, bool do_occlusion) { @@ -1687,7 +1687,7 @@ void renderOctree(LLSpatialGroup* group) col.setVec(0.1f,0.1f,1,0.1f); { - LLGLDepthTest gl_depth(FALSE, FALSE); + LLGLDepthTest gl_depth(false, false); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); gGL.diffuseColor4f(1,0,0,group->mBuilt); @@ -1817,7 +1817,7 @@ std::set visible_selected_groups; void renderXRay(LLSpatialGroup* group, LLCamera* camera) { - BOOL render_objects = (!LLPipeline::sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) && group->isVisible() && + bool render_objects = (!LLPipeline::sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) && group->isVisible() && !group->isEmpty(); if (render_objects) @@ -1909,7 +1909,7 @@ void renderUpdateType(LLDrawable* drawablep) } } -void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) +void renderBoundingBox(LLDrawable* drawable, bool set_color = true) { if (set_color) { @@ -2277,13 +2277,13 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume, bool wireframe // LLPhysicsShapeBuilderUtil::determinePhysicsShape(physics_params, volume->getScale(), physics_spec); LLUUID mesh_id; LLModel::Decomposition* decomp = nullptr; - bool hasConvexDecomp = FALSE; + bool hasConvexDecomp = false; // If we are a mesh and the mesh has a hul decomp (is analysed) then set hasDecomp to true if (volume->isMesh()){ mesh_id = volume_params.getSculptID(); decomp = gMeshRepo.getDecomposition(mesh_id); - if (decomp && !decomp->mHull.empty()){ hasConvexDecomp = TRUE; } + if (decomp && !decomp->mHull.empty()){ hasConvexDecomp = true; } } LLPhysicsShapeBuilderUtil::determinePhysicsShape(physics_params, volume->getScale(), hasConvexDecomp, physics_spec); @@ -2796,7 +2796,7 @@ void renderTexelDensity(LLDrawable* drawable) checkerboard_matrix.initScale(LLVector3(texturep->getWidth(discard_level) / 8, texturep->getHeight(discard_level) / 8, 1.f)); - gGL.getTexUnit(0)->bind(LLViewerTexture::sCheckerBoardImagep, TRUE); + gGL.getTexUnit(0)->bind(LLViewerTexture::sCheckerBoardImagep, true); gGL.matrixMode(LLRender::MM_TEXTURE); gGL.loadMatrix((GLfloat*)&checkerboard_matrix.mMatrix); @@ -2849,7 +2849,7 @@ void renderTexelDensity(LLDrawable* drawable) // //gGL.matrixMode(LLRender::MM_TEXTURE); // glLoadMatrixf((GLfloat*) checkboard_matrix.mMatrix); - // gGL.getTexUnit(i)->bind(LLViewerTexture::sCheckerBoardImagep, TRUE); + // gGL.getTexUnit(i)->bind(LLViewerTexture::sCheckerBoardImagep, true); // pushVerts(params, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_NORMAL ); @@ -3492,7 +3492,7 @@ public: { continue; } - renderBoundingBox(drawable, FALSE); + renderBoundingBox(drawable, false); } } }; @@ -3681,14 +3681,14 @@ bool LLSpatialPartition::isHUDPartition() return mPartitionType == LLViewerRegion::PARTITION_HUD ; } -BOOL LLSpatialPartition::isVisible(const LLVector3& v) +bool LLSpatialPartition::isVisible(const LLVector3& v) { if (!LLViewerCamera::getInstance()->sphereInFrustum(v, 4.0f)) { - return FALSE; + return false; } - return TRUE; + return true; } // Class to watch for any octree changes while iterating. Will catch child insertion/removal as well as data insertion/removal. @@ -3786,12 +3786,12 @@ public: LLVector4a *mNormal; LLVector4a *mTangent; LLDrawable* mHit; - BOOL mPickTransparent; - BOOL mPickRigged; - BOOL mPickUnselectable; - BOOL mPickReflectionProbe; + bool mPickTransparent; + bool mPickRigged; + bool mPickUnselectable; + bool mPickReflectionProbe; - LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, BOOL pick_reflection_probe, + LLOctreeIntersect(const LLVector4a& start, const LLVector4a& end, bool pick_transparent, bool pick_rigged, bool pick_unselectable, bool pick_reflection_probe, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) : mStart(start), mEnd(end), @@ -3967,7 +3967,7 @@ public: } if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, - (mPickReflectionProbe && vobj->isReflectionProbe()) ? TRUE : mPickTransparent, // always pick transparent when picking selection probe + (mPickReflectionProbe && vobj->isReflectionProbe()) ? true : mPickTransparent, // always pick transparent when picking selection probe mPickRigged, mPickUnselectable, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) { mEnd = intersection; // shorten ray so we only find CLOSER hits @@ -3986,10 +3986,10 @@ public: } LL_ALIGN_POSTFIX(16); LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, - BOOL pick_reflection_probe, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, + bool pick_reflection_probe, S32* face_hit, // return the face hit LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point @@ -4005,10 +4005,10 @@ LLDrawable* LLSpatialPartition::lineSegmentIntersect(const LLVector4a& start, co } LLDrawable* LLSpatialGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, - BOOL pick_reflection_probe, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, + bool pick_reflection_probe, S32* face_hit, // return the face hit LLVector4a* intersection, // return the intersection point LLVector2* tex_coord, // return the texture coordinates of the intersection point diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 66cd2f8e70..dea368af49 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -231,7 +231,7 @@ public: } static U32 sNodeCount; - static bool sNoDelete; //deletion of spatial groups and draw info not allowed if TRUE + static bool sNoDelete; //deletion of spatial groups and draw info not allowed if true typedef std::vector > sg_vector_t; typedef std::vector > bridge_list_t; @@ -293,7 +293,7 @@ public: LLSpatialGroup(OctreeNode* node, LLSpatialPartition* part); - BOOL isHUDGroup() ; + bool isHUDGroup() ; void clearDrawMap(); void validate(); @@ -305,9 +305,9 @@ public: LLSpatialGroup* getParent(); - BOOL addObject(LLDrawable *drawablep); - BOOL removeObject(LLDrawable *drawablep, BOOL from_octree = FALSE); - BOOL updateInGroup(LLDrawable *drawablep, BOOL immediate = FALSE); // Update position if it's in the group + bool addObject(LLDrawable *drawablep); + bool removeObject(LLDrawable *drawablep, bool from_octree = false); + bool updateInGroup(LLDrawable *drawablep, bool immediate = false); // Update position if it's in the group void expandExtents(const LLVector4a* addingExtents, const LLXformMatrix& currentTransform); void shift(const LLVector4a &offset); @@ -316,7 +316,7 @@ public: void updateDistance(LLCamera& camera); F32 getUpdateUrgency() const; - BOOL changeLOD(); + bool changeLOD(); void rebuildGeom(); void rebuildMesh(); @@ -327,10 +327,10 @@ public: void drawObjectBox(LLColor4 col); LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, - BOOL pick_reflection_probe, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, + bool pick_reflection_probe, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -398,17 +398,17 @@ public: class LLSpatialPartition: public LLViewerOctreePartition, public LLGeometryManager { public: - LLSpatialPartition(U32 data_mask, BOOL render_by_group, LLViewerRegion* regionp); + LLSpatialPartition(U32 data_mask, bool render_by_group, LLViewerRegion* regionp); virtual ~LLSpatialPartition(); - LLSpatialGroup *put(LLDrawable *drawablep, BOOL was_visible = FALSE); - BOOL remove(LLDrawable *drawablep, LLSpatialGroup *curp); + LLSpatialGroup *put(LLDrawable *drawablep, bool was_visible = false); + bool remove(LLDrawable *drawablep, LLSpatialGroup *curp); LLDrawable* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, - BOOL pick_reflection_probe, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, + bool pick_reflection_probe, S32* face_hit, // return the face hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -418,7 +418,7 @@ public: // If the drawable moves, move it here. - virtual void move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate = FALSE); + virtual void move(LLDrawable *drawablep, LLSpatialGroup *curp, bool immediate = false); virtual void shift(const LLVector4a &offset); virtual F32 calcDistance(LLSpatialGroup* group, LLCamera& camera); @@ -427,33 +427,33 @@ public: virtual void rebuildGeom(LLSpatialGroup* group); virtual void rebuildMesh(LLSpatialGroup* group); - BOOL visibleObjectsInFrustum(LLCamera& camera); + bool visibleObjectsInFrustum(LLCamera& camera); /*virtual*/ S32 cull(LLCamera &camera, bool do_occlusion=false); // Cull on arbitrary frustum - S32 cull(LLCamera &camera, std::vector* results, BOOL for_select); // Cull on arbitrary frustum + S32 cull(LLCamera &camera, std::vector* results, bool for_select); // Cull on arbitrary frustum - BOOL isVisible(const LLVector3& v); + bool isVisible(const LLVector3& v); bool isHUDPartition() ; LLSpatialBridge* asBridge() { return mBridge; } - BOOL isBridge() { return asBridge() != NULL; } + bool isBridge() { return asBridge() != NULL; } void renderPhysicsShapes(bool depth_only); void renderDebug(); void renderIntersectingBBoxes(LLCamera* camera); void restoreGL(); - BOOL getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax); + bool getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax); public: LLSpatialBridge* mBridge; // NULL for non-LLSpatialBridge instances, otherwise, mBridge == this // use a pointer instead of making "isBridge" and "asBridge" virtual so it's safe // to call asBridge() from the destructor - bool mInfiniteFarClip; // if TRUE, frustum culling ignores far clip plane + bool mInfiniteFarClip; // if true, frustum culling ignores far clip plane const bool mRenderByGroup; U32 mVertexDataMask; F32 mSlopRatio; //percentage distance must change before drawables receive LOD update (default is 0.25); - bool mDepthMask; //if TRUE, objects in this partition will be written to depth during alpha rendering + bool mDepthMask; //if true, objects in this partition will be written to depth during alpha rendering }; // class for creating bridges between spatial partitions @@ -465,18 +465,18 @@ protected: public: typedef std::vector > bridge_vector_t; - LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 data_mask, LLViewerRegion* regionp); + LLSpatialBridge(LLDrawable* root, bool render_by_group, U32 data_mask, LLViewerRegion* regionp); void destroyTree(); - virtual BOOL isSpatialBridge() const { return TRUE; } + virtual bool isSpatialBridge() const { return true; } virtual void updateSpatialExtents(); virtual void updateBinRadius(); - virtual void setVisible(LLCamera& camera_in, std::vector* results = NULL, BOOL for_select = FALSE); + virtual void setVisible(LLCamera& camera_in, std::vector* results = NULL, bool for_select = false); virtual void updateDistance(LLCamera& camera_in, bool force_update); virtual void makeActive(); - virtual void move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL immediate = FALSE); - virtual BOOL updateMove(); + virtual void move(LLDrawable *drawablep, LLSpatialGroup *curp, bool immediate = false); + virtual bool updateMove(); virtual void shiftPos(const LLVector4a& vec); virtual void cleanupReferences(); virtual LLSpatialPartition* asPartition() { return this; } @@ -691,7 +691,7 @@ class LLVolumeGeometryManager: public LLGeometryManager virtual void rebuildMesh(LLSpatialGroup* group); virtual void getGeometry(LLSpatialGroup* group); virtual void addGeometryCount(LLSpatialGroup* group, U32& vertex_count, U32& index_count); - U32 genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort = FALSE, BOOL batch_textures = FALSE, BOOL rigged = FALSE); + U32 genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, bool distance_sort = false, bool batch_textures = false, bool rigged = false); void registerFace(LLSpatialGroup* group, LLFace* facep, U32 type); private: diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 831ff8bd1d..c799870757 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -52,16 +52,16 @@ LLSpeaker::LLSpeaker(const LLUUID& id, const std::string& name, const ESpeakerTy mStatus(LLSpeaker::STATUS_TEXT_ONLY), mLastSpokeTime(0.f), mSpeechVolume(0.f), - mHasSpoken(FALSE), - mHasLeftCurrentCall(FALSE), + mHasSpoken(false), + mHasLeftCurrentCall(false), mDotColor(LLColor4::white), mID(id), - mTyping(FALSE), + mTyping(false), mSortIndex(0), mType(type), - mIsModerator(FALSE), - mModeratorMutedVoice(FALSE), - mModeratorMutedText(FALSE) + mIsModerator(false), + mModeratorMutedVoice(false), + mModeratorMutedText(false) { if (name.empty() && type == SPEAKER_AGENT) { @@ -191,7 +191,7 @@ bool LLSpeakerActionTimer::tick() { if (mActionCallback) { - return (BOOL)mActionCallback(mSpeakerId); + return (bool)mActionCallback(mSpeakerId); } return true; } @@ -363,7 +363,7 @@ void LLSpeakerMgr::initVoiceModerateMode() } } -void LLSpeakerMgr::update(BOOL resort_ok) +void LLSpeakerMgr::update(bool resort_ok) { if (!LLVoiceClient::getInstance()) { @@ -379,7 +379,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) } // update status of all current speakers - BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); + bool voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()); for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); speaker_it++) { LLUUID speaker_id = speaker_it->first; @@ -388,7 +388,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id)) { speakerp->mSpeechVolume = LLVoiceClient::getInstance()->getCurrentPower(speaker_id); - BOOL moderator_muted_voice = LLVoiceClient::getInstance()->getIsModeratorMuted(speaker_id); + bool moderator_muted_voice = LLVoiceClient::getInstance()->getIsModeratorMuted(speaker_id); if (moderator_muted_voice != speakerp->mModeratorMutedVoice) { speakerp->mModeratorMutedVoice = moderator_muted_voice; @@ -406,7 +406,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) if (speakerp->mStatus != LLSpeaker::STATUS_SPEAKING) { speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32(); - speakerp->mHasSpoken = TRUE; + speakerp->mHasSpoken = true; fireEvent(new LLSpeakerUpdateSpeakerEvent(speakerp), "update_speaker"); } speakerp->mStatus = LLSpeaker::STATUS_SPEAKING; @@ -590,7 +590,7 @@ bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id) LL_DEBUGS("Speakers") << "Removed speaker " << speaker_id << LL_ENDL; fireEvent(new LLSpeakerListChangeEvent(this, speaker_id), "remove"); - update(TRUE); + update(true); return false; } @@ -608,7 +608,7 @@ LLPointer LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id) return found_it->second; } -void LLSpeakerMgr::getSpeakerList(speaker_list_t* speaker_list, BOOL include_text) +void LLSpeakerMgr::getSpeakerList(speaker_list_t* speaker_list, bool include_text) { speaker_list->clear(); for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it) @@ -632,7 +632,7 @@ bool LLSpeakerMgr::isSpeakerToBeRemoved(const LLUUID& speaker_id) return mSpeakerDelayRemover && mSpeakerDelayRemover->isTimerStarted(speaker_id); } -void LLSpeakerMgr::setSpeakerTyping(const LLUUID& speaker_id, BOOL typing) +void LLSpeakerMgr::setSpeakerTyping(const LLUUID& speaker_id, bool typing) { LLPointer speakerp = findSpeaker(speaker_id); if (speakerp.notNull()) @@ -648,12 +648,12 @@ void LLSpeakerMgr::speakerChatted(const LLUUID& speaker_id) if (speakerp.notNull()) { speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32(); - speakerp->mHasSpoken = TRUE; + speakerp->mHasSpoken = true; fireEvent(new LLSpeakerUpdateSpeakerEvent(speakerp), "update_speaker"); } } -BOOL LLSpeakerMgr::isVoiceActive() +bool LLSpeakerMgr::isVoiceActive() { // mVoiceChannel = NULL means current voice channel, whatever it is return LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive(); @@ -698,7 +698,7 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers) if ( speaker_it->second.isMap() ) { - BOOL is_moderator = speakerp->mIsModerator; + bool is_moderator = speakerp->mIsModerator; speakerp->mIsModerator = speaker_it->second["is_moderator"]; speakerp->mModeratorMutedText = speaker_it->second["mutes"]["text"]; @@ -773,7 +773,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update) if (agent_info.has("is_moderator")) { - BOOL is_moderator = speakerp->mIsModerator; + bool is_moderator = speakerp->mIsModerator; speakerp->mIsModerator = agent_info["is_moderator"]; // Fire event only if moderator changed if ( is_moderator != speakerp->mIsModerator ) @@ -851,7 +851,7 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu if (!speakerp) return; // *NOTE: mantipov: probably this condition will be incorrect when avatar will be blocked for - // text chat via moderation (LLSpeaker::mModeratorMutedText == TRUE) + // text chat via moderation (LLSpeaker::mModeratorMutedText == true) bool is_in_voice = speakerp->mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || speakerp->mStatus == LLSpeaker::STATUS_MUTED; // do not send voice moderation changes for avatars not in voice channel diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index aa7a817706..5f309fbe7f 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -70,16 +70,16 @@ public: F32 mLastSpokeTime; // timestamp when this speaker last spoke F32 mSpeechVolume; // current speech amplitude (timea average rms amplitude?) std::string mDisplayName; // cache user name for this speaker - BOOL mHasSpoken; // has this speaker said anything this session? - BOOL mHasLeftCurrentCall; // has this speaker left the current voice call? + bool mHasSpoken; // has this speaker said anything this session? + bool mHasLeftCurrentCall; // has this speaker left the current voice call? LLColor4 mDotColor; LLUUID mID; - BOOL mTyping; + bool mTyping; S32 mSortIndex; ESpeakerType mType; - BOOL mIsModerator; - BOOL mModeratorMutedVoice; - BOOL mModeratorMutedText; + bool mIsModerator; + bool mModeratorMutedVoice; + bool mModeratorMutedText; }; class LLSpeakerUpdateSpeakerEvent : public LLOldEvents::LLEvent @@ -98,7 +98,7 @@ public: /*virtual*/ LLSD getValue(); private: const LLUUID& mSpeakerID; - BOOL mIsModerator; + bool mIsModerator; }; class LLSpeakerTextModerationEvent : public LLOldEvents::LLEvent @@ -228,18 +228,18 @@ public: virtual ~LLSpeakerMgr(); LLPointer findSpeaker(const LLUUID& avatar_id); - void update(BOOL resort_ok); - void setSpeakerTyping(const LLUUID& speaker_id, BOOL typing); + void update(bool resort_ok); + void setSpeakerTyping(const LLUUID& speaker_id, bool typing); void speakerChatted(const LLUUID& speaker_id); LLPointer setSpeaker(const LLUUID& id, const std::string& name = LLStringUtil::null, LLSpeaker::ESpeakerStatus status = LLSpeaker::STATUS_TEXT_ONLY, LLSpeaker::ESpeakerType = LLSpeaker::SPEAKER_AGENT); - BOOL isVoiceActive(); + bool isVoiceActive(); typedef std::vector > speaker_list_t; - void getSpeakerList(speaker_list_t* speaker_list, BOOL include_text); + void getSpeakerList(speaker_list_t* speaker_list, bool include_text); LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; } const LLUUID getSessionID(); bool isSpeakerToBeRemoved(const LLUUID& speaker_id); diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 0111d8869c..1c3d1dd09b 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -109,9 +109,9 @@ private: * Changes state of indicators specified by LLUUIDs * * @param speakers_uuids - avatars' LLUUIDs whose speaking indicators should be switched - * @param switch_on - if TRUE specified indicator will be switched on, off otherwise. + * @param switch_on - if true specified indicator will be switched on, off otherwise. */ - void switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on); + void switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, bool switch_on); /** * Ensures that passed instance of Speaking Indicator does not exist among registered ones. @@ -154,7 +154,7 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i mSpeakingIndicators.insert(value_type); speaker_ids_t speakers_uuids; - BOOL is_in_same_voice = LLVoiceClient::getInstance()->isParticipant(speaker_id); + bool is_in_same_voice = LLVoiceClient::getInstance()->isParticipant(speaker_id); speakers_uuids.insert(speaker_id); switchSpeakerIndicators(speakers_uuids, is_in_same_voice); @@ -201,7 +201,7 @@ void SpeakingIndicatorManager::cleanupSingleton() void SpeakingIndicatorManager::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) { - switchSpeakerIndicators(mSwitchedIndicatorsOn, FALSE); + switchSpeakerIndicators(mSwitchedIndicatorsOn, false); mSwitchedIndicatorsOn.clear(); } @@ -214,15 +214,15 @@ void SpeakingIndicatorManager::onParticipantsChanged() LL_DEBUGS("SpeakingIndicator") << "Switching all OFF, count: " << mSwitchedIndicatorsOn.size() << LL_ENDL; // switch all indicators off - switchSpeakerIndicators(mSwitchedIndicatorsOn, FALSE); + switchSpeakerIndicators(mSwitchedIndicatorsOn, false); mSwitchedIndicatorsOn.clear(); LL_DEBUGS("SpeakingIndicator") << "Switching all ON, count: " << speakers_uuids.size() << LL_ENDL; // then switch current voice participants indicators on - switchSpeakerIndicators(speakers_uuids, TRUE); + switchSpeakerIndicators(speakers_uuids, true); } -void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on) +void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, bool switch_on) { LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); LLUUID session_id; diff --git a/indra/newview/llsplitbutton.cpp b/indra/newview/llsplitbutton.cpp index d6fe6d43a1..2e68696920 100644 --- a/indra/newview/llsplitbutton.cpp +++ b/indra/newview/llsplitbutton.cpp @@ -93,7 +93,7 @@ void LLSplitButton::onArrowBtnDown() { showButtons(); - setFocus(TRUE); + setFocus(true); if (mArrowBtn->hasMouseCapture() || mShownItem->hasMouseCapture()) { @@ -161,21 +161,21 @@ void LLSplitButton::showButtons() // effectively putting us into a special draw layer gViewerWindow->addPopup(this); - mItemsPanel->setFocus(TRUE); + mItemsPanel->setFocus(true); //push arrow button down and show the item buttons - mArrowBtn->setToggleState(TRUE); - mItemsPanel->setVisible(TRUE); + mArrowBtn->setToggleState(true); + mItemsPanel->setVisible(true); - setUseBoundingRect(TRUE); + setUseBoundingRect(true); } void LLSplitButton::hideButtons() { - mItemsPanel->setVisible(FALSE); - mArrowBtn->setToggleState(FALSE); + mItemsPanel->setVisible(false); + mArrowBtn->setToggleState(false); - setUseBoundingRect(FALSE); + setUseBoundingRect(false); gViewerWindow->removePopup(this); } diff --git a/indra/newview/llsprite.cpp b/indra/newview/llsprite.cpp index af0b5a40b4..866bb17820 100644 --- a/indra/newview/llsprite.cpp +++ b/indra/newview/llsprite.cpp @@ -60,8 +60,8 @@ LLSprite::LLSprite(const LLUUID &image_uuid) : mPitch(0.f), mYaw(0.f), mPosition(0.0f, 0.0f, 0.0f), - mFollow(TRUE), - mUseCameraUp(TRUE), + mFollow(true), + mUseCameraUp(true), mColor(0.5f, 0.5f, 0.5f, 1.0f), mTexMode(GL_REPLACE) { @@ -266,12 +266,12 @@ void LLSprite::setYaw(F32 yaw) mYaw = yaw; } -void LLSprite::setFollow(const BOOL follow) +void LLSprite::setFollow(const bool follow) { mFollow = follow; } -void LLSprite::setUseCameraUp(const BOOL use_up) +void LLSprite::setUseCameraUp(const bool use_up) { mUseCameraUp = use_up; } diff --git a/indra/newview/llsprite.h b/indra/newview/llsprite.h index d00b8ef695..457c0230f7 100644 --- a/indra/newview/llsprite.h +++ b/indra/newview/llsprite.h @@ -61,8 +61,8 @@ public: void setPitch(const F32 pitch); void setSize(const F32 width, const F32 height); void setYaw(const F32 yaw); - void setFollow(const BOOL follow); - void setUseCameraUp(const BOOL use_up); + void setFollow(const bool follow); + void setUseCameraUp(const bool use_up); void setTexMode(LLGLenum mode); void setColor(const LLColor4 &color); @@ -85,8 +85,8 @@ private: F32 mPitch; F32 mYaw; LLVector3 mPosition; - BOOL mFollow; - BOOL mUseCameraUp; + bool mFollow; + bool mUseCameraUp; LLColor4 mColor; LLGLenum mTexMode; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 96180d7afa..5072e08f2d 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -813,7 +813,7 @@ bool idle_startup() LLVersionInfo::instance().getMajor(), LLVersionInfo::instance().getMinor(), LLVersionInfo::instance().getPatch(), - FALSE, + false, std::string(), responder, failure_is_fatal, @@ -884,7 +884,7 @@ bool idle_startup() F32 xfer_throttle_bps = gSavedSettings.getF32("XferThrottle"); if (xfer_throttle_bps > 1.f) { - gXferManager->setUseAckThrottling(TRUE); + gXferManager->setUseAckThrottling(true); gXferManager->setAckThrottleBPS(xfer_throttle_bps); } gAssetStorage = new LLViewerAssetStorage(msg, gXferManager); @@ -898,13 +898,13 @@ bool idle_startup() if (inBandwidth != 0.f) { LL_DEBUGS("AppInit") << "Setting packetring incoming bandwidth to " << inBandwidth << LL_ENDL; - msg->mPacketRing.setUseInThrottle(TRUE); + msg->mPacketRing.setUseInThrottle(true); msg->mPacketRing.setInBandwidth(inBandwidth); } if (outBandwidth != 0.f) { LL_DEBUGS("AppInit") << "Setting packetring outgoing bandwidth to " << outBandwidth << LL_ENDL; - msg->mPacketRing.setUseOutThrottle(TRUE); + msg->mPacketRing.setUseOutThrottle(true); msg->mPacketRing.setOutBandwidth(outBandwidth); } } @@ -977,7 +977,7 @@ bool idle_startup() else { ms_sleep(1); - return FALSE; + return false; } // } @@ -1001,7 +1001,7 @@ bool idle_startup() // or audio cues in connection UI. //------------------------------------------------- - if (FALSE == gSavedSettings.getBOOL("NoAudio")) + if (false == gSavedSettings.getBOOL("NoAudio")) { delete gAudiop; gAudiop = NULL; @@ -1036,7 +1036,7 @@ bool idle_startup() #endif if (gAudiop->init(window_handle, LLAppViewer::instance()->getSecondLifeTitle())) { - if (FALSE == gSavedSettings.getBOOL("UseMediaPluginsForStreamingAudio")) + if (false == gSavedSettings.getBOOL("UseMediaPluginsForStreamingAudio")) { LL_INFOS("AppInit") << "Using default impl to render streaming audio" << LL_ENDL; gAudiop->setStreamingAudioImpl(gAudiop->createDefaultStreamingAudioImpl()); @@ -1053,7 +1053,7 @@ bool idle_startup() // Output device selection gAudiop->setDevice(LLUUID(gSavedSettings.getString("FSOutputDeviceUUID"))); - gAudiop->setMuted(TRUE); + gAudiop->setMuted(true); } else { @@ -1081,7 +1081,7 @@ bool idle_startup() // Previous initializeLoginInfo may have generated user credentials. Re-check them. if (gUserCredential.isNull()) { - show_connect_box = TRUE; + show_connect_box = true; } else if (gSavedSettings.getBOOL("AutoLogin")) { @@ -1119,13 +1119,13 @@ bool idle_startup() { gRememberPassword = gSavedSettings.getBOOL("RememberPassword"); gRememberUser = gSavedSettings.getBOOL("RememberUser"); - show_connect_box = TRUE; + show_connect_box = true; } // [RLVa:KB] - Patch: RLVa-2.1.0 if (gSavedSettings.get(RlvSettingNames::Main)) { - show_connect_box = TRUE; + show_connect_box = true; } // [/RVA:KB] @@ -1169,7 +1169,7 @@ bool idle_startup() // Go to the next startup state LLStartUp::setStartupState( STATE_BROWSER_INIT ); - return FALSE; + return false; } @@ -1181,7 +1181,7 @@ bool idle_startup() display_startup(); // LLViewerMedia::initBrowser(); LLStartUp::setStartupState( STATE_LOGIN_SHOW ); - return FALSE; + return false; } @@ -1225,7 +1225,7 @@ bool idle_startup() gUserCredential = gLoginHandler.initializeLoginInfo(); } // Make sure the process dialog doesn't hide things - gViewerWindow->setShowProgress(FALSE,FALSE); + gViewerWindow->setShowProgress(false,false); // Show the login dialog login_show(); // connect dialog is already shown, so fill in the names @@ -1265,9 +1265,9 @@ bool idle_startup() LLStartUp::setStartupState( STATE_LOGIN_CLEANUP ); } - gViewerWindow->setNormalControlsVisible( FALSE ); - gLoginMenuBarView->setVisible( TRUE ); - gLoginMenuBarView->setEnabled( TRUE ); + gViewerWindow->setNormalControlsVisible( false ); + gLoginMenuBarView->setVisible( true ); + gLoginMenuBarView->setEnabled( true ); LLNotificationsUI::LLScreenChannelBase* chat_channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID(LLUUID(gSavedSettings.getString("NearByChatChannelUUID"))); if(chat_channel) @@ -1295,7 +1295,7 @@ bool idle_startup() #endif display_startup(); timeout.reset(); - return FALSE; + return false; } if (STATE_LOGIN_WAIT == LLStartUp::getStartupState()) @@ -1311,7 +1311,7 @@ bool idle_startup() // display() function will be the one to run display_startup() // Sleep so we don't spin the CPU ms_sleep(1); - return FALSE; + return false; } if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) @@ -1323,7 +1323,7 @@ bool idle_startup() LLNotificationsUtil::add("TestversionExpired", LLSD(), LLSD(), login_alert_done); LLStartUp::setStartupState(STATE_LOGIN_CONFIRM_NOTIFICATON); show_connect_box = true; - return FALSE; + return false; } // @@ -1334,7 +1334,7 @@ bool idle_startup() LLNotificationsUtil::add("BlockLoginInfo", blocked, LLSD(), login_alert_done); LLStartUp::setStartupState(STATE_LOGIN_CONFIRM_NOTIFICATON); show_connect_box = true; - return FALSE; + return false; } // @@ -1349,7 +1349,7 @@ bool idle_startup() // could then change the preferences to fix the issue. LLStartUp::setStartupState(STATE_LOGIN_SHOW); - return FALSE; + return false; } // [RLVa:KB] - Checked: RLVa-0.2.1 @@ -1596,8 +1596,8 @@ bool idle_startup() // Display the startup progress bar. gViewerWindow->initTextures(agent_location_id); - gViewerWindow->setShowProgress(TRUE,!gSavedSettings.getBOOL("FSDisableLoginScreens")); - gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Quit")); + gViewerWindow->setShowProgress(true,!gSavedSettings.getBOOL("FSDisableLoginScreens")); + gViewerWindow->setProgressCancelButtonVisible(true, LLTrans::getString("Quit")); gViewerWindow->revealIntroPanel(); @@ -1612,7 +1612,7 @@ bool idle_startup() LLStartUp::setStartupState(STATE_AGENTS_WAIT); // - return FALSE; + return false; } // fsdata support @@ -1629,7 +1629,7 @@ bool idle_startup() else { ms_sleep(1); - return FALSE; + return false; } } // @@ -1678,7 +1678,7 @@ bool idle_startup() // #endif // OPENSIM // LLStartUp::setStartupState( STATE_LOGIN_CURL_UNSTUCK ); - return FALSE; + return false; } if(STATE_LOGIN_CURL_UNSTUCK == LLStartUp::getStartupState()) @@ -1689,7 +1689,7 @@ bool idle_startup() set_startup_status(progress, auth_desc, auth_message); LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE ); - return FALSE; + return false; } if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState()) @@ -1901,20 +1901,20 @@ bool idle_startup() LLStartUp::setStartupState(STATE_LOGIN_CONFIRM_NOTIFICATON); // show_connect_box = true; - return FALSE; + return false; } } - return FALSE; + return false; } // Wait for notification confirmation if (STATE_LOGIN_CONFIRM_NOTIFICATON == LLStartUp::getStartupState()) { display_startup(); - gViewerWindow->getProgressView()->setVisible(FALSE); + gViewerWindow->getProgressView()->setVisible(false); display_startup(); ms_sleep(1); - return FALSE; + return false; } // @@ -1933,8 +1933,8 @@ bool idle_startup() if (LLGridManager::getInstance()->isInSecondLife()) #endif { - gMenuBarView->getChild("HTTP Textures")->setVisible(FALSE); - gMenuBarView->getChild("HTTP Inventory")->setVisible(FALSE); + gMenuBarView->getChild("HTTP Textures")->setVisible(false); + gMenuBarView->getChild("HTTP Inventory")->setVisible(false); } // @@ -1955,7 +1955,7 @@ bool idle_startup() // Since we connected, save off the settings so the user doesn't have to // type the name/password again if we crash. - gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); + gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), true); LLUIColorTable::instance().saveUserSettings(); display_startup(); @@ -2039,7 +2039,7 @@ bool idle_startup() LLStartUp::setStartupState( STATE_MULTIMEDIA_INIT ); - return FALSE; + return false; } @@ -2052,7 +2052,7 @@ bool idle_startup() LLStartUp::multimediaInit(); LLStartUp::setStartupState( STATE_FONT_INIT ); display_startup(); - return FALSE; + return false; } // Loading fonts takes several seconds @@ -2061,7 +2061,7 @@ bool idle_startup() LLStartUp::fontInit(); LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT ); display_startup(); - return FALSE; + return false; } //--------------------------------------------------------------------- @@ -2115,7 +2115,7 @@ bool idle_startup() } } display_startup(); - return FALSE; + return false; } @@ -2140,10 +2140,10 @@ bool idle_startup() if ( gViewerWindow != NULL) { // This isn't the first logon attempt, so show the UI - gViewerWindow->setNormalControlsVisible( TRUE ); + gViewerWindow->setNormalControlsVisible( true ); } - gLoginMenuBarView->setVisible( FALSE ); - gLoginMenuBarView->setEnabled( FALSE ); + gLoginMenuBarView->setVisible( false ); + gLoginMenuBarView->setEnabled( false ); display_startup(); // direct logging to the debug console's line buffer @@ -2168,7 +2168,7 @@ bool idle_startup() display_startup(); #ifndef LL_RELEASE_FOR_DOWNLOAD - gMessageSystem->setTimeDecodes( TRUE ); // Time the decode of each msg + gMessageSystem->setTimeDecodes( true ); // Time the decode of each msg gMessageSystem->setTimeDecodesSpamThreshold( 0.05f ); // Spam if a single msg takes over 50ms to decode #endif display_startup(); @@ -2207,7 +2207,7 @@ bool idle_startup() // FIRE-3066: Force creation or FSFLoaterContacts here, this way it will register with LLAvatarTracker early enough. // Otherwise it is only create if isChatMultriTab() == true and LLIMFloaterContainer::getInstance is called - // Moved here from llfloaternearbyvchat.cpp by Zi, to make this work even if LogShowHistory is FALSE + // Moved here from llfloaternearbyvchat.cpp by Zi, to make this work even if LogShowHistory is false LLFloater *pContacts(FSFloaterContacts::getInstance()); // Load persisted avatar render settings @@ -2342,7 +2342,7 @@ bool idle_startup() gUseCircuitCallbackCalled = false; - msg->enableCircuit(gFirstSim, TRUE); + msg->enableCircuit(gFirstSim, true); // now, use the circuit info to tell simulator about us! LL_INFOS("AppInit") << "viewer: UserLoginLocationReply() Enabling " << gFirstSim << " with code " << msg->mOurCircuitCode << LL_ENDL; msg->newMessageFast(_PREHASH_UseCircuitCode); @@ -2353,7 +2353,7 @@ bool idle_startup() msg->sendReliable( gFirstSim, gSavedSettings.getS32("UseCircuitCodeMaxRetries"), - FALSE, + false, (F32Seconds)gSavedSettings.getF32("UseCircuitCodeTimeout"), use_circuit_callback, NULL); @@ -2361,7 +2361,7 @@ bool idle_startup() timeout.reset(); display_startup(); - return FALSE; + return false; } //--------------------------------------------------------------------- @@ -2376,7 +2376,7 @@ bool idle_startup() LLStartUp::setStartupState( STATE_AGENT_SEND ); } pump_idle_startup_network(); - return FALSE; + return false; } //--------------------------------------------------------------------- @@ -2415,7 +2415,7 @@ bool idle_startup() // But not on first login, because you can't see your avatar then if (!gAgent.isFirstLogin()) { - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true); effectp->setPositionGlobal(gAgent.getPositionGlobal()); effectp->setColor(LLColor4U(gAgent.getEffectColor())); LLHUDManager::getInstance()->sendEffects(); @@ -2425,7 +2425,7 @@ bool idle_startup() timeout.reset(); display_startup(); - return FALSE; + return false; } //--------------------------------------------------------------------- @@ -2476,7 +2476,7 @@ bool idle_startup() } reset_login(); } - return FALSE; + return false; } //--------------------------------------------------------------------- @@ -2535,7 +2535,7 @@ bool idle_startup() display_startup(); LLStartUp::setStartupState(STATE_INVENTORY_SKEL); display_startup(); - return FALSE; + return false; } if (STATE_INVENTORY_SKEL == LLStartUp::getStartupState()) @@ -2567,7 +2567,7 @@ bool idle_startup() display_startup(); LLStartUp::setStartupState(STATE_INVENTORY_SEND2); display_startup(); - return FALSE; + return false; } if (STATE_INVENTORY_SEND2 == LLStartUp::getStartupState()) @@ -2662,7 +2662,7 @@ bool idle_startup() // visible. JC if (show_hud || gSavedSettings.getBOOL("ShowTutorial")) { - LLFloaterReg::showInstance("hud", LLSD(), FALSE); + LLFloaterReg::showInstance("hud", LLSD(), false); } display_startup(); @@ -2699,7 +2699,7 @@ bool idle_startup() LLStartUp::setStartupState(STATE_INVENTORY_CALLBACKS ); display_startup(); - return FALSE; + return false; } //--------------------------------------------------------------------- @@ -2710,7 +2710,7 @@ bool idle_startup() if (!LLInventoryModel::isSysFoldersReady()) { display_startup(); - return FALSE; + return false; } LLInventoryModelBackgroundFetch::instance().start(); LLUUID cof_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); @@ -2767,7 +2767,7 @@ bool idle_startup() LLStartUp::setStartupState( STATE_MISC ); display_startup(); - return FALSE; + return false; } @@ -2842,7 +2842,7 @@ bool idle_startup() gSavedPerAccountSettings.setS32("KeepConversationLogTranscript", 0); //ok, we're done, set it back to false. - gSavedSettings.setBOOL("FSFirstRunAfterSettingsRestore", FALSE); + gSavedSettings.setBOOL("FSFirstRunAfterSettingsRestore", false); } display_startup(); // @@ -2874,7 +2874,7 @@ bool idle_startup() gSavedSettings.setString( "NextLoginLocation", "" ); // and make sure it's saved - gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE ); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , true ); LLUIColorTable::instance().saveUserSettings(); }; // [FS Login Panel] @@ -2905,8 +2905,8 @@ bool idle_startup() if (item_id.notNull() && asset_id.notNull()) { // Could schedule and delay these for later. - const BOOL no_inform_server = FALSE; - const BOOL no_deactivate_similar = FALSE; + const bool no_inform_server = false; + const bool no_deactivate_similar = false; LLGestureMgr::instance().activateGestureWithAsset(item_id, asset_id, no_inform_server, no_deactivate_similar); @@ -2919,7 +2919,7 @@ bool idle_startup() LLGestureMgr::instance().setFetchIDs(item_ids); LLGestureMgr::instance().startFetch(); } - gDisplaySwapBuffers = TRUE; + gDisplaySwapBuffers = true; display_startup(); LLMessageSystem* msg = gMessageSystem; @@ -2962,13 +2962,13 @@ bool idle_startup() && gSavedSettings.getBOOL("RestoreCameraPosOnLogin")) { // restore old camera pos - gAgentCamera.setFocusOnAvatar(FALSE, FALSE); + gAgentCamera.setFocusOnAvatar(false, false); gAgentCamera.setCameraPosAndFocusGlobal(gSavedSettings.getVector3d("CameraPosOnLogout"), gSavedSettings.getVector3d("FocusPosOnLogout"), LLUUID::null); - BOOL limit_hit = FALSE; + bool limit_hit = false; gAgentCamera.calcCameraPositionTargetGlobal(&limit_hit); if (limit_hit) { - gAgentCamera.setFocusOnAvatar(TRUE, FALSE); + gAgentCamera.setFocusOnAvatar(true, false); } gAgentCamera.stopCameraAnimation(); } @@ -3025,7 +3025,7 @@ bool idle_startup() LLStartUp::setStartupState( STATE_PRECACHE ); timeout.reset(); - return FALSE; + return false; } if (STATE_PRECACHE == LLStartUp::getStartupState()) @@ -3051,7 +3051,7 @@ bool idle_startup() if (isAgentAvatarValid() && !gAgent.isFirstLogin() && !gAgent.isOutfitChosen()) { gAgentWearables.notifyLoadingStarted(); - gAgent.setOutfitChosen(TRUE); + gAgent.setOutfitChosen(true); // [Legacy Bake] //gAgentWearables.sendDummyAgentWearablesUpdate(); if (LLGridManager::getInstance()->isInSecondLife()) @@ -3090,7 +3090,7 @@ bool idle_startup() display_startup(); } - return TRUE; + return true; } if (STATE_WEARABLES_WAIT == LLStartUp::getStartupState()) @@ -3136,7 +3136,7 @@ bool idle_startup() { LL_DEBUGS("Avatar") << "avatar fully loaded" << LL_ENDL; LLStartUp::setStartupState( STATE_CLEANUP ); - return TRUE; + return true; } } else @@ -3147,11 +3147,11 @@ bool idle_startup() // We have our clothing, proceed. LL_DEBUGS("Avatar") << "wearables loaded" << LL_ENDL; LLStartUp::setStartupState( STATE_CLEANUP ); - return TRUE; + return true; } // Can't fall through here, so return - return TRUE; + return true; } //fall through this frame to STATE_CLEANUP } @@ -3202,7 +3202,7 @@ bool idle_startup() LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL; //gViewerWindow->revealIntroPanel(); gViewerWindow->setStartupComplete(); - gViewerWindow->setProgressCancelButtonVisible(FALSE); + gViewerWindow->setProgressCancelButtonVisible(false); display_startup(); // We're not away from keyboard, even though login might have taken @@ -3301,10 +3301,10 @@ bool idle_startup() } // - return TRUE; + return true; } - return TRUE; + return true; } // @@ -3318,7 +3318,7 @@ void login_show() // Hide the toolbars: may happen to come back here if login fails after login agent but before login in region if (gToolBarView) { - gToolBarView->setVisible(FALSE); + gToolBarView->setVisible(false); } // [FS Login Panel] @@ -3343,7 +3343,7 @@ void login_callback(S32 option, void *userdata) if (!gSavedSettings.getBOOL("RememberPassword")) { // turn off the setting and write out to disk - gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE ); + gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , true ); LLUIColorTable::instance().saveUserSettings(); } @@ -3833,7 +3833,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, LL_DEBUGS() << "initial outfit category id: " << cat_id << LL_ENDL; } - gAgent.setOutfitChosen(TRUE); + gAgent.setOutfitChosen(true); // [Legacy Bake] #ifdef OPENSIM if (LLGridManager::getInstance()->isInSecondLife()) @@ -3939,9 +3939,9 @@ void reset_login() if ( gViewerWindow ) { // Hide menus and normal buttons - gViewerWindow->setNormalControlsVisible( FALSE ); - gLoginMenuBarView->setVisible( TRUE ); - gLoginMenuBarView->setEnabled( TRUE ); + gViewerWindow->setNormalControlsVisible( false ); + gLoginMenuBarView->setVisible( true ); + gLoginMenuBarView->setEnabled( true ); } // Hide any other stuff @@ -4613,7 +4613,7 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y gFirstSim.set(sim_ip_str, sim_port); if (gFirstSim.isOk()) { - gMessageSystem->enableCircuit(gFirstSim, TRUE); + gMessageSystem->enableCircuit(gFirstSim, true); } } std::string region_x_str = response["region_x"]; @@ -4738,7 +4738,7 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y // outfit is chosen on COF contents, initial outfit // requested and available, etc. - //gAgent.setGenderChosen(TRUE); + //gAgent.setGenderChosen(true); } bool pacific_daylight_time = false; diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 1b8adce54a..772f229a89 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -182,15 +182,15 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBoxBalance(NULL), mBalance(0), mHealth(100), - mShowParcelIcons(TRUE), + mShowParcelIcons(true), mSquareMetersCredit(0), mSquareMetersCommitted(0), mFilterEdit(NULL), // Edit for filtering mSearchPanel(NULL), // Panel for filtering - mPathfindingFlashOn(TRUE), // Pathfinding rebake functions - mAudioStreamEnabled(FALSE), // Media/Stream separation - mRebakeStuck(FALSE), // FIRE-7639 - Stop the blinking after a while - mNearbyIcons(FALSE), // Script debug + mPathfindingFlashOn(true), // Pathfinding rebake functions + mAudioStreamEnabled(false), // Media/Stream separation + mRebakeStuck(false), // FIRE-7639 - Stop the blinking after a while + mNearbyIcons(false), // Script debug mIconPresetsGraphic(NULL), mIconPresetsCamera(NULL), mMediaToggle(NULL), @@ -203,7 +203,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect) setRect(rect); // status bar can possible overlay menus? - setMouseOpaque(FALSE); + setMouseOpaque(false); mBalanceTimer = new LLFrameTimer(); mHealthTimer = new LLFrameTimer(); @@ -731,12 +731,12 @@ void LLStatusBar::setVisibleForMouselook(bool visible) // mStreamToggle->setVisible(visible); // ## Zi: Media/Stream separation // mMediaToggle->setVisible(visible); mSearchPanel->setVisible(visible && gSavedSettings.getBOOL("MenuSearch")); - BOOL FSEnableVolumeControls = gSavedSettings.getBOOL("FSEnableVolumeControls"); + bool FSEnableVolumeControls = gSavedSettings.getBOOL("FSEnableVolumeControls"); mBtnVolume->setVisible(visible && FSEnableVolumeControls); mStreamToggle->setVisible(visible && FSEnableVolumeControls); // ## Zi: Media/Stream separation mMediaToggle->setVisible(visible && FSEnableVolumeControls); // - BOOL showNetStats = gSavedSettings.getBOOL("ShowNetStats"); + bool showNetStats = gSavedSettings.getBOOL("ShowNetStats"); mSGBandwidth->setVisible(visible && showNetStats); mSGPacketLoss->setVisible(visible && showNetStats); mBandwidthButton->setVisible(visible && showNetStats); // FIRE-6287: Clicking on traffic indicator toggles Lag Meter window @@ -818,7 +818,7 @@ void LLStatusBar::sendMoneyBalanceRequest() } // Double amount of retries due to this request initially happening during busy stage // Ideally this should be turned into a capability - gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, TRUE, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL); + gMessageSystem->sendReliable(gAgent.getRegionHost(), LL_DEFAULT_RELIABLE_RETRIES * 2, true, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL); } @@ -869,7 +869,7 @@ void LLStatusBar::setLandCommitted(S32 committed) mSquareMetersCommitted = committed; } -BOOL LLStatusBar::isUserTiered() const +bool LLStatusBar::isUserTiered() const { return (mSquareMetersCredit > 0); } @@ -918,10 +918,10 @@ void LLStatusBar::onMouseEnterPresetsCamera() // show the master presets pull-down LLUI::getInstance()->clearPopups(); LLUI::getInstance()->addPopup(mPanelPresetsCameraPulldown); - mPanelNearByMedia->setVisible(FALSE); - mPanelVolumePulldown->setVisible(FALSE); - mPanelPresetsPulldown->setVisible(FALSE); - mPanelPresetsCameraPulldown->setVisible(TRUE); + mPanelNearByMedia->setVisible(false); + mPanelVolumePulldown->setVisible(false); + mPanelPresetsPulldown->setVisible(false); + mPanelPresetsCameraPulldown->setVisible(true); } void LLStatusBar::onMouseEnterPresets() @@ -945,9 +945,9 @@ void LLStatusBar::onMouseEnterPresets() // show the master presets pull-down LLUI::getInstance()->clearPopups(); LLUI::getInstance()->addPopup(mPanelPresetsPulldown); - mPanelNearByMedia->setVisible(FALSE); - mPanelVolumePulldown->setVisible(FALSE); - mPanelPresetsPulldown->setVisible(TRUE); + mPanelNearByMedia->setVisible(false); + mPanelVolumePulldown->setVisible(false); + mPanelPresetsPulldown->setVisible(true); } void LLStatusBar::onMouseEnterVolume() @@ -972,10 +972,10 @@ void LLStatusBar::onMouseEnterVolume() // show the master volume pull-down LLUI::getInstance()->clearPopups(); LLUI::getInstance()->addPopup(mPanelVolumePulldown); - mPanelPresetsCameraPulldown->setVisible(FALSE); - mPanelPresetsPulldown->setVisible(FALSE); - mPanelNearByMedia->setVisible(FALSE); - mPanelVolumePulldown->setVisible(TRUE); + mPanelPresetsCameraPulldown->setVisible(false); + mPanelPresetsPulldown->setVisible(false); + mPanelNearByMedia->setVisible(false); + mPanelVolumePulldown->setVisible(true); } void LLStatusBar::onMouseEnterNearbyMedia() @@ -997,10 +997,10 @@ void LLStatusBar::onMouseEnterNearbyMedia() LLUI::getInstance()->clearPopups(); LLUI::getInstance()->addPopup(mPanelNearByMedia); - mPanelPresetsCameraPulldown->setVisible(FALSE); - mPanelPresetsPulldown->setVisible(FALSE); - mPanelVolumePulldown->setVisible(FALSE); - mPanelNearByMedia->setVisible(TRUE); + mPanelPresetsCameraPulldown->setVisible(false); + mPanelPresetsPulldown->setVisible(false); + mPanelVolumePulldown->setVisible(false); + mPanelNearByMedia->setVisible(true); } @@ -1109,13 +1109,13 @@ void LLStatusBar::toggleStream(bool enable) mAudioStreamEnabled = enable; } -BOOL LLStatusBar::getAudioStreamEnabled() const +bool LLStatusBar::getAudioStreamEnabled() const { return mAudioStreamEnabled; } // Media/Stream separation -BOOL can_afford_transaction(S32 cost) +bool can_afford_transaction(S32 cost) { return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost))); } @@ -1349,7 +1349,7 @@ void LLStatusBar::setParcelInfoText(const std::string& new_text) rect.mRight = panelParcelInfoRect.getWidth(); } - mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), TRUE); + mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), true); mParcelInfoText->setRect(rect); mParcelInfoPanel->setRect(panelParcelInfoRect); } @@ -1428,7 +1428,7 @@ void LLStatusBar::updateParcelIcons() bool allow_build = vpm->allowAgentBuild(current_parcel); // true when anyone is allowed to build. See EXT-4610. bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel); bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel); - BOOL see_avatars = current_parcel->getSeeAVs(); + bool see_avatars = current_parcel->getSeeAVs(); bool is_for_sale = (!current_parcel->isPublic() && vpm->canAgentBuyParcel(current_parcel, false)); bool pathfinding_dynamic_enabled = agent_region->dynamicPathfindingEnabled(); @@ -1646,7 +1646,7 @@ void LLStatusBar::setBackgroundColor( const LLColor4& color ) void LLStatusBar::updateNetstatVisibility(const LLSD& data) { const S32 NETSTAT_WIDTH = (SIM_STAT_WIDTH + 2) * 2; - BOOL showNetStat = data.asBoolean(); + bool showNetStat = data.asBoolean(); S32 translateFactor = (showNetStat ? -1 : 1); mSGBandwidth->setVisible(showNetStat); @@ -1668,7 +1668,7 @@ void LLStatusBar::updateNetstatVisibility(const LLSD& data) void LLStatusBar::updateVolumeControlsVisibility(const LLSD& data) { const S32 cVolumeIconsWidth = mVolumeIconsWidth; - BOOL showVolumeControls = data.asBoolean(); + bool showVolumeControls = data.asBoolean(); S32 translateFactor = (showVolumeControls ? -1 : 1); mBtnVolume->setVisible(showVolumeControls); @@ -1693,7 +1693,7 @@ void LLStatusBar::updateVolumeControlsVisibility(const LLSD& data) void LLStatusBar::onShowFPSChanged(const LLSD& newvalue) { const S32 text_width = mFPSText->getRect().getWidth() + 4; // left_pad = 4 - BOOL show_fps = newvalue.asBoolean(); + bool show_fps = newvalue.asBoolean(); S32 translateFactor = (show_fps ? -1 : 1); mFPSText->setVisible(show_fps); @@ -1711,7 +1711,7 @@ void LLStatusBar::onShowFPSChanged(const LLSD& newvalue) update(); } -BOOL LLStatusBar::rebakeRegionCallback(const LLSD& notification, const LLSD& response) +bool LLStatusBar::rebakeRegionCallback(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -1721,9 +1721,9 @@ BOOL LLStatusBar::rebakeRegionCallback(const LLSD& notification, const LLSD& res { LLMenuOptionPathfindingRebakeNavmesh::getInstance()->rebakeNavmesh(); } - return TRUE; + return true; } - return FALSE; + return false; } void LLStatusBar::onMouseEnterParcelInfo() diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 47de25cf10..79cd183dc5 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -67,7 +67,7 @@ public: mY(0), mZ(0), mArea (0), - mForSale(FALSE), + mForSale(false), mOwner("Unknown"), mTraffic(0), mBalance(0), @@ -81,7 +81,7 @@ public: S32 mY; S32 mZ; S32 mArea; - BOOL mForSale; + bool mForSale; std::string mOwner; F32 mTraffic; S32 mBalance; @@ -134,14 +134,14 @@ public: S32 getBalance() const; S32 getHealth() const; - BOOL isUserTiered() const; + bool isUserTiered() const; S32 getSquareMetersCredit() const; S32 getSquareMetersCommitted() const; S32 getSquareMetersLeft() const; LLRegionDetails mRegionDetails; LLPanelNearByMedia* getNearbyMediaPanel() { return mPanelNearByMedia; } - BOOL getAudioStreamEnabled() const; + bool getAudioStreamEnabled() const; void setBackgroundColor( const LLColor4& color ); @@ -345,8 +345,8 @@ private: S32 mHealth; S32 mSquareMetersCredit; S32 mSquareMetersCommitted; - BOOL mAudioStreamEnabled; - BOOL mShowParcelIcons; + bool mAudioStreamEnabled; + bool mShowParcelIcons; LLFrameTimer* mBalanceTimer; LLFrameTimer* mHealthTimer; LLPanelPresetsCameraPulldown* mPanelPresetsCameraPulldown; @@ -376,14 +376,14 @@ private: // // Pathfinding rebake functions - BOOL rebakeRegionCallback(const LLSD& notification,const LLSD& response); + bool rebakeRegionCallback(const LLSD& notification,const LLSD& response); LLFrameTimer mRebakingTimer; - BOOL mPathfindingFlashOn; + bool mPathfindingFlashOn; // // Script debug - BOOL mNearbyIcons; + bool mNearbyIcons; bool mRebakeStuck; // FIRE-7639 - Stop the blinking after a while @@ -403,7 +403,7 @@ private: }; // *HACK: Status bar owns your cached money balance. JC -BOOL can_afford_transaction(S32 cost); +bool can_afford_transaction(S32 cost); extern LLStatusBar *gStatusBar; diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index 529ba721c5..f34330c4c6 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -90,7 +90,7 @@ LLSurface::LLSurface(U32 type, LLViewerRegion *regionp) : // One of each for each camera mVisiblePatchCount = 0; - mHasZData = FALSE; + mHasZData = false; // "uninitialized" min/max z mMinZ = 10000.f; mMaxZ = -10000.f; @@ -256,7 +256,7 @@ void LLSurface::createSTexture() } } - mSTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); + mSTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false); mSTexturep->dontDiscard(); gGL.getTexUnit(0)->bind(mSTexturep); mSTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); @@ -281,7 +281,7 @@ void LLSurface::createWaterTexture() } } - mWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); + mWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false); mWaterTexturep->dontDiscard(); gGL.getTexUnit(0)->bind(mWaterTexturep); mWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); @@ -318,8 +318,8 @@ void LLSurface::initTextures() void LLSurface::rebuildWater() { - BOOL renderwater = gSavedSettings.getBOOL("RenderWater") && LLWorld::getInstance()->getAllowRenderWater(); - BOOL prev_renderwater = !mWaterObjp.isNull(); + bool renderwater = gSavedSettings.getBOOL("RenderWater") && LLWorld::getInstance()->getAllowRenderWater(); + bool prev_renderwater = !mWaterObjp.isNull(); if(prev_renderwater && !renderwater) { @@ -827,17 +827,17 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent) } } -BOOL LLSurface::idleUpdate(F32 max_update_time) +bool LLSurface::idleUpdate(F32 max_update_time) { if (!gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_TERRAIN)) { - return FALSE; + return false; } // Perform idle time update of non-critical stuff. // In this case, texture and normal updates. LLTimer update_timer; - BOOL did_update = FALSE; + bool did_update = false; // If the Z height data has changed, we need to rebuild our // property line vertex arrays. @@ -859,7 +859,7 @@ BOOL LLSurface::idleUpdate(F32 max_update_time) { if (patchp->updateTexture()) { - did_update = TRUE; + did_update = true; patchp->clearDirty(); mDirtyPatchList.erase(curiter); } @@ -875,7 +875,7 @@ BOOL LLSurface::idleUpdate(F32 max_update_time) return did_update; } -void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL b_large_patch) +void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, bool b_large_patch) { LLPatchHeader ph; @@ -957,16 +957,16 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL } -// Retrurns TRUE if "position" is within the bounds of surface. +// Retrurns true if "position" is within the bounds of surface. // "position" is region-local -BOOL LLSurface::containsPosition(const LLVector3 &position) +bool LLSurface::containsPosition(const LLVector3 &position) { if (position.mV[VX] < 0.0f || position.mV[VX] > mMetersPerEdge || position.mV[VY] < 0.0f || position.mV[VY] > mMetersPerEdge) { - return FALSE; + return false; } - return TRUE; + return true; } @@ -1229,8 +1229,8 @@ void LLSurface::createPatchData() for (i=0; imHasReceivedData = FALSE; - patchp->mSTexUpdate = TRUE; + patchp->mHasReceivedData = false; + patchp->mSTexUpdate = true; S32 data_offset = i * mGridsPerPatchEdge + j * mGridsPerPatchEdge * mGridsPerEdge; @@ -1417,13 +1417,13 @@ F32 LLSurface::getWaterHeight() const } -BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y, +bool LLSurface::generateWaterTexture(const F32 x, const F32 y, const F32 width, const F32 height) { LL_PROFILE_ZONE_SCOPED if (!getWaterTexture()) { - return FALSE; + return false; } S32 tex_width = mWaterTexturep->getWidth(); @@ -1512,5 +1512,5 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y, } mWaterTexturep->setSubImage(raw, x_begin, y_begin, x_end - x_begin, y_end - y_begin); - return TRUE; + return true; } diff --git a/indra/newview/llsurface.h b/indra/newview/llsurface.h index c4a2dcaa88..2e71750dd7 100644 --- a/indra/newview/llsurface.h +++ b/indra/newview/llsurface.h @@ -87,7 +87,7 @@ public: // Aurora Sim void rebuildWater(); // Aurora Sim - virtual void decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL b_large_patch); + virtual void decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, bool b_large_patch); virtual void updatePatchVisibilities(LLAgent &agent); inline F32 getZ(const U32 k) const { return mSurfaceZ[k]; } @@ -115,9 +115,9 @@ public: LLSurfacePatch *resolvePatchGlobal(const LLVector3d &position_global) const; // Update methods (called during idle, normally) - BOOL idleUpdate(F32 max_update_time); + bool idleUpdate(F32 max_update_time); - BOOL containsPosition(const LLVector3 &position); + bool containsPosition(const LLVector3 &position); void moveZ(const S32 x, const S32 y, const F32 delta); @@ -131,7 +131,7 @@ public: LLViewerTexture *getSTexture(); LLViewerTexture *getWaterTexture(); - BOOL hasZData() const { return mHasZData; } + bool hasZData() const { return mHasZData; } void dirtyAllPatches(); // Use this to dirty all patches when changing terrain parameters @@ -181,7 +181,7 @@ protected: void createPatchData(); // Allocates memory for patches. void destroyPatchData(); // Deallocates memory for patches. - BOOL generateWaterTexture(const F32 x, const F32 y, + bool generateWaterTexture(const F32 x, const F32 y, const F32 width, const F32 height); // Generate texture from composition values. //F32 updateTexture(LLSurfacePatch *ppatch); @@ -216,7 +216,7 @@ protected: LLPatchVertexArray mPVArray; - BOOL mHasZData; // We've received any patch data for this surface. + bool mHasZData; // We've received any patch data for this surface. F32 mMinZ; // min z for this region (during the session) F32 mMaxZ; // max z for this region (during the session) diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 0e745d6cff..b469b36592 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -48,11 +48,11 @@ extern U64MicrosecondsImplicit gFrameTime; extern LLPipeline gPipeline; LLSurfacePatch::LLSurfacePatch() -: mHasReceivedData(FALSE), - mSTexUpdate(FALSE), - mDirty(FALSE), - mDirtyZStats(TRUE), - mHeightsGenerated(FALSE), +: mHasReceivedData(false), + mSTexUpdate(false), + mDirty(false), + mDirtyZStats(true), + mHeightsGenerated(false), mDataOffset(0), mDataZ(NULL), mDataNorm(NULL), @@ -79,7 +79,7 @@ LLSurfacePatch::LLSurfacePatch() } for (i = 0; i < 9; i++) { - mNormalsInvalid[i] = TRUE; + mNormalsInvalid[i] = true; } } @@ -103,12 +103,12 @@ void LLSurfacePatch::dirty() LL_WARNS("Terrain") << "No viewer object for this surface patch!" << LL_ENDL; } - mDirtyZStats = TRUE; - mHeightsGenerated = FALSE; + mDirtyZStats = true; + mHeightsGenerated = false; if (!mDirty) { - mDirty = TRUE; + mDirty = true; mSurfacep->dirtySurfacePatch(this); } } @@ -160,7 +160,7 @@ void LLSurfacePatch::disconnectNeighbor(LLSurface *surfacep) } // setNeighborPatch(i, NULL); - mNormalsInvalid[i] = TRUE; + mNormalsInvalid[i] = true; } } } @@ -504,14 +504,14 @@ void LLSurfacePatch::updateVerticalStats() mSurfacep->mMaxZ = llmax(mMaxZ, mSurfacep->mMaxZ); mSurfacep->mMinZ = llmin(mMinZ, mSurfacep->mMinZ); - mSurfacep->mHasZData = TRUE; + mSurfacep->mHasZData = true; mSurfacep->getRegion()->calculateCenterGlobal(); if (mVObjp) { mVObjp->dirtyPatch(); } - mDirtyZStats = FALSE; + mDirtyZStats = false; } @@ -524,7 +524,7 @@ void LLSurfacePatch::updateNormals() U32 grids_per_patch_edge = mSurfacep->getGridsPerPatchEdge(); U32 grids_per_edge = mSurfacep->getGridsPerEdge(); - BOOL dirty_patch = FALSE; + bool dirty_patch = false; U32 i, j; // update the east edge @@ -537,7 +537,7 @@ void LLSurfacePatch::updateNormals() calcNormal(grids_per_patch_edge - 2, j, 2); } - dirty_patch = TRUE; + dirty_patch = true; } // update the north edge @@ -562,7 +562,7 @@ void LLSurfacePatch::updateNormals() calcNormal(i, grids_per_patch_edge - 2, 2); } - dirty_patch = TRUE; + dirty_patch = true; } // update the west edge @@ -583,7 +583,7 @@ void LLSurfacePatch::updateNormals() calcNormal(0, j, 2); calcNormal(1, j, 2); } - dirty_patch = TRUE; + dirty_patch = true; } // update the south edge @@ -605,7 +605,7 @@ void LLSurfacePatch::updateNormals() calcNormal(i, 0, 2); calcNormal(i, 1, 2); } - dirty_patch = TRUE; + dirty_patch = true; } // Invalidating the northeast corner is different, because depending on what the adjacent neighbors are, @@ -706,7 +706,7 @@ void LLSurfacePatch::updateNormals() calcNormal(grids_per_patch_edge, grids_per_patch_edge - 1, 2); calcNormal(grids_per_patch_edge - 1, grids_per_patch_edge, 2); calcNormal(grids_per_patch_edge - 1, grids_per_patch_edge - 1, 2); - dirty_patch = TRUE; + dirty_patch = true; } // update the middle normals @@ -719,7 +719,7 @@ void LLSurfacePatch::updateNormals() calcNormal(i, j, 2); } } - dirty_patch = TRUE; + dirty_patch = true; } if (dirty_patch) @@ -729,7 +729,7 @@ void LLSurfacePatch::updateNormals() for (i = 0; i < 9; i++) { - mNormalsInvalid[i] = FALSE; + mNormalsInvalid[i] = false; } } @@ -807,7 +807,7 @@ void LLSurfacePatch::updateNorthEdge() } } -BOOL LLSurfacePatch::updateTexture() +bool LLSurfacePatch::updateTexture() { if (mSTexUpdate) // Update texture as needed { @@ -830,11 +830,11 @@ BOOL LLSurfacePatch::updateTexture() if (comp->generateHeights((F32)origin_region[VX], (F32)origin_region[VY], patch_size, patch_size)) { - mHeightsGenerated = TRUE; + mHeightsGenerated = true; } else { - return FALSE; + return false; } } @@ -848,11 +848,11 @@ BOOL LLSurfacePatch::updateTexture() } } } - return FALSE; + return false; } else { - return TRUE; + return true; } } @@ -872,7 +872,7 @@ void LLSurfacePatch::updateGL() if (comp->generateTexture((F32)origin_region[VX], (F32)origin_region[VY], tex_patch_size, tex_patch_size)) { - mSTexUpdate = FALSE; + mSTexUpdate = false; // Also generate the water texture mSurfacep->generateWaterTexture((F32)origin_region.mdV[VX], (F32)origin_region.mdV[VY], @@ -882,13 +882,13 @@ void LLSurfacePatch::updateGL() void LLSurfacePatch::dirtyZ() { - mSTexUpdate = TRUE; + mSTexUpdate = true; // Invalidate all normals in this patch U32 i; for (i = 0; i < 9; i++) { - mNormalsInvalid[i] = TRUE; + mNormalsInvalid[i] = true; } // Invalidate normals in this and neighboring patches @@ -896,12 +896,12 @@ void LLSurfacePatch::dirtyZ() { if (getNeighborPatch(i)) { - getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = TRUE; + getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = true; getNeighborPatch(i)->dirty(); if (i < 4) { - getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = TRUE; - getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = TRUE; + getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = true; + getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = true; } } } @@ -937,7 +937,7 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global) mCenterRegion.mV[VX] = origin_region.mV[VX] + 0.5f*mSurfacep->getGridsPerPatchEdge()*mSurfacep->getMetersPerGrid(); mCenterRegion.mV[VY] = origin_region.mV[VY] + 0.5f*mSurfacep->getGridsPerPatchEdge()*mSurfacep->getMetersPerGrid(); - mVisInfo.mbIsVisible = FALSE; + mVisInfo.mbIsVisible = false; mVisInfo.mDistance = 512.0f; mVisInfo.mRenderLevel = 0; mVisInfo.mRenderStride = mSurfacep->getGridsPerPatchEdge(); @@ -947,8 +947,8 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global) void LLSurfacePatch::connectNeighbor(LLSurfacePatch *neighbor_patchp, const U32 direction) { llassert(neighbor_patchp); - mNormalsInvalid[direction] = TRUE; - neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = TRUE; + mNormalsInvalid[direction] = true; + neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = true; setNeighborPatch(direction, neighbor_patchp); neighbor_patchp->setNeighborPatch(gDirOpposite[direction], this); @@ -1051,11 +1051,11 @@ void LLSurfacePatch::updateVisibility() // } } - mVisInfo.mbIsVisible = TRUE; + mVisInfo.mbIsVisible = true; } else { - mVisInfo.mbIsVisible = FALSE; + mVisInfo.mbIsVisible = false; } } @@ -1070,7 +1070,7 @@ LLVector3 LLSurfacePatch::getOriginAgent() const return gAgent.getPosAgentFromGlobal(mOriginGlobal); } -BOOL LLSurfacePatch::getVisible() const +bool LLSurfacePatch::getVisible() const { return mVisInfo.mbIsVisible; } @@ -1087,10 +1087,10 @@ S32 LLSurfacePatch::getRenderLevel() const void LLSurfacePatch::setHasReceivedData() { - mHasReceivedData = TRUE; + mHasReceivedData = true; } -BOOL LLSurfacePatch::getHasReceivedData() const +bool LLSurfacePatch::getHasReceivedData() const { return mHasReceivedData; } @@ -1155,11 +1155,11 @@ F32 LLSurfacePatch::getMaxComposition() const void LLSurfacePatch::setNeighborPatch(const U32 direction, LLSurfacePatch *neighborp) { mNeighborPatches[direction] = neighborp; - mNormalsInvalid[direction] = TRUE; + mNormalsInvalid[direction] = true; if (direction < 4) { - mNormalsInvalid[gDirAdjacent[direction][0]] = TRUE; - mNormalsInvalid[gDirAdjacent[direction][1]] = TRUE; + mNormalsInvalid[gDirAdjacent[direction][0]] = true; + mNormalsInvalid[gDirAdjacent[direction][1]] = true; } } diff --git a/indra/newview/llsurfacepatch.h b/indra/newview/llsurfacepatch.h index 8c8f501dce..638712c26d 100644 --- a/indra/newview/llsurfacepatch.h +++ b/indra/newview/llsurfacepatch.h @@ -44,13 +44,13 @@ class LLPatchVisibilityInfo { public: LLPatchVisibilityInfo() : - mbIsVisible(FALSE), + mbIsVisible(false), mDistance(0.f), mRenderLevel(0), mRenderStride(0) { }; ~LLPatchVisibilityInfo() { }; - BOOL mbIsVisible; + bool mbIsVisible; F32 mDistance; // Distance from camera S32 mRenderLevel; U32 mRenderStride; @@ -73,7 +73,7 @@ public: void colorPatch(const U8 r, const U8 g, const U8 b); - BOOL updateTexture(); + bool updateTexture(); void updateVerticalStats(); void updateCompositionStats(); @@ -88,7 +88,7 @@ public: void dirtyZ(); // Dirty the z values of this patch void setHasReceivedData(); - BOOL getHasReceivedData() const; + bool getHasReceivedData() const; F32 getDistance() const; F32 getMaxZ() const; @@ -124,7 +124,7 @@ public: // +---+---+---+ - BOOL getVisible() const; + bool getVisible() const; U32 getRenderStride() const; S32 getRenderLevel() const; @@ -134,21 +134,21 @@ public: F32 *getDataZ() const { return mDataZ; } void dirty(); // Mark this surface patch as dirty... - void clearDirty() { mDirty = FALSE; } + void clearDirty() { mDirty = false; } void clearVObj(); public: - BOOL mHasReceivedData; // has the patch EVER received height data? - BOOL mSTexUpdate; // Does the surface texture need to be updated? + bool mHasReceivedData; // has the patch EVER received height data? + bool mSTexUpdate; // Does the surface texture need to be updated? protected: LLSurfacePatch *mNeighborPatches[8]; // Adjacent patches - BOOL mNormalsInvalid[9]; // Which normals are invalid + bool mNormalsInvalid[9]; // Which normals are invalid - BOOL mDirty; - BOOL mDirtyZStats; - BOOL mHeightsGenerated; + bool mDirty; + bool mDirtyZStats; + bool mHeightsGenerated; U32 mDataOffset; F32 *mDataZ; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index b267509bf5..444e0a503e 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -80,7 +80,7 @@ void LLSysWellWindow::onOpen(const LLSD& key) mReshapedByUserControlName = mInstanceName + "_user_reshaped"; if (!getControlGroup()->controlExists(mReshapedByUserControlName)) { - getControlGroup()->declareBOOL(mReshapedByUserControlName, FALSE, llformat("Has system well %s been resized by the user", mInstanceName.c_str()), LLControlVariable::PERSIST_NONDFT); + getControlGroup()->declareBOOL(mReshapedByUserControlName, false, llformat("Has system well %s been resized by the user", mInstanceName.c_str()), LLControlVariable::PERSIST_NONDFT); } mIsReshapedByUser = getControlGroup()->getBOOL(mReshapedByUserControlName); @@ -107,7 +107,7 @@ void LLSysWellWindow::handleReshape(const LLRect& rect, bool by_user) // FIRE-11537: Fix well lists size appearing random if (by_user) { - getControlGroup()->setBOOL(mReshapedByUserControlName, TRUE); + getControlGroup()->setBOOL(mReshapedByUserControlName, true); } // @@ -118,7 +118,7 @@ void LLSysWellWindow::handleReshape(const LLRect& rect, bool by_user) void LLSysWellWindow::onStartUpToastClick(S32 x, S32 y, MASK mask) { // just set floater visible. Screen channels will be cleared. - setVisible(TRUE); + setVisible(true); } void LLSysWellWindow::setSysWellChiclet(LLSysWellChiclet* chiclet) @@ -155,7 +155,7 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id) // hide chiclet window if there are no items left if(isWindowEmpty()) { - setVisible(FALSE); + setVisible(false); } } @@ -256,7 +256,7 @@ void LLSysWellWindow::reshapeWindow() S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth(); curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height); - reshape(curRect.getWidth(), curRect.getHeight(), TRUE); + reshape(curRect.getWidth(), curRect.getHeight(), true); setRect(curRect); } @@ -699,7 +699,7 @@ bool LLIMWellWindow::postBuild() // [FS communication UI] //virtual void LLIMWellWindow::sessionAdded(const LLUUID& session_id, - const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) + const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg) { LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); if (!session) return; @@ -809,7 +809,7 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId) // hide chiclet window if there are no items left if(isWindowEmpty()) { - setVisible(FALSE); + setVisible(false); } else { @@ -860,7 +860,7 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id) // hide chiclet window if there are no items left if(isWindowEmpty()) { - setVisible(FALSE); + setVisible(false); } } diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 3711563d39..0b7dd21de1 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -191,7 +191,7 @@ public: // [FS communication UI] // LLIMSessionObserver observe triggers - /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg); + /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg); /*virtual*/ void sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) {} /*virtual*/ void sessionVoiceOrIMStarted(const LLUUID& session_id) {}; /*virtual*/ void sessionRemoved(const LLUUID& session_id); diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 9aa1b6b44e..23cca8237f 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -108,7 +108,7 @@ public: mOffset(offset), mImageSize(imagesize), mImageFormat(IMG_CODEC_J2C), - mImageLocal(FALSE), + mImageLocal(false), mResponder(responder), mFileHandle(LLLFSThread::nullHandle()), mBytesToRead(0), @@ -150,7 +150,7 @@ protected: S32 mOffset; S32 mImageSize; EImageCodec mImageFormat; - BOOL mImageLocal; + bool mImageLocal; LLPointer mResponder; LLLFSThread::handle_t mFileHandle; S32 mBytesToRead; @@ -224,7 +224,7 @@ bool LLTextureCacheLocalFileWorker::doRead() else { mImageSize = local_size; - mImageLocal = TRUE; + mImageLocal = true; } return true; } @@ -364,7 +364,7 @@ bool LLTextureCacheRemoteWorker::doRead() else { mImageSize = local_size; - mImageLocal = TRUE; + mImageLocal = true; } } else @@ -796,9 +796,9 @@ LLTextureCache::LLTextureCache(bool threaded) mListMutex(), mFastCacheMutex(), mHeaderAPRFile(NULL), - mReadOnly(TRUE), //do not allow to change the texture cache until setReadOnly() is called. + mReadOnly(true), //do not allow to change the texture cache until setReadOnly() is called. mTexturesSizeTotal(0), - mDoPurge(FALSE), + mDoPurge(false), mFastCachep(NULL), mFastCachePoolp(NULL), mFastCachePadBuffer(NULL) @@ -873,7 +873,7 @@ std::string LLTextureCache::getTextureFileName(const LLUUID& id) } //debug -BOOL LLTextureCache::isInCache(const LLUUID& id) +bool LLTextureCache::isInCache(const LLUUID& id) { LLMutexLock lock(&mHeaderMutex); id_map_t::const_iterator iter = mHeaderIDMap.find(id); @@ -882,7 +882,7 @@ BOOL LLTextureCache::isInCache(const LLUUID& id) } //debug -BOOL LLTextureCache::isInLocal(const LLUUID& id) +bool LLTextureCache::isInLocal(const LLUUID& id) { S32 local_size = 0; std::string local_filename; @@ -894,7 +894,7 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id) local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool()); if (local_size > 0) { - return TRUE ; + return true ; } } @@ -904,7 +904,7 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id) local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool()); if (local_size > 0) { - return TRUE ; + return true ; } } @@ -914,11 +914,11 @@ BOOL LLTextureCache::isInLocal(const LLUUID& id) local_size = LLAPRFile::size(local_filename, getLocalAPRFilePool()); if (local_size > 0) { - return TRUE ; + return true ; } } - return FALSE ; + return false ; } ////////////////////////////////////////////////////////////////////////////// @@ -983,14 +983,14 @@ void LLTextureCache::purgeCache(ELLPath location, bool remove_dir) } //is called in the main thread before initCache(...) is called. -void LLTextureCache::setReadOnly(BOOL read_only) +void LLTextureCache::setReadOnly(bool read_only) { mReadOnly = read_only ; } // Called in the main thread. // Returns the unused amount of max_size if any -S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL texture_cache_mismatch) +S64 LLTextureCache::initCache(ELLPath location, S64 max_size, bool texture_cache_mismatch) { llassert_always(getPending() == 0) ; //should not start accessing the texture cache before initialized. @@ -1319,7 +1319,7 @@ bool LLTextureCache::updateEntry(S32& idx, Entry& entry, S32 new_image_size, S32 if (purge) { - mDoPurge = TRUE; + mDoPurge = true; } } @@ -2327,11 +2327,11 @@ bool LLTextureCache::removeFromCache(const LLUUID& id) LLTextureCache::ReadResponder::ReadResponder() : mImageSize(0), - mImageLocal(FALSE) + mImageLocal(false) { } -void LLTextureCache::ReadResponder::setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal) +void LLTextureCache::ReadResponder::setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal) { if (mFormattedImage.notNull()) { diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 09ccad463f..2e006bb5f5 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -87,24 +87,24 @@ public: class Responder : public LLResponder { public: - virtual void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal) = 0; + virtual void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal) = 0; }; class ReadResponder : public Responder { public: ReadResponder(); - void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal); + void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal); void setImage(LLImageFormatted* image) { mFormattedImage = image; } protected: LLPointer mFormattedImage; S32 mImageSize; - BOOL mImageLocal; + bool mImageLocal; }; class WriteResponder : public Responder { - void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, BOOL imagelocal) + void setData(U8* data, S32 datasize, S32 imagesize, S32 imageformat, bool imagelocal) { // not used } @@ -116,8 +116,8 @@ public: /*virtual*/ size_t update(F32 max_time_ms); void purgeCache(ELLPath location, bool remove_dir = true); - void setReadOnly(BOOL read_only) ; - S64 initCache(ELLPath location, S64 maxsize, BOOL texture_cache_mismatch); + void setReadOnly(bool read_only) ; + S64 initCache(ELLPath location, S64 maxsize, bool texture_cache_mismatch); handle_t readFromCache(const std::string& local_filename, const LLUUID& id, S32 offset, S32 size, ReadResponder* responder); @@ -146,8 +146,8 @@ public: S64Bytes getMaxUsage() { return S64Bytes(sCacheMaxTexturesSize); } U32 getEntries() { return mHeaderEntriesInfo.mEntries; } U32 getMaxEntries() { return sCacheMaxEntries; }; - BOOL isInCache(const LLUUID& id) ; - BOOL isInLocal(const LLUUID& id) ; //not thread safe at the moment + bool isInCache(const LLUUID& id) ; + bool isInLocal(const LLUUID& id) ; //not thread safe at the moment protected: // Accessed by LLTextureCacheWorker @@ -214,7 +214,7 @@ private: typedef std::vector, bool> > responder_list_t; responder_list_t mCompletedList; - BOOL mReadOnly; + bool mReadOnly; std::string mCacheParentDirName; diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 0fe2ac4993..94f3099de9 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -146,12 +146,12 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( LLUUID image_asset_id, LLUUID default_image_asset_id, LLUUID blank_image_asset_id, - BOOL tentative, - BOOL allow_no_texture, + bool tentative, + bool allow_no_texture, const std::string& label, PermissionMask immediate_filter_perm_mask, PermissionMask dnd_filter_perm_mask, - BOOL can_apply_immediately, + bool can_apply_immediately, LLUIImagePtr fallback_image) : LLFloater(LLSD()), mOwner( owner ), @@ -166,12 +166,12 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mLabel(label), mTentativeLabel(NULL), mResolutionLabel(NULL), - mActive( TRUE ), + mActive( true ), mFilterEdit(NULL), mImmediateFilterPermMask(immediate_filter_perm_mask), mDnDFilterPermMask(dnd_filter_perm_mask), mContextConeOpacity(0.f), - mSelectedItemPinned( FALSE ), + mSelectedItemPinned( false ), mCanApply(true), mCanPreview(true), mLimitsSet(false), @@ -182,12 +182,12 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( mOnFloaterCloseCallback(NULL), mSetImageAssetIDCallback(NULL), mOnUpdateImageStatsCallback(NULL), - mBakeTextureEnabled(FALSE), + mBakeTextureEnabled(false), mInventoryPickType(LLTextureCtrl::PICK_TEXTURE) { mCanApplyImmediately = can_apply_immediately; buildFromFile("floater_texture_ctrl.xml"); - setCanMinimize(FALSE); + setCanMinimize(false); } LLFloaterTexturePicker::~LLFloaterTexturePicker() @@ -198,7 +198,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti { if( ((mImageAssetID != image_id) || mTentative) && mActive) { - mNoCopyTextureSelected = FALSE; + mNoCopyTextureSelected = false; mViewModel->setDirty(); // *TODO: shouldn't we be using setValue() here? mImageAssetID = image_id; @@ -248,7 +248,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti } if (item_id.isNull()) { - item_id = findItemID(mImageAssetID, FALSE); + item_id = findItemID(mImageAssetID, false); } if (item_id.isNull()) { @@ -264,15 +264,15 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti //if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID())) if (itemp) { - BOOL copy = itemp->getPermissions().allowCopyBy(gAgent.getID()); - BOOL mod = itemp->getPermissions().allowModifyBy(gAgent.getID()); - BOOL xfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); + bool copy = itemp->getPermissions().allowCopyBy(gAgent.getID()); + bool mod = itemp->getPermissions().allowModifyBy(gAgent.getID()); + bool xfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); if(!copy) { // no copy texture - getChild("apply_immediate_check")->setValue(FALSE); - mNoCopyTextureSelected = TRUE; + getChild("apply_immediate_check")->setValue(false); + mNoCopyTextureSelected = true; } //Verify permissions before revealing UUID. @@ -312,7 +312,7 @@ void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bo setImageID(asset_id, set_selection); } -void LLFloaterTexturePicker::setActive( BOOL active ) +void LLFloaterTexturePicker::setActive( bool active ) { if (!active && getChild("Pipette")->getValue().asBoolean()) { @@ -321,7 +321,7 @@ void LLFloaterTexturePicker::setActive( BOOL active ) mActive = active; } -void LLFloaterTexturePicker::setCanApplyImmediately(BOOL b) +void LLFloaterTexturePicker::setCanApplyImmediately(bool b) { mCanApplyImmediately = b; @@ -527,8 +527,8 @@ bool LLFloaterTexturePicker::handleKeyHere(KEY key, MASK mask) // CTRL-F focusses local search editor if (FSCommon::isFilterEditorKeyCombo(key, mask)) { - mFilterEdit->setFocus(TRUE); - return TRUE; + mFilterEdit->setFocus(true); + return true; } // @@ -659,7 +659,7 @@ bool LLFloaterTexturePicker::postBuild() // Disable auto selecting first filtered item because it takes away // selection from the item set by LLTextureCtrl owning this floater. - mInventoryPanel->getRootFolder()->setAutoSelectOverride(TRUE); + mInventoryPanel->getRootFolder()->setAutoSelectOverride(true); // Commented out to scroll to currently selected texture. See EXT-5403. // // store this filter as the default one @@ -675,7 +675,7 @@ bool LLFloaterTexturePicker::postBuild() if(!mImageAssetID.isNull()) { - mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO); + mInventoryPanel->setSelection(findItemID(mImageAssetID, false), TAKE_FOCUS_NO); } } @@ -687,19 +687,19 @@ bool LLFloaterTexturePicker::postBuild() mLocalScrollCtrl->setCommitCallback(onLocalScrollCommit, this); refreshLocalList(); - mNoCopyTextureSelected = FALSE; + mNoCopyTextureSelected = false; getChild("apply_immediate_check")->setValue(mCanApplyImmediately && gSavedSettings.getBOOL("TextureLivePreview")); childSetCommitCallback("apply_immediate_check", onApplyImmediateCheck, this); getChildView("apply_immediate_check")->setEnabled(mCanApplyImmediately); - mSavedFolderState.setApply(FALSE); + mSavedFolderState.setApply(false); LLToolPipette::getInstance()->setToolSelectCallback(boost::bind(&LLFloaterTexturePicker::onTextureSelect, this, _1)); getChild("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this); - setBakeTextureEnabled(TRUE); + setBakeTextureEnabled(true); return true; } @@ -718,7 +718,7 @@ void LLFloaterTexturePicker::draw() mPipetteBtn->setEnabled(mActive); mPipetteBtn->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance()); - //BOOL allow_copy = FALSE; + //bool allow_copy = false; if( mOwner ) { mTexturep = NULL; @@ -758,7 +758,7 @@ void LLFloaterTexturePicker::draw() if (mTentativeLabel) { - mTentativeLabel->setVisible( FALSE ); + mTentativeLabel->setVisible( false ); } mDefaultBtn->setEnabled(mImageAssetID != mDefaultImageAssetID || mTentative); @@ -775,7 +775,7 @@ void LLFloaterTexturePicker::draw() // Border LLRect border = getChildView("preview_widget")->getRect(); - gl_rect_2d( border, LLColor4::black, FALSE ); + gl_rect_2d( border, LLColor4::black, false ); // Interior @@ -812,7 +812,7 @@ void LLFloaterTexturePicker::draw() } else { - gl_rect_2d( interior, LLColor4::grey % alpha, TRUE ); + gl_rect_2d( interior, LLColor4::grey % alpha, true ); // Draw X gl_draw_x(interior, LLColor4::black ); @@ -821,7 +821,7 @@ void LLFloaterTexturePicker::draw() // Draw Tentative Label over the image if( mTentative && !mViewModel->isDirty() ) { - mTentativeLabel->setVisible( TRUE ); + mTentativeLabel->setVisible( true ); drawChild(mTentativeLabel); } @@ -837,19 +837,19 @@ void LLFloaterTexturePicker::draw() // After inventory panel filter is applied we have to update // constraint rect for the selected item because of folder view - // AutoSelectOverride set to TRUE. We force PinningSelectedItem - // flag to FALSE state and setting filter "dirty" to update + // AutoSelectOverride set to true. We force PinningSelectedItem + // flag to false state and setting filter "dirty" to update // scroll container to show selected item (see LLFolderView::doIdle()). if (!is_filter_active && !mSelectedItemPinned) { folder_view->setPinningSelectedItem(mSelectedItemPinned); folder_view->getViewModelItem()->dirtyFilter(); - mSelectedItemPinned = TRUE; + mSelectedItemPinned = true; } } } -const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library) +const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library) { LLUUID loockup_id = asset_id; if (loockup_id.isNull()) @@ -1091,7 +1091,7 @@ void LLFloaterTexturePicker::onBtnSelect(void* userdata) void LLFloaterTexturePicker::onBtnPipette() { - BOOL pipette_active = getChild("Pipette")->getValue().asBoolean(); + bool pipette_active = getChild("Pipette")->getValue().asBoolean(); pipette_active = !pipette_active; if (pipette_active) { @@ -1103,13 +1103,13 @@ void LLFloaterTexturePicker::onBtnPipette() } } -void LLFloaterTexturePicker::onSelectionChange(const std::deque &items, BOOL user_action) +void LLFloaterTexturePicker::onSelectionChange(const std::deque &items, bool user_action) { if (items.size()) { LLFolderViewItem* first_item = items.front(); LLInventoryItem* itemp = gInventory.getItem(static_cast(first_item->getViewModelItem())->getUUID()); - mNoCopyTextureSelected = FALSE; + mNoCopyTextureSelected = false; if (itemp) { if (!mTextureSelectedCallback.empty()) @@ -1118,14 +1118,14 @@ void LLFloaterTexturePicker::onSelectionChange(const std::deque UUID texture picker uses extra permissions, so we do all the fancy stuff here - BOOL copy = itemp->getPermissions().allowCopyBy(gAgent.getID()); - BOOL mod = itemp->getPermissions().allowModifyBy(gAgent.getID()); - BOOL xfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); + bool copy = itemp->getPermissions().allowCopyBy(gAgent.getID()); + bool mod = itemp->getPermissions().allowModifyBy(gAgent.getID()); + bool xfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); //if (!itemp->getPermissions().allowCopyBy(gAgent.getID())) if (!copy) { - mNoCopyTextureSelected = TRUE; + mNoCopyTextureSelected = true; } // // FIRE-8298: Apply now checkbox has no effect @@ -1437,7 +1437,7 @@ void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string ) return; } - mSavedFolderState.setApply(TRUE); + mSavedFolderState.setApply(true); mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState); // add folder with current item to list of previously opened folders LLOpenFoldersWithSelection opener; @@ -1450,7 +1450,7 @@ void LLFloaterTexturePicker::onFilterEdit(const std::string& search_string ) // first letter in search term, save existing folder open state if (!mInventoryPanel->getFilter().isNotDefault()) { - mSavedFolderState.setApply(FALSE); + mSavedFolderState.setApply(false); mInventoryPanel->getRootFolder()->applyFunctorRecursively(mSavedFolderState); } } @@ -1464,20 +1464,20 @@ void LLFloaterTexturePicker::changeMode() //int index = mModeSelector->getValue().asInteger(); int index = mModeSelector->getSelectedIndex(); - mDefaultBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE); - mBlankBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE); - mNoneBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE); - mTransparentBtn->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE); // FIRE-5082: "Transparent" button in Texture Panel - mFilterEdit->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE); - mInventoryPanel->setVisible(index == PICKER_INVENTORY ? TRUE : FALSE); + mDefaultBtn->setVisible(index == PICKER_INVENTORY ? true : false); + mBlankBtn->setVisible(index == PICKER_INVENTORY ? true : false); + mNoneBtn->setVisible(index == PICKER_INVENTORY ? true : false); + mTransparentBtn->setVisible(index == PICKER_INVENTORY ? true : false); // FIRE-5082: "Transparent" button in Texture Panel + mFilterEdit->setVisible(index == PICKER_INVENTORY ? true : false); + mInventoryPanel->setVisible(index == PICKER_INVENTORY ? true : false); - getChild("l_add_btn")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE); - getChild("l_rem_btn")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE); - getChild("l_upl_btn")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE); - getChild("l_name_list")->setVisible(index == PICKER_LOCAL ? TRUE : FALSE); + getChild("l_add_btn")->setVisible(index == PICKER_LOCAL ? true : false); + getChild("l_rem_btn")->setVisible(index == PICKER_LOCAL ? true : false); + getChild("l_upl_btn")->setVisible(index == PICKER_LOCAL ? true : false); + getChild("l_name_list")->setVisible(index == PICKER_LOCAL ? true : false); - getChild("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE ? TRUE : FALSE); - //getChild("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE); // Does not exist 11-10-2023 + getChild("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE ? true : false); + //getChild("hide_base_mesh_region")->setVisible(false);// index == 2 ? true : false); // Does not exist 11-10-2023 bool pipette_visible = (index == PICKER_INVENTORY) && (mInventoryPickType != LLTextureCtrl::PICK_MATERIAL); @@ -1535,7 +1535,7 @@ void LLFloaterTexturePicker::changeMode() val = 10; } - getChild("l_bake_use_texture_combo_box")->setSelectedByValue(val, TRUE); + getChild("l_bake_use_texture_combo_box")->setSelectedByValue(val, true); } } @@ -1581,15 +1581,15 @@ void LLFloaterTexturePicker::refreshInventoryFilter() mInventoryPanel->setFilterTypes(filter_types); } -void LLFloaterTexturePicker::setLocalTextureEnabled(BOOL enabled) +void LLFloaterTexturePicker::setLocalTextureEnabled(bool enabled) { // FIRE-30431: Keep radio button mode selection in texture selection //mModeSelector->setEnabledByValue(1, enabled); mModeSelector->setIndexEnabled(1,enabled);} -void LLFloaterTexturePicker::setBakeTextureEnabled(BOOL enabled) +void LLFloaterTexturePicker::setBakeTextureEnabled(bool enabled) { - BOOL changed = (enabled != mBakeTextureEnabled); + bool changed = (enabled != mBakeTextureEnabled); mBakeTextureEnabled = enabled; // FIRE-30431: Keep radio button mode selection in texture selection @@ -1707,10 +1707,10 @@ void LLFloaterTexturePicker::onPickerCallback(const std::vector& fi void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te ) { - LLUUID inventory_item_id = findItemID(te.getID(), TRUE); + LLUUID inventory_item_id = findItemID(te.getID(), true); if (inventory_item_id.notNull()) { - LLToolPipette::getInstance()->setResult(TRUE, ""); + LLToolPipette::getInstance()->setResult(true, ""); if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL) { // tes have no data about material ids @@ -1726,20 +1726,20 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te ) setImageID(te.getID()); } - mNoCopyTextureSelected = FALSE; + mNoCopyTextureSelected = false; LLInventoryItem* itemp = gInventory.getItem(inventory_item_id); if (itemp && !itemp->getPermissions().allowCopyBy(gAgent.getID())) { // no copy texture - mNoCopyTextureSelected = TRUE; + mNoCopyTextureSelected = true; } commitIfImmediateSet(); } else { - LLToolPipette::getInstance()->setResult(FALSE, LLTrans::getString("InventoryNoTexture")); + LLToolPipette::getInstance()->setResult(false, LLTrans::getString("InventoryNoTexture")); } } @@ -1757,12 +1757,12 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mOnSelectCallback(NULL), mBorderColor( p.border_color() ), mAllowNoTexture( p.allow_no_texture ), - mAllowLocalTexture( TRUE ), + mAllowLocalTexture( true ), mImmediateFilterPermMask( PERM_NONE ), - mCanApplyImmediately( FALSE ), - mNeedsRawImageData( FALSE ), - mValid( TRUE ), - mShowLoadingPlaceholder( TRUE ), + mCanApplyImmediately( false ), + mNeedsRawImageData( false ), + mValid( true ), + mShowLoadingPlaceholder( true ), mOpenTexPreview(!p.enabled), // For texture preview mode mBakeTextureEnabled(true), mInventoryPickType(PICK_TEXTURE), @@ -1773,7 +1773,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mTextEnabledColor(p.text_enabled_color), // Add label/caption colors mTextDisabledColor(p.text_disabled_color), // Add label/caption colors // Mask texture if desired - mIsMasked(FALSE) + mIsMasked(false) { mCaptionHeight = p.show_caption ? BTN_HEIGHT_SMALL : 0; // leave some room underneath the image for the caption // Default of defaults is white image for diff tex @@ -1844,7 +1844,7 @@ LLTextureCtrl::~LLTextureCtrl() // } -void LLTextureCtrl::setShowLoadingPlaceholder(BOOL showLoadingPlaceholder) +void LLTextureCtrl::setShowLoadingPlaceholder(bool showLoadingPlaceholder) { mShowLoadingPlaceholder = showLoadingPlaceholder; } @@ -1854,7 +1854,7 @@ void LLTextureCtrl::setCaption(const std::string& caption) mCaption->setText( caption ); } -void LLTextureCtrl::setCanApplyImmediately(BOOL b) +void LLTextureCtrl::setCanApplyImmediately(bool b) { mCanApplyImmediately = b; LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get(); @@ -1932,7 +1932,7 @@ void LLTextureCtrl::setEnabled( bool enabled ) // } -void LLTextureCtrl::setValid(BOOL valid ) +void LLTextureCtrl::setValid(bool valid ) { mValid = valid; if (!valid) @@ -1940,7 +1940,7 @@ void LLTextureCtrl::setValid(BOOL valid ) LLFloaterTexturePicker* pickerp = (LLFloaterTexturePicker*)mFloaterHandle.get(); if (pickerp) { - pickerp->setActive(FALSE); + pickerp->setActive(false); } } } @@ -1958,7 +1958,7 @@ void LLTextureCtrl::setLabel(const std::string& label) mCaption->setText(label); } -void LLTextureCtrl::showPicker(BOOL take_focus) +void LLTextureCtrl::showPicker(bool take_focus) { // show hourglass cursor when loading inventory window // because inventory construction is slooow @@ -2018,7 +2018,7 @@ void LLTextureCtrl::showPicker(BOOL take_focus) if (take_focus) { - floaterp->setFocus(TRUE); + floaterp->setFocus(true); } } @@ -2029,7 +2029,7 @@ void LLTextureCtrl::closeDependentFloater() if( floaterp && floaterp->isInVisibleChain()) { floaterp->setOwner(NULL); - floaterp->setVisible(FALSE); + floaterp->setVisible(false); floaterp->closeFloater(); } } @@ -2063,7 +2063,7 @@ bool LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask) { if (!mOpenTexPreview) { - showPicker(FALSE); + showPicker(false); if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL) { //grab materials first... @@ -2103,12 +2103,12 @@ bool LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask) // Open the preview floater for the texture LLSD params; params["uuid"] = getValue(); - params["preview_only"] = TRUE; - LLFloaterReg::showInstance("preview_texture", params, TRUE); + params["preview_only"] = true; + LLFloaterReg::showInstance("preview_texture", params, true); } // - handled = TRUE; + handled = true; } return handled; @@ -2146,7 +2146,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLPickerSource source, co if(floaterp->isDirty() || asset_id.notNull()) // mModelView->setDirty does not work. { - setTentative( FALSE ); + setTentative( false ); switch(source) { @@ -2167,7 +2167,7 @@ void LLTextureCtrl::onFloaterCommit(ETexturePickOp op, LLPickerSource source, co break; case PICKER_UNKNOWN: default: - mImageItemID = floaterp->findItemID(asset_id, FALSE); + mImageItemID = floaterp->findItemID(asset_id, false); mImageAssetID = asset_id; mLocalTrackingID.setNull(); break; @@ -2301,7 +2301,7 @@ bool LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, // This removes the 'Multiple' overlay, since // there is now only one texture selected. - setTentative( FALSE ); + setTentative( false ); onCommit(); } } @@ -2354,7 +2354,7 @@ void LLTextureCtrl::draw() } else { - texture = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + texture = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); texture->setBoostLevel(LLGLTexture::BOOST_PREVIEW); texture->forceToSaveRawImage(0); } @@ -2371,7 +2371,7 @@ void LLTextureCtrl::draw() // leave some room underneath the image for the caption // LLRect border( 0, getRect().getHeight(), getRect().getWidth(), BTN_HEIGHT_SMALL ); LLRect border( 0, getRect().getHeight(), getRect().getWidth(), mCaptionHeight ); - gl_rect_2d( border, mBorderColor.get(), FALSE ); + gl_rect_2d( border, mBorderColor.get(), false ); // Interior LLRect interior = border; @@ -2391,7 +2391,7 @@ void LLTextureCtrl::draw() // Mask texture if desired if (mIsMasked) { - gl_rect_2d( interior, LLColor4(0.5f, 0.5f, 0.5f, 0.44f), TRUE); + gl_rect_2d( interior, LLColor4(0.5f, 0.5f, 0.5f, 0.44f), true); gl_draw_x( interior, LLColor4::black ); } // Mask texture if desired @@ -2402,7 +2402,7 @@ void LLTextureCtrl::draw() } else { - gl_rect_2d( interior, LLColor4::grey % alpha, TRUE ); + gl_rect_2d( interior, LLColor4::grey % alpha, true ); // Draw X gl_draw_x( interior, LLColor4::black ); @@ -2415,7 +2415,7 @@ void LLTextureCtrl::draw() // fully loaded. if (mTexturep.notNull() && (!mTexturep->isFullyLoaded()) && - (mShowLoadingPlaceholder == TRUE)) + (mShowLoadingPlaceholder == true)) { U32 v_offset = 25; LLFontGL* font = LLFontGL::getFontSansSerif(); @@ -2463,11 +2463,11 @@ void LLTextureCtrl::draw() LLUICtrl::draw(); } -BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg) +bool LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg) { - BOOL copy = item->getPermissions().allowCopyBy(gAgent.getID()); - BOOL mod = item->getPermissions().allowModifyBy(gAgent.getID()); - BOOL xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, + bool copy = item->getPermissions().allowCopyBy(gAgent.getID()); + bool mod = item->getPermissions().allowModifyBy(gAgent.getID()); + bool xfer = item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); PermissionMask item_perm_mask = 0; @@ -2484,7 +2484,7 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type } else { - return TRUE; + return true; } } else @@ -2495,16 +2495,16 @@ BOOL LLTextureCtrl::allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type { tooltip_msg.assign(LLTrans::getString("TooltipTextureRestrictedDrop")); } - return FALSE; + return false; } } -BOOL LLTextureCtrl::doDrop(LLInventoryItem* item) +bool LLTextureCtrl::doDrop(LLInventoryItem* item) { // call the callback if it exists. if(mDropCallback) { - // if it returns TRUE, we return TRUE, and therefore the + // if it returns true, we return true, and therefore the // commit is called above. return mDropCallback(this, item); } @@ -2520,7 +2520,7 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item) setImageAssetID(asset_id); mImageItemID = item->getUUID(); - return TRUE; + return true; } bool LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char) @@ -2528,10 +2528,10 @@ bool LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char) if( ' ' == uni_char ) { // Texture preview mode - //showPicker(TRUE); + //showPicker(true); if (!mOpenTexPreview) { - showPicker(TRUE); + showPicker(true); //grab textures first... LLInventoryModelBackgroundFetch::instance().start(gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE)); //...then start full inventory fetch. @@ -2542,8 +2542,8 @@ bool LLTextureCtrl::handleUnicodeCharHere(llwchar uni_char) // Open the preview floater for the texture LLSD params; params["uuid"] = getValue(); - params["preview_only"] = TRUE; - LLFloaterReg::showInstance("preview_texture", params, TRUE); + params["preview_only"] = true; + LLFloaterReg::showInstance("preview_texture", params, true); } // return true; diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 967668b8c5..f96228d4c4 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -51,7 +51,7 @@ class LLViewerFetchedTexture; class LLFetchedGLTFMaterial; // used for setting drag & drop callbacks. -typedef boost::function drag_n_drop_callback; +typedef boost::function drag_n_drop_callback; typedef boost::function texture_selected_callback; // Helper functions for UI that work with picker @@ -156,7 +156,7 @@ public: virtual void setVisible( bool visible ); virtual void setEnabled( bool enabled ); - void setValid(BOOL valid); + void setValid(bool valid); // LLUICtrl interface virtual void clear(); @@ -166,17 +166,17 @@ public: virtual LLSD getValue() const; // LLTextureCtrl interface - void showPicker(BOOL take_focus); + void showPicker(bool take_focus); bool isPickerShown() { return !mFloaterHandle.isDead(); } void setLabel(const std::string& label); void setLabelWidth(S32 label_width) {mLabelWidth =label_width;} const std::string& getLabel() const { return mLabel; } - void setAllowNoTexture( BOOL b ) { mAllowNoTexture = b; } + void setAllowNoTexture( bool b ) { mAllowNoTexture = b; } bool getAllowNoTexture() const { return mAllowNoTexture; } - void setAllowLocalTexture(BOOL b) { mAllowLocalTexture = b; } - BOOL getAllowLocalTexture() const { return mAllowLocalTexture; } + void setAllowLocalTexture(bool b) { mAllowLocalTexture = b; } + bool getAllowLocalTexture() const { return mAllowLocalTexture; } const LLUUID& getImageItemID() { return mImageItemID; } @@ -196,7 +196,7 @@ public: void setOpenTexPreview(bool open_preview) { mOpenTexPreview = open_preview; } void setCaption(const std::string& caption); - void setCanApplyImmediately(BOOL b); + void setCanApplyImmediately(bool b); void setCanApply(bool can_preview, bool can_apply); @@ -216,10 +216,10 @@ public: const LLUUID& tracking_id); // This call is returned when a drag is detected. Your callback - // should return TRUE if the drag is acceptable. + // should return true if the drag is acceptable. void setDragCallback(drag_n_drop_callback cb) { mDragCallback = cb; } - // This callback is called when the drop happens. Return TRUE if + // This callback is called when the drop happens. Return true if // the drop happened - resulting in an on commit callback, but not // necessariliy any other change. void setDropCallback(drag_n_drop_callback cb) { mDropCallback = cb; } @@ -233,7 +233,7 @@ public: */ void setOnTextureSelectedCallback(texture_selected_callback cb); - void setShowLoadingPlaceholder(BOOL showLoadingPlaceholder); + void setShowLoadingPlaceholder(bool showLoadingPlaceholder); LLViewerFetchedTexture* getTexture() { return mTexturep; } @@ -247,14 +247,14 @@ public: LLUUID getLocalTrackingID() { return mLocalTrackingID; } // Mask texture if desired - void setIsMasked(BOOL masked) { mIsMasked = masked; } + void setIsMasked(bool masked) { mIsMasked = masked; } void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; updateLabelColor(); } // Add label/caption colors void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; updateLabelColor(); } // Add label/caption colors private: - BOOL allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg); - BOOL doDrop(LLInventoryItem* item); + bool allowDrop(LLInventoryItem* item, EDragAndDropType cargo_type, std::string& tooltip_msg); + bool doDrop(LLInventoryItem* item); void updateLabelColor(); // Add label/caption colors @@ -279,16 +279,16 @@ private: LLTextBox* mCaption; S32 mCaptionHeight; // leave some room underneath the image for the caption std::string mLabel; - BOOL mAllowNoTexture; // If true, the user can select "none" as an option - BOOL mAllowLocalTexture; + bool mAllowNoTexture; // If true, the user can select "none" as an option + bool mAllowLocalTexture; PermissionMask mImmediateFilterPermMask; PermissionMask mDnDFilterPermMask; - BOOL mCanApplyImmediately; - BOOL mCommitOnSelection; - BOOL mNeedsRawImageData; + bool mCanApplyImmediately; + bool mCommitOnSelection; + bool mNeedsRawImageData; LLViewBorder* mBorder; - BOOL mValid; - BOOL mShowLoadingPlaceholder; + bool mValid; + bool mShowLoadingPlaceholder; std::string mLoadingPlaceholderString; S32 mLabelWidth; bool mOpenTexPreview; @@ -296,7 +296,7 @@ private: LLTextureCtrl::EPickInventoryType mInventoryPickType; // Mask texture if desired - BOOL mIsMasked; + bool mIsMasked; LLUIColor mTextEnabledColor; // Add label/caption colors LLUIColor mTextDisabledColor; // Add label/caption colors @@ -317,12 +317,12 @@ public: LLUUID image_asset_id, LLUUID default_image_asset_id, LLUUID blank_image_asset_id, - BOOL tentative, - BOOL allow_no_texture, + bool tentative, + bool allow_no_texture, const std::string& label, PermissionMask immediate_filter_perm_mask, PermissionMask dnd_filter_perm_mask, - BOOL can_apply_immediately, + bool can_apply_immediately, LLUIImagePtr fallback_image_name ); @@ -347,10 +347,10 @@ public: void setImageID(const LLUUID& image_asset_id, bool set_selection = true); bool updateImageStats(); // true if within limits const LLUUID& getAssetID() { return mImageAssetID; } - const LLUUID& findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library = FALSE); - void setCanApplyImmediately(BOOL b); + const LLUUID& findItemID(const LLUUID& asset_id, bool copyable_only, bool ignore_library = false); + void setCanApplyImmediately(bool b); - void setActive(BOOL active); + void setActive(bool active); LLView* getOwner() const { return mOwner; } void setOwner(LLView* owner) { mOwner = owner; } @@ -383,7 +383,7 @@ public: static void onBtnBlank(void* userdata); static void onBtnTransparent( void* userdata ); // FIRE-5082: "Transparent" button in Texture Panel static void onBtnNone(void* userdata); - void onSelectionChange(const std::deque &items, BOOL user_action); + void onSelectionChange(const std::deque &items, bool user_action); static void onApplyImmediateCheck(LLUICtrl* ctrl, void* userdata); void onTextureSelect(const LLTextureEntry& te); @@ -395,8 +395,8 @@ public: static void onBakeTextureSelect(LLUICtrl* ctrl, void *userdata); - void setLocalTextureEnabled(BOOL enabled); - void setBakeTextureEnabled(BOOL enabled); + void setLocalTextureEnabled(bool enabled); + void setBakeTextureEnabled(bool enabled); void setInventoryPickType(LLTextureCtrl::EPickInventoryType type); void setImmediateFilterPermMask(PermissionMask mask); @@ -417,8 +417,8 @@ protected: LLUIImagePtr mFallbackImage; // What to show if currently selected texture is null. LLUUID mDefaultImageAssetID; LLUUID mBlankImageAssetID; - BOOL mTentative; - BOOL mAllowNoTexture; + bool mTentative; + bool mAllowNoTexture; LLUUID mSpecialCurrentImageAssetID; // Used when the asset id has no corresponding texture in the user's inventory. LLUUID mOriginalImageAssetID; LLUUID mTransparentImageAssetID; // FIRE-5082: "Transparent" button in Texture Panel @@ -430,17 +430,17 @@ protected: LLTextBox* mResolutionWarning; std::string mPendingName; - BOOL mActive; + bool mActive; LLFilterEditor* mFilterEdit; LLInventoryPanel* mInventoryPanel; PermissionMask mImmediateFilterPermMask; PermissionMask mDnDFilterPermMask; - BOOL mCanApplyImmediately; - BOOL mNoCopyTextureSelected; + bool mCanApplyImmediately; + bool mNoCopyTextureSelected; F32 mContextConeOpacity; LLSaveFolderState mSavedFolderState; - BOOL mSelectedItemPinned; + bool mSelectedItemPinned; // FIRE-30431: Keep radio button mode selection in texture selection //LLComboBox* mModeSelector; @@ -473,7 +473,7 @@ private: set_image_asset_id_callback mSetImageAssetIDCallback; set_on_update_image_stats_callback mOnUpdateImageStatsCallback; - BOOL mBakeTextureEnabled; + bool mBakeTextureEnabled; static S32 sLastPickerMode; }; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index f430278043..cb984f77a8 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -396,7 +396,7 @@ public: // Threads: Ttc void callbackCacheRead(bool success, LLImageFormatted* image, - S32 imagesize, BOOL islocal); + S32 imagesize, bool islocal); // Threads: Ttc void callbackCacheWrite(bool success); @@ -586,13 +586,13 @@ private: mCachedSize; e_request_state mSentRequest; handle_t mDecodeHandle; - BOOL mLoaded; - BOOL mDecoded; - BOOL mWritten; - BOOL mNeedsAux; - BOOL mHaveAllData; - BOOL mInLocalCache; - BOOL mInCache; + bool mLoaded; + bool mDecoded; + bool mWritten; + bool mNeedsAux; + bool mHaveAllData; + bool mInLocalCache; + bool mInCache; bool mCanUseHTTP, mCanUseNET ; //can get from asset server. // OpenSim compatibility S32 mRetryAttempt; @@ -926,15 +926,15 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher, mFileSize(0), mSkippedStatesTime(0), mCachedSize(0), - mLoaded(FALSE), + mLoaded(false), mSentRequest(UNSENT), mDecodeHandle(0), - mDecoded(FALSE), - mWritten(FALSE), - mNeedsAux(FALSE), - mHaveAllData(FALSE), - mInLocalCache(FALSE), - mInCache(FALSE), + mDecoded(false), + mWritten(false), + mNeedsAux(false), + mHaveAllData(false), + mInLocalCache(false), + mInCache(false), mCanUseHTTP(true), mRetryAttempt(0), mActiveCount(0), @@ -1109,7 +1109,7 @@ void LLTextureFetchWorker::resetFormattedData() } mHttpReplySize = 0; mHttpReplyOffset = 0; - mHaveAllData = FALSE; + mHaveAllData = false; } F32 LLTextureFetchWorker::getImagePriority() const @@ -1223,10 +1223,10 @@ bool LLTextureFetchWorker::doWork(S32 param) mRequestedOffset = 0; mFileSize = 0; mCachedSize = 0; - mLoaded = FALSE; + mLoaded = false; mSentRequest = UNSENT; - mDecoded = FALSE; - mWritten = FALSE; + mDecoded = false; + mWritten = false; if (mHttpBufferArray) { mHttpBufferArray->release(); @@ -1234,12 +1234,12 @@ bool LLTextureFetchWorker::doWork(S32 param) } mHttpReplySize = 0; mHttpReplyOffset = 0; - mHaveAllData = FALSE; + mHaveAllData = false; clearPackets(); // TODO: Shouldn't be necessary mCacheReadHandle = LLTextureCache::nullHandle(); mCacheWriteHandle = LLTextureCache::nullHandle(); setState(LOAD_FROM_TEXTURE_CACHE); - mInCache = FALSE; + mInCache = false; mDesiredSize = llmax(mDesiredSize, TEXTURE_CACHE_ENTRY_SIZE); // min desired size is TEXTURE_CACHE_ENTRY_SIZE LL_DEBUGS(LOG_TXT) << mID << ": Priority: " << llformat("%8.0f",mImagePriority) << " Desired Discard: " << mDesiredDiscard << " Desired Size: " << mDesiredSize << LL_ENDL; @@ -1261,7 +1261,7 @@ bool LLTextureFetchWorker::doWork(S32 param) // return false; } mFileSize = 0; - mLoaded = FALSE; + mLoaded = false; add(LLTextureFetch::sCacheAttempt, 1.0); @@ -1335,7 +1335,7 @@ bool LLTextureFetchWorker::doWork(S32 param) << ", should be >=0" << LL_ENDL; } setState(DECODE_IMAGE); - mInCache = TRUE; + mInCache = true; mWriteToCacheState = NOT_WRITE ; LL_DEBUGS(LOG_TXT) << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() << " Size: " << llformat("%dx%d",mFormattedImage->getWidth(),mFormattedImage->getHeight()) @@ -1625,7 +1625,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } mRequestedDeltaTimer.reset(); - mLoaded = FALSE; + mLoaded = false; mGetStatus = LLCore::HttpStatus(); mGetReason.clear(); LL_DEBUGS(LOG_TXT) << "HTTP GET: " << mID << " Offset: " << mRequestedOffset @@ -1754,7 +1754,7 @@ bool LLTextureFetchWorker::doWork(S32 param) else if (http_not_sat == mGetStatus) { // Allowed, we'll accept whatever data we have as complete. - mHaveAllData = TRUE; + mHaveAllData = true; } else { @@ -1959,7 +1959,7 @@ bool LLTextureFetchWorker::doWork(S32 param) mAuxImage = NULL; llassert_always(mFormattedImage.notNull()); S32 discard = mHaveAllData ? 0 : mLoadedDiscard; - mDecoded = FALSE; + mDecoded = false; setState(DECODE_IMAGE_UPDATE); LL_DEBUGS(LOG_TXT) << mID << ": Decoding. Bytes: " << mFormattedImage->getDataSize() << " Discard: " << discard << " All Data: " << mHaveAllData << LL_ENDL; @@ -2036,7 +2036,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } } llassert_always(datasize); - mWritten = FALSE; + mWritten = false; setState(WAIT_ON_WRITE); ++mCacheWriteCount; CacheWriteResponder* responder = new CacheWriteResponder(mFetcher, mID); @@ -2351,7 +2351,7 @@ bool LLTextureFetchWorker::processSimulatorPackets() /// We have enough (or all) data if (have_all_data) { - mHaveAllData = TRUE; + mHaveAllData = true; } S32 cur_size = mFormattedImage->getDataSize(); if (buffer_size > cur_size) @@ -2450,19 +2450,19 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, << mFileSize << " datasize: " << mFormattedImage->getDataSize() << LL_ENDL; } - mHaveAllData = TRUE; + mHaveAllData = true; llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; // discard any previous data we had } else if (data_size < mRequestedSize) { - mHaveAllData = TRUE; + mHaveAllData = true; } else if (data_size > mRequestedSize) { // *TODO: This shouldn't be happening any more (REALLY don't expect this anymore) LL_WARNS(LOG_TXT) << "data_size = " << data_size << " > requested: " << mRequestedSize << LL_ENDL; - mHaveAllData = TRUE; + mHaveAllData = true; llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; // discard any previous data we had } @@ -2471,7 +2471,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, { // We requested data but received none (and no error), // so presumably we have all of it - mHaveAllData = TRUE; + mHaveAllData = true; } mRequestedSize = data_size; @@ -2487,7 +2487,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, mRequestedSize = -1; // error } - mLoaded = TRUE; + mLoaded = true; return data_size ; } @@ -2496,7 +2496,7 @@ S32 LLTextureFetchWorker::callbackHttpGet(LLCore::HttpResponse * response, // Threads: Ttc void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* image, - S32 imagesize, BOOL islocal) + S32 imagesize, bool islocal) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; LLMutexLock lock(&mWorkMutex); // +Mw @@ -2514,10 +2514,10 @@ void LLTextureFetchWorker::callbackCacheRead(bool success, LLImageFormatted* ima mInLocalCache = islocal; if (mFileSize != 0 && mFormattedImage->getDataSize() >= mFileSize) { - mHaveAllData = TRUE; + mHaveAllData = true; } } - mLoaded = TRUE; + mLoaded = true; } // -Mw // Threads: Ttc @@ -2529,7 +2529,7 @@ void LLTextureFetchWorker::callbackCacheWrite(bool success) // LL_WARNS(LOG_TXT) << "Write callback for " << mID << " with state = " << mState << LL_ENDL; return; } - mWritten = TRUE; + mWritten = true; } // -Mw ////////////////////////////////////////////////////////////////////////////// @@ -2566,7 +2566,7 @@ void LLTextureFetchWorker::callbackDecoded(bool success, LLImageRaw* raw, LLImag removeFromCache(); mDecodedDiscard = -1; // Redundant, here for clarity and paranoia } - mDecoded = TRUE; + mDecoded = true; // LL_INFOS(LOG_TXT) << mID << " : DECODE COMPLETE " << LL_ENDL; } // -Mw @@ -2643,7 +2643,7 @@ std::string LLTextureFetch::getStateString(S32 state) LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mode) : LLWorkerThread("TextureFetch", threaded, true), mDebugCount(0), - mDebugPause(FALSE), + mDebugPause(false), mPacketCount(0), mBadPacketCount(0), mQueueMutex(), @@ -3738,9 +3738,9 @@ bool LLTextureFetch::receiveImagePacket(const LLHost& host, const LLUUID& id, U1 ////////////////////////////////////////////////////////////////////////////// // Threads: T* -BOOL LLTextureFetch::isFromLocalCache(const LLUUID& id) +bool LLTextureFetch::isFromLocalCache(const LLUUID& id) { - BOOL from_cache = FALSE ; + bool from_cache = false ; LLTextureFetchWorker* worker = getWorker(id); if (worker) diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index c55b3011c8..55bff004a6 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -117,7 +117,7 @@ public: F32 getTextureBandwidth() { return mTextureBandwidth; } // Threads: T* - BOOL isFromLocalCache(const LLUUID& id); + bool isFromLocalCache(const LLUUID& id); // get the current fetch state, if any, from the given UUID S32 getFetchState(const LLUUID& id); @@ -313,7 +313,7 @@ private: public: LLUUID mDebugID; S32 mDebugCount; - BOOL mDebugPause; + bool mDebugPause; S32 mPacketCount; S32 mBadPacketCount; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index f48a6d0cf0..d1d87a24f1 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -689,7 +689,7 @@ void LLGLTexMemBar::draw() LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*3, text_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, - &x_right, FALSE); + &x_right, false); // Move BW figures further to the right to prevent overlapping left = 575; @@ -783,7 +783,7 @@ public: void setTop(S32 loaded, S32 bound, F32 scale) {mTopLoaded = loaded ; mTopBound = bound; mScale = scale ;} void draw(); - BOOL handleHover(S32 x, S32 y, MASK mask, BOOL set_pick_size) ; + bool handleHover(S32 x, S32 y, MASK mask, bool set_pick_size) ; private: S32 mIndex ; @@ -796,13 +796,13 @@ private: F32 mScale ; }; -BOOL LLGLTexSizeBar::handleHover(S32 x, S32 y, MASK mask, BOOL set_pick_size) +bool LLGLTexSizeBar::handleHover(S32 x, S32 y, MASK mask, bool set_pick_size) { if(y > mBottom && (y < mBottom + (S32)(mTopLoaded * mScale) || y < mBottom + (S32)(mTopBound * mScale))) { LLImageGL::setCurTexSizebar(mIndex, set_pick_size); } - return TRUE ; + return true ; } void LLGLTexSizeBar::draw() { @@ -831,14 +831,14 @@ void LLGLTexSizeBar::draw() LLTextureView::LLTextureView(const LLTextureView::Params& p) : LLContainerView(p), - mFreezeView(FALSE), - mOrderFetch(FALSE), - mPrintList(FALSE), + mFreezeView(false), + mOrderFetch(false), + mPrintList(false), mNumTextureBars(0) { - setVisible(FALSE); + setVisible(false); - setDisplayChildren(TRUE); + setDisplayChildren(true); mGLTexMemBar = 0; mAvatarTexBar = 0; } @@ -1010,7 +1010,7 @@ void LLTextureView::draw() if (mPrintList) { - mPrintList = FALSE; + mPrintList = false; } static S32 max_count = 50; @@ -1059,7 +1059,7 @@ void LLTextureView::draw() addChild(mAvatarTexBar); sendChildToFront(mAvatarTexBar); - reshape(getRect().getWidth(), getRect().getHeight(), TRUE); + reshape(getRect().getWidth(), getRect().getHeight(), true); LLUI::popMatrix(); LLUI::pushMatrix(); @@ -1071,7 +1071,7 @@ void LLTextureView::draw() LLView *viewp = *child_iter; if (viewp->getRect().mBottom < 0) { - viewp->setVisible(FALSE); + viewp->setVisible(false); } } } @@ -1107,7 +1107,7 @@ bool LLTextureView::handleMouseDown(S32 x, S32 y, MASK mask) { if ((mask & (MASK_CONTROL|MASK_SHIFT|MASK_ALT)) == (MASK_ALT|MASK_SHIFT)) { - mPrintList = TRUE; + mPrintList = true; return true; } if ((mask & (MASK_CONTROL|MASK_SHIFT|MASK_ALT)) == (MASK_CONTROL|MASK_SHIFT)) diff --git a/indra/newview/lltextureview.h b/indra/newview/lltextureview.h index dff10d4fbe..8e7aa34e78 100644 --- a/indra/newview/lltextureview.h +++ b/indra/newview/lltextureview.h @@ -58,9 +58,9 @@ private: bool addBar(LLViewerFetchedTexture *image, S32 hilight = 0); private: - BOOL mFreezeView; - BOOL mOrderFetch; - BOOL mPrintList; + bool mFreezeView; + bool mOrderFetch; + bool mPrintList; LLTextBox *mInfoTextp; diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp index 3347463c57..787f242565 100644 --- a/indra/newview/llthumbnailctrl.cpp +++ b/indra/newview/llthumbnailctrl.cpp @@ -95,7 +95,7 @@ void LLThumbnailCtrl::draw() { mBorder->setKeyboardFocusHighlight(hasFocus()); - gl_rect_2d( draw_rect, mBorderColor.get(), FALSE ); + gl_rect_2d( draw_rect, mBorderColor.get(), false ); draw_rect.stretch( -1 ); } @@ -106,7 +106,7 @@ void LLThumbnailCtrl::draw() if( mTexturep->getComponents() == 4 ) { const LLColor4 color(.098f, .098f, .098f); - gl_rect_2d( draw_rect, color, TRUE); + gl_rect_2d( draw_rect, color, true); } gl_draw_scaled_image( draw_rect.mLeft, draw_rect.mBottom, draw_rect.getWidth(), draw_rect.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha); @@ -142,7 +142,7 @@ void LLThumbnailCtrl::draw() } else { - gl_rect_2d( draw_rect, LLColor4::grey % alpha, TRUE ); + gl_rect_2d( draw_rect, LLColor4::grey % alpha, true ); // Draw X gl_draw_x( draw_rect, LLColor4::black ); diff --git a/indra/newview/lltinygltfhelper.cpp b/indra/newview/lltinygltfhelper.cpp index 0e37423a5e..a70f3130c8 100644 --- a/indra/newview/lltinygltfhelper.cpp +++ b/indra/newview/lltinygltfhelper.cpp @@ -284,7 +284,7 @@ bool LLTinyGLTFHelper::getMaterialFromModel( if (base_color_tex) { - base_color_tex->addTextureStats(64.f * 64.f, TRUE); + base_color_tex->addTextureStats(64.f * 64.f, true); material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR] = base_color_tex->getID(); material->mBaseColorTexture = base_color_tex; } @@ -296,7 +296,7 @@ bool LLTinyGLTFHelper::getMaterialFromModel( if (normal_tex) { - normal_tex->addTextureStats(64.f * 64.f, TRUE); + normal_tex->addTextureStats(64.f * 64.f, true); material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL] = normal_tex->getID(); material->mNormalTexture = normal_tex; } @@ -308,7 +308,7 @@ bool LLTinyGLTFHelper::getMaterialFromModel( if (mr_tex) { - mr_tex->addTextureStats(64.f * 64.f, TRUE); + mr_tex->addTextureStats(64.f * 64.f, true); material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS] = mr_tex->getID(); material->mMetallicRoughnessTexture = mr_tex; } @@ -320,7 +320,7 @@ bool LLTinyGLTFHelper::getMaterialFromModel( if (emissive_tex) { - emissive_tex->addTextureStats(64.f * 64.f, TRUE); + emissive_tex->addTextureStats(64.f * 64.f, true); material->mTextureId[LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE] = emissive_tex->getID(); material->mEmissiveTexture = emissive_tex; } diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 0877c1b0d8..c8b6c90898 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -68,7 +68,7 @@ void LLToastLifeTimer::restart() mEventTimer.reset(); } -BOOL LLToastLifeTimer::getStarted() +bool LLToastLifeTimer::getStarted() { return mEventTimer.getStarted(); } @@ -124,17 +124,17 @@ LLToast::LLToast(const LLToast::Params& p) buildFromFile("panel_toast.xml"); - setCanDrag(FALSE); + setCanDrag(false); mWrapperPanel = getChild("wrapper_panel"); - setBackgroundOpaque(TRUE); // *TODO: obsolete + setBackgroundOpaque(true); // *TODO: obsolete updateTransparency(); // Show toasts in front of other floaters if (gSavedSettings.getBOOL("FSShowToastsInFront")) { - setFrontmost(FALSE); + setFrontmost(false); } // Show toasts in front of other floaters @@ -219,7 +219,7 @@ void LLToast::hide() { if (!mIsHidden) { - setVisible(FALSE); + setVisible(false); setFading(false); mTimer->stop(); mIsHidden = true; @@ -433,7 +433,7 @@ void LLToast::setVisible(bool show) mNotification->getName() != "UnknownScriptQuestion")) && !getVisible()) { - LLModalDialog::setFrontmost(FALSE); + LLModalDialog::setFrontmost(false); } // } @@ -517,7 +517,7 @@ void LLToast::updateHoveredState() sendChildToFront(mHideBtn); if(mHideBtn && mHideBtn->getEnabled()) { - mHideBtn->setVisible(TRUE); + mHideBtn->setVisible(true); } mToastMouseEnterSignal(this, getValue()); @@ -540,7 +540,7 @@ void LLToast::updateHoveredState() mHideBtnPressed = false; return; } - mHideBtn->setVisible(FALSE); + mHideBtn->setVisible(false); } mToastMouseLeaveSignal(this, getValue()); @@ -548,7 +548,7 @@ void LLToast::updateHoveredState() } } -void LLToast::setBackgroundOpaque(BOOL b) +void LLToast::setBackgroundOpaque(bool b) { if(mWrapperPanel && !isBackgroundVisible()) { diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 11b6ef44bf..9c9b623faa 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -57,7 +57,7 @@ public: void stop(); void start(); void restart(); - BOOL getStarted(); + bool getStarted(); void setPeriod(F32 period); F32 getRemainingTimeF32(); @@ -109,7 +109,7 @@ public: static void updateClass(); static void cleanupToasts(); - static BOOL isAlertToastShown() { return sModalToastsList.size() > 0; } + static bool isAlertToastShown() { return sModalToastsList.size() > 0; } LLToast(const LLToast::Params& p); virtual ~LLToast(); @@ -149,7 +149,7 @@ public: // virtual void setVisible(bool show); - /*virtual*/ void setBackgroundOpaque(BOOL b); + /*virtual*/ void setBackgroundOpaque(bool b); // virtual void hide(); @@ -236,7 +236,7 @@ private: bool mCanBeStored; bool mHideBtnEnabled; bool mHideBtnPressed; - bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849) + bool mIsHidden; // this flag is true when a toast has faded or was hidden with (x) button (EXT-1849) bool mIsTip; bool mIsFading; bool mIsHovered; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index dca78dc62c..39b84c396b 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -95,8 +95,8 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal bool is_password = false; bool defaultText = false; - LLToastPanel::setBackgroundVisible(FALSE); - LLToastPanel::setBackgroundOpaque(TRUE); + LLToastPanel::setBackgroundVisible(false); + LLToastPanel::setBackgroundOpaque(true); typedef std::vector > options_t; @@ -253,7 +253,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal dialog_width += 32 + HPAD; } - LLToastPanel::reshape( dialog_width, dialog_height, FALSE ); + LLToastPanel::reshape( dialog_width, dialog_height, false ); S32 msg_y = LLToastPanel::getRect().getHeight() - VPAD; S32 msg_x = HPAD; @@ -375,7 +375,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal if( i == mDefaultOption ) { - btn->setFocus(TRUE); + btn->setFocus(true); } } button_left += ((mButtonData[i].mWidth == 0) ? button_width : mButtonData[i].mWidth) + BTN_HPAD; @@ -385,18 +385,18 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal { if(mLineEditor) { - mLineEditor->setFocus(TRUE); + mLineEditor->setFocus(true); } } setCheckBoxes(HPAD, VPAD); // *TODO: check necessity of this code - //gFloaterView->adjustToFitScreen(this, FALSE); + //gFloaterView->adjustToFitScreen(this, false); if (mLineEditor) { mLineEditor->selectAll(); - mLineEditor->setFocus(TRUE); + mLineEditor->setFocus(true); } if(mDefaultOption >= 0) { @@ -450,16 +450,16 @@ LLToastAlertPanel::~LLToastAlertPanel() if (current_selection) { // If the focus moved to some other view though, move the focus there - current_selection->setFocus(TRUE); + current_selection->setFocus(true); } else { - mPreviouslyFocusedView.get()->setFocus(TRUE); + mPreviouslyFocusedView.get()->setFocus(true); } } } -BOOL LLToastAlertPanel::hasTitleBar() const +bool LLToastAlertPanel::hasTitleBar() const { // *TODO: check necessity of this code /* diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h index cd73f4ef47..78e4391de3 100644 --- a/indra/newview/lltoastalertpanel.h +++ b/indra/newview/lltoastalertpanel.h @@ -61,9 +61,9 @@ public: virtual void draw(); virtual void setVisible( bool visible ); - void setCaution(BOOL val = TRUE) { mCaution = val; } - // If mUnique==TRUE only one copy of this message should exist - void setUnique(BOOL val = TRUE) { mUnique = val; } + void setCaution(bool val = true) { mCaution = val; } + // If mUnique==true only one copy of this message should exist + void setUnique(bool val = true) { mUnique = val; } void setEditTextArgs(const LLSD& edit_args); void onButtonPressed(const LLSD& data, S32 button); @@ -75,7 +75,7 @@ private: // No you can't kill it. It can only kill itself. // Does it have a readable title label, or minimize or close buttons? - BOOL hasTitleBar() const; + bool hasTitleBar() const; private: static LLControlGroup* sSettings; @@ -96,8 +96,8 @@ private: std::vector mButtonData; S32 mDefaultOption; - BOOL mCaution; - BOOL mUnique; + bool mCaution; + bool mUnique; LLUIString mLabel; LLFrameTimer mDefaultBtnTimer; // For Dialogs that take a line as text as input: diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index 1bc315cc06..1090975715 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -69,7 +69,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi mGroupID = payload["group_id"].asUUID(); //group icon - LLGroupIconCtrl* pGroupIcon = getChild("group_icon", TRUE); + LLGroupIconCtrl* pGroupIcon = getChild("group_icon", true); // We should already have this data preloaded, so no sense in setting icon through setValue(group_id) pGroupIcon->setIconId(groupData.mInsigniaID); @@ -124,18 +124,18 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi LLFontGL* subject_font = LLFontGL::getFontByName(getString("subject_font")); if (subject_font) style.font = subject_font; - pMessageText->appendText(subject, FALSE, style); + pMessageText->appendText(subject, false, style); LLFontGL* date_font = LLFontGL::getFontByName(getString("date_font")); if (date_font) style.font = date_font; - pMessageText->appendText(timeStr + "\n", TRUE, style); + pMessageText->appendText(timeStr + "\n", true, style); style.font = pMessageText->getFont(); - pMessageText->appendText(message, TRUE, style); + pMessageText->appendText(message, true, style); //attachment - BOOL hasInventory = payload["inventory_offer"].isDefined(); + bool hasInventory = payload["inventory_offer"].isDefined(); // attachment container (if any) LLPanel* pAttachContainer = findChild("attachment_container"); @@ -144,7 +144,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi //attachment text LLTextBox * pAttachLink = getChild("attachment"); //attachment icon - LLIconCtrl* pAttachIcon = getChild("attachment_icon", TRUE); + LLIconCtrl* pAttachIcon = getChild("attachment_icon", true); //If attachment is empty let it be invisible and not take place at the panel if (pAttachContainer) @@ -246,8 +246,8 @@ void LLToastGroupNotifyPanel::onClickAttachment() pAttachLink->setColor(textColor); LLIconCtrl* pAttachIcon = - getChild ("attachment_icon", TRUE); - pAttachIcon->setEnabled(FALSE); + getChild ("attachment_icon", true); + pAttachIcon->setEnabled(false); //if attachment isn't openable - notify about saving if (!isAttachmentOpenable(mInventoryOffer->mType)) { diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 94b1c9fe60..cdc6d2e99d 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -86,8 +86,8 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif { style_params.font.style ="ITALIC"; } - mMessage->appendText(p.from, FALSE, style_params); - mMessage->appendText(p.message.substr(3), FALSE, style_params); + mMessage->appendText(p.from, false, style_params); + mMessage->appendText(p.message.substr(3), false, style_params); } else { @@ -127,7 +127,7 @@ LLToastIMPanel::~LLToastIMPanel() //virtual bool LLToastIMPanel::handleMouseUp(S32 x, S32 y, MASK mask) { - if (LLPanel::handleMouseUp(x,y,mask) == FALSE) + if (LLPanel::handleMouseUp(x,y,mask) == false) { mNotification->respond(mNotification->getResponseTemplate()); } @@ -170,11 +170,11 @@ void LLToastIMPanel::spawnNameToolTip() params.background_visible(false); if(!mIsGroupMsg) { - params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_avatar", LLSD().with("avatar_id", mAvatarID), FALSE)); + params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_avatar", LLSD().with("avatar_id", mAvatarID), false)); } else { - params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), FALSE)); + params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), false)); } params.delay_time(0.0f); // spawn instantly on hover params.image(LLUI::getUIImage("Info_Small")); @@ -200,7 +200,7 @@ void LLToastIMPanel::spawnGroupIconToolTip() LLInspector::Params params; params.fillFrom(LLUICtrlFactory::instance().getDefaultParams()); - params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), FALSE)); + params.click_callback(boost::bind(&LLFloaterReg::showInstance, "inspect_group", LLSD().with("group_id", mSessionID), false)); params.delay_time(0.100f); params.image(LLUI::getUIImage("Info_Small")); params.message(g_data.mName); @@ -213,9 +213,9 @@ void LLToastIMPanel::spawnGroupIconToolTip() void LLToastIMPanel::initIcon() { - mAvatarIcon->setVisible(FALSE); - mGroupIcon->setVisible(FALSE); - mAdhocIcon->setVisible(FALSE); + mAvatarIcon->setVisible(false); + mGroupIcon->setVisible(false); + mAdhocIcon->setVisible(false); if(mAvatarName->getValue().asString() == SYSTEM_FROM) { @@ -235,15 +235,15 @@ void LLToastIMPanel::initIcon() switch(im_session->mSessionType) { case LLIMModel::LLIMSession::P2P_SESSION: - mAvatarIcon->setVisible(TRUE); + mAvatarIcon->setVisible(true); mAvatarIcon->setValue(mAvatarID); break; case LLIMModel::LLIMSession::GROUP_SESSION: - mGroupIcon->setVisible(TRUE); + mGroupIcon->setVisible(true); mGroupIcon->setValue(mSessionID); break; case LLIMModel::LLIMSession::ADHOC_SESSION: - mAdhocIcon->setVisible(TRUE); + mAdhocIcon->setVisible(true); mAdhocIcon->setValue(im_session->mOtherParticipantID); mAdhocIcon->setToolTip(im_session->mName); break; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index e39a89e9c5..36def390d5 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -69,7 +69,7 @@ void LLToastNotifyPanel::addDefaultButton() { LLSD form_element; form_element.with("name", "OK").with("text", LLTrans::getString("ok")).with("default", true); - LLButton* ok_btn = createButton(form_element, FALSE); + LLButton* ok_btn = createButton(form_element, false); LLRect new_btn_rect(ok_btn->getRect()); new_btn_rect.setOriginAndSize(llabs(getRect().getWidth() - BUTTON_WIDTH)/ 2, BOTTOM_PAD, @@ -80,7 +80,7 @@ void LLToastNotifyPanel::addDefaultButton() mNumButtons = 1; mAddedDefaultBtn = true; } -LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, BOOL is_option) +LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, bool is_option) { InstanceAndS32* userdata = new InstanceAndS32; userdata->mSelf = this; @@ -226,7 +226,7 @@ void LLToastNotifyPanel::adjustPanelForScriptNotice(S32 button_panel_width, S32 void LLToastNotifyPanel::adjustPanelForTipNotice() { //we don't need display ControlPanel for tips because they doesn't contain any buttons. - mControlPanel->setVisible(FALSE); + mControlPanel->setVisible(false); reshape(getRect().getWidth(), mInfoPanel->getRect().getHeight()); if (mNotification->getPayload().has("respond_on_mousedown") @@ -253,7 +253,7 @@ void LLToastNotifyPanel::onClickButton(void* data) } // disable all buttons - self->mControlPanel->setEnabled(FALSE); + self->mControlPanel->setEnabled(false); // this might repost notification with new form data/enabled buttons self->mNotification->respond(response); @@ -332,7 +332,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) } mTextBox->setMaxTextLength(LLToastPanel::MAX_TEXT_LENGTH); - mTextBox->setVisible(TRUE); + mTextBox->setVisible(true); mTextBox->setPlainText(!show_images); mTextBox->setContentTrusted(is_content_trusted); mTextBox->setValue(mNotification->getMessage()); @@ -353,7 +353,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) { // setting size to 0,0 becuase button visibility is dictated by a control variable, // so we need a different way to hide this button. - getChild("DialogStackButton")->reshape(0, 0, FALSE); + getChild("DialogStackButton")->reshape(0, 0, false); } // @@ -381,7 +381,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) // a textbox pretending to be a button. continue; } - LLButton* new_button = createButton(form_element, TRUE); + LLButton* new_button = createButton(form_element, true); buttons_width += new_button->getRect().getWidth(); S32 index = form_element["index"].asInteger(); buttons.push_back(index_button_pair_t(index,new_button)); diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index a3bd327681..3593022a7d 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -72,7 +72,7 @@ public: bool isControlPanelEnabled() const; protected: - LLButton* createButton(const LLSD& form_element, BOOL is_option); + LLButton* createButton(const LLSD& form_element, bool is_option); // Used for callbacks struct InstanceAndS32 diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index e83f71f67b..60e5233444 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -225,7 +225,7 @@ bool LLCheckBoxToastPanel::setCheckBox(const std::string& check_title, dialog_height += LINE_HEIGHT * lines.size(); dialog_height += LINE_HEIGHT / 2; - LLToastPanel::reshape(dialog_width, dialog_height, FALSE); + LLToastPanel::reshape(dialog_width, dialog_height, false); S32 msg_x = (LLToastPanel::getRect().getWidth() - max_msg_width) / 2; @@ -252,7 +252,7 @@ bool LLCheckBoxToastPanel::setCheckBox(const std::string& check_title, void LLCheckBoxToastPanel::onCommitCheckbox(LLUICtrl* ctrl) { - BOOL check = ctrl->getValue().asBoolean(); + bool check = ctrl->getValue().asBoolean(); if (mNotification->getForm()->getIgnoreType() == LLNotificationForm::IGNORE_SHOW_AGAIN) { // question was "show again" so invert value to get "ignore" diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp index dedcc72b84..d4b2cfa4c7 100644 --- a/indra/newview/lltoastscriptquestion.cpp +++ b/indra/newview/lltoastscriptquestion.cpp @@ -138,7 +138,7 @@ void LLToastScriptQuestion::createButtons() if (form_element.has("default") && form_element["default"].asBoolean() && (mNotification->getName() != "ScriptQuestionCaution" || gSavedSettings.getBOOL("FSPermissionDebitDefaultDeny"))) // { - button->setFocus(TRUE); + button->setFocus(true); setDefaultBtn(button); } } diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp index eb86a44055..b5f18f7502 100644 --- a/indra/newview/lltoastscripttextbox.cpp +++ b/indra/newview/lltoastscripttextbox.cpp @@ -58,7 +58,7 @@ LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification LLStyle::Params style; style.font = pMessageText->getFont(); - pMessageText->appendText(message, TRUE, style); + pMessageText->appendText(message, true, style); //submit button LLButton* pSubmitBtn = getChild("btn_submit"); diff --git a/indra/newview/lltool.cpp b/indra/newview/lltool.cpp index 031358c3dc..18dd695ec1 100644 --- a/indra/newview/lltool.cpp +++ b/indra/newview/lltool.cpp @@ -163,7 +163,7 @@ bool LLTool::handleToolTip(S32 x, S32 y, MASK mask) return false; } -void LLTool::setMouseCapture( BOOL b ) +void LLTool::setMouseCapture( bool b ) { if( b ) { @@ -185,9 +185,9 @@ bool LLTool::hasMouseCapture() return gFocusMgr.getMouseCapture() == (mComposite ? mComposite : this); } -BOOL LLTool::handleKey(KEY key, MASK mask) +bool LLTool::handleKey(KEY key, MASK mask) { - return FALSE; + return false; } LLTool* LLTool::getOverrideTool(MASK mask) diff --git a/indra/newview/lltool.h b/indra/newview/lltool.h index 9eb9cf7027..2e22bcfdb9 100644 --- a/indra/newview/lltool.h +++ b/indra/newview/lltool.h @@ -46,7 +46,7 @@ public: virtual ~LLTool(); // Hack to support LLFocusMgr - virtual BOOL isView() const { return FALSE; } + virtual bool isView() const { return false; } // Virtual functions inherited from LLMouseHandler virtual bool handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down); @@ -63,7 +63,7 @@ public: virtual bool handleRightMouseUp(S32 x, S32 y, MASK mask); virtual bool handleToolTip(S32 x, S32 y, MASK mask); - // Return FALSE to allow context menu to be shown. + // Return false to allow context menu to be shown. virtual void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const { *local_x = screen_x; *local_y = screen_y; } virtual void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const @@ -74,10 +74,10 @@ public: // New virtual functions virtual LLViewerObject* getEditingObject() { return NULL; } virtual LLVector3d getEditingPointGlobal() { return LLVector3d(); } - virtual BOOL isEditing() { return (getEditingObject() != NULL); } + virtual bool isEditing() { return (getEditingObject() != NULL); } virtual void stopEditing() {} - virtual BOOL clipMouseWhenDown() { return TRUE; } + virtual bool clipMouseWhenDown() { return true; } virtual void handleSelect() { } // do stuff when your tool is selected virtual void handleDeselect() { } // clean up when your tool is deselected @@ -86,15 +86,15 @@ public: // isAlwaysRendered() - return true if this is a tool that should // always be rendered regardless of selection. - virtual BOOL isAlwaysRendered() { return FALSE; } + virtual bool isAlwaysRendered() { return false; } virtual void render() {} // draw tool specific 3D content in world virtual void draw(); // draw tool specific 2D overlay - virtual BOOL handleKey(KEY key, MASK mask); + virtual bool handleKey(KEY key, MASK mask); // Note: NOT virtual. Subclasses should call this version. - void setMouseCapture(BOOL b); + void setMouseCapture(bool b); bool hasMouseCapture(); virtual void onMouseCaptureLost() {} // override this one as needed. diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index b05ef20f54..4908b75056 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -674,7 +674,7 @@ void LLToolBarView::draw() for (S32 i = LLToolBarEnums::TOOLBAR_FIRST; i <= LLToolBarEnums::TOOLBAR_LAST; i++) { - gl_rect_2d(toolbar_rects[i], drop_color, TRUE); + gl_rect_2d(toolbar_rects[i], drop_color, true); } } @@ -702,12 +702,12 @@ void LLToolBarView::startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton) LLToolDragAndDrop::getInstance()->setDragStart( x, y ); } -BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type) +bool LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type) { // Do not drag and drop when toolbars are locked if(gSavedSettings.getBOOL("LockToolbars")) { - return FALSE; + return false; } // @@ -731,7 +731,7 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp gToolBarView->stopCommandInProgress(command_id); gToolBarView->mDragStarted = true; - return TRUE; + return true; } else { @@ -739,25 +739,25 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp return LLToolDragAndDrop::getInstance()->handleHover( x, y, mask ); } } - return FALSE; + return false; } -BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar) +bool LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* toolbar) { // Do not drag and drop when toolbars are locked if(gSavedSettings.getBOOL("LockToolbars")) { - return FALSE; + return false; } // - BOOL handled = FALSE; + bool handled = false; LLInventoryObject* inv_item = static_cast(cargo_data); LLAssetType::EType type = inv_item->getType(); if (type == LLAssetType::AT_WIDGET) { - handled = TRUE; + handled = true; // Get the command from its uuid LLCommandManager& mgr = LLCommandManager::instance(); LLCommandId command_id(inv_item->getUUID()); diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index a2d1c5c16f..5166517860 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -93,8 +93,8 @@ public: static bool clearAllToolbars(); static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton); - static BOOL handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type); - static BOOL handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar); + static bool handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type); + static bool handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar); static void resetDragTool(LLToolBarButton* toolbarButton); LLInventoryObject* getDragItem(); LLView* getBottomToolbar() { return mBottomToolbarPanel; } diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index 896d12c227..19eb8b8d58 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -88,8 +88,8 @@ LLToolBrushLand::LLToolBrushLand() mStartingZ( 0.0f ), mMouseX( 0 ), mMouseY(0), - mGotHover(FALSE), - mBrushSelected(FALSE) + mGotHover(false), + mBrushSelected(false) { mBrushSize = gSavedSettings.getF32("LandBrushSize"); } @@ -122,7 +122,7 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global, iter != mLastAffectedRegions.end(); ++iter) { LLViewerRegion* regionp = *iter; - //BOOL is_changed = FALSE; + //bool is_changed = false; LLVector3 pos_region = regionp->getPosRegionFromGlobal(pos_global); LLSurface &land = regionp->getLand(); char action = E_LAND_LEVEL; @@ -249,7 +249,7 @@ void LLToolBrushLand::modifyLandInSelectionGlobal() iter != mLastAffectedRegions.end(); ++iter) { LLViewerRegion* regionp = *iter; - //BOOL is_changed = FALSE; + //bool is_changed = false; LLVector3 min_region = regionp->getPosRegionFromGlobal(min); LLVector3 max_region = regionp->getPosRegionFromGlobal(max); @@ -318,7 +318,7 @@ void LLToolBrushLand::modifyLandInSelectionGlobal() msg->addF32Fast(_PREHASH_Seconds, seconds); msg->addF32Fast(_PREHASH_Height, mStartingZ); - BOOL parcel_selected = LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected(); + bool parcel_selected = LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected(); LLParcel* selected_parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); if (parcel_selected && selected_parcel) @@ -356,7 +356,7 @@ void LLToolBrushLand::brush( void ) spot.mdV[VX] = floor( spot.mdV[VX] + 0.5 ); spot.mdV[VY] = floor( spot.mdV[VY] + 0.5 ); - modifyLandAtPointGlobal(spot, gKeyboard->currentMask(TRUE)); + modifyLandAtPointGlobal(spot, gKeyboard->currentMask(true)); } } @@ -394,9 +394,9 @@ bool LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask) mMouseX = x; mMouseY = y; gIdleCallbacks.addFunction( &LLToolBrushLand::onIdle, (void*)this ); - setMouseCapture( TRUE ); + setMouseCapture( true ); - LLViewerParcelMgr::getInstance()->setSelectionVisible(FALSE); + LLViewerParcelMgr::getInstance()->setSelectionVisible(false); handled = true; } @@ -410,7 +410,7 @@ bool LLToolBrushLand::handleHover( S32 x, S32 y, MASK mask ) << ")" << LL_ENDL; mMouseX = x; mMouseY = y; - mGotHover = TRUE; + mGotHover = true; gViewerWindow->setCursor(UI_CURSOR_TOOLLAND); LLVector3d spot; @@ -432,9 +432,9 @@ bool LLToolBrushLand::handleMouseUp(S32 x, S32 y, MASK mask) if( hasMouseCapture() ) { // Release the mouse - setMouseCapture( FALSE ); + setMouseCapture( false ); - LLViewerParcelMgr::getInstance()->setSelectionVisible(TRUE); + LLViewerParcelMgr::getInstance()->setSelectionVisible(true); gIdleCallbacks.deleteFunction( &LLToolBrushLand::onIdle, (void*)this ); handled = true; @@ -450,7 +450,7 @@ void LLToolBrushLand::handleSelect() gFloaterTools->setStatusText("modifyland"); // if (!mBrushSelected) { - mBrushSelected = TRUE; + mBrushSelected = true; } } @@ -461,8 +461,8 @@ void LLToolBrushLand::handleDeselect() { gEditMenuHandler = NULL; } - LLViewerParcelMgr::getInstance()->setSelectionVisible(TRUE); - mBrushSelected = FALSE; + LLViewerParcelMgr::getInstance()->setSelectionVisible(true); + mBrushSelected = false; } // Draw the area that will be affected. @@ -493,7 +493,7 @@ void LLToolBrushLand::render() pos_world); } } - mGotHover = FALSE; + mGotHover = false; } } @@ -681,7 +681,7 @@ bool LLToolBrushLand::canTerraformParcel(LLViewerRegion* regionp) const bool is_terraform_allowed = false; if (selected_parcel) { - BOOL owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(selected_parcel, GP_LAND_ALLOW_EDIT_LAND); + bool owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(selected_parcel, GP_LAND_ALLOW_EDIT_LAND); is_terraform_allowed = ( gAgent.canManageEstate() || (selected_parcel->getOwnerID() == regionp->getOwner()) || owner_release); } diff --git a/indra/newview/lltoolbrush.h b/indra/newview/lltoolbrush.h index c006153657..9193dfe5f1 100644 --- a/indra/newview/lltoolbrush.h +++ b/indra/newview/lltoolbrush.h @@ -57,7 +57,7 @@ public: // isAlwaysRendered() - return true if this is a tool that should // always be rendered regardless of selection. - virtual BOOL isAlwaysRendered() { return TRUE; } + virtual bool isAlwaysRendered() { return true; } // Draw the area that will be affected. virtual void render(); @@ -95,8 +95,8 @@ protected: S32 mMouseX; S32 mMouseY; F32 mBrushSize; - BOOL mGotHover; - BOOL mBrushSelected; + bool mGotHover; + bool mBrushSelected; // Order doesn't matter and we do check for existance of regions, so use a set region_list_t mLastAffectedRegions; diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 151f8b36f9..bf3aefcb33 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -87,8 +87,8 @@ LLToolComposite::LLToolComposite(const std::string& name) : LLTool(name), mCur(sNullTool), mDefault(sNullTool), - mSelected(FALSE), - mMouseDown(FALSE), mManip(NULL), mSelectRect(NULL) + mSelected(false), + mMouseDown(false), mManip(NULL), mSelectRect(NULL) { } @@ -109,7 +109,7 @@ void LLToolComposite::onMouseCaptureLost() setCurrentTool( mDefault ); } -BOOL LLToolComposite::isSelecting() +bool LLToolComposite::isSelecting() { return mCur == mSelectRect; } @@ -122,14 +122,14 @@ void LLToolComposite::handleSelect() } mCur = mDefault; mCur->handleSelect(); - mSelected = TRUE; + mSelected = true; } void LLToolComposite::handleDeselect() { mCur->handleDeselect(); mCur = mDefault; - mSelected = FALSE; + mSelected = false; } //---------------------------------------------------------------------------- @@ -138,7 +138,7 @@ void LLToolComposite::handleDeselect() LLToolCompInspect::LLToolCompInspect() : LLToolComposite(std::string("Inspect")), - mIsToolCameraActive(FALSE) + mIsToolCameraActive(false) { mSelectRect = new LLToolSelectRect(this); mDefault = mSelectRect; @@ -161,7 +161,7 @@ bool LLToolCompInspect::handleMouseDown(S32 x, S32 y, MASK mask) } else { - mMouseDown = TRUE; + mMouseDown = true; gViewerWindow->pickAsync(x, y, mask, pickCallback); handled = true; } @@ -184,7 +184,7 @@ void LLToolCompInspect::pickCallback(const LLPickInfo& pick_info) if (!tool_inspectp->mMouseDown) { // fast click on object, but mouse is already up...just do select - tool_inspectp->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE); + tool_inspectp->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), false); return; } @@ -194,7 +194,7 @@ void LLToolCompInspect::pickCallback(const LLPickInfo& pick_info) } tool_inspectp->setCurrentTool( tool_inspectp->mSelectRect ); - tool_inspectp->mIsToolCameraActive = FALSE; + tool_inspectp->mIsToolCameraActive = false; tool_inspectp->mSelectRect->handlePick( pick_info ); } @@ -203,15 +203,15 @@ bool LLToolCompInspect::handleDoubleClick(S32 x, S32 y, MASK mask) return true; } -BOOL LLToolCompInspect::handleKey(KEY key, MASK mask) +bool LLToolCompInspect::handleKey(KEY key, MASK mask) { - BOOL handled = FALSE; + bool handled = false; if(KEY_ALT == key) { setCurrentTool(LLToolCamera::getInstance()); - mIsToolCameraActive = TRUE; - handled = TRUE; + mIsToolCameraActive = true; + handled = true; } else { @@ -224,7 +224,7 @@ BOOL LLToolCompInspect::handleKey(KEY key, MASK mask) void LLToolCompInspect::onMouseCaptureLost() { LLToolComposite::onMouseCaptureLost(); - mIsToolCameraActive = FALSE; + mIsToolCameraActive = false; } void LLToolCompInspect::keyUp(KEY key, MASK mask) @@ -232,7 +232,7 @@ void LLToolCompInspect::keyUp(KEY key, MASK mask) if (KEY_ALT == key && mCur == LLToolCamera::getInstance()) { setCurrentTool(mDefault); - mIsToolCameraActive = FALSE; + mIsToolCameraActive = false; } } @@ -271,8 +271,8 @@ bool LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask) bool LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask) { - mMouseDown = TRUE; - gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, LLFloaterReg::instanceVisible("build"), FALSE, + mMouseDown = true; + gViewerWindow->pickAsync(x, y, mask, pickCallback, /*bool pick_transparent*/ false, LLFloaterReg::instanceVisible("build"), false, gSavedSettings.getBOOL("SelectReflectionProbes"));; return true; } @@ -285,7 +285,7 @@ void LLToolCompTranslate::pickCallback(const LLPickInfo& pick_info) if (!LLToolCompTranslate::getInstance()->mMouseDown) { // fast click on object, but mouse is already up...just do select - LLToolCompTranslate::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE); + LLToolCompTranslate::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), false); return; } @@ -296,7 +296,7 @@ void LLToolCompTranslate::pickCallback(const LLPickInfo& pick_info) LLEditMenuHandler::gEditMenuHandler = LLSelectMgr::getInstance(); } - BOOL can_move = LLToolCompTranslate::getInstance()->mManip->canAffectSelection(); + bool can_move = LLToolCompTranslate::getInstance()->mManip->canAffectSelection(); if( LLManip::LL_NO_PART != LLToolCompTranslate::getInstance()->mManip->getHighlightedPart() && can_move) { @@ -321,7 +321,7 @@ void LLToolCompTranslate::pickCallback(const LLPickInfo& pick_info) bool LLToolCompTranslate::handleMouseUp(S32 x, S32 y, MASK mask) { - mMouseDown = FALSE; + mMouseDown = false; return LLToolComposite::handleMouseUp(x, y, mask); } @@ -398,7 +398,7 @@ bool LLToolCompScale::handleHover(S32 x, S32 y, MASK mask) bool LLToolCompScale::handleMouseDown(S32 x, S32 y, MASK mask) { - mMouseDown = TRUE; + mMouseDown = true; gViewerWindow->pickAsync(x, y, mask, pickCallback); return true; } @@ -411,7 +411,7 @@ void LLToolCompScale::pickCallback(const LLPickInfo& pick_info) if (!LLToolCompScale::getInstance()->mMouseDown) { // fast click on object, but mouse is already up...just do select - LLToolCompScale::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE); + LLToolCompScale::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), false); return; } @@ -442,7 +442,7 @@ void LLToolCompScale::pickCallback(const LLPickInfo& pick_info) bool LLToolCompScale::handleMouseUp(S32 x, S32 y, MASK mask) { - mMouseDown = FALSE; + mMouseDown = false; return LLToolComposite::handleMouseUp(x, y, mask); } @@ -511,7 +511,7 @@ LLToolCompCreate::LLToolCompCreate() mCur = mPlacer; mDefault = mPlacer; - mObjectPlacedOnMouseDown = FALSE; + mObjectPlacedOnMouseDown = false; } @@ -525,7 +525,7 @@ LLToolCompCreate::~LLToolCompCreate() bool LLToolCompCreate::handleMouseDown(S32 x, S32 y, MASK mask) { bool handled = false; - mMouseDown = TRUE; + mMouseDown = true; if ( (mask == MASK_SHIFT) || (mask == MASK_CONTROL) ) { @@ -538,7 +538,7 @@ bool LLToolCompCreate::handleMouseDown(S32 x, S32 y, MASK mask) handled = mPlacer->placeObject( x, y, mask ); } - mObjectPlacedOnMouseDown = TRUE; + mObjectPlacedOnMouseDown = true; return handled; } @@ -569,8 +569,8 @@ bool LLToolCompCreate::handleMouseUp(S32 x, S32 y, MASK mask) handled = mPlacer->placeObject( x, y, mask ); } - mObjectPlacedOnMouseDown = FALSE; - mMouseDown = FALSE; + mObjectPlacedOnMouseDown = false; + mMouseDown = false; if (!handled) { @@ -612,7 +612,7 @@ bool LLToolCompRotate::handleHover(S32 x, S32 y, MASK mask) bool LLToolCompRotate::handleMouseDown(S32 x, S32 y, MASK mask) { - mMouseDown = TRUE; + mMouseDown = true; gViewerWindow->pickAsync(x, y, mask, pickCallback); return true; } @@ -625,7 +625,7 @@ void LLToolCompRotate::pickCallback(const LLPickInfo& pick_info) if (!LLToolCompRotate::getInstance()->mMouseDown) { // fast click on object, but mouse is already up...just do select - LLToolCompRotate::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), FALSE); + LLToolCompRotate::getInstance()->mSelectRect->handleObjectSelection(pick_info, gSavedSettings.getBOOL("EditLinkedParts"), false); return; } @@ -655,7 +655,7 @@ void LLToolCompRotate::pickCallback(const LLPickInfo& pick_info) bool LLToolCompRotate::handleMouseUp(S32 x, S32 y, MASK mask) { - mMouseDown = FALSE; + mMouseDown = false; return LLToolComposite::handleMouseUp(x, y, mask); } @@ -754,7 +754,7 @@ bool LLToolCompGun::handleHover(S32 x, S32 y, MASK mask) else if ( mCur == mGrab && !(mask & MASK_ALT) ) { setCurrentTool( (LLTool*) mGun ); - setMouseCapture(TRUE); + setMouseCapture(true); } } @@ -804,14 +804,14 @@ bool LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask) // make the build menu appear. setCurrentTool( (LLTool*) mNull ); - // This should return FALSE, meaning the context menu will + // This should return false, meaning the context menu will // be shown. return false; */ // Returning true will suppress the context menu // NaCl - Rightclick-mousewheel zoom - if (!(gKeyboard->currentMask(TRUE) & MASK_ALT)) + if (!(gKeyboard->currentMask(true) & MASK_ALT)) { LLVector3 _NACL_MLFovValues = gSavedSettings.getVector3("_NACL_MLFovValues"); F32 CameraAngle = gSavedSettings.getF32("CameraAngle"); @@ -825,7 +825,7 @@ bool LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask) // NaCl End // Enable context/pie menu in mouselook - //return TRUE; + //return true; return (!gSavedSettings.getBOOL("FSEnableRightclickMenuInMouselook")); // } @@ -869,13 +869,13 @@ void LLToolCompGun::onMouseCaptureLost() void LLToolCompGun::handleSelect() { LLToolComposite::handleSelect(); - setMouseCapture(TRUE); + setMouseCapture(true); } void LLToolCompGun::handleDeselect() { LLToolComposite::handleDeselect(); - setMouseCapture(FALSE); + setMouseCapture(false); } diff --git a/indra/newview/lltoolcomp.h b/indra/newview/lltoolcomp.h index f7d0231044..cd8f0cbe56 100644 --- a/indra/newview/lltoolcomp.h +++ b/indra/newview/lltoolcomp.h @@ -59,10 +59,10 @@ public: virtual LLViewerObject* getEditingObject() { return mCur->getEditingObject(); } virtual LLVector3d getEditingPointGlobal() { return mCur->getEditingPointGlobal(); } - virtual BOOL isEditing() { return mCur->isEditing(); } + virtual bool isEditing() { return mCur->isEditing(); } virtual void stopEditing() { mCur->stopEditing(); mCur = mDefault; } - virtual BOOL clipMouseWhenDown() { return mCur->clipMouseWhenDown(); } + virtual bool clipMouseWhenDown() { return mCur->clipMouseWhenDown(); } virtual void handleSelect(); virtual void handleDeselect(); @@ -70,7 +70,7 @@ public: virtual void render() { mCur->render(); } virtual void draw() { mCur->draw(); } - virtual BOOL handleKey(KEY key, MASK mask) { return mCur->handleKey( key, mask ); } + virtual bool handleKey(KEY key, MASK mask) { return mCur->handleKey( key, mask ); } virtual void onMouseCaptureLost(); @@ -80,7 +80,7 @@ public: virtual void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const { mCur->localPointToScreen(local_x, local_y, screen_x, screen_y); } - BOOL isSelecting(); + bool isSelecting(); LLTool* getCurrentTool() { return mCur; } protected: @@ -91,8 +91,8 @@ protected: protected: LLTool* mCur; // The tool to which we're delegating. LLTool* mDefault; - BOOL mSelected; - BOOL mMouseDown; + bool mSelected; + bool mMouseDown; LLManip* mManip; LLToolSelectRect* mSelectRect; @@ -114,16 +114,16 @@ public: virtual bool handleMouseDown(S32 x, S32 y, MASK mask); virtual bool handleMouseUp(S32 x, S32 y, MASK mask); virtual bool handleDoubleClick(S32 x, S32 y, MASK mask); - virtual BOOL handleKey(KEY key, MASK mask); + virtual bool handleKey(KEY key, MASK mask); virtual void onMouseCaptureLost(); void keyUp(KEY key, MASK mask); static void pickCallback(const LLPickInfo& pick_info); - BOOL isToolCameraActive() const { return mIsToolCameraActive; } + bool isToolCameraActive() const { return mIsToolCameraActive; } private: - BOOL mIsToolCameraActive; + bool mIsToolCameraActive; }; //----------------------------------------------------------------------- @@ -214,7 +214,7 @@ public: static void pickCallback(const LLPickInfo& pick_info); protected: LLToolPlacer* mPlacer; - BOOL mObjectPlacedOnMouseDown; + bool mObjectPlacedOnMouseDown; }; diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 89a7fbd328..bfaf8dcced 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -112,7 +112,7 @@ public: class LLDroppableItem : public LLInventoryCollectFunctor { public: - LLDroppableItem(BOOL is_transfer) : + LLDroppableItem(bool is_transfer) : mCountLosing(0), mIsTransfer(is_transfer) {} virtual ~LLDroppableItem() {} virtual bool operator()(LLInventoryCategory* cat, @@ -121,7 +121,7 @@ public: protected: S32 mCountLosing; - BOOL mIsTransfer; + bool mIsTransfer; }; bool LLDroppableItem::operator()(LLInventoryCategory* cat, @@ -297,7 +297,7 @@ LLToolDragAndDrop::LLToolDragAndDrop() mSource(SOURCE_AGENT), mCursor(UI_CURSOR_NO), mLastAccept(ACCEPT_NO), - mDrop(FALSE), + mDrop(false), mCurItemIndex(0) { @@ -309,7 +309,7 @@ void LLToolDragAndDrop::setDragStart(S32 x, S32 y) mDragStartY = y; } -BOOL LLToolDragAndDrop::isOverThreshold(S32 x,S32 y) +bool LLToolDragAndDrop::isOverThreshold(S32 x,S32 y) { static LLCachedControl drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold", 3); @@ -348,7 +348,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, mSourceID = source_id; mObjectID = object_id; - setMouseCapture( TRUE ); + setMouseCapture( true ); LLToolMgr::getInstance()->setTransientTool( this ); mCursor = UI_CURSOR_NO; if ((mCargoTypes[0] == DAD_CATEGORY) @@ -418,7 +418,7 @@ void LLToolDragAndDrop::beginMultiDrag( mSource = source; mSourceID = source_id; - setMouseCapture( TRUE ); + setMouseCapture( true ); LLToolMgr::getInstance()->setTransientTool( this ); mCursor = UI_CURSOR_NO; if ((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) @@ -467,7 +467,7 @@ void LLToolDragAndDrop::endDrag() { mEndDragSignal(); LLSelectMgr::getInstance()->unhighlightAll(); - setMouseCapture(FALSE); + setMouseCapture(false); } void LLToolDragAndDrop::onMouseCaptureLost() @@ -487,7 +487,7 @@ bool LLToolDragAndDrop::handleMouseUp( S32 x, S32 y, MASK mask ) if (hasMouseCapture()) { EAcceptance acceptance = ACCEPT_NO; - dragOrDrop( x, y, mask, TRUE, &acceptance ); + dragOrDrop( x, y, mask, true, &acceptance ); endDrag(); } return true; @@ -557,7 +557,7 @@ ECursorType LLToolDragAndDrop::acceptanceToCursor( EAcceptance acceptance ) case ACCEPT_POSTPONED: break; default: - llassert( FALSE ); + llassert( false ); } return mCursor; @@ -566,7 +566,7 @@ ECursorType LLToolDragAndDrop::acceptanceToCursor( EAcceptance acceptance ) bool LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask ) { EAcceptance acceptance = ACCEPT_NO; - dragOrDrop( x, y, mask, FALSE, &acceptance ); + dragOrDrop( x, y, mask, false, &acceptance ); ECursorType cursor = acceptanceToCursor(acceptance); gViewerWindow->getWindow()->setCursor( cursor ); @@ -575,16 +575,16 @@ bool LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask ) return true; } -BOOL LLToolDragAndDrop::handleKey(KEY key, MASK mask) +bool LLToolDragAndDrop::handleKey(KEY key, MASK mask) { if (key == KEY_ESCAPE) { // cancel drag and drop operation endDrag(); - return TRUE; + return true; } - return FALSE; + return false; } bool LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask) @@ -609,12 +609,12 @@ void LLToolDragAndDrop::handleDeselect() } // protected -void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, +void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, bool drop, EAcceptance* acceptance) { *acceptance = ACCEPT_YES_MULTI; - BOOL handled = FALSE; + bool handled = false; LLView* top_view = gFocusMgr.getTopCtrl(); LLViewerInventoryItem* item; @@ -634,7 +634,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, if (top_view) { - handled = TRUE; + handled = true; for (mCurItemIndex = 0; mCurItemIndex < (S32)mCargoIDs.size(); mCurItemIndex++) { @@ -645,7 +645,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, LLInventoryObject* cargo = locateInventory(item, cat); if (cargo) { - handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE, + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, false, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, @@ -653,7 +653,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } else if (is_uuid_dragged) { - handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE, + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, false, mCargoTypes[mCurItemIndex], (void*)&mCargoIDs[mCurItemIndex], &item_acceptance, @@ -686,7 +686,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, LLInventoryObject* cargo = locateInventory(item, cat); if (cargo) { - handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, TRUE, + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, true, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, @@ -694,7 +694,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } else if (is_uuid_dragged) { - handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, FALSE, + handled = handled && top_view->handleDragAndDrop(local_x, local_y, mask, false, mCargoTypes[mCurItemIndex], (void*)&mCargoIDs[mCurItemIndex], &item_acceptance, @@ -710,7 +710,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, if (!handled) { - handled = TRUE; + handled = true; LLRootView* root_view = gViewerWindow->getRootView(); @@ -723,7 +723,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, // fix for EXT-3191 if (cargo) { - handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, + handled = handled && root_view->handleDragAndDrop(x, y, mask, false, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, @@ -731,7 +731,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } else if (is_uuid_dragged) { - handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, + handled = handled && root_view->handleDragAndDrop(x, y, mask, false, mCargoTypes[mCurItemIndex], (void*)&mCargoIDs[mCurItemIndex], &item_acceptance, @@ -761,7 +761,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, LLInventoryObject* cargo = locateInventory(item, cat); if (cargo) { - handled = handled && root_view->handleDragAndDrop(x, y, mask, TRUE, + handled = handled && root_view->handleDragAndDrop(x, y, mask, true, mCargoTypes[mCurItemIndex], (void*)cargo, &item_acceptance, @@ -769,7 +769,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } else if (is_uuid_dragged) { - handled = handled && root_view->handleDragAndDrop(x, y, mask, TRUE, + handled = handled && root_view->handleDragAndDrop(x, y, mask, true, mCargoTypes[mCurItemIndex], (void*)&mCargoIDs[mCurItemIndex], &item_acceptance, @@ -805,18 +805,18 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } } -void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAcceptance* acceptance ) +void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, bool drop, EAcceptance* acceptance ) { mDrop = drop; if (mDrop) { // don't allow drag and drop onto rigged or transparent objects - pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE)); + pick(gViewerWindow->pickImmediate(x, y, false, false)); } else { // don't allow drag and drop onto transparent objects - gViewerWindow->pickAsync(x, y, mask, pickCallback, FALSE, FALSE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, false, false); } *acceptance = mLastAccept; @@ -899,7 +899,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) (U32)mLastAccept, (U32)callMemberFunction(*this, LLDragAndDropDictionary::instance().get(dad_type, target)) - (hit_obj, hit_face, pick_info.mKeyMask, FALSE)); + (hit_obj, hit_face, pick_info.mKeyMask, false)); } if (mDrop && ((U32)mLastAccept >= ACCEPT_YES_COPY_SINGLE)) @@ -914,7 +914,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) const EDragAndDropType dad_type = mCargoTypes[item_index]; // Call the right implementation function callMemberFunction(*this, LLDragAndDropDictionary::instance().get(dad_type, target)) - (hit_obj, hit_face, pick_info.mKeyMask, TRUE); + (hit_obj, hit_face, pick_info.mKeyMask, true); } } else @@ -945,12 +945,12 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) } // static -BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, +bool LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, LLInventoryItem* item, LLToolDragAndDrop::ESource source, const LLUUID& src_id) { - if (!item) return FALSE; + if (!item) return false; // Always succeed if.... // material is from the library @@ -958,7 +958,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, if (SOURCE_LIBRARY == source) { // dropping a material from the library always just works. - return TRUE; + return true; } // In case the inventory has not been loaded (e.g. due to some recent operation @@ -979,7 +979,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, args["ERROR_MESSAGE"] = "Unable to add texture.\nPlease wait a few seconds and try again."; } LLNotificationsUtil::add("ErrorMessage", args); - return FALSE; + return false; } // Make sure to verify both id and type since 'null' // is a shared default for some asset types. @@ -989,7 +989,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // then it can always be added to a side. // This saves some work if the task's inventory is already loaded // and ensures that the asset item is only added once. - return TRUE; + return true; } LLPointer new_item = new LLViewerInventoryItem(item); @@ -998,7 +998,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // Check that we can add the material as inventory to the object if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE ) { - return FALSE; + return false; } // make sure the object has the material in it's inventory. if (SOURCE_AGENT == source) @@ -1021,7 +1021,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, else { LL_WARNS() << "Unable to find source object." << LL_ENDL; - return FALSE; + return false; } } // Add the asset item to the target object's inventory. @@ -1047,7 +1047,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // Check that we can add the asset as inventory to the object if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE ) { - return FALSE; + return false; } // *FIX: may want to make sure agent can paint hit_obj. @@ -1074,7 +1074,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // Check that we can add the material as inventory to the object if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE ) { - return FALSE; + return false; } // *FIX: may want to make sure agent can paint hit_obj. @@ -1088,7 +1088,7 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // we should return false here. This will requre a separate listener // since without listener, we have no way to receive update } - return TRUE; + return true; } void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, @@ -1116,7 +1116,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, return; } LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if (!success) { return; @@ -1201,7 +1201,7 @@ void LLToolDragAndDrop::dropMaterialOneFace(LLViewerObject* hit_obj, // SL-20013 must save asset_id before handleDropMaterialProtections since our item instance // may be deleted if it is moved into task inventory LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if (!success) { return; @@ -1236,7 +1236,7 @@ void LLToolDragAndDrop::dropMaterialAllFaces(LLViewerObject* hit_obj, // SL-20013 must save asset_id before handleDropMaterialProtections since our item instance // may be deleted if it is moved into task inventory LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if (!success) { @@ -1267,7 +1267,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, return; } LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if(!success) { return; @@ -1275,7 +1275,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, LLSculptParams sculpt_params; sculpt_params.setSculptTexture(asset_id, LL_SCULPT_TYPE_MESH); - hit_obj->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, TRUE); + hit_obj->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, true); dialog_refresh_all(); } @@ -1373,7 +1373,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, return; } LLUUID asset_id = item->getAssetUUID(); - BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); + bool success = handleDropMaterialProtections(hit_obj, item, source, src_id); if (!success) { return; @@ -1436,7 +1436,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, LLInventoryItem* item, - BOOL active, + bool active, ESource source, const LLUUID& src_id) { @@ -1482,7 +1482,7 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, gFloaterTools->dirty(); // VEFFECT: SetScript - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(hit_obj); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -1491,9 +1491,9 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, } void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, - BOOL bypass_sim_raycast, - BOOL from_task_inventory, - BOOL remove_from_inventory) + bool bypass_sim_raycast, + bool from_task_inventory, + bool remove_from_inventory) { LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal(mLastHitPos); if (!regionp) @@ -1530,7 +1530,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, if (!remove_from_inventory && !item->getPermissions().allowCopyBy(gAgent.getID())) { - remove_from_inventory = TRUE; + remove_from_inventory = true; } // Limit raycast to a single object. @@ -1558,7 +1558,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, LLUUID source_id = from_task_inventory ? mSourceID : LLUUID::null; // Select the object only if we're editing. - BOOL rez_selected = LLToolMgr::getInstance()->inEdit(); + bool rez_selected = LLToolMgr::getInstance()->inEdit(); LLVector3 ray_start = regionp->getPosRegionFromGlobal(mLastCameraPos); @@ -1566,7 +1566,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, // currently the ray's end point is an approximation, // and is sometimes too short (causing failure.) so we // double the ray's length: - if (bypass_sim_raycast == FALSE) + if (bypass_sim_raycast == false) { LLVector3 ray_direction = ray_start - ray_end; ray_end = ray_end - ray_direction; @@ -1601,7 +1601,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, msg->addVector3Fast(_PREHASH_RayStart, ray_start); msg->addVector3Fast(_PREHASH_RayEnd, ray_end); msg->addUUIDFast(_PREHASH_RayTargetID, ray_target_id ); - msg->addBOOLFast(_PREHASH_RayEndIsIntersection, FALSE); + msg->addBOOLFast(_PREHASH_RayEndIsIntersection, false); msg->addBOOLFast(_PREHASH_RezSelected, rez_selected); msg->addBOOLFast(_PREHASH_RemoveItem, remove_from_inventory); @@ -1658,7 +1658,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, } // VEFFECT: DropObject - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setPositionGlobal(mLastHitPos); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -1721,7 +1721,7 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, } // VEFFECT: AddToInventory - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(hit_obj); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -1756,10 +1756,10 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL return ACCEPT_NO; } - //BOOL copy = (perm.allowCopyBy(gAgent.getID(), + //bool copy = (perm.allowCopyBy(gAgent.getID(), // gAgent.getGroupID()) // && (obj->mPermModify || obj->mFlagAllowInventoryAdd)); - BOOL worn = FALSE; + bool worn = false; LLVOAvatarSelf* my_avatar = NULL; switch(item->getType()) { @@ -1767,14 +1767,14 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL my_avatar = gAgentAvatarp; if(my_avatar && my_avatar->isWearingAttachment(item->getUUID())) { - worn = TRUE; + worn = true; } break; case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: if(gAgentWearables.isWearingItem(item->getUUID())) { - worn = TRUE; + worn = true; } break; case LLAssetType::AT_CALLINGCARD: @@ -1785,16 +1785,16 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL break; } const LLPermissions& perm = item->getPermissions(); - BOOL modify = (obj->permModify() || obj->flagAllowInventoryAdd()); - BOOL transfer = FALSE; + bool modify = (obj->permModify() || obj->flagAllowInventoryAdd()); + bool transfer = false; if((obj->permYouOwner() && (perm.getOwner() == gAgent.getID())) || perm.allowOperationBy(PERM_TRANSFER, gAgent.getID())) { - transfer = TRUE; + transfer = true; } - BOOL volume = (LL_PCODE_VOLUME == obj->getPCode()); - BOOL attached = obj->isAttachment(); - BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; + bool volume = (LL_PCODE_VOLUME == obj->getPCode()); + bool attached = obj->isAttachment(); + bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false; // [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.0c if (rlv_handler_t::isEnabled()) @@ -1846,7 +1846,7 @@ static void give_inventory_cb(const LLSD& notification, const LLSD& response) LLViewerInventoryCategory * inv_cat = gInventory.getCategory(payload["item_id"]); if (NULL == inv_item && NULL == inv_cat) { - llassert( FALSE ); + llassert( false ); return; } bool successfully_shared; @@ -1905,7 +1905,7 @@ static void get_name_cb(const LLUUID& id, // function used as drag-and-drop handler for simple agent give inventory requests //static -bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_id, BOOL drop, +bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_id, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, @@ -1991,7 +1991,7 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ break; } - return TRUE; + return true; } @@ -2001,14 +2001,14 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ /// EAcceptance LLToolDragAndDrop::dad3dNULL( - LLViewerObject*, S32, MASK, BOOL) + LLViewerObject*, S32, MASK, bool) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dNULL()" << LL_ENDL; return ACCEPT_NO; } EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << LL_ENDL; // must be in the user's inventory @@ -2083,7 +2083,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { // [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l // RELEASE-RLVa: [SL-2.2.0] Make sure the code below is the only code path to LLToolDragAndDrop::dad3dRezFromObjectOnLand() @@ -2111,21 +2111,21 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( } EAcceptance accept; - BOOL remove_inventory; + bool remove_inventory; // Get initial settings based on shift key if (mask & MASK_SHIFT) { // For now, always make copy //accept = ACCEPT_YES_SINGLE; - //remove_inventory = TRUE; + //remove_inventory = true; accept = ACCEPT_YES_COPY_SINGLE; - remove_inventory = FALSE; + remove_inventory = false; } else { accept = ACCEPT_YES_COPY_SINGLE; - remove_inventory = FALSE; + remove_inventory = false; } // check if the item can be copied. If not, send that to the sim @@ -2133,7 +2133,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( if(!item->getPermissions().allowCopyBy(gAgent.getID())) { accept = ACCEPT_YES_SINGLE; - remove_inventory = TRUE; + remove_inventory = true; } // Check if it's in the trash. @@ -2145,14 +2145,14 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( if(drop) { - dropObject(obj, TRUE, FALSE, remove_inventory); + dropObject(obj, true, false, remove_inventory); } return accept; } EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { // [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l // NOTE: if (mask & MASK_CONTROL) then it's a drop rather than a rez, so we let that pass through when @rez=n restricted @@ -2201,20 +2201,20 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( } EAcceptance accept; - BOOL remove_inventory; + bool remove_inventory; if (mask & MASK_SHIFT) { // For now, always make copy //accept = ACCEPT_YES_SINGLE; - //remove_inventory = TRUE; + //remove_inventory = true; accept = ACCEPT_YES_COPY_SINGLE; - remove_inventory = FALSE; + remove_inventory = false; } else { accept = ACCEPT_YES_COPY_SINGLE; - remove_inventory = FALSE; + remove_inventory = false; } // check if the item can be copied. If not, send that to the sim @@ -2222,7 +2222,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( if(!item->getPermissions().allowCopyBy(gAgent.getID())) { accept = ACCEPT_YES_SINGLE; - remove_inventory = TRUE; + remove_inventory = true; } // Check if it's in the trash. @@ -2230,19 +2230,19 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { accept = ACCEPT_YES_SINGLE; - remove_inventory = TRUE; + remove_inventory = true; } if(drop) { - dropObject(obj, FALSE, FALSE, remove_inventory); + dropObject(obj, false, false, remove_inventory); } return accept; } EAcceptance LLToolDragAndDrop::dad3dRezScript( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezScript()" << LL_ENDL; @@ -2262,7 +2262,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript( { // rez in the script active by default, rez in inactive if the // control key is being held down. - BOOL active = ((mask & MASK_CONTROL) == 0); + bool active = ((mask & MASK_CONTROL) == 0); LLViewerObject* root_object = obj; if (obj && obj->getParent()) @@ -2280,7 +2280,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript( } EAcceptance LLToolDragAndDrop::dad3dApplyToObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop, EDragAndDropType cargo_type) + LLViewerObject* obj, S32 face, MASK mask, bool drop, EDragAndDropType cargo_type) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dApplyToObject()" << LL_ENDL; @@ -2392,7 +2392,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject( } // VEFFECT: SetTexture - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(obj); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -2405,19 +2405,19 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject( EAcceptance LLToolDragAndDrop::dad3dTextureObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { return dad3dApplyToObject(obj, face, mask, drop, DAD_TEXTURE); } EAcceptance LLToolDragAndDrop::dad3dMaterialObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { return dad3dApplyToObject(obj, face, mask, drop, DAD_MATERIAL); } EAcceptance LLToolDragAndDrop::dad3dMeshObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { return dad3dApplyToObject(obj, face, mask, drop, DAD_MESH); } @@ -2425,7 +2425,7 @@ EAcceptance LLToolDragAndDrop::dad3dMeshObject( /* EAcceptance LLToolDragAndDrop::dad3dTextureSelf( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dTextureAvatar()" << LL_ENDL; if(drop) @@ -2440,7 +2440,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureSelf( */ EAcceptance LLToolDragAndDrop::dad3dWearItem( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearItem()" << LL_ENDL; LLViewerInventoryItem* item; @@ -2484,7 +2484,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( } EAcceptance LLToolDragAndDrop::dad3dActivateGesture( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dActivateGesture()" << LL_ENDL; LLViewerInventoryItem* item; @@ -2533,7 +2533,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture( } EAcceptance LLToolDragAndDrop::dad3dWearCategory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearCategory()" << LL_ENDL; LLViewerInventoryItem* item; @@ -2580,7 +2580,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( if(drop) { - BOOL append = ( (mask & MASK_SHIFT) ? TRUE : FALSE ); + bool append = ( (mask & MASK_SHIFT) ? true : false ); LLAppearanceMgr::instance().wearInventoryCategory(category, false, append); } return ACCEPT_YES_MULTI; @@ -2602,7 +2602,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( EAcceptance LLToolDragAndDrop::dad3dUpdateInventory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dadUpdateInventory()" << LL_ENDL; @@ -2635,14 +2635,14 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory( return rv; } -BOOL LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, BOOL drop) +bool LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, bool drop) { EAcceptance rv = dad3dUpdateInventory(obj, -1, MASK_NONE, drop); return (rv >= ACCEPT_YES_COPY_SINGLE); } EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << LL_ENDL; if (obj == NULL) @@ -2758,7 +2758,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( EAcceptance LLToolDragAndDrop::dad3dRezCategoryOnObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { if ((mask & MASK_CONTROL)) { @@ -2771,15 +2771,15 @@ EAcceptance LLToolDragAndDrop::dad3dRezCategoryOnObject( } -BOOL LLToolDragAndDrop::dadUpdateInventoryCategory(LLViewerObject* obj, - BOOL drop) +bool LLToolDragAndDrop::dadUpdateInventoryCategory(LLViewerObject* obj, + bool drop) { EAcceptance rv = dad3dUpdateInventoryCategory(obj, -1, MASK_NONE, drop); return (rv >= ACCEPT_YES_COPY_SINGLE); } EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << LL_ENDL; @@ -2823,7 +2823,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( EAcceptance LLToolDragAndDrop::dad3dGiveInventory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventory()" << LL_ENDL; // item has to be in agent inventory. @@ -2852,7 +2852,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory( } EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << LL_ENDL; // [RLVa:KB] - @share @@ -2876,7 +2876,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << LL_ENDL; LLViewerInventoryItem* item = NULL; @@ -2891,13 +2891,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( } if(drop) { - dropObject(obj, TRUE, TRUE, FALSE); + dropObject(obj, true, true, false); } return ACCEPT_YES_SINGLE; } EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( - LLViewerObject* obj, S32 face, MASK mask, BOOL drop) + LLViewerObject* obj, S32 face, MASK mask, bool drop) { LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << LL_ENDL; LLViewerInventoryItem* item; @@ -2926,13 +2926,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( } if(drop) { - dropObject(obj, FALSE, TRUE, FALSE); + dropObject(obj, false, true, false); } return ACCEPT_YES_SINGLE; } EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand( - LLViewerObject *obj, S32 face, MASK mask, BOOL drop) + LLViewerObject *obj, S32 face, MASK mask, bool drop) { return ACCEPT_NO; /* @@ -2970,7 +2970,7 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand( // This shortcuts alot of steps to make a basic object // w/ an inventory and a special permissions set EAcceptance LLToolDragAndDrop::dad3dAssetOnLand( - LLViewerObject *obj, S32 face, MASK mask, BOOL drop) + LLViewerObject *obj, S32 face, MASK mask, bool drop) { return ACCEPT_NO; /* diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 33fa20169a..f63e74a7a3 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -50,13 +50,13 @@ public: // overridden from LLTool virtual bool handleMouseUp(S32 x, S32 y, MASK mask); virtual bool handleHover(S32 x, S32 y, MASK mask); - virtual BOOL handleKey(KEY key, MASK mask); + virtual bool handleKey(KEY key, MASK mask); virtual bool handleToolTip(S32 x, S32 y, MASK mask); virtual void onMouseCaptureLost(); virtual void handleDeselect(); void setDragStart( S32 x, S32 y ); // In screen space - BOOL isOverThreshold( S32 x, S32 y ); // In screen space + bool isOverThreshold( S32 x, S32 y ); // In screen space enum ESource { @@ -92,9 +92,9 @@ public: static S32 getOperationId() { return sOperationId; } - // deal with permissions of object, etc. returns TRUE if drop can - // proceed, otherwise FALSE. - static BOOL handleDropMaterialProtections(LLViewerObject* hit_obj, + // deal with permissions of object, etc. returns true if drop can + // proceed, otherwise false. + static bool handleDropMaterialProtections(LLViewerObject* hit_obj, LLInventoryItem* item, LLToolDragAndDrop::ESource source, const LLUUID& src_id); @@ -112,14 +112,14 @@ protected: protected: // dragOrDrop3dImpl points to a member of LLToolDragAndDrop that - // takes parameters (LLViewerObject* obj, S32 face, MASK, BOOL - // drop) and returns a BOOL if drop is ok + // takes parameters (LLViewerObject* obj, S32 face, MASK, bool + // drop) and returns a bool if drop is ok typedef EAcceptance (LLToolDragAndDrop::*dragOrDrop3dImpl) - (LLViewerObject*, S32, MASK, BOOL); + (LLViewerObject*, S32, MASK, bool); - void dragOrDrop(S32 x, S32 y, MASK mask, BOOL drop, + void dragOrDrop(S32 x, S32 y, MASK mask, bool drop, EAcceptance* acceptance); - void dragOrDrop3D(S32 x, S32 y, MASK mask, BOOL drop, + void dragOrDrop3D(S32 x, S32 y, MASK mask, bool drop, EAcceptance* acceptance); static void pickCallback(const LLPickInfo& pick_info); @@ -146,7 +146,7 @@ protected: ECursorType mCursor; EAcceptance mLastAccept; - BOOL mDrop; + bool mDrop; S32 mCurItemIndex; std::string mToolTipMsg; std::string mCustomMsg; @@ -155,57 +155,57 @@ protected: protected: // 3d drop functions. these call down into the static functions - // named drop if drop is TRUE and permissions allow + // named drop if drop is true and permissions allow // that behavior. - EAcceptance dad3dNULL(LLViewerObject*, S32, MASK, BOOL); + EAcceptance dad3dNULL(LLViewerObject*, S32, MASK, bool); EAcceptance dad3dRezObjectOnLand(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dRezObjectOnObject(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dRezCategoryOnObject(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dRezScript(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dTextureObject(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dMaterialObject(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dMeshObject(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); // EAcceptance dad3dTextureSelf(LLViewerObject* obj, S32 face, -// MASK mask, BOOL drop); +// MASK mask, bool drop); EAcceptance dad3dWearItem(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dWearCategory(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dUpdateInventory(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dUpdateInventoryCategory(LLViewerObject* obj, S32 face, MASK mask, - BOOL drop); + bool drop); EAcceptance dad3dGiveInventoryObject(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dGiveInventory(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dGiveInventoryCategory(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dRezFromObjectOnLand(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dRezFromObjectOnObject(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dRezAttachmentFromInv(LLViewerObject* obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dCategoryOnLand(LLViewerObject *obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dAssetOnLand(LLViewerObject *obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); EAcceptance dad3dActivateGesture(LLViewerObject *obj, S32 face, - MASK mask, BOOL drop); + MASK mask, bool drop); // helper called by methods above to handle "application" of an item // to an object (texture applied to face, mesh applied to shape, etc.) - EAcceptance dad3dApplyToObject(LLViewerObject* obj, S32 face, MASK mask, BOOL drop, EDragAndDropType cargo_type); + EAcceptance dad3dApplyToObject(LLViewerObject* obj, S32 face, MASK mask, bool drop, EDragAndDropType cargo_type); // set the LLToolDragAndDrop's cursor based on the given acceptance @@ -222,9 +222,9 @@ protected: // LLViewerInventoryItem::item_array_t& items); void dropObject(LLViewerObject* raycast_target, - BOOL bypass_sim_raycast, - BOOL from_task_inventory, - BOOL remove_from_inventory); + bool bypass_sim_raycast, + bool from_task_inventory, + bool remove_from_inventory); // accessor that looks at permissions, copyability, and names of // inventory items to determine if a drop would be ok. @@ -232,15 +232,15 @@ protected: public: // helper functions - static BOOL isInventoryDropAcceptable(LLViewerObject* obj, LLInventoryItem* item) { return (ACCEPT_YES_COPY_SINGLE <= willObjectAcceptInventory(obj, item)); } + static bool isInventoryDropAcceptable(LLViewerObject* obj, LLInventoryItem* item) { return (ACCEPT_YES_COPY_SINGLE <= willObjectAcceptInventory(obj, item)); } - BOOL dadUpdateInventory(LLViewerObject* obj, BOOL drop); - BOOL dadUpdateInventoryCategory(LLViewerObject* obj, BOOL drop); + bool dadUpdateInventory(LLViewerObject* obj, bool drop); + bool dadUpdateInventoryCategory(LLViewerObject* obj, bool drop); // methods that act on the simulator state. static void dropScript(LLViewerObject* hit_obj, LLInventoryItem* item, - BOOL active, + bool active, ESource source, const LLUUID& src_id); static void dropTexture(LLViewerObject* hit_obj, @@ -288,7 +288,7 @@ public: ESource source, const LLUUID& src_id); - static bool handleGiveDragAndDrop(LLUUID agent, LLUUID session, BOOL drop, + static bool handleGiveDragAndDrop(LLUUID agent, LLUUID session, bool drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, diff --git a/indra/newview/lltoolface.cpp b/indra/newview/lltoolface.cpp index ece937e9be..0541f9925f 100644 --- a/indra/newview/lltoolface.cpp +++ b/indra/newview/lltoolface.cpp @@ -182,14 +182,14 @@ void LLToolFace::pickCallback(const LLPickInfo& pick_info) void LLToolFace::handleSelect() { // From now on, draw faces - LLSelectMgr::getInstance()->setTEMode(TRUE); + LLSelectMgr::getInstance()->setTEMode(true); } void LLToolFace::handleDeselect() { // Stop drawing faces - LLSelectMgr::getInstance()->setTEMode(FALSE); + LLSelectMgr::getInstance()->setTEMode(false); stopGrabbing(); // Add control to drag texture faces around } @@ -202,7 +202,7 @@ void LLToolFace::render() #ifdef TEXTURE_GRAB_UPDATE_REGULARLY static S32 updateCounter=0; - static BOOL teDirty=FALSE; + static bool teDirty=false; #endif // do nothing if no texture was grabbed or no associated object was found, or the object is no modify @@ -238,7 +238,7 @@ void LLToolFace::render() mTextureObject->getTE(mFaceGrabbed)->getScale(&scaleU,&scaleV); // get the status of modifier keys - MASK mask=gKeyboard->currentMask(FALSE); + MASK mask=gKeyboard->currentMask(false); // scale mode // if(mask & MASK_ALT) @@ -298,14 +298,14 @@ void LLToolFace::render() } #ifdef TEXTURE_GRAB_UPDATE_REGULARLY - teDirty=TRUE; + teDirty=true; updateCounter++; if(updateCounter==10) { mTextureObject->sendTEUpdate(); updateCounter=0; - teDirty=FALSE; + teDirty=false; } #endif // this is one way I would rather do it than tracking mouse deltas, because it @@ -314,7 +314,7 @@ void LLToolFace::render() S32 x=gViewerWindow->getCurrentMouseX(); S32 y=gViewerWindow->getCurrentMouseY(); - const LLPickInfo& pick=gViewerWindow->pickImmediate(x,y,TRUE); + const LLPickInfo& pick=gViewerWindow->pickImmediate(x,y,true); if(pick.getObjectID()!=LLToolFace::mTextureObject->getID() || pick.mObjectFace!=LLToolFace::mFaceGrabbed) { @@ -338,7 +338,7 @@ void LLToolFace::render() LLVector3 gDebugRaycastStart; LLVector3 gDebugRaycastEnd; - gDebugRaycastObject = gViewerWindow->cursorIntersect(x,y, 512.f, mTextureObject, mFaceGrabbed, FALSE, + gDebugRaycastObject = gViewerWindow->cursorIntersect(x,y, 512.f, mTextureObject, mFaceGrabbed, false, &gDebugRaycastFaceHit, &gDebugRaycastIntersection, &gDebugRaycastTexCoord, diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index 4476bad1a4..2ea0447f49 100644 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -57,9 +57,9 @@ #include "llmenugl.h" // Globals -BOOL gCameraBtnZoom = TRUE; -BOOL gCameraBtnOrbit = FALSE; -BOOL gCameraBtnPan = FALSE; +bool gCameraBtnZoom = true; +bool gCameraBtnOrbit = false; +bool gCameraBtnPan = false; const S32 SLOP_RANGE = 4; @@ -73,12 +73,12 @@ LLToolCamera::LLToolCamera() mAccumY(0), mMouseDownX(0), mMouseDownY(0), - mOutsideSlopX(FALSE), - mOutsideSlopY(FALSE), - mValidClickPoint(FALSE), + mOutsideSlopX(false), + mOutsideSlopY(false), + mValidClickPoint(false), mClickPickPending(false), - mValidSelection(FALSE), - mMouseSteering(FALSE), + mValidSelection(false), + mMouseSteering(false), mMouseUpX(0), mMouseUpY(0), mMouseUpMask(MASK_NONE) @@ -102,10 +102,10 @@ void LLToolCamera::handleSelect() // virtual void LLToolCamera::handleDeselect() { -// gAgent.setLookingAtAvatar(FALSE); +// gAgent.setLookingAtAvatar(false); // Make sure that temporary selection won't pass anywhere except pie tool. - MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0; + MASK override_mask = gKeyboard ? gKeyboard->currentMask(true) : 0; if (!mValidSelection && (override_mask != MASK_NONE || (gFloaterTools && gFloaterTools->getVisible()))) { LLMenuGL::sMenuContainer->hideMenus(); @@ -116,7 +116,7 @@ void LLToolCamera::handleDeselect() bool LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) { // Ensure a mouseup - setMouseCapture(TRUE); + setMouseCapture(true); // call the base class to propogate info to sim LLTool::handleMouseDown(x, y, mask); @@ -124,10 +124,10 @@ bool LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) mAccumX = 0; mAccumY = 0; - mOutsideSlopX = FALSE; - mOutsideSlopY = FALSE; + mOutsideSlopX = false; + mOutsideSlopY = false; - mValidClickPoint = FALSE; + mValidClickPoint = false; // Sometimes Windows issues down and up events near simultaneously // without giving async pick a chance to trigged @@ -142,7 +142,7 @@ bool LLToolCamera::handleMouseDown(S32 x, S32 y, MASK mask) gViewerWindow->hideCursor(); - gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, /*BOOL pick_rigged*/ FALSE, /*BOOL pick_unselectable*/ TRUE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, /*bool pick_transparent*/ false, /*bool pick_rigged*/ false, /*bool pick_unselectable*/ true); return true; } @@ -167,7 +167,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) // Check for hit the sky, or some other invalid point if (!hit_obj && pick_info.mPosGlobal.isExactlyZero()) { - camera->mValidClickPoint = FALSE; + camera->mValidClickPoint = false; return; } @@ -177,37 +177,37 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); if (!selection->getObjectCount() || selection->getSelectType() != SELECT_TYPE_HUD) { - camera->mValidClickPoint = FALSE; + camera->mValidClickPoint = false; return; } } if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { - BOOL good_customize_avatar_hit = FALSE; + bool good_customize_avatar_hit = false; if( hit_obj ) { if (isAgentAvatarValid() && (hit_obj == gAgentAvatarp)) { // It's you - good_customize_avatar_hit = TRUE; + good_customize_avatar_hit = true; } else if (hit_obj->isAttachment() && hit_obj->permYouOwner()) { // It's an attachment that you're wearing - good_customize_avatar_hit = TRUE; + good_customize_avatar_hit = true; } } if( !good_customize_avatar_hit ) { - camera->mValidClickPoint = FALSE; + camera->mValidClickPoint = false; return; } if( gMorphView ) { - gMorphView->setCameraDrivenByKeys( FALSE ); + gMorphView->setCameraDrivenByKeys( false ); } } //RN: check to see if this is mouse-driving as opposed to ALT-zoom or Focus tool @@ -220,18 +220,18 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) // ...clicked on a world object, so focus at its position if (!hit_obj->isHUDAttachment()) { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(pick_info); } } else if (!pick_info.mPosGlobal.isExactlyZero()) { // Hit the ground - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(pick_info); } - BOOL zoom_tool = gCameraBtnZoom && (LLToolMgr::getInstance()->getBaseTool() == LLToolCamera::getInstance()); + bool zoom_tool = gCameraBtnZoom && (LLToolMgr::getInstance()->getBaseTool() == LLToolCamera::getInstance()); // Replace frequently called gSavedSettings static LLCachedControl sFreezeTime(gSavedSettings, "FreezeTime"); // @@ -247,16 +247,16 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) (hit_obj == gAgentAvatarp || (hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf()))) { - LLToolCamera::getInstance()->mMouseSteering = TRUE; + LLToolCamera::getInstance()->mMouseSteering = true; } } - camera->mValidClickPoint = TRUE; + camera->mValidClickPoint = true; if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { - gAgentCamera.setFocusOnAvatar(FALSE, FALSE); + gAgentCamera.setFocusOnAvatar(false, false); LLVector3d cam_pos = gAgentCamera.getCameraPositionGlobal(); @@ -283,10 +283,10 @@ void LLToolCamera::releaseMouse() LLToolMgr::getInstance()->clearTransientTool(); } - mMouseSteering = FALSE; - mValidClickPoint = FALSE; - mOutsideSlopX = FALSE; - mOutsideSlopY = FALSE; + mMouseSteering = false; + mValidClickPoint = false; + mOutsideSlopX = false; + mOutsideSlopY = false; } @@ -308,7 +308,7 @@ bool LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask) { LLCoordGL mouse_pos; LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgentCamera.getFocusGlobal()); - BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos); + bool success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos); if (success) { LLUI::getInstance()->setMousePositionScreen(mouse_pos.mX, mouse_pos.mY); @@ -331,7 +331,7 @@ bool LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask) } // calls releaseMouse() internally - setMouseCapture(FALSE); + setMouseCapture(false); } else { @@ -362,12 +362,12 @@ bool LLToolCamera::handleHover(S32 x, S32 y, MASK mask) if (mAccumX >= SLOP_RANGE) { - mOutsideSlopX = TRUE; + mOutsideSlopX = true; } if (mAccumY >= SLOP_RANGE) { - mOutsideSlopY = TRUE; + mOutsideSlopY = true; } } @@ -378,7 +378,7 @@ bool LLToolCamera::handleHover(S32 x, S32 y, MASK mask) LL_DEBUGS("UserInput") << "hover handled by LLToolFocus [invalid point]" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_NO); gViewerWindow->showCursor(); - return TRUE; + return true; } if (gCameraBtnOrbit || diff --git a/indra/newview/lltoolfocus.h b/indra/newview/lltoolfocus.h index 17b4095ea3..a0b9cc9e92 100644 --- a/indra/newview/lltoolfocus.h +++ b/indra/newview/lltoolfocus.h @@ -53,7 +53,7 @@ public: void setClickPickPending() { mClickPickPending = true; } static void pickCallback(const LLPickInfo& pick_info); - BOOL mouseSteerMode() { return mMouseSteering; } + bool mouseSteerMode() { return mMouseSteering; } protected: // called from handleMouseUp and onMouseCaptureLost to "let go" @@ -65,20 +65,20 @@ protected: S32 mAccumY; S32 mMouseDownX; S32 mMouseDownY; - BOOL mOutsideSlopX; - BOOL mOutsideSlopY; - BOOL mValidClickPoint; + bool mOutsideSlopX; + bool mOutsideSlopY; + bool mValidClickPoint; bool mClickPickPending; - BOOL mValidSelection; - BOOL mMouseSteering; + bool mValidSelection; + bool mMouseSteering; S32 mMouseUpX; // needed for releaseMouse() S32 mMouseUpY; MASK mMouseUpMask; }; -extern BOOL gCameraBtnOrbit; -extern BOOL gCameraBtnPan; -extern BOOL gCameraBtnZoom; +extern bool gCameraBtnOrbit; +extern bool gCameraBtnPan; +extern bool gCameraBtnZoom; #endif diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index bbc760314a..5c33b2a1b0 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -65,8 +65,8 @@ const S32 SLOP_DIST_SQ = 4; // Override modifier key behavior with these buttons -BOOL gGrabBtnVertical = FALSE; -BOOL gGrabBtnSpin = FALSE; +bool gGrabBtnVertical = false; +bool gGrabBtnSpin = false; LLTool* gGrabTransientTool = NULL; extern bool gDebugClicks; @@ -76,20 +76,20 @@ extern bool gDebugClicks; LLToolGrabBase::LLToolGrabBase( LLToolComposite* composite ) : LLTool( std::string("Grab"), composite ), mMode( GRAB_INACTIVE ), - mVerticalDragging( FALSE ), - mHitLand(FALSE), + mVerticalDragging( false ), + mHitLand(false), mLastMouseX(0), mLastMouseY(0), mAccumDeltaX(0), mAccumDeltaY(0), - mHasMoved( FALSE ), - mOutsideSlop(FALSE), - mDeselectedThisClick(FALSE), + mHasMoved( false ), + mOutsideSlop(false), + mDeselectedThisClick(false), mLastFace(0), - mSpinGrabbing( FALSE ), + mSpinGrabbing( false ), mSpinRotation(), - mClickedInMouselook( FALSE ), - mHideBuildHighlight(FALSE) + mClickedInMouselook( false ), + mHideBuildHighlight(false) { } LLToolGrabBase::~LLToolGrabBase() @@ -106,19 +106,19 @@ void LLToolGrabBase::handleSelect() // in case we start from tools floater, we count any selection as valid mValidSelection = gFloaterTools->getVisible(); } - gGrabBtnVertical = FALSE; - gGrabBtnSpin = FALSE; + gGrabBtnVertical = false; + gGrabBtnSpin = false; } void LLToolGrabBase::handleDeselect() { if( hasMouseCapture() ) { - setMouseCapture( FALSE ); + setMouseCapture( false ); } // Make sure that temporary(invalid) selection won't pass anywhere except pie tool. - MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0; + MASK override_mask = gKeyboard ? gKeyboard->currentMask(true) : 0; if (!mValidSelection && (override_mask != MASK_NONE || (gFloaterTools && gFloaterTools->getVisible()))) { LLMenuGL::sMenuContainer->hideMenus(); @@ -150,7 +150,7 @@ bool LLToolGrabBase::handleMouseDown(S32 x, S32 y, MASK mask) if (!gAgent.leftButtonGrabbed() || ((mask & DEFAULT_GRAB_MASK) != 0 && !gAgentCamera.cameraMouselook())) { // can grab transparent objects (how touch event propagates, scripters rely on this) - gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE); + gViewerWindow->pickAsync(x, y, mask, pickCallback, /*bool pick_transparent*/ true); } mClickedInMouselook = gAgentCamera.cameraMouselook(); @@ -174,16 +174,16 @@ void LLToolGrabBase::pickCallback(const LLPickInfo& pick_info) LLToolGrab::getInstance()->mGrabPick = pick_info; LLViewerObject *objectp = pick_info.getObject(); - BOOL extend_select = (pick_info.mKeyMask & MASK_SHIFT); + bool extend_select = (pick_info.mKeyMask & MASK_SHIFT); if (!extend_select && !LLSelectMgr::getInstance()->getSelection()->isEmpty()) { LLSelectMgr::getInstance()->deselectAll(); - LLToolGrab::getInstance()->mDeselectedThisClick = TRUE; + LLToolGrab::getInstance()->mDeselectedThisClick = true; } else { - LLToolGrab::getInstance()->mDeselectedThisClick = FALSE; + LLToolGrab::getInstance()->mDeselectedThisClick = false; } // if not over object, do nothing @@ -193,7 +193,7 @@ void LLToolGrabBase::pickCallback(const LLPickInfo& pick_info) if ( (!objectp) || ((RlvActions::isRlvEnabled()) && (!RlvActions::canTouch(objectp, pick_info.mObjectOffset))) ) // [/RLVa:KB] { - LLToolGrab::getInstance()->setMouseCapture(TRUE); + LLToolGrab::getInstance()->setMouseCapture(true); LLToolGrab::getInstance()->mMode = GRAB_NOOBJECT; LLToolGrab::getInstance()->mGrabPick.mObjectID.setNull(); } @@ -203,7 +203,7 @@ void LLToolGrabBase::pickCallback(const LLPickInfo& pick_info) } } -BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info) +bool LLToolGrabBase::handleObjectHit(const LLPickInfo& info) { mGrabPick = info; LLViewerObject* objectp = mGrabPick.getObject(); @@ -215,8 +215,8 @@ BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info) if (NULL == objectp) // unexpected { - LL_WARNS() << "objectp was NULL; returning FALSE" << LL_ENDL; - return FALSE; + LL_WARNS() << "objectp was NULL; returning false" << LL_ENDL; + return false; } if (objectp->isAvatar()) @@ -226,16 +226,16 @@ BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info) gBasicToolset->selectTool( gGrabTransientTool ); gGrabTransientTool = NULL; } - return TRUE; + return true; } - setMouseCapture( TRUE ); + setMouseCapture( true ); // Grabs always start from the root // objectp = (LLViewerObject *)objectp->getRoot(); LLViewerObject* parent = objectp->getRootEdit(); - BOOL script_touch = (objectp->flagHandleTouch()) || (parent && parent->flagHandleTouch()); + bool script_touch = (objectp->flagHandleTouch()) || (parent && parent->flagHandleTouch()); // Clicks on scripted or physical objects are temporary grabs, so // not "Build mode" @@ -298,8 +298,8 @@ BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info) mLastMouseY = gViewerWindow->getCurrentMouseY(); mAccumDeltaX = 0; mAccumDeltaY = 0; - mHasMoved = FALSE; - mOutsideSlop = FALSE; + mHasMoved = false; + mOutsideSlop = false; mVerticalDragging = (info.mKeyMask == MASK_VERTICAL) || gGrabBtnVertical; @@ -332,7 +332,7 @@ BOOL LLToolGrabBase::handleObjectHit(const LLPickInfo& info) gGrabTransientTool = NULL; } - return TRUE; + return true; } @@ -343,7 +343,7 @@ void LLToolGrabBase::startSpin() { return; } - mSpinGrabbing = TRUE; + mSpinGrabbing = true; // Was saveSelectedObjectTransform() LLViewerObject *root = (LLViewerObject *)objectp->getRoot(); @@ -362,7 +362,7 @@ void LLToolGrabBase::startSpin() void LLToolGrabBase::stopSpin() { - mSpinGrabbing = FALSE; + mSpinGrabbing = false; LLViewerObject* objectp = mGrabPick.getObject(); if (!objectp) @@ -448,7 +448,7 @@ bool LLToolGrabBase::handleHover(S32 x, S32 y, MASK mask) if (!gViewerWindow->getLeftMouseDown()) { gViewerWindow->setCursor(UI_CURSOR_TOOLGRAB); - setMouseCapture(FALSE); + setMouseCapture(false); return true; } @@ -462,8 +462,8 @@ bool LLToolGrabBase::handleHover(S32 x, S32 y, MASK mask) gBasicToolset->selectTool(gGrabTransientTool); gGrabTransientTool = NULL; } - setMouseCapture(FALSE); - return TRUE; + setMouseCapture(false); + return true; } // [/RLVa:KB] @@ -509,7 +509,7 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask) if (objectp->isDead()) { // Bail out of drag because object has been killed - setMouseCapture(FALSE); + setMouseCapture(false); return; } @@ -521,12 +521,12 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask) if ((mask == MASK_VERTICAL) || (gGrabBtnVertical && (mask != MASK_SPIN))) { - vertical_dragging = TRUE; + vertical_dragging = true; } else if ((mask == MASK_SPIN) || (gGrabBtnSpin && (mask != MASK_VERTICAL))) { - spin_grabbing = TRUE; + spin_grabbing = true; } //-------------------------------------------------- @@ -574,11 +574,11 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask) S32 dist_sq = mAccumDeltaX * mAccumDeltaX + mAccumDeltaY * mAccumDeltaY; if (dist_sq > SLOP_DIST_SQ) { - mOutsideSlop = TRUE; + mOutsideSlop = true; } // mouse has moved outside center - mHasMoved = TRUE; + mHasMoved = true; if (mSpinGrabbing) { @@ -650,7 +650,7 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask) /* Snap to grid disabled for grab tool - very confusing // Handle snapping to grid, but only when the tool is formally selected. - BOOL snap_on = gSavedSettings.getBOOL("SnapEnabled"); + bool snap_on = gSavedSettings.getBOOL("SnapEnabled"); if (snap_on && !gGrabTransientTool) { F64 snap_size = gSavedSettings.getF32("GridResolution"); @@ -768,7 +768,7 @@ void LLToolGrabBase::handleHoverActive(S32 x, S32 y, MASK mask) // force focus to point in space where we were looking previously // Example of use: follow cam scripts shouldn't affect you when movng objects arouns gAgentCamera.setFocusGlobal(gAgentCamera.calcFocusPositionTargetGlobal(), LLUUID::null); - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); } } else @@ -791,7 +791,7 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask) if (objectp->isDead()) { // Bail out of drag because object has been killed - setMouseCapture(FALSE); + setMouseCapture(false); return; } @@ -809,7 +809,7 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask) LLVector3 grab_pos_region(0,0,0); - const BOOL SUPPORT_LLDETECTED_GRAB = TRUE; + const bool SUPPORT_LLDETECTED_GRAB = true; if (SUPPORT_LLDETECTED_GRAB) { //-------------------------------------------------- @@ -817,13 +817,13 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask) //-------------------------------------------------- if (!(mask == MASK_VERTICAL) && !gGrabBtnVertical) { - mVerticalDragging = FALSE; + mVerticalDragging = false; } else if ((gGrabBtnVertical && (mask != MASK_SPIN)) || (mask == MASK_VERTICAL)) { - mVerticalDragging = TRUE; + mVerticalDragging = true; } S32 dx = x - mLastMouseX; @@ -837,11 +837,11 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask) S32 dist_sq = mAccumDeltaX * mAccumDeltaX + mAccumDeltaY * mAccumDeltaY; if (dist_sq > SLOP_DIST_SQ) { - mOutsideSlop = TRUE; + mOutsideSlop = true; } // mouse has moved - mHasMoved = TRUE; + mHasMoved = true; //------------------------------------------------------ // Handle grabbing @@ -880,7 +880,7 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask) // only send message if something has changed since last message - BOOL changed_since_last_update = FALSE; + bool changed_since_last_update = false; // test if touch data needs to be updated if ((pick.mObjectFace != mLastFace) || @@ -891,7 +891,7 @@ void LLToolGrabBase::handleHoverNonPhysical(S32 x, S32 y, MASK mask) (pick.mBinormal != mLastBinormal) || (grab_pos_region != mLastGrabPos)) { - changed_since_last_update = TRUE; + changed_since_last_update = true; } if (changed_since_last_update) @@ -962,7 +962,7 @@ void LLToolGrabBase::handleHoverFailed(S32 x, S32 y, MASK mask) S32 dist_sq = (x-mGrabPick.mMousePt.mX) * (x-mGrabPick.mMousePt.mX) + (y-mGrabPick.mMousePt.mY) * (y-mGrabPick.mMousePt.mY); if( mOutsideSlop || dist_sq > SLOP_DIST_SQ ) { - mOutsideSlop = TRUE; + mOutsideSlop = true; switch( mMode ) { @@ -1007,7 +1007,7 @@ bool LLToolGrabBase::handleMouseUp(S32 x, S32 y, MASK mask) if( hasMouseCapture() ) { - setMouseCapture( FALSE ); + setMouseCapture( false ); } mMode = GRAB_INACTIVE; @@ -1015,7 +1015,7 @@ bool LLToolGrabBase::handleMouseUp(S32 x, S32 y, MASK mask) // FIRE-15578: After exiting mouselook, left clicking on a touchable object opens build floater //if(mClickedInMouselook && !gAgentCamera.cameraMouselook()) //{ - // mClickedInMouselook = FALSE; + // mClickedInMouselook = false; //} //else // @@ -1030,7 +1030,7 @@ bool LLToolGrabBase::handleMouseUp(S32 x, S32 y, MASK mask) } } // FIRE-15578: After exiting mouselook, left clicking on a touchable object opens build floater - mClickedInMouselook = FALSE; + mClickedInMouselook = false; //gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject")); @@ -1041,7 +1041,7 @@ void LLToolGrabBase::stopEditing() { if( hasMouseCapture() ) { - setMouseCapture( FALSE ); + setMouseCapture( false ); } } @@ -1090,7 +1090,7 @@ void LLToolGrabBase::onMouseCaptureLost() mMode = GRAB_INACTIVE; - mHideBuildHighlight = FALSE; + mHideBuildHighlight = false; mGrabPick.mObjectID.setNull(); @@ -1129,7 +1129,7 @@ void LLToolGrabBase::stopGrab() case GRAB_NONPHYSICAL: case GRAB_LOCKED: send_ObjectDeGrab_message(objectp, pick); - mVerticalDragging = FALSE; + mVerticalDragging = false; break; case GRAB_NOOBJECT: @@ -1139,7 +1139,7 @@ void LLToolGrabBase::stopGrab() break; } - mHideBuildHighlight = FALSE; + mHideBuildHighlight = false; } @@ -1149,7 +1149,7 @@ void LLToolGrabBase::draw() void LLToolGrabBase::render() { } -BOOL LLToolGrabBase::isEditing() +bool LLToolGrabBase::isEditing() { return (mGrabPick.getObject().notNull()); } diff --git a/indra/newview/lltoolgrab.h b/indra/newview/lltoolgrab.h index 4362b4c25c..99a67d45c8 100644 --- a/indra/newview/lltoolgrab.h +++ b/indra/newview/lltoolgrab.h @@ -70,21 +70,21 @@ public: virtual LLViewerObject* getEditingObject(); virtual LLVector3d getEditingPointGlobal(); - virtual BOOL isEditing(); + virtual bool isEditing(); virtual void stopEditing(); virtual void onMouseCaptureLost(); - BOOL hasGrabOffset() { return TRUE; } // HACK + bool hasGrabOffset() { return true; } // HACK LLVector3 getGrabOffset(S32 x, S32 y); // HACK // Capture the mouse and start grabbing. - BOOL handleObjectHit(const LLPickInfo& info); + bool handleObjectHit(const LLPickInfo& info); // Certain grabs should not highlight the "Build" toolbar button - BOOL getHideBuildHighlight() { return mHideBuildHighlight; } + bool getHideBuildHighlight() { return mHideBuildHighlight; } - void setClickedInMouselook(BOOL is_clickedInMouselook) {mClickedInMouselook = is_clickedInMouselook;} + void setClickedInMouselook(bool is_clickedInMouselook) {mClickedInMouselook = is_clickedInMouselook;} static void pickCallback(const LLPickInfo& pick_info); private: @@ -106,9 +106,9 @@ private: EGrabMode mMode; - BOOL mVerticalDragging; + bool mVerticalDragging; - BOOL mHitLand; + bool mHitLand; LLTimer mGrabTimer; // send simulator time between hover movements @@ -124,10 +124,10 @@ private: S32 mLastMouseY; S32 mAccumDeltaX; // since cursor hidden, how far have you moved? S32 mAccumDeltaY; - BOOL mHasMoved; // has mouse moved off center at all? - BOOL mOutsideSlop; // has mouse moved outside center 5 pixels? - BOOL mDeselectedThisClick; - BOOL mValidSelection; + bool mHasMoved; // has mouse moved off center at all? + bool mOutsideSlop; // has mouse moved outside center 5 pixels? + bool mDeselectedThisClick; + bool mValidSelection; S32 mLastFace; LLVector2 mLastUVCoords; @@ -138,12 +138,12 @@ private: LLVector3 mLastGrabPos; - BOOL mSpinGrabbing; + bool mSpinGrabbing; LLQuaternion mSpinRotation; - BOOL mHideBuildHighlight; + bool mHideBuildHighlight; - BOOL mClickedInMouselook; + bool mClickedInMouselook; }; /// This is the LLSingleton instance of LLToolGrab. @@ -152,8 +152,8 @@ class LLToolGrab : public LLToolGrabBase, public LLSingleton LLSINGLETON_EMPTY_CTOR(LLToolGrab); }; -extern BOOL gGrabBtnVertical; -extern BOOL gGrabBtnSpin; +extern bool gGrabBtnVertical; +extern bool gGrabBtnSpin; extern LLTool* gGrabTransientTool; #endif // LL_TOOLGRAB_H diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index 1a597870e5..f9522a5b05 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -51,7 +51,7 @@ LLToolGun::LLToolGun( LLToolComposite* composite ) : LLTool( std::string("gun"), composite ), - mIsSelected(FALSE) + mIsSelected(false) { // Performance tweak mCrosshairp = LLUI::getUIImage("crosshairs.tga"); @@ -65,8 +65,8 @@ void LLToolGun::handleSelect() // [/RLVa:KB] gViewerWindow->hideCursor(); gViewerWindow->moveCursorToCenter(); - gViewerWindow->getWindow()->setMouseClipping(TRUE); - mIsSelected = TRUE; + gViewerWindow->getWindow()->setMouseClipping(true); + mIsSelected = true; // [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10) } // [/RLVa:KB] @@ -76,8 +76,8 @@ void LLToolGun::handleDeselect() { gViewerWindow->moveCursorToCenter(); gViewerWindow->showCursor(); - gViewerWindow->getWindow()->setMouseClipping(FALSE); - mIsSelected = FALSE; + gViewerWindow->getWindow()->setMouseClipping(false); + mIsSelected = false; } bool LLToolGun::handleMouseDown(S32 x, S32 y, MASK mask) diff --git a/indra/newview/lltoolgun.h b/indra/newview/lltoolgun.h index a18e2afde9..b8d866b388 100644 --- a/indra/newview/lltoolgun.h +++ b/indra/newview/lltoolgun.h @@ -45,9 +45,9 @@ public: virtual bool handleHover(S32 x, S32 y, MASK mask); virtual LLTool* getOverrideTool(MASK mask) { return NULL; } - virtual BOOL clipMouseWhenDown() { return FALSE; } + virtual bool clipMouseWhenDown() { return false; } private: - BOOL mIsSelected; + bool mIsSelected; // Performance tweak LLUIImagePtr mCrosshairp; diff --git a/indra/newview/lltoolindividual.cpp b/indra/newview/lltoolindividual.cpp index c637427bc7..bf31f77f49 100644 --- a/indra/newview/lltoolindividual.cpp +++ b/indra/newview/lltoolindividual.cpp @@ -101,7 +101,7 @@ bool LLToolIndividual::handleDoubleClick(S32 x, S32 y, MASK mask) void LLToolIndividual::handleSelect() { - const BOOL children_ok = TRUE; + const bool children_ok = true; LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); LLSelectMgr::getInstance()->deselectAll(); if(obj) diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index 7fea202ee0..33e5e2f530 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -105,12 +105,12 @@ LLToolMgr::LLToolMgr() void LLToolMgr::initTools() { - static BOOL initialized = FALSE; + static bool initialized = false; if(initialized) { return; } - initialized = TRUE; + initialized = true; gBasicToolset->addTool( LLToolPie::getInstance() ); gBasicToolset->addTool( LLToolCamera::getInstance() ); gCameraToolset->addTool( LLToolCamera::getInstance() ); @@ -146,9 +146,9 @@ LLToolMgr::~LLToolMgr() gToolNull = NULL; } -BOOL LLToolMgr::usingTransientTool() +bool LLToolMgr::usingTransientTool() { - return mTransientTool ? TRUE : FALSE; + return mTransientTool ? true : false; } void LLToolMgr::setCurrentToolset(LLToolset* current) @@ -191,7 +191,7 @@ void LLToolMgr::setCurrentTool( LLTool* tool ) LLTool* LLToolMgr::getCurrentTool() { - MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0; + MASK override_mask = gKeyboard ? gKeyboard->currentMask(true) : 0; LLTool* cur_tool = NULL; // always use transient tools if available @@ -333,7 +333,7 @@ void LLToolMgr::enterBuildMode(bool verify_canedit /*=false*/) if (gAgentCamera.getFocusOnAvatar()) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis())); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); @@ -504,7 +504,7 @@ void LLToolset::selectToolByIndex( S32 index ) } } -BOOL LLToolset::isToolSelected( S32 index ) +bool LLToolset::isToolSelected( S32 index ) { LLTool *tool = (index >= 0 && index < (S32)mToolList.size()) ? mToolList[index] : NULL; return (tool == mSelectedTool); diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h index d5ec645949..cba10b438f 100644 --- a/indra/newview/lltoolmgr.h +++ b/indra/newview/lltoolmgr.h @@ -68,7 +68,7 @@ public: void setTransientTool(LLTool* tool); void clearTransientTool(); - BOOL usingTransientTool(); + bool usingTransientTool(); void setCurrentToolset(LLToolset* current); LLToolset* getCurrentToolset(); @@ -110,7 +110,7 @@ public: void handleScrollWheel(S32 clicks); - BOOL isToolSelected( S32 index ); + bool isToolSelected( S32 index ); void setShowFloaterTools(bool pShowFloaterTools) {mIsShowFloaterTools = pShowFloaterTools;}; bool isShowFloaterTools() const {return mIsShowFloaterTools;}; diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index c566ec8448..e0ffb157c1 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -62,7 +62,7 @@ //static LLVisualParamHint::instance_list_t LLVisualParamHint::sInstances; -BOOL LLVisualParamReset::sDirty = FALSE; +bool LLVisualParamReset::sDirty = false; //----------------------------------------------------------------------------- // LLVisualParamHint() @@ -78,14 +78,14 @@ LLVisualParamHint::LLVisualParamHint( F32 param_weight, LLJoint* jointp) : - LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, TRUE ), - mNeedsUpdate( TRUE ), - mIsVisible( FALSE ), + LLViewerDynamicTexture(width, height, 3, LLViewerDynamicTexture::ORDER_MIDDLE, true ), + mNeedsUpdate( true ), + mIsVisible( false ), mJointMesh( mesh ), mVisualParam( param ), mWearablePtr( wearable ), mVisualParamWeight( param_weight ), - mAllowsUpdates( TRUE ), + mAllowsUpdates( true ), mDelayFrames( 0 ), mRect( pos_x, pos_y + height, pos_x + width, pos_y ), mLastParamWeight(0.f), @@ -128,30 +128,30 @@ void LLVisualParamHint::requestHintUpdates( LLVisualParamHint* exception1, LLVis { if( instance->mAllowsUpdates ) { - instance->mNeedsUpdate = TRUE; + instance->mNeedsUpdate = true; instance->mDelayFrames = delay_frames; delay_frames++; } else { - instance->mNeedsUpdate = TRUE; + instance->mNeedsUpdate = true; instance->mDelayFrames = 0; } } } } -BOOL LLVisualParamHint::needsRender() +bool LLVisualParamHint::needsRender() { return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgentAvatarp->getIsAppearanceAnimating() && mAllowsUpdates; } -void LLVisualParamHint::preRender(BOOL clear_depth) +void LLVisualParamHint::preRender(bool clear_depth) { LLViewerWearable* wearable = (LLViewerWearable*)mWearablePtr; if (wearable) { - wearable->setVolatile(TRUE); + wearable->setVolatile(true); } mLastParamWeight = mVisualParam->getWeight(); // [Legacy Bake] @@ -183,9 +183,9 @@ void LLVisualParamHint::preRender(BOOL clear_depth) //----------------------------------------------------------------------------- // render() //----------------------------------------------------------------------------- -BOOL LLVisualParamHint::render() +bool LLVisualParamHint::render() { - LLVisualParamReset::sDirty = TRUE; + LLVisualParamReset::sDirty = true; gGL.pushUIMatrix(); gGL.loadUIIdentity(); @@ -202,7 +202,7 @@ BOOL LLVisualParamHint::render() gUIProgram.bind(); LLGLSUIDefault gls_ui; - //LLGLState::verify(TRUE); + //LLGLState::verify(true); mBackgroundp->draw(0, 0, mFullWidth, mFullHeight); gGL.matrixMode(LLRender::MM_PROJECTION); @@ -211,8 +211,8 @@ BOOL LLVisualParamHint::render() gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.popMatrix(); - mNeedsUpdate = FALSE; - mIsVisible = TRUE; + mNeedsUpdate = false; + mIsVisible = true; LLQuaternion avatar_rotation; LLJoint* root_joint = gAgentAvatarp->getRootJoint(); @@ -241,7 +241,7 @@ BOOL LLVisualParamHint::render() LLVector3::z_axis, // up target_pos ); // point of interest - LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE); + LLViewerCamera::getInstance()->setPerspective(false, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, false); if (gAgentAvatarp->mDrawable.notNull()) { @@ -260,7 +260,7 @@ BOOL LLVisualParamHint::render() LLViewerWearable* wearable = (LLViewerWearable*)mWearablePtr; if (wearable) { - wearable->setVolatile(FALSE); + wearable->setVolatile(false); } gAgentAvatarp->updateVisualParams(); @@ -268,7 +268,7 @@ BOOL LLVisualParamHint::render() mGLTexturep->setGLTextureCreated(true); gGL.popUIMatrix(); - return TRUE; + return true; } @@ -322,7 +322,7 @@ void LLVisualParamHint::draw(F32 alpha) //----------------------------------------------------------------------------- // LLVisualParamReset() //----------------------------------------------------------------------------- -LLVisualParamReset::LLVisualParamReset() : LLViewerDynamicTexture(1, 1, 1, ORDER_RESET, FALSE) +LLVisualParamReset::LLVisualParamReset() : LLViewerDynamicTexture(1, 1, 1, ORDER_RESET, false) { } @@ -335,15 +335,15 @@ S8 LLVisualParamReset::getType() const //----------------------------------------------------------------------------- // render() //----------------------------------------------------------------------------- -BOOL LLVisualParamReset::render() +bool LLVisualParamReset::render() { if (sDirty) { gAgentAvatarp->updateComposites(); gAgentAvatarp->updateVisualParams(); gAgentAvatarp->updateGeometry(gAgentAvatarp->mDrawable); - sDirty = FALSE; + sDirty = false; } - return FALSE; + return false; } diff --git a/indra/newview/lltoolmorph.h b/indra/newview/lltoolmorph.h index a6889be151..7bcb8b4e02 100644 --- a/indra/newview/lltoolmorph.h +++ b/indra/newview/lltoolmorph.h @@ -63,18 +63,18 @@ public: /*virtual*/ S8 getType() const ; - BOOL needsRender(); - void preRender(BOOL clear_depth); - BOOL render(); - void requestUpdate( S32 delay_frames ) {mNeedsUpdate = TRUE; mDelayFrames = delay_frames; } + bool needsRender(); + void preRender(bool clear_depth); + bool render(); + void requestUpdate( S32 delay_frames ) {mNeedsUpdate = true; mDelayFrames = delay_frames; } void setUpdateDelayFrames( S32 delay_frames ) { mDelayFrames = delay_frames; } void draw(F32 alpha); LLViewerVisualParam* getVisualParam() { return mVisualParam; } F32 getVisualParamWeight() { return mVisualParamWeight; } - BOOL getVisible() { return mIsVisible; } + bool getVisible() { return mIsVisible; } - void setAllowsUpdates( BOOL b ) { mAllowsUpdates = b; } + void setAllowsUpdates( bool b ) { mAllowsUpdates = b; } const LLRect& getRect() { return mRect; } @@ -82,13 +82,13 @@ public: static void requestHintUpdates( LLVisualParamHint* exception1 = NULL, LLVisualParamHint* exception2 = NULL ); protected: - BOOL mNeedsUpdate; // does this texture need to be re-rendered? - BOOL mIsVisible; // is this distortion hint visible? + bool mNeedsUpdate; // does this texture need to be re-rendered? + bool mIsVisible; // is this distortion hint visible? LLViewerJointMesh* mJointMesh; // mesh that this distortion applies to LLViewerVisualParam* mVisualParam; // visual param applied by this hint LLWearable* mWearablePtr; // wearable we're editing F32 mVisualParamWeight; // weight for this visual parameter - BOOL mAllowsUpdates; // updates are blocked unless this is true + bool mAllowsUpdates; // updates are blocked unless this is true S32 mDelayFrames; // updates are blocked for this many frames LLRect mRect; F32 mLastParamWeight; @@ -107,10 +107,10 @@ protected: /*virtual */ ~LLVisualParamReset(){} public: LLVisualParamReset(); - /*virtual */ BOOL render(); + /*virtual */ bool render(); /*virtual*/ S8 getType() const ; - static BOOL sDirty; + static bool sDirty; }; #endif diff --git a/indra/newview/lltoolobjpicker.cpp b/indra/newview/lltoolobjpicker.cpp index 6638fe4682..3d3855030e 100644 --- a/indra/newview/lltoolobjpicker.cpp +++ b/indra/newview/lltoolobjpicker.cpp @@ -47,14 +47,14 @@ LLToolObjPicker::LLToolObjPicker() : LLTool( std::string("ObjPicker"), NULL ), - mPicked( FALSE ), + mPicked( false ), mHitObjectID( LLUUID::null ), mExitCallback( NULL ), mExitCallbackData( NULL ) { } -// returns TRUE if an object was selected +// returns true if an object was selected bool LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask) { LLRootView* viewp = gViewerWindow->getRootView(); @@ -66,13 +66,13 @@ bool LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask) { // didn't click in any UI object, so must have clicked in the world gViewerWindow->pickAsync(x, y, mask, pickCallback); - handled = TRUE; + handled = true; } else { if (hasMouseCapture()) { - setMouseCapture(FALSE); + setMouseCapture(false); } else { @@ -105,7 +105,7 @@ bool LLToolObjPicker::handleMouseUp(S32 x, S32 y, MASK mask) LLTool::handleMouseUp(x, y, mask); if (hasMouseCapture()) { - setMouseCapture(FALSE); + setMouseCapture(false); } else { @@ -118,7 +118,7 @@ bool LLToolObjPicker::handleMouseUp(S32 x, S32 y, MASK mask) bool LLToolObjPicker::handleHover(S32 x, S32 y, MASK mask) { LLView *viewp = gViewerWindow->getRootView(); - BOOL handled = viewp->handleHover(x, y, mask); + bool handled = viewp->handleHover(x, y, mask); if (!handled) { // Used to do pick on hover. Now we just always display the cursor. @@ -142,7 +142,7 @@ void LLToolObjPicker::onMouseCaptureLost() mExitCallbackData = NULL; } - mPicked = FALSE; + mPicked = false; mHitObjectID.setNull(); } @@ -157,7 +157,7 @@ void LLToolObjPicker::setExitCallback(void (*callback)(void *), void *callback_d void LLToolObjPicker::handleSelect() { LLTool::handleSelect(); - setMouseCapture(TRUE); + setMouseCapture(true); } // virtual @@ -166,7 +166,7 @@ void LLToolObjPicker::handleDeselect() if (hasMouseCapture()) { LLTool::handleDeselect(); - setMouseCapture(FALSE); + setMouseCapture(false); } } diff --git a/indra/newview/lltoolobjpicker.h b/indra/newview/lltoolobjpicker.h index 960ae0fd56..2238aefa08 100644 --- a/indra/newview/lltoolobjpicker.h +++ b/indra/newview/lltoolobjpicker.h @@ -54,7 +54,7 @@ public: static void pickCallback(const LLPickInfo& pick_info); protected: - BOOL mPicked; + bool mPicked; LLUUID mHitObjectID; void (*mExitCallback)(void *callback_data); void *mExitCallbackData; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index f5ec21df6b..abbb55d24d 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -118,13 +118,13 @@ bool LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) mDoubleClickTimer.stop(); } - mMouseOutsideSlop = FALSE; + mMouseOutsideSlop = false; mMouseDownX = x; mMouseDownY = y; LLTimer pick_timer; - BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); - LLPickInfo transparent_pick = gViewerWindow->pickImmediate(x, y, TRUE /*includes transparent*/, pick_rigged, FALSE, TRUE, FALSE); - LLPickInfo visible_pick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged); + bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); + LLPickInfo transparent_pick = gViewerWindow->pickImmediate(x, y, true /*includes transparent*/, pick_rigged, false, true, false); + LLPickInfo visible_pick = gViewerWindow->pickImmediate(x, y, false, pick_rigged); LLViewerObject *transp_object = transparent_pick.getObject(); LLViewerObject *visible_object = visible_pick.getObject(); @@ -196,14 +196,14 @@ bool LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) // an item. bool LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask) { - BOOL pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes"); + bool pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes"); // don't pick transparent so users can't "pay" transparent objects mPick = gViewerWindow->pickImmediate(x, y, - /*BOOL pick_transparent*/ gSavedSettings.getBOOL("FSEnableRightclickOnTransparentObjects"), // FALSE, // FIRE-1396: Allow selecting transparent objects - /*BOOL pick_rigged*/ TRUE, - /*BOOL pick_particle*/ TRUE, - /*BOOL pick_unselectable*/ TRUE, + /*bool pick_transparent*/ gSavedSettings.getBOOL("FSEnableRightclickOnTransparentObjects"), // false, // FIRE-1396: Allow selecting transparent objects + /*bool pick_rigged*/ true, + /*bool pick_particle*/ true, + /*bool pick_unselectable*/ true, pick_reflection_probe); mPick.mKeyMask = mask; @@ -224,9 +224,9 @@ bool LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask) return LLTool::handleRightMouseUp(x, y, mask); } -BOOL LLToolPie::handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y) +bool LLToolPie::handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y) { - BOOL res = FALSE; + bool res = false; // mHoverPick should have updated on its own and we should have a face // in LLViewerMediaFocus in case of media, so just reuse mHoverPick if (mHoverPick.mUVCoords.mV[VX] >= 0.f && mHoverPick.mUVCoords.mV[VY] >= 0.f) @@ -252,7 +252,7 @@ bool LLToolPie::handleScrollHWheel(S32 x, S32 y, S32 clicks) } // True if you selected an object. -BOOL LLToolPie::handleLeftClickPick() +bool LLToolPie::handleLeftClickPick() { S32 x = mPick.mMousePt.mX; S32 y = mPick.mMousePt.mY; @@ -267,7 +267,7 @@ BOOL LLToolPie::handleLeftClickPick() && !LLViewerParcelMgr::getInstance()->isCollisionBanned()) { // if selling passes, just buy one - void* deselect_when_done = (void*)TRUE; + void* deselect_when_done = (void*)true; LLPanelLandGeneral::onClickBuyPass(deselect_when_done); } else @@ -297,7 +297,7 @@ BOOL LLToolPie::handleLeftClickPick() if (handleMediaClick(mPick)) { - return TRUE; + return true; } // If it's a left-click, and we have a special action, do it. @@ -307,7 +307,7 @@ BOOL LLToolPie::handleLeftClickPick() // Blanket block all left-click special actions on objects the user can't interact with if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canInteract(object, mPick.mObjectOffset)) ) { - return TRUE; + return true; } // [/RLVa:KB] @@ -358,7 +358,7 @@ BOOL LLToolPie::handleLeftClickPick() handle_object_sit_or_stand(); // put focus in world when sitting on an object gFocusMgr.setKeyboardFocus(NULL); - return TRUE; + return true; } // else nothing (fall through to touch) } case CLICK_ACTION_PAY: @@ -369,13 +369,13 @@ BOOL LLToolPie::handleLeftClickPick() { // pay event goes to object actually clicked on mClickActionObject = object; - mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE); + mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, false, true); if (LLSelectMgr::getInstance()->selectGetAllValid()) { // call this right away, since we have all the info we need to continue the action selectionPropertiesReceived(); } - return TRUE; + return true; } } break; @@ -383,34 +383,34 @@ BOOL LLToolPie::handleLeftClickPick() if ( mClickActionBuyEnabled ) { mClickActionObject = parent; - mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE); + mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, false, true, true); if (LLSelectMgr::getInstance()->selectGetAllValid()) { // call this right away, since we have all the info we need to continue the action selectionPropertiesReceived(); } - return TRUE; + return true; } break; case CLICK_ACTION_OPEN: if (parent && parent->allowOpen()) { mClickActionObject = parent; - mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE); + mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, false, true, true); if (LLSelectMgr::getInstance()->selectGetAllValid()) { // call this right away, since we have all the info we need to continue the action selectionPropertiesReceived(); } } - return TRUE; + return true; case CLICK_ACTION_PLAY: handle_click_action_play(); - return TRUE; + return true; case CLICK_ACTION_OPEN_MEDIA: // mClickActionObject = object; handle_click_action_open_media(object); - return TRUE; + return true; case CLICK_ACTION_ZOOM: { const F32 PADDING_FACTOR = 2.f; @@ -418,7 +418,7 @@ BOOL LLToolPie::handleLeftClickPick() if (object) { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); LLBBox bbox = object->getBoundingBoxAgent() ; F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); @@ -433,9 +433,9 @@ BOOL LLToolPie::handleLeftClickPick() mPick.mObjectID ); } } - return TRUE; + return true; case CLICK_ACTION_DISABLED: - return TRUE; + return true; default: // nothing break; @@ -507,13 +507,13 @@ BOOL LLToolPie::handleLeftClickPick() mMouseButtonDown = false; LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); gViewerWindow->hideCursor(); - LLToolCamera::getInstance()->setMouseCapture(TRUE); + LLToolCamera::getInstance()->setMouseCapture(true); LLToolCamera::getInstance()->setClickPickPending(); LLToolCamera::getInstance()->pickCallback(mPick); if(!gSavedSettings.getBOOL("ClickOnAvatarKeepsCamera")) // keep camera in place when clicking on ourselves - gAgentCamera.setFocusOnAvatar(TRUE, TRUE); + gAgentCamera.setFocusOnAvatar(true, true); - return TRUE; + return true; } ////////// // // Could be first left-click on nothing @@ -523,7 +523,7 @@ BOOL LLToolPie::handleLeftClickPick() return LLTool::handleMouseDown(x, y, mask); } -BOOL LLToolPie::useClickAction(MASK mask, +bool LLToolPie::useClickAction(MASK mask, LLViewerObject* object, LLViewerObject* parent) { @@ -657,9 +657,9 @@ bool LLToolPie::walkToClickedLocation() if (gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) { mPick = gViewerWindow->pickImmediate(mHoverPick.mMousePt.mX, mHoverPick.mMousePt.mY, - FALSE /* ignore transparent */, - FALSE /* ignore rigged */, - FALSE /* ignore particles */); + false /* ignore transparent */, + false /* ignore rigged */, + false /* ignore particles */); } else { @@ -667,9 +667,9 @@ bool LLToolPie::walkToClickedLocation() // use croshair's position to do a pick mPick = gViewerWindow->pickImmediate(gViewerWindow->getWorldViewRectScaled().getWidth() / 2, gViewerWindow->getWorldViewRectScaled().getHeight() / 2, - FALSE /* ignore transparent */, - FALSE /* ignore rigged */, - FALSE /* ignore particles */); + false /* ignore transparent */, + false /* ignore rigged */, + false /* ignore particles */); } if (mPick.mPickType == LLPickInfo::PICK_OBJECT) @@ -712,23 +712,23 @@ bool LLToolPie::walkToClickedLocation() // [/RLVa:KB] { // FIRE-31135 Do not reset camera position for "click to walk" - // gAgentCamera.setFocusOnAvatar(TRUE, TRUE); + // gAgentCamera.setFocusOnAvatar(true, true); static LLCachedControl sResetCameraOnMovement(gSavedSettings, "FSResetCameraOnMovement"); if (sResetCameraOnMovement) { - gAgentCamera.setFocusOnAvatar(TRUE, TRUE); + gAgentCamera.setFocusOnAvatar(true, true); } // if (mAutoPilotDestination) { mAutoPilotDestination->markDead(); } - mAutoPilotDestination = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, FALSE); + mAutoPilotDestination = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, false); mAutoPilotDestination->setPositionGlobal(mPick.mPosGlobal); mAutoPilotDestination->setPixelSize(5); mAutoPilotDestination->setColor(LLColor4U(170, 210, 190)); mAutoPilotDestination->setDuration(3.f); LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; - gAgent.startAutoPilotGlobal(pos, std::string(), NULL, NULL, NULL, 0.f, 0.03f, FALSE); + gAgent.startAutoPilotGlobal(pos, std::string(), NULL, NULL, NULL, 0.f, 0.03f, false); LLFirstUse::notMoving(false); showVisualContextMenuEffect(); return true; @@ -751,10 +751,10 @@ bool LLToolPie::teleportToClickedLocation() { // We do not handle hover in mouselook as we do in other modes, so // use croshair's position to do a pick - BOOL pick_rigged = false; + bool pick_rigged = false; mHoverPick = gViewerWindow->pickImmediate(gViewerWindow->getWorldViewRectScaled().getWidth() / 2, gViewerWindow->getWorldViewRectScaled().getHeight() / 2, - FALSE, + false, pick_rigged); } LLViewerObject* objp = mHoverPick.getObject(); @@ -848,7 +848,7 @@ void LLToolPie::selectionPropertiesReceived() bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) { bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); - mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged); + mHoverPick = gViewerWindow->pickImmediate(x, y, false, pick_rigged); LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); // [RLVa:KB] - Checked: RLVa-1.1.0 @@ -856,7 +856,7 @@ bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canInteract(object, mHoverPick.mObjectOffset)) ) { gViewerWindow->setCursor(UI_CURSOR_ARROW); - return TRUE; + return true; } // [/RLVa:KB] LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace); @@ -900,7 +900,7 @@ bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) else { // perform a separate pick that detects transparent objects since they respond to 1-click actions - LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged); + LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, false, pick_rigged); LLViewerObject* click_action_object = click_action_pick.getObject(); @@ -942,7 +942,7 @@ bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) LLViewerMediaFocus::getInstance()->clearHover(); } - return TRUE; + return true; } bool LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) @@ -963,7 +963,7 @@ bool LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) gViewerWindow->setCursor(UI_CURSOR_ARROW); if (hasMouseCapture()) { - setMouseCapture(FALSE); + setMouseCapture(false); } LLToolMgr::getInstance()->clearTransientTool(); @@ -1062,10 +1062,10 @@ static bool needs_tooltip(LLSelectNode* nodep) // -BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) +bool LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) { // Do not show hover for land unless prefs are set to allow it. - if (!gSavedSettings.getBOOL("ShowLandHoverTip")) return TRUE; + if (!gSavedSettings.getBOOL("ShowLandHoverTip")) return true; LLViewerParcelMgr::getInstance()->setHoverParcel( mHoverPick.mPosGlobal ); @@ -1219,15 +1219,15 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) LLToolTipMgr::instance().show(tooltip_msg); } - return TRUE; + return true; } -BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg) +bool LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg) { // FIRE-9522: Crashfix if (!hover_object) { - return TRUE; + return true; } // @@ -1240,7 +1240,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l { // no hover tips for HUD elements, since they can obscure // what the HUD is displaying - return TRUE; + return true; } if ( hover_object->isAttachment() ) @@ -1250,13 +1250,13 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l if (!root_edit) { // Strange parenting issue, don't show any text - return TRUE; + return true; } hover_object = (LLViewerObject*)root_edit->getParent(); if (!hover_object) { // another strange parenting issue, bail out - return TRUE; + return true; } } @@ -1603,7 +1603,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l } } - return TRUE; + return true; } bool LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) @@ -1613,7 +1613,7 @@ bool LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) if (!mHoverPick.isValid()) return true; // [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g #ifdef RLV_EXTENSION_CMD_INTERACT - if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) return TRUE; + if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) return true; #endif // RLV_EXTENSION_CMD_INTERACT // [/RLVa:KB] @@ -1623,7 +1623,7 @@ bool LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask) // Block the tooltip of anything the user can't interact with if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canInteract(hover_object, mHoverPick.mObjectOffset)) ) { - return TRUE; + return true; } // [/RLVa:KB] @@ -1801,14 +1801,14 @@ void LLToolPie::handleDeselect() { if( hasMouseCapture() ) { - setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly + setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly } // remove temporary selection for pie menu LLSelectMgr::getInstance()->setHoverObject(NULL); // Menu may be still up during transfer to different tool. // toolfocus and toolgrab should retain menu, they will clear it if needed - MASK override_mask = gKeyboard ? gKeyboard->currentMask(TRUE) : 0; + MASK override_mask = gKeyboard ? gKeyboard->currentMask(true) : 0; if (gMenuHolder && (!gMenuHolder->getVisible() || (override_mask & (MASK_ALT | MASK_CONTROL)) == 0)) { // in most cases menu is useless without correct selection, so either keep both or discard both @@ -1841,7 +1841,7 @@ void LLToolPie::stopEditing() { if( hasMouseCapture() ) { - setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly + setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly } } @@ -1863,7 +1863,7 @@ bool LLToolPie::inCameraSteerMode() } // true if x,y outside small box around start_x,start_y -BOOL LLToolPie::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y) +bool LLToolPie::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y) { S32 dx = x - start_x; S32 dy = y - start_y; @@ -1947,9 +1947,9 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick) gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance()); LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl(); - media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(TRUE)); + media_impl->mouseDown(pick.mUVCoords, gKeyboard->currentMask(true)); mMediaMouseCaptureID = mep->getMediaID(); - setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture. + setMouseCapture(true); // This object will send a mouse-up to the media when it loses capture. } return true; @@ -2001,9 +2001,9 @@ bool LLToolPie::handleMediaDblClick(const LLPickInfo& pick) gFocusMgr.setKeyboardFocus(LLViewerMediaFocus::getInstance()); LLEditMenuHandler::gEditMenuHandler = LLViewerMediaFocus::instance().getFocusedMediaImpl(); - media_impl->mouseDoubleClick(pick.mUVCoords, gKeyboard->currentMask(TRUE)); + media_impl->mouseDoubleClick(pick.mUVCoords, gKeyboard->currentMask(true)); mMediaMouseCaptureID = mep->getMediaID(); - setMouseCapture(TRUE); // This object will send a mouse-up to the media when it loses capture. + setMouseCapture(true); // This object will send a mouse-up to the media when it loses capture. } return true; @@ -2054,7 +2054,7 @@ bool LLToolPie::handleMediaHover(const LLPickInfo& pick) // If this is the focused media face, send mouse move events. if (LLViewerMediaFocus::getInstance()->isFocusedOnFace(objectp, pick.mObjectFace)) { - media_impl->mouseMove(pick.mUVCoords, gKeyboard->currentMask(TRUE)); + media_impl->mouseMove(pick.mUVCoords, gKeyboard->currentMask(true)); gViewerWindow->setCursor(media_impl->getLastSetCursor()); } else @@ -2150,7 +2150,7 @@ static ECursorType cursor_from_parcel_media(U8 click_action) // True if we handled the event. -BOOL LLToolPie::handleRightClickPick() +bool LLToolPie::handleRightClickPick() { S32 x = mPick.mMousePt.mX; S32 y = mPick.mMousePt.mY; @@ -2165,7 +2165,7 @@ BOOL LLToolPie::handleRightClickPick() LLViewerObject *object = mPick.getObject(); // Can't ignore children here. - LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE); + LLToolSelect::handleObjectSelection(mPick, false, true); // Spawn pie menu if (mPick.mPickType == LLPickInfo::PICK_LAND) @@ -2193,7 +2193,7 @@ BOOL LLToolPie::handleRightClickPick() { //either at very early startup stage or at late quitting stage, //this event is ignored. - return TRUE; + return true; } gPieMenuAvatarSelf->show(x, y); @@ -2205,7 +2205,7 @@ BOOL LLToolPie::handleRightClickPick() { //either at very early startup stage or at late quitting stage, //this event is ignored. - return TRUE ; + return true ; } gMenuAvatarSelf->show(x, y); @@ -2227,7 +2227,7 @@ BOOL LLToolPie::handleRightClickPick() if (!object) { - return TRUE; // unexpected, but escape + return true; // unexpected, but escape } // Object is an avatar, so check for mute by id. @@ -2392,13 +2392,13 @@ BOOL LLToolPie::handleRightClickPick() LLTool::handleRightMouseDown(x, y, mask); // We handled the event. - return TRUE; + return true; } void LLToolPie::showVisualContextMenuEffect() { // VEFFECT: ShowPie - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_SPHERE, true); effectp->setPositionGlobal(mPick.mPosGlobal); effectp->setColor(LLColor4U(gAgent.getEffectColor())); effectp->setDuration(0.25f); @@ -2470,7 +2470,7 @@ void LLToolPie::startCameraSteering() LLViewerCamera::instance().getOrigin() + gViewerWindow->mouseDirectionGlobal(mSteerPick.mMousePt.mX, mSteerPick.mMousePt.mY) * 100.f); } - setMouseCapture(TRUE); + setMouseCapture(true); mMouseSteerX = mMouseDownX; mMouseSteerY = mMouseDownY; @@ -2479,7 +2479,7 @@ void LLToolPie::startCameraSteering() mClockwise = camera_to_rotation_center * rotation_center_to_pick < 0.f; if (mMouseSteerGrabPoint) { mMouseSteerGrabPoint->markDead(); } - mMouseSteerGrabPoint = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, FALSE); + mMouseSteerGrabPoint = (LLHUDEffectBlob *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BLOB, false); mMouseSteerGrabPoint->setPositionGlobal(mSteerPick.mPosGlobal); mMouseSteerGrabPoint->setColor(LLColor4U(170, 210, 190)); mMouseSteerGrabPoint->setPixelSize(5); @@ -2584,12 +2584,12 @@ LLToolPie::~LLToolPie() // FIRE-10276; handleTooltipObject can be called during name resolution (LLAvatarNameCache), then hover_object can lon gbe destroyed and the pointer invalid. // To circumvent this just pass the id and try to fetch the object from gObjectList. -BOOL LLToolPie::handleTooltipObjectById( LLUUID hoverObjectId, std::string line, std::string tooltip_msg) +bool LLToolPie::handleTooltipObjectById( LLUUID hoverObjectId, std::string line, std::string tooltip_msg) { LLViewerObject* pObject = gObjectList.findObject( hoverObjectId ); if( !pObject ) - return TRUE; + return true; return handleTooltipObject( pObject, line, tooltip_msg ); } diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index f98b8a17c5..a4e3c0afbc 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -49,7 +49,7 @@ public: virtual bool handleRightMouseUp(S32 x, S32 y, MASK mask); virtual bool handleHover(S32 x, S32 y, MASK mask); virtual bool handleDoubleClick(S32 x, S32 y, MASK mask); - BOOL handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y); + bool handleScrollWheelAny(S32 x, S32 y, S32 clicks_x, S32 clicks_y); virtual bool handleScrollWheel(S32 x, S32 y, S32 clicks); virtual bool handleScrollHWheel(S32 x, S32 y, S32 clicks); virtual bool handleToolTip(S32 x, S32 y, MASK mask); @@ -84,10 +84,10 @@ public: static void VisitHomePage(const LLPickInfo& info); private: - BOOL outsideSlop (S32 x, S32 y, S32 start_x, S32 start_y); - BOOL handleLeftClickPick(); - BOOL handleRightClickPick(); - BOOL useClickAction (MASK mask, LLViewerObject* object,LLViewerObject* parent); + bool outsideSlop (S32 x, S32 y, S32 start_x, S32 start_y); + bool handleLeftClickPick(); + bool handleRightClickPick(); + bool useClickAction (MASK mask, LLViewerObject* object,LLViewerObject* parent); void showVisualContextMenuEffect(); ECursorType cursorFromObject(LLViewerObject* object); @@ -96,13 +96,13 @@ private: bool handleMediaDblClick(const LLPickInfo& info); bool handleMediaHover(const LLPickInfo& info); bool handleMediaMouseUp(); - BOOL handleTooltipLand(std::string line, std::string tooltip_msg); - BOOL handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg); + bool handleTooltipLand(std::string line, std::string tooltip_msg); + bool handleTooltipObject( LLViewerObject* hover_object, std::string line, std::string tooltip_msg); // FIRE-10276; handleTooltipObject can be called during name resolution (LLAvatarNameCache), then hover_object can lon gbe destroyed and the pointer invalid. // To circumvent this just pass the id and try to fetch the object from gObjectList. - BOOL handleTooltipObjectById( LLUUID hoverObjectId, std::string line, std::string tooltip_msg); + bool handleTooltipObjectById( LLUUID hoverObjectId, std::string line, std::string tooltip_msg); // @@ -128,8 +128,8 @@ private: LLPointer mClickActionObject; U8 mClickAction; LLSafeHandle mLeftClickSelection; - BOOL mClickActionBuyEnabled; - BOOL mClickActionPayEnabled; + bool mClickActionBuyEnabled; + bool mClickActionPayEnabled; LLFrameTimer mDoubleClickTimer; // Keep track of name resolutions we made and delete them if needed to avoid crashing if this instance dies. diff --git a/indra/newview/lltoolpipette.cpp b/indra/newview/lltoolpipette.cpp index 4fdd7cf7c9..36ac20bc59 100644 --- a/indra/newview/lltoolpipette.cpp +++ b/indra/newview/lltoolpipette.cpp @@ -48,7 +48,7 @@ LLToolPipette::LLToolPipette() : LLTool(std::string("Pipette")), - mSuccess(TRUE) + mSuccess(true) { } @@ -59,20 +59,20 @@ LLToolPipette::~LLToolPipette() bool LLToolPipette::handleMouseDown(S32 x, S32 y, MASK mask) { - mSuccess = TRUE; + mSuccess = true; mTooltipMsg.clear(); - setMouseCapture(TRUE); + setMouseCapture(true); gViewerWindow->pickAsync(x, y, mask, pickCallback); return true; } bool LLToolPipette::handleMouseUp(S32 x, S32 y, MASK mask) { - mSuccess = TRUE; + mSuccess = true; LLSelectMgr::getInstance()->unhighlightAll(); // *NOTE: This assumes the pipette tool is a transient tool. LLToolMgr::getInstance()->clearTransientTool(); - setMouseCapture(FALSE); + setMouseCapture(false); return true; } @@ -129,7 +129,7 @@ void LLToolPipette::pickCallback(const LLPickInfo& pick_info) } } -void LLToolPipette::setResult(BOOL success, const std::string& msg) +void LLToolPipette::setResult(bool success, const std::string& msg) { mTooltipMsg = msg; mSuccess = success; diff --git a/indra/newview/lltoolpipette.h b/indra/newview/lltoolpipette.h index be7b6a2dec..8fc7ae5edf 100644 --- a/indra/newview/lltoolpipette.h +++ b/indra/newview/lltoolpipette.h @@ -55,7 +55,7 @@ public: // Note: Don't return connection; use boost::bind + boost::signals2::trackable to disconnect slots typedef boost::signals2::signal signal_t; void setToolSelectCallback(const signal_t::slot_type& cb) { mSignal.connect(cb); } - void setResult(BOOL success, const std::string& msg); + void setResult(bool success, const std::string& msg); void setTextureEntry(const LLTextureEntry* entry); static void pickCallback(const LLPickInfo& pick_info); @@ -63,7 +63,7 @@ public: protected: LLTextureEntry mTextureEntry; signal_t mSignal; - BOOL mSuccess; + bool mSuccess; std::string mTooltipMsg; }; diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index 241f5215c5..7cb6af8ccd 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -108,8 +108,8 @@ LLToolPlacer::LLToolPlacer() { } -BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, S32* hit_face, - BOOL* b_hit_land, LLVector3* ray_start_region, LLVector3* ray_end_region, LLViewerRegion** region ) +bool LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, S32* hit_face, + bool* b_hit_land, LLVector3* ray_start_region, LLVector3* ray_end_region, LLViewerRegion** region ) { // Performance tweak and selection fix static LLCachedControl limitSelectDistance(gSavedSettings, "LimitSelectDistance"); @@ -119,7 +119,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, // Viewer-side pick to find the right sim to create the object on. // First find the surface the object will be created on. - LLPickInfo pick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE); + LLPickInfo pick = gViewerWindow->pickImmediate(x, y, false, false); // Note: use the frontmost non-flora version because (a) plants usually have lots of alpha and (b) pants' Havok // representations (if any) are NOT the same as their viewer representation. @@ -137,12 +137,12 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, LLVector3d land_pos_global = pick.mPosGlobal; // Make sure there's a surface to place the new object on. - BOOL bypass_sim_raycast = FALSE; + bool bypass_sim_raycast = false; LLVector3d surface_pos_global; if (*b_hit_land) { surface_pos_global = land_pos_global; - bypass_sim_raycast = TRUE; + bypass_sim_raycast = true; } else if (*hit_obj) @@ -151,7 +151,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, } else { - return FALSE; + return false; } // Make sure the surface isn't too far away. @@ -163,7 +163,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, if(limitSelectDistance && dist_to_surface_sq > (max_dist_from_camera * max_dist_from_camera) ) // { - return FALSE; + return false; } // [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f @@ -172,7 +172,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, { static RlvCachedBehaviourModifier s_nFartouchDist(RLV_MODIFIER_FARTOUCHDIST); if (dist_vec_squared(gAgent.getPositionGlobal(), pick.mPosGlobal) > s_nFartouchDist * s_nFartouchDist) - return FALSE; + return false; } // [/RLVa:KB] @@ -181,7 +181,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, if (!regionp) { LL_WARNS() << "Trying to add object outside of all known regions!" << LL_ENDL; - return FALSE; + return false; } // Find the simulator-side ray that will be used to place the object accurately @@ -213,35 +213,35 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, *ray_end_region = regionp->getPosRegionFromGlobal( ray_end_global ); } - return TRUE; + return true; } -BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) +bool LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) { LLVector3 ray_start_region; LLVector3 ray_end_region; LLViewerRegion* regionp = NULL; - BOOL b_hit_land = FALSE; + bool b_hit_land = false; S32 hit_face = -1; LLViewerObject* hit_obj = NULL; U8 state = 0; - BOOL success = raycastForNewObjPos( x, y, &hit_obj, &hit_face, &b_hit_land, &ray_start_region, &ray_end_region, ®ionp ); + bool success = raycastForNewObjPos( x, y, &hit_obj, &hit_face, &b_hit_land, &ray_start_region, &ray_end_region, ®ionp ); if( !success ) { - return FALSE; + return false; } if( hit_obj && (hit_obj->isAvatar() || hit_obj->isAttachment()) ) { // Can't create objects on avatars or attachments - return FALSE; + return false; } if (NULL == regionp) { LL_WARNS() << "regionp was NULL; aborting function." << LL_ENDL; - return FALSE; + return false; } if (regionp->getRegionFlag(REGION_FLAGS_SANDBOX)) @@ -266,7 +266,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) else if (default_material == "Rubber") material = LL_MCODE_RUBBER; else if (default_material == "Plastic") material = LL_MCODE_PLASTIC; - BOOL create_selected = FALSE; + bool create_selected = false; LLVolumeParams volume_params; switch (pcode) @@ -297,7 +297,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) case LLViewerObject::LL_VO_SQUARE_TORUS: case LLViewerObject::LL_VO_TRIANGLE_TORUS: default: - create_selected = TRUE; + create_selected = true; break; } @@ -487,7 +487,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) gMessageSystem->addVector3Fast(_PREHASH_RayStart, ray_start_region ); gMessageSystem->addVector3Fast(_PREHASH_RayEnd, ray_end_region ); gMessageSystem->addU8Fast(_PREHASH_BypassRaycast, (U8)b_hit_land ); - gMessageSystem->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)FALSE ); + gMessageSystem->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)false ); gMessageSystem->addU8Fast(_PREHASH_State, state); // Limit raycast to a single object. @@ -516,7 +516,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) } // VEFFECT: AddObject - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, true); effectp->setSourceObject((LLViewerObject*)gAgentAvatarp); effectp->setPositionGlobal(regionp->getPosGlobalFromRegion(ray_end_region)); effectp->setDuration(LL_HUD_DUR_SHORT); @@ -524,30 +524,30 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) add(LLStatViewer::OBJECT_CREATE, 1); - return TRUE; + return true; } // Used by the placer tool to add copies of the current selection. // Inspired by add_object(). JC -BOOL LLToolPlacer::addDuplicate(S32 x, S32 y) +bool LLToolPlacer::addDuplicate(S32 x, S32 y) { LLVector3 ray_start_region; LLVector3 ray_end_region; LLViewerRegion* regionp = NULL; - BOOL b_hit_land = FALSE; + bool b_hit_land = false; S32 hit_face = -1; LLViewerObject* hit_obj = NULL; - BOOL success = raycastForNewObjPos( x, y, &hit_obj, &hit_face, &b_hit_land, &ray_start_region, &ray_end_region, ®ionp ); + bool success = raycastForNewObjPos( x, y, &hit_obj, &hit_face, &b_hit_land, &ray_start_region, &ray_end_region, ®ionp ); if( !success ) { make_ui_sound("UISndInvalidOp"); - return FALSE; + return false; } if( hit_obj && (hit_obj->isAvatar() || hit_obj->isAttachment()) ) { // Can't create objects on avatars or attachments make_ui_sound("UISndInvalidOp"); - return FALSE; + return false; } @@ -567,11 +567,11 @@ BOOL LLToolPlacer::addDuplicate(S32 x, S32 y) LLSelectMgr::getInstance()->selectDuplicateOnRay(ray_start_region, ray_end_region, b_hit_land, // suppress raycast - FALSE, // intersection + false, // intersection ray_target_id, gSavedSettings.getBOOL("CreateToolCopyCenters"), gSavedSettings.getBOOL("CreateToolCopyRotates"), - FALSE); // select copy + false); // select copy if (regionp && (regionp->getRegionFlag(REGION_FLAGS_SANDBOX))) @@ -579,18 +579,18 @@ BOOL LLToolPlacer::addDuplicate(S32 x, S32 y) //LLFirstUse::useSandbox(); } - return TRUE; + return true; } -BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask) +bool LLToolPlacer::placeObject(S32 x, S32 y, MASK mask) { - BOOL added = TRUE; + bool added = true; // [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) || (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))) ) { - return TRUE; // Callers seem to expect a "did you handle it?" so we return TRUE rather than FALSE + return true; // Callers seem to expect a "did you handle it?" so we return true rather than false } // [/RLVa:KB] @@ -600,7 +600,7 @@ BOOL LLToolPlacer::placeObject(S32 x, S32 y, MASK mask) } else { - added = addObject( sObjectType, x, y, FALSE ); + added = addObject( sObjectType, x, y, false ); } // ...and go back to the default tool diff --git a/indra/newview/lltoolplacer.h b/indra/newview/lltoolplacer.h index a3e82dc6cb..d9161711cb 100644 --- a/indra/newview/lltoolplacer.h +++ b/indra/newview/lltoolplacer.h @@ -42,7 +42,7 @@ class LLToolPlacer public: LLToolPlacer(); - virtual BOOL placeObject(S32 x, S32 y, MASK mask); + virtual bool placeObject(S32 x, S32 y, MASK mask); virtual bool handleHover(S32 x, S32 y, MASK mask); virtual void handleSelect(); // do stuff when your tool is selected virtual void handleDeselect(); // clean up when your tool is deselected @@ -54,10 +54,10 @@ protected: static LLPCode sObjectType; private: - BOOL addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ); - BOOL raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, S32* hit_face, - BOOL* b_hit_land, LLVector3* ray_start_region, LLVector3* ray_end_region, LLViewerRegion** region ); - BOOL addDuplicate(S32 x, S32 y); + bool addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ); + bool raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, S32* hit_face, + bool* b_hit_land, LLVector3* ray_start_region, LLVector3* ray_end_region, LLViewerRegion** region ); + bool addDuplicate(S32 x, S32 y); }; #endif diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index c1e3743006..596adfe124 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -54,14 +54,14 @@ // [/RLVa:KB] // Globals -//extern BOOL gAllowSelectAvatar; +//extern bool gAllowSelectAvatar; const F32 SELECTION_ROTATION_TRESHOLD = 0.1f; const F32 SELECTION_SITTING_ROTATION_TRESHOLD = 3.2f; //radian LLToolSelect::LLToolSelect( LLToolComposite* composite ) : LLTool( std::string("Select"), composite ), - mIgnoreGroup( FALSE ) + mIgnoreGroup( false ) { } @@ -69,11 +69,11 @@ LLToolSelect::LLToolSelect( LLToolComposite* composite ) bool LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask) { // do immediate pick query - BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); - BOOL pick_transparent = gSavedSettings.getBOOL("SelectInvisibleObjects"); - BOOL pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes"); + bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); + bool pick_transparent = gSavedSettings.getBOOL("SelectInvisibleObjects"); + bool pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes"); - mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged, FALSE, TRUE, pick_reflection_probe); + mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged, false, true, pick_reflection_probe); // Pass mousedown to agent LLTool::handleMouseDown(x, y, mask); @@ -83,7 +83,7 @@ bool LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask) // static -LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pick, BOOL ignore_group, BOOL temp_select, BOOL select_root) +LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pick, bool ignore_group, bool temp_select, bool select_root) { LLViewerObject* object = pick.getObject(); if (select_root) @@ -128,12 +128,12 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi } // [/RLVa:KB] - BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly"); - BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly"); + bool select_owned = gSavedSettings.getBOOL("SelectOwnedOnly"); + bool select_movable = gSavedSettings.getBOOL("SelectMovableOnly"); // FIRE-14593: Option to select only copyable objects - BOOL select_copyable = gSavedSettings.getBOOL("FSSelectCopyableOnly"); + bool select_copyable = gSavedSettings.getBOOL("FSSelectCopyableOnly"); // FIRE-17696: Option to select only locked objects - BOOL select_locked = gSavedSettings.getBOOL("FSSelectLockedOnly"); + bool select_locked = gSavedSettings.getBOOL("FSSelectLockedOnly"); // *NOTE: These settings must be cleaned up at bottom of function. if (temp_select || LLSelectMgr::getInstance()->mAllowSelectAvatar) @@ -141,13 +141,13 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi gSavedSettings.setBOOL("SelectOwnedOnly", false); gSavedSettings.setBOOL("SelectMovableOnly", false); // FIRE-14593: Option to select only copyable objects - gSavedSettings.setBOOL("FSSelectCopyableOnly", FALSE); + gSavedSettings.setBOOL("FSSelectCopyableOnly", false); // FIRE-17696: Option to select only locked objects - gSavedSettings.setBOOL("FSSelectLockedOnly", FALSE); - LLSelectMgr::getInstance()->setForceSelection(TRUE); + gSavedSettings.setBOOL("FSSelectLockedOnly", false); + LLSelectMgr::getInstance()->setForceSelection(true); } - BOOL extend_select = (pick.mKeyMask == MASK_SHIFT) || (pick.mKeyMask == MASK_CONTROL); + bool extend_select = (pick.mKeyMask == MASK_SHIFT) || (pick.mKeyMask == MASK_CONTROL); // If no object, check for icon, then just deselect if (!object) @@ -165,7 +165,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi } else { - BOOL already_selected = object->isSelected(); + bool already_selected = object->isSelected(); if (already_selected && object->getNumTEs() > 0 && @@ -192,7 +192,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi } else { - LLSelectMgr::getInstance()->deselectObjectAndFamily(object, TRUE, TRUE); + LLSelectMgr::getInstance()->deselectObjectAndFamily(object, true, true); } } else @@ -275,7 +275,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi LLSelectNode* select_node = selection->findNode(root_object); if (select_node) { - select_node->setTransient(TRUE); + select_node->setTransient(true); } LLViewerObject::const_child_list_t& child_list = root_object->getChildren(); @@ -286,7 +286,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi select_node = selection->findNode(child); if (select_node) { - select_node->setTransient(TRUE); + select_node->setTransient(true); } } @@ -303,7 +303,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi gSavedSettings.setBOOL("FSSelectCopyableOnly", select_copyable); // FIRE-17696: Option to select only locked objects gSavedSettings.setBOOL("FSSelectLockedOnly", select_locked); - LLSelectMgr::getInstance()->setForceSelection(FALSE); + LLSelectMgr::getInstance()->setForceSelection(false); } return LLSelectMgr::getInstance()->getSelection(); @@ -313,7 +313,7 @@ bool LLToolSelect::handleMouseUp(S32 x, S32 y, MASK mask) { mIgnoreGroup = gSavedSettings.getBOOL("EditLinkedParts"); - handleObjectSelection(mPick, mIgnoreGroup, FALSE); + handleObjectSelection(mPick, mIgnoreGroup, false); return LLTool::handleMouseUp(x, y, mask); } @@ -322,7 +322,7 @@ void LLToolSelect::handleDeselect() { if( hasMouseCapture() ) { - setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly + setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly } } @@ -331,7 +331,7 @@ void LLToolSelect::stopEditing() { if( hasMouseCapture() ) { - setMouseCapture( FALSE ); // Calls onMouseCaptureLost() indirectly + setMouseCapture( false ); // Calls onMouseCaptureLost() indirectly } } @@ -339,10 +339,10 @@ void LLToolSelect::onMouseCaptureLost() { // Finish drag - LLSelectMgr::getInstance()->enableSilhouette(TRUE); + LLSelectMgr::getInstance()->enableSilhouette(true); // Clean up drag-specific variables - mIgnoreGroup = FALSE; + mIgnoreGroup = false; } diff --git a/indra/newview/lltoolselect.h b/indra/newview/lltoolselect.h index 11d96bae05..3a8055fe3e 100644 --- a/indra/newview/lltoolselect.h +++ b/indra/newview/lltoolselect.h @@ -44,13 +44,13 @@ public: virtual void stopEditing(); - static LLSafeHandle handleObjectSelection(const LLPickInfo& pick, BOOL ignore_group, BOOL temp_select, BOOL select_root = FALSE); + static LLSafeHandle handleObjectSelection(const LLPickInfo& pick, bool ignore_group, bool temp_select, bool select_root = false); virtual void onMouseCaptureLost(); virtual void handleDeselect(); protected: - BOOL mIgnoreGroup; + bool mIgnoreGroup; LLUUID mSelectObjectID; LLPickInfo mPick; }; diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp index 5efbb670af..674882b0cc 100644 --- a/indra/newview/lltoolselectland.cpp +++ b/indra/newview/lltoolselectland.cpp @@ -47,12 +47,12 @@ LLToolSelectLand::LLToolSelectLand( ) : LLTool( std::string("Parcel") ), mDragStartGlobal(), mDragEndGlobal(), - mDragEndValid(FALSE), + mDragEndValid(false), mDragStartX(0), mDragStartY(0), mDragEndX(0), mDragEndY(0), - mMouseOutsideSlop(FALSE), + mMouseOutsideSlop(false), mWestSouthBottom(), mEastNorthTop() { } @@ -67,14 +67,14 @@ bool LLToolSelectLand::handleMouseDown(S32 x, S32 y, MASK mask) bool hit_land = gViewerWindow->mousePointOnLandGlobal(x, y, &mDragStartGlobal); if (hit_land) { - setMouseCapture( TRUE ); + setMouseCapture( true ); mDragStartX = x; mDragStartY = y; mDragEndX = x; mDragEndY = y; - mDragEndValid = TRUE; + mDragEndValid = true; mDragEndGlobal = mDragStartGlobal; sanitize_corners(mDragStartGlobal, mDragEndGlobal, mWestSouthBottom, mEastNorthTop); @@ -85,7 +85,7 @@ bool LLToolSelectLand::handleMouseDown(S32 x, S32 y, MASK mask) roundXY(mWestSouthBottom); roundXY(mEastNorthTop); - mMouseOutsideSlop = TRUE; //FALSE; + mMouseOutsideSlop = true; //false; LLViewerParcelMgr::getInstance()->deselectLand(); } @@ -112,7 +112,7 @@ bool LLToolSelectLand::handleMouseUp(S32 x, S32 y, MASK mask) { if( hasMouseCapture() ) { - setMouseCapture( FALSE ); + setMouseCapture( false ); if (mMouseOutsideSlop && mDragEndValid) { @@ -129,11 +129,11 @@ bool LLToolSelectLand::handleMouseUp(S32 x, S32 y, MASK mask) roundXY(mEastNorthTop); // Don't auto-select entire parcel. - mSelection = LLViewerParcelMgr::getInstance()->selectLand( mWestSouthBottom, mEastNorthTop, FALSE ); + mSelection = LLViewerParcelMgr::getInstance()->selectLand( mWestSouthBottom, mEastNorthTop, false ); } - mMouseOutsideSlop = FALSE; - mDragEndValid = FALSE; + mMouseOutsideSlop = false; + mDragEndValid = false; return true; } @@ -147,17 +147,17 @@ bool LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask) { if (mMouseOutsideSlop || outsideSlop(x, y, mDragStartX, mDragStartY)) { - mMouseOutsideSlop = TRUE; + mMouseOutsideSlop = true; // Must do this every frame, in case the camera moved or the land moved // since last frame. // If doesn't hit land, doesn't change old value LLVector3d land_global; - BOOL hit_land = gViewerWindow->mousePointOnLandGlobal(x, y, &land_global); + bool hit_land = gViewerWindow->mousePointOnLandGlobal(x, y, &land_global); if (hit_land) { - mDragEndValid = TRUE; + mDragEndValid = true; mDragEndGlobal = land_global; sanitize_corners(mDragStartGlobal, mDragEndGlobal, mWestSouthBottom, mEastNorthTop); @@ -173,7 +173,7 @@ bool LLToolSelectLand::handleHover(S32 x, S32 y, MASK mask) } else { - mDragEndValid = FALSE; + mDragEndValid = false; LL_DEBUGS("UserInput") << "hover handled by LLToolSelectLand (active, no land)" << LL_ENDL; gViewerWindow->setCursor(UI_CURSOR_NO); } @@ -225,7 +225,7 @@ void LLToolSelectLand::roundXY(LLVector3d &vec) // true if x,y outside small box around start_x,start_y -BOOL LLToolSelectLand::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y) +bool LLToolSelectLand::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y) { S32 dx = x - start_x; S32 dy = y - start_y; diff --git a/indra/newview/lltoolselectland.h b/indra/newview/lltoolselectland.h index dbddf07f49..3aa86bc87d 100644 --- a/indra/newview/lltoolselectland.h +++ b/indra/newview/lltoolselectland.h @@ -44,19 +44,19 @@ public: /*virtual*/ bool handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ bool handleHover(S32 x, S32 y, MASK mask); /*virtual*/ void render(); // draw the select rectangle - /*virtual*/ BOOL isAlwaysRendered() { return TRUE; } + /*virtual*/ bool isAlwaysRendered() { return true; } /*virtual*/ void handleSelect(); /*virtual*/ void handleDeselect(); protected: - BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y); + bool outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y); void roundXY(LLVector3d& vec); protected: LLVector3d mDragStartGlobal; // global coords LLVector3d mDragEndGlobal; // global coords - BOOL mDragEndValid; // is drag end a valid point in the world? + bool mDragEndValid; // is drag end a valid point in the world? S32 mDragStartX; // screen coords, from left S32 mDragStartY; // screen coords, from bottom @@ -64,7 +64,7 @@ protected: S32 mDragEndX; S32 mDragEndY; - BOOL mMouseOutsideSlop; // has mouse ever gone outside slop region? + bool mMouseOutsideSlop; // has mouse ever gone outside slop region? LLVector3d mWestSouthBottom; // global coords, from drag LLVector3d mEastNorthTop; // global coords, from drag diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp index 063c6f062c..feba24c2b3 100644 --- a/indra/newview/lltoolselectrect.cpp +++ b/indra/newview/lltoolselectrect.cpp @@ -62,7 +62,7 @@ LLToolSelectRect::LLToolSelectRect( LLToolComposite* composite ) mDragEndY(0), mDragLastWidth(0), mDragLastHeight(0), - mMouseOutsideSlop(FALSE) + mMouseOutsideSlop(false) { } @@ -72,7 +72,7 @@ void dialog_refresh_all(void); bool LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask) { bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); - handlePick(gViewerWindow->pickImmediate(x, y, TRUE /* pick_transparent */, pick_rigged)); + handlePick(gViewerWindow->pickImmediate(x, y, true /* pick_transparent */, pick_rigged)); LLTool::handleMouseDown(x, y, mask); @@ -84,27 +84,27 @@ void LLToolSelectRect::handlePick(const LLPickInfo& pick) mPick = pick; // start dragging rectangle - setMouseCapture( TRUE ); + setMouseCapture( true ); mDragStartX = pick.mMousePt.mX; mDragStartY = pick.mMousePt.mY; mDragEndX = pick.mMousePt.mX; mDragEndY = pick.mMousePt.mY; - mMouseOutsideSlop = FALSE; + mMouseOutsideSlop = false; } bool LLToolSelectRect::handleMouseUp(S32 x, S32 y, MASK mask) { - setMouseCapture( FALSE ); + setMouseCapture( false ); if( mMouseOutsideSlop ) { mDragLastWidth = 0; mDragLastHeight = 0; - mMouseOutsideSlop = FALSE; + mMouseOutsideSlop = false; if (mask == MASK_CONTROL) { @@ -134,7 +134,7 @@ bool LLToolSelectRect::handleHover(S32 x, S32 y, MASK mask) // just started rect select, and not adding to current selection LLSelectMgr::getInstance()->deselectAll(); } - mMouseOutsideSlop = TRUE; + mMouseOutsideSlop = true; mDragEndX = x; mDragEndY = y; @@ -161,7 +161,7 @@ void LLToolSelectRect::draw() { if( hasMouseCapture() && mMouseOutsideSlop) { - if (gKeyboard->currentMask(TRUE) == MASK_CONTROL) + if (gKeyboard->currentMask(true) == MASK_CONTROL) { gGL.color4f(1.f, 0.f, 0.f, 1.f); } @@ -175,8 +175,8 @@ void LLToolSelectRect::draw() llmax(mDragStartY, mDragEndY), llmax(mDragStartX, mDragEndX), llmin(mDragStartY, mDragEndY), - FALSE); - if (gKeyboard->currentMask(TRUE) == MASK_CONTROL) + false); + if (gKeyboard->currentMask(true) == MASK_CONTROL) { gGL.color4f(1.f, 0.f, 0.f, 0.1f); } @@ -193,7 +193,7 @@ void LLToolSelectRect::draw() } // true if x,y outside small box around start_x,start_y -BOOL LLToolSelectRect::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y) +bool LLToolSelectRect::outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y) { S32 dx = x - start_x; S32 dy = y - start_y; diff --git a/indra/newview/lltoolselectrect.h b/indra/newview/lltoolselectrect.h index cbdac957dc..bdde50fb3d 100644 --- a/indra/newview/lltoolselectrect.h +++ b/indra/newview/lltoolselectrect.h @@ -45,7 +45,7 @@ public: protected: void handleRectangleSelection(S32 x, S32 y, MASK mask); // true if you selected one - BOOL outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y); + bool outsideSlop(S32 x, S32 y, S32 start_x, S32 start_y); protected: S32 mDragStartX; // screen coords, from left @@ -57,7 +57,7 @@ protected: S32 mDragLastWidth; S32 mDragLastHeight; - BOOL mMouseOutsideSlop; // has mouse ever gone outside slop region? + bool mMouseOutsideSlop; // has mouse ever gone outside slop region? }; diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index f0a6b02ca6..3b10baef04 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -76,7 +76,7 @@ const S32 HUD_ARROW_SIZE = 32; // static LLTracker *LLTracker::sTrackerp = NULL; -BOOL LLTracker::sCheesyBeacon = FALSE; +bool LLTracker::sCheesyBeacon = false; LLTracker::LLTracker() : mTrackingStatus(TRACKING_NOTHING), @@ -85,12 +85,12 @@ LLTracker::LLTracker() mHUDArrowCenterY(0), mToolTip( "" ), mTrackedLandmarkName(""), - mHasReachedLandmark(FALSE), - mHasLandmarkPosition(FALSE), - mLandmarkHasBeenVisited(FALSE), + mHasReachedLandmark(false), + mHasLandmarkPosition(false), + mLandmarkHasBeenVisited(false), mTrackedLocationName( "" ), - mIsTrackingLocation(FALSE), - mHasReachedLocation(FALSE) + mIsTrackingLocation(false), + mHasReachedLocation(false) { } @@ -189,7 +189,7 @@ void LLTracker::render3D() if (!instance()->mBeaconText) { instance()->mBeaconText = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT); - instance()->mBeaconText->setDoFade(FALSE); + instance()->mBeaconText->setDoFade(false); } LLVector3d pos_global = instance()->mTrackedPositionGlobal; @@ -225,7 +225,7 @@ void LLTracker::render3D() if (!instance()->mBeaconText) { instance()->mBeaconText = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT); - instance()->mBeaconText->setDoFade(FALSE); + instance()->mBeaconText->setDoFade(false); } if (instance()->mHasLandmarkPosition) @@ -254,7 +254,7 @@ void LLTracker::render3D() // disappear when they're created only a few meters // away, yet disappear when the agent wanders away // and back again - instance()->mHasReachedLandmark = FALSE; + instance()->mHasReachedLandmark = false; } renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, map_track_color_under, instance()->mBeaconText, instance()->mTrackedLandmarkName ); @@ -275,7 +275,7 @@ void LLTracker::render3D() if (!instance()->mBeaconText) { instance()->mBeaconText = (LLHUDText *)LLHUDObject::addHUDObject(LLHUDObject::LL_HUD_TEXT); - instance()->mBeaconText->setDoFade(FALSE); + instance()->mBeaconText->setDoFade(false); } F32 dist = gFloaterWorldMap->getDistanceToDestination(instance()->getTrackedPositionGlobal(), 0.0f); @@ -302,22 +302,22 @@ void LLTracker::render3D() } else { - BOOL stop_tracking = FALSE; + bool stop_tracking = false; const LLUUID& avatar_id = av_tracker.getAvatarID(); if(avatar_id.isNull()) { - stop_tracking = TRUE; + stop_tracking = true; } else { const LLRelationship* buddy = av_tracker.getBuddyInfo(avatar_id); if(buddy && !buddy->isOnline() && !gAgent.isGodlike()) { - stop_tracking = TRUE; + stop_tracking = true; } if(!buddy && !gAgent.isGodlike()) { - stop_tracking = TRUE; + stop_tracking = true; } } if(stop_tracking) @@ -366,7 +366,7 @@ void LLTracker::trackLocation(const LLVector3d& pos_global, const std::string& f instance()->mTrackedPositionGlobal = pos_global; instance()->mTrackedLocationName = full_name; - instance()->mIsTrackingLocation = TRUE; + instance()->mIsTrackingLocation = true; instance()->mTrackingStatus = TRACKING_LOCATION; instance()->mTrackingLocationType = location_type; instance()->mLabel = full_name; @@ -375,9 +375,9 @@ void LLTracker::trackLocation(const LLVector3d& pos_global, const std::string& f // static -BOOL LLTracker::handleMouseDown(S32 x, S32 y) +bool LLTracker::handleMouseDown(S32 x, S32 y) { - BOOL eat_mouse_click = FALSE; + bool eat_mouse_click = false; // fortunately, we can always compute the tracking arrow center S32 dist_sqrd = (x - instance()->mHUDArrowCenterX) * (x - instance()->mHUDArrowCenterX) + (y - instance()->mHUDArrowCenterY) * (y - instance()->mHUDArrowCenterY); @@ -388,14 +388,14 @@ BOOL LLTracker::handleMouseDown(S32 x, S32 y) // turn off tracking if (gAgent.getAutoPilot()) { - gAgent.stopAutoPilot(TRUE); // TRUE because cancelled by user - eat_mouse_click = TRUE; + gAgent.stopAutoPilot(true); // true because cancelled by user + eat_mouse_click = true; } */ if (getTrackingStatus()) { instance()->stopTrackingAll(); - eat_mouse_click = TRUE; + eat_mouse_click = true; } } return eat_mouse_click; @@ -433,7 +433,7 @@ LLVector3d LLTracker::getTrackedPositionGlobal() // static -BOOL LLTracker::hasLandmarkPosition() +bool LLTracker::hasLandmarkPosition() { if (!instance()->mHasLandmarkPosition) { @@ -667,7 +667,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global, str += text; hud_textp->setFont(LLFontGL::getFontSansSerif()); - hud_textp->setZCompare(FALSE); + hud_textp->setZCompare(false); hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST)))); hud_textp->setString(str); @@ -717,9 +717,9 @@ void LLTracker::stopTrackingLandmark(bool clear_ui) mTrackedLandmarkItemID.setNull(); mTrackedLandmarkName.assign(""); mTrackedPositionGlobal.zeroVec(); - mHasLandmarkPosition = FALSE; - mHasReachedLandmark = FALSE; - mLandmarkHasBeenVisited = TRUE; + mHasLandmarkPosition = false; + mHasReachedLandmark = false; + mLandmarkHasBeenVisited = true; gFloaterWorldMap->clearLandmarkSelection(clear_ui); mTrackingStatus = TRACKING_NOTHING; } @@ -729,7 +729,7 @@ void LLTracker::stopTrackingLocation(bool clear_ui, bool dest_reached) { purgeBeaconText(); mTrackedLocationName.assign(""); - mIsTrackingLocation = FALSE; + mIsTrackingLocation = false; mTrackedPositionGlobal.zeroVec(); gFloaterWorldMap->clearLocationSelection(clear_ui, dest_reached); mTrackingStatus = TRACKING_NOTHING; @@ -753,7 +753,7 @@ void LLTracker::drawMarker(const LLVector3d& pos_global, const LLColor4& color, LLCoordGL screen; S32 x = 0; S32 y = 0; - const BOOL CLAMP = TRUE; + const bool CLAMP = true; // Exodus' mouselook combat feature //if (LLViewerCamera::getInstance()->projectPosAgentToScreen(pos_local, screen, CLAMP) @@ -872,13 +872,13 @@ void LLTracker::cacheLandmarkPosition() { // the landmark asset download may have finished, in which case // we'll now be able to figure out where we're trying to go - BOOL found_landmark = FALSE; + bool found_landmark = false; if( mTrackedLandmarkAssetID == LLFloaterWorldMap::getHomeID()) { LLVector3d pos_global; if ( gAgent.getHomePosGlobal( &mTrackedPositionGlobal )) { - found_landmark = TRUE; + found_landmark = true; } else { @@ -892,27 +892,27 @@ void LLTracker::cacheLandmarkPosition() LLLandmark* landmark = gLandmarkList.getAsset(mTrackedLandmarkAssetID); if(landmark && landmark->getGlobalPos(mTrackedPositionGlobal)) { - found_landmark = TRUE; + found_landmark = true; // cache the object's visitation status - mLandmarkHasBeenVisited = FALSE; + mLandmarkHasBeenVisited = false; LLInventoryItem* item = gInventory.getItem(mTrackedLandmarkItemID); if ( item && item->getFlags()&LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED) { - mLandmarkHasBeenVisited = TRUE; + mLandmarkHasBeenVisited = true; } } } if ( found_landmark && gFloaterWorldMap ) { - mHasReachedLandmark = FALSE; + mHasReachedLandmark = false; F32 dist = gFloaterWorldMap->getDistanceToDestination(mTrackedPositionGlobal, 1.0f); if ( dist < DESTINATION_UNVISITED_RADIUS ) { - mHasReachedLandmark = TRUE; + mHasReachedLandmark = true; } - mHasLandmarkPosition = TRUE; + mHasLandmarkPosition = true; } mHasLandmarkPosition = found_landmark; } diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h index a585c0674e..eb85b9b8f6 100644 --- a/indra/newview/lltracker.h +++ b/indra/newview/lltracker.h @@ -89,7 +89,7 @@ public: // returns global pos of tracked thing static LLVector3d getTrackedPositionGlobal(); - static BOOL hasLandmarkPosition(); + static bool hasLandmarkPosition(); static const std::string& getTrackedLocationName(); static void drawHUDArrow(); @@ -97,10 +97,10 @@ public: // Draw in-world 3D tracking stuff static void render3D(); - static BOOL handleMouseDown(S32 x, S32 y); + static bool handleMouseDown(S32 x, S32 y); static LLTracker* sTrackerp; - static BOOL sCheesyBeacon; + static bool sCheesyBeacon; static const std::string& getLabel() { return instance()->mLabel; } static const std::string& getToolTip() { return instance()->mToolTip; } @@ -146,13 +146,13 @@ protected: LLUUID mTrackedLandmarkItemID; std::vector mLandmarkAssetIDList; std::vector mLandmarkItemIDList; - BOOL mHasReachedLandmark; - BOOL mHasLandmarkPosition; - BOOL mLandmarkHasBeenVisited; + bool mHasReachedLandmark; + bool mHasLandmarkPosition; + bool mLandmarkHasBeenVisited; std::string mTrackedLocationName; - BOOL mIsTrackingLocation; - BOOL mHasReachedLocation; + bool mIsTrackingLocation; + bool mHasReachedLocation; }; diff --git a/indra/newview/lltrackpicker.cpp b/indra/newview/lltrackpicker.cpp index 4cdf9516e8..72e12a7192 100644 --- a/indra/newview/lltrackpicker.cpp +++ b/indra/newview/lltrackpicker.cpp @@ -72,7 +72,7 @@ void LLFloaterTrackPicker::onClose(bool app_quitting) LLView *owner = mOwnerHandle.get(); if (owner) { - owner->setFocus(TRUE); + owner->setFocus(true); } } @@ -94,12 +94,12 @@ void LLFloaterTrackPicker::showPicker(const LLSD &args) if (can_enable && select_item) { select_item = false; - getChild(RDO_TRACK_SELECTION, true)->setSelectedByValue(LLSD(track_id), TRUE); + getChild(RDO_TRACK_SELECTION, true)->setSelectedByValue(LLSD(track_id), true); } } openFloater(getKey()); - setFocus(TRUE); + setFocus(true); } void LLFloaterTrackPicker::draw() diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp index 3d68c10489..129c7e1b6d 100644 --- a/indra/newview/lltransientfloatermgr.cpp +++ b/indra/newview/lltransientfloatermgr.cpp @@ -96,7 +96,7 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y) bool hide = isControlClicked(group, mGroupControls.find(group)->second, x, y); if (hide) { - floater->setTransientVisible(FALSE); + floater->setTransientVisible(false); } } } diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h index d126543f15..fda96cfd64 100644 --- a/indra/newview/lltransientfloatermgr.h +++ b/indra/newview/lltransientfloatermgr.h @@ -80,7 +80,7 @@ protected: public: virtual LLTransientFloaterMgr::ETransientGroup getGroup() = 0; bool isTransientDocked() { return mFloater->isDocked(); }; - void setTransientVisible(BOOL visible) {mFloater->setVisible(visible); } + void setTransientVisible(bool visible) {mFloater->setVisible(visible); } private: LLFloater* mFloater; diff --git a/indra/newview/lluiavatar.cpp b/indra/newview/lluiavatar.cpp index e4e266c92a..264d39c559 100644 --- a/indra/newview/lluiavatar.cpp +++ b/indra/newview/lluiavatar.cpp @@ -37,7 +37,7 @@ LLUIAvatar::LLUIAvatar(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp) : LLVOAvatar(id, pcode, regionp) { - mIsDummy = TRUE; + mIsDummy = true; mIsUIAvatar = true; } diff --git a/indra/newview/lluploaddialog.cpp b/indra/newview/lluploaddialog.cpp index 78728b9e66..a545051048 100644 --- a/indra/newview/lluploaddialog.cpp +++ b/indra/newview/lluploaddialog.cpp @@ -62,7 +62,7 @@ LLUploadDialog::LLUploadDialog( const std::string& msg) : LLPanel() { setTransparentColor(LLUIColorTable::instance().getColor("UploadDialogBackground").get()); // Default-Panel independent background - setBackgroundVisible( TRUE ); + setBackgroundVisible( true ); if( LLUploadDialog::sDialog ) { @@ -120,7 +120,7 @@ void LLUploadDialog::setMessage( const std::string& msg) S32 dialog_width = max_msg_width + 2 * HPAD; S32 dialog_height = line_height * msg_lines.size() + 2 * VPAD; - reshape( dialog_width, dialog_height, FALSE ); + reshape( dialog_width, dialog_height, false ); // Message S32 msg_x = (getRect().getWidth() - max_msg_width) / 2; @@ -128,7 +128,7 @@ void LLUploadDialog::setMessage( const std::string& msg) int line_num; for (line_num=0; line_num<16; ++line_num) { - mLabelBox[line_num]->setVisible(FALSE); + mLabelBox[line_num]->setVisible(false); } line_num = 0; for (std::list::iterator iter = msg_lines.begin(); @@ -140,7 +140,7 @@ void LLUploadDialog::setMessage( const std::string& msg) mLabelBox[line_num]->setRect(msg_rect); mLabelBox[line_num]->setText(cur_line); mLabelBox[line_num]->setColor( LLUIColorTable::instance().getColor( "LabelTextColor" ) ); - mLabelBox[line_num]->setVisible(TRUE); + mLabelBox[line_num]->setVisible(true); msg_y -= line_height; ++line_num; } diff --git a/indra/newview/llurl.cpp b/indra/newview/llurl.cpp index 46cdbf9ed3..46ddf1e4ce 100644 --- a/indra/newview/llurl.cpp +++ b/indra/newview/llurl.cpp @@ -166,9 +166,9 @@ bool LLURL::operator==(const LLURL &rhs) const || (strcmp(mTag, rhs.mTag)) ) { - return FALSE; + return false; } - return TRUE; + return true; } bool LLURL::operator!=(const LLURL& rhs) const diff --git a/indra/newview/llurl.h b/indra/newview/llurl.h index 01ab3bdfc2..208f1a7562 100644 --- a/indra/newview/llurl.h +++ b/indra/newview/llurl.h @@ -77,7 +77,7 @@ public: virtual const char *updateRelativePath(const LLURL &url); - virtual BOOL isExtension(const char *compare) {return (!strcmp(mExtension,compare));}; + virtual bool isExtension(const char *compare) {return (!strcmp(mExtension,compare));}; public: diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp index 2b7e598a59..14a658827e 100644 --- a/indra/newview/llurllineeditorctrl.cpp +++ b/indra/newview/llurllineeditorctrl.cpp @@ -62,7 +62,7 @@ void LLURLLineEditor::cut() deleteSelection(); // Validate new string and rollback the if needed. - BOOL need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) ); + bool need_to_rollback = ( mPrevalidateFunc && !mPrevalidateFunc( mText.getWString() ) ); if( need_to_rollback ) { rollback.doRollback( this ); diff --git a/indra/newview/llurllineeditorctrl.h b/indra/newview/llurllineeditorctrl.h index b9540dd571..ed9671d314 100644 --- a/indra/newview/llurllineeditorctrl.h +++ b/indra/newview/llurllineeditorctrl.h @@ -82,7 +82,7 @@ private: std::string mText; S32 mCursorPos; S32 mScrollHPos; - BOOL mIsSelecting; + bool mIsSelecting; S32 mSelectionStart; S32 mSelectionEnd; }; // end class LLURLLineEditorRollback diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index 0170537b2e..ecf4ecacac 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -201,12 +201,12 @@ void LLViewerAssetStorage::storeAssetData( // Read the data from the cache if it'll fit in this packet. if (asset_size + 100 < MTUBYTES) { - BOOL res = vfile.read(buffer, asset_size); /* Flawfinder: ignore */ + bool res = vfile.read(buffer, asset_size); /* Flawfinder: ignore */ S32 bytes_read = res ? vfile.getLastBytesRead() : 0; if( bytes_read == asset_size ) { - req->mDataSentInFirstPacket = TRUE; + req->mDataSentInFirstPacket = true; //LL_INFOS() << "LLViewerAssetStorage::createAsset sending data in first packet" << LL_ENDL; } else diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index cc1854d496..216ade8b7a 100644 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -51,7 +51,7 @@ public: bool temp_file = false, bool is_priority = false, bool store_local = false, - bool user_waiting=FALSE, + bool user_waiting=false, F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT) override; void storeAssetData( @@ -62,7 +62,7 @@ public: void* user_data, bool temp_file = false, bool is_priority = false, - bool user_waiting=FALSE, + bool user_waiting=false, F64Seconds timeout=LL_ASSET_STORAGE_TIMEOUT) override; protected: diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 3a4e7b27ce..69b451b86a 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -426,7 +426,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() // Unknown extension errorMessage = llformat(LLTrans::getString("UnknownFileExtension").c_str(), exten.c_str()); errorLabel = "ErrorMessage"; - error = TRUE;; + error = true;; } else if (assetType == LLAssetType::AT_TEXTURE) { @@ -535,7 +535,7 @@ LLSD LLNewFileResourceUploadInfo::exportTempFile() // Unknown extension errorMessage = llformat(LLTrans::getString("UnknownFileExtension").c_str(), exten.c_str()); errorLabel = "ErrorMessage"; - error = TRUE;; + error = true;; } if (error) @@ -848,7 +848,7 @@ LLSD LLScriptAssetUpload::generatePostBody() body["item_id"] = getItemId(); // OpenSim expects an integer here... //body["is_script_running"] = getIsRunning(); - body["is_script_running"] = (BOOL)getIsRunning(); + body["is_script_running"] = (S32)getIsRunning(); // body["target"] = (getTargetType() == MONO) ? "mono" : "lsl2"; body["experience"] = getExerienceId(); @@ -974,7 +974,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. - LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(false); // Use correct inventory floater for showing the upload if (!panel) { @@ -990,9 +990,9 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti // // FIRE-22943: Don't switch away from the "Recent Items" tab. - //LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, FALSE, TAKE_FOCUS_NO, (panel == NULL)); - BOOL show_main_panel = (!panel || panel->getName() != "Recent Items"); - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, show_main_panel, TAKE_FOCUS_NO, (panel == NULL)); + //LLInventoryPanel::openInventoryPanelAndSetSelection(true, serverInventoryItem, false, TAKE_FOCUS_NO, (panel == NULL)); + bool show_main_panel = (!panel || panel->getName() != "Recent Items"); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, serverInventoryItem, show_main_panel, TAKE_FOCUS_NO, (panel == NULL)); // // restore keyboard focus diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 87198e7af1..54df27dfe6 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -395,9 +395,9 @@ void init_audio() // load up our initial set of sounds we'll want so they're in memory and ready to be played - BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); + bool mute_audio = gSavedSettings.getBOOL("MuteAudio"); - if (!mute_audio && FALSE == gSavedSettings.getBOOL("NoPreload")) + if (!mute_audio && false == gSavedSettings.getBOOL("NoPreload")) { gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndAlert"))); gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndBadKeystroke"))); @@ -453,15 +453,15 @@ void audio_update_volume(bool force_update) { // Replace frequently called gSavedSettings //F32 master_volume = gSavedSettings.getF32("AudioLevelMaster"); - //BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); + //bool mute_audio = gSavedSettings.getBOOL("MuteAudio"); static LLCachedControl sAudioLevelMaster(gSavedSettings, "AudioLevelMaster"); static LLCachedControl sMuteAudio(gSavedSettings, "MuteAudio"); F32 master_volume = sAudioLevelMaster(); - BOOL mute_audio = (BOOL)sMuteAudio; + bool mute_audio = sMuteAudio(); // LLProgressView* progress = gViewerWindow->getProgressView(); - BOOL progress_view_visible = FALSE; + bool progress_view_visible = false; if (progress) { @@ -470,7 +470,7 @@ void audio_update_volume(bool force_update) if (!gViewerWindow->getActive() && gSavedSettings.getBOOL("MuteWhenMinimized")) { - mute_audio = TRUE; + mute_audio = true; } F32 mute_volume = mute_audio ? 0.0f : 1.0f; @@ -548,12 +548,12 @@ void audio_update_volume(bool force_update) // Use faster LLCachedControls for frequently visited locations //F32 music_volume = gSavedSettings.getF32("AudioLevelMusic"); - //BOOL music_muted = gSavedSettings.getBOOL("MuteMusic"); + //bool music_muted = gSavedSettings.getBOOL("MuteMusic"); static LLCachedControl audioLevelMusic(gSavedSettings, "AudioLevelMusic"); static LLCachedControl muteMusic(gSavedSettings, "MuteMusic"); F32 music_volume = (F32)audioLevelMusic; - BOOL music_muted = (BOOL)muteMusic; + bool music_muted = muteMusic(); // F32 fade_volume = LLViewerAudio::getInstance()->getFadeVolume(); @@ -564,12 +564,12 @@ void audio_update_volume(bool force_update) // Streaming Media // Use faster LLCachedControls for frequently visited locations //F32 media_volume = gSavedSettings.getF32("AudioLevelMedia"); - //BOOL media_muted = gSavedSettings.getBOOL("MuteMedia"); + //bool media_muted = gSavedSettings.getBOOL("MuteMedia"); static LLCachedControl audioLevelMedia(gSavedSettings, "AudioLevelMedia"); static LLCachedControl muteMedia(gSavedSettings, "MuteMedia"); F32 media_volume = (F32)audioLevelMedia; - BOOL media_muted = (BOOL)muteMedia; + bool media_muted = muteMedia(); // media_volume = mute_volume * master_volume * media_volume; LLViewerMedia::getInstance()->setVolume( media_muted ? 0.0f : media_volume ); @@ -584,9 +584,9 @@ void audio_update_volume(bool force_update) // voice_volume = mute_volume * master_volume * voice_volume; // Use faster LLCachedControls for frequently visited locations - //BOOL voice_mute = gSavedSettings.getBOOL("MuteVoice"); + //bool voice_mute = gSavedSettings.getBOOL("MuteVoice"); static LLCachedControl muteVoice(gSavedSettings, "MuteVoice"); - BOOL voice_mute = (BOOL)muteVoice; + bool voice_mute = muteVoice(); LLVoiceClient *voice_inst = LLVoiceClient::getInstance(); // voice_inst->setVoiceVolume(voice_mute ? 0.f : voice_volume); diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index 77d596e2c4..1040e086c7 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -199,7 +199,7 @@ void LLViewerCamera::calcProjection(const F32 far_distance) const // height. //static -void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zflip, BOOL no_hacks) +void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, bool ortho, bool zflip, bool no_hacks) { GLint* viewport = (GLint*) gGLViewport; F64 model[16]; @@ -295,17 +295,17 @@ void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zfli camera.calcAgentFrustumPlanes(frust); } -void LLViewerCamera::setPerspective(BOOL for_selection, +void LLViewerCamera::setPerspective(bool for_selection, S32 x, S32 y_from_bot, S32 width, S32 height, - BOOL limit_select_distance, + bool limit_select_distance, F32 z_near, F32 z_far) { F32 fov_y, aspect; fov_y = RAD_TO_DEG * getView(); - BOOL z_default_far = FALSE; + bool z_default_far = false; if (z_far <= 0) { - z_default_far = TRUE; + z_default_far = true; z_far = getFar(); } if (z_near <= 0) @@ -450,11 +450,11 @@ void LLViewerCamera::projectScreenToPosAgent(const S32 screen_x, const S32 scree } // Uses the last GL matrices set in set_perspective to project a point from -// the agent's region space to screen coordinates. Returns TRUE if point in within +// the agent's region space to screen coordinates. Returns true if point in within // the current window. -BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const BOOL clamp) const +bool LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const bool clamp) const { - BOOL in_front = TRUE; + bool in_front = true; GLdouble x, y, z; // object's window coords, GL-style LLVector3 dir_to_point = pos_agent - getOrigin(); @@ -464,11 +464,11 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord { if (clamp) { - return FALSE; + return false; } else { - in_front = FALSE; + in_front = false; } } @@ -503,19 +503,19 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord S32 int_x = lltrunc(x); S32 int_y = lltrunc(y); - BOOL valid = TRUE; + bool valid = true; if (clamp) { if (int_x < world_rect.mLeft) { out_point.mX = world_rect.mLeft; - valid = FALSE; + valid = false; } else if (int_x > world_rect.mRight) { out_point.mX = world_rect.mRight; - valid = FALSE; + valid = false; } else { @@ -525,12 +525,12 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord if (int_y < world_rect.mBottom) { out_point.mY = world_rect.mBottom; - valid = FALSE; + valid = false; } else if (int_y > world_rect.mTop) { out_point.mY = world_rect.mTop; - valid = FALSE; + valid = false; } else { @@ -545,19 +545,19 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord if (int_x < world_rect.mLeft) { - valid = FALSE; + valid = false; } else if (int_x > world_rect.mRight) { - valid = FALSE; + valid = false; } if (int_y < world_rect.mBottom) { - valid = FALSE; + valid = false; } else if (int_y > world_rect.mTop) { - valid = FALSE; + valid = false; } return in_front && valid; @@ -565,23 +565,23 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord } else { - return FALSE; + return false; } } // Uses the last GL matrices set in set_perspective to project a point from // the agent's region space to the nearest edge in screen coordinates. -// Returns TRUE if projection succeeds. -BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent, +// Returns true if projection succeeds. +bool LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const { LLVector3 dir_to_point = pos_agent - getOrigin(); dir_to_point /= dir_to_point.magVec(); - BOOL in_front = TRUE; + bool in_front = true; if (dir_to_point * getAtAxis() < 0.f) { - in_front = FALSE; + in_front = false; } LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw(); @@ -622,7 +622,7 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent, if (x == center_x && y == center_y) { // can't project to edge from exact center - return FALSE; + return false; } // find the line from center to local @@ -719,9 +719,9 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent, out_point.mX = int_x + world_rect.mLeft; out_point.mY = int_y + world_rect.mBottom; - return TRUE; + return true; } - return FALSE; + return false; } @@ -746,7 +746,7 @@ LLVector3 LLViewerCamera::roundToPixel(const LLVector3 &pos_agent) F32 dist = (pos_agent - getOrigin()).magVec(); // Convert to screen space and back, preserving the depth. LLCoordGL screen_point; - if (!projectPosAgentToScreen(pos_agent, screen_point, FALSE)) + if (!projectPosAgentToScreen(pos_agent, screen_point, false)) { // Off the screen, just return the original position. return pos_agent; @@ -768,7 +768,7 @@ LLVector3 LLViewerCamera::roundToPixel(const LLVector3 &pos_agent) return pos_agent_rounded; } -BOOL LLViewerCamera::cameraUnderWater() const +bool LLViewerCamera::cameraUnderWater() const { LLViewerRegion* regionp = LLWorld::instance().getRegionFromPosAgent(getOrigin()); @@ -779,26 +779,26 @@ BOOL LLViewerCamera::cameraUnderWater() const if(!regionp) { - return FALSE ; + return false ; } return getOrigin().mV[VZ] < regionp->getWaterHeight(); } -BOOL LLViewerCamera::areVertsVisible(LLViewerObject* volumep, BOOL all_verts) +bool LLViewerCamera::areVertsVisible(LLViewerObject* volumep, bool all_verts) { S32 i, num_faces; LLDrawable* drawablep = volumep->mDrawable; if (!drawablep) { - return FALSE; + return false; } LLVolume* volume = volumep->getVolume(); if (!volume) { - return FALSE; + return false; } LLVOVolume* vo_volume = (LLVOVolume*) volumep; @@ -830,7 +830,7 @@ BOOL LLViewerCamera::areVertsVisible(LLViewerObject* volumep, BOOL all_verts) render_mata.affineTransform(t, vec); } - BOOL in_frustum = pointInFrustum(LLVector3(vec.getF32ptr())) > 0; + bool in_frustum = pointInFrustum(LLVector3(vec.getF32ptr())) > 0; if (( !in_frustum && all_verts) || (in_frustum && !all_verts)) @@ -842,7 +842,7 @@ BOOL LLViewerCamera::areVertsVisible(LLViewerObject* volumep, BOOL all_verts) return all_verts; } -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; // changes local camera and broadcasts change /* virtual */ void LLViewerCamera::setView(F32 vertical_fov_rads) @@ -893,14 +893,14 @@ void LLViewerCamera::setDefaultFOV(F32 vertical_fov_rads) mCosHalfCameraFOV = cosf(mCameraFOVDefault * 0.5f); } -BOOL LLViewerCamera::isDefaultFOVChanged() +bool LLViewerCamera::isDefaultFOVChanged() { if(mPrevCameraFOVDefault != mCameraFOVDefault) { mPrevCameraFOVDefault = mCameraFOVDefault; return !gSavedSettings.getBOOL("IgnoreFOVZoomForLODs"); } - return FALSE; + return false; } // static diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h index 78ca2b3076..f65a2017bf 100644 --- a/indra/newview/llviewercamera.h +++ b/indra/newview/llviewercamera.h @@ -35,8 +35,8 @@ #include "lltrace.h" class LLViewerObject; -const BOOL FOR_SELECTION = TRUE; -const BOOL NOT_FOR_SELECTION = FALSE; +const bool FOR_SELECTION = true; +const bool NOT_FOR_SELECTION = false; class alignas(16) LLViewerCamera : public LLCamera, public LLSimpleton { @@ -64,17 +64,17 @@ public: const LLVector3 &up_direction, const LLVector3 &point_of_interest); - static void updateFrustumPlanes(LLCamera& camera, BOOL ortho = FALSE, BOOL zflip = FALSE, BOOL no_hacks = FALSE); + static void updateFrustumPlanes(LLCamera& camera, bool ortho = false, bool zflip = false, bool no_hacks = false); static void updateCameraAngle(void* user_data, const LLSD& value); - void setPerspective(BOOL for_selection, S32 x, S32 y_from_bot, S32 width, S32 height, BOOL limit_select_distance, F32 z_near = 0, F32 z_far = 0); + void setPerspective(bool for_selection, S32 x, S32 y_from_bot, S32 width, S32 height, bool limit_select_distance, F32 z_near = 0, F32 z_far = 0); const LLMatrix4 &getProjection() const; const LLMatrix4 &getModelview() const; // Warning! These assume the current global matrices are correct void projectScreenToPosAgent(const S32 screen_x, const S32 screen_y, LLVector3* pos_agent ) const; - BOOL projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const BOOL clamp = TRUE) const; - BOOL projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const; + bool projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const bool clamp = true) const; + bool projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const; LLVector3 getVelocityDir() const {return mVelocityDir;} static LLTrace::CountStatHandle<>* getVelocityStat() {return &sVelocityStat; } @@ -92,10 +92,10 @@ public: void setDefaultFOV(F32 fov) ; F32 getDefaultFOV() { return mCameraFOVDefault; } - BOOL isDefaultFOVChanged(); + bool isDefaultFOVChanged(); - BOOL cameraUnderWater() const; - BOOL areVertsVisible(LLViewerObject* volumep, BOOL all_verts); + bool cameraUnderWater() const; + bool areVertsVisible(LLViewerObject* volumep, bool all_verts); const LLVector3 &getPointOfInterest() { return mLastPointOfInterest; } F32 getPixelMeterRatio() const { return mPixelMeterRatio; } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index d1ca6be0f1..1ded3114f9 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -119,7 +119,7 @@ #include #ifdef TOGGLE_HACKED_GODLIKE_VIEWER -BOOL gHackGodmode = FALSE; +bool gHackGodmode = false; #endif // Should you contemplate changing the name "Global", please first grep for @@ -132,8 +132,8 @@ LLControlGroup gWarningSettings("Warnings"); // persists ignored dialogs/warning std::string gLastRunVersion; -extern BOOL gResizeScreenTexture; -extern BOOL gResizeShadowTexture; +extern bool gResizeScreenTexture; +extern bool gResizeShadowTexture; extern bool gDebugGL; // FIRE-6809: Quickly moving the bandwidth slider has no effect @@ -164,7 +164,7 @@ protected: if (!alreadyComplainedAboutBW && mNewValue > 1500.f) { LLNotificationsUtil::add("FSBWTooHigh"); - gWarningSettings.setBOOL("FSBandwidthTooHigh", TRUE); + gWarningSettings.setBOOL("FSBandwidthTooHigh", true); } return false; @@ -461,7 +461,7 @@ static void handleAudioVolumeChanged(const LLSD& newvalue) static bool handleJoystickChanged(const LLSD& newvalue) { - LLViewerJoystick::getInstance()->setCameraNeedsUpdate(TRUE); + LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); return true; } @@ -541,7 +541,7 @@ static bool handleRenderDebugPipelineChanged(const LLSD& newvalue) static bool handleRenderResolutionDivisorChanged(const LLSD&) { - gResizeScreenTexture = TRUE; + gResizeScreenTexture = true; return true; } @@ -737,7 +737,7 @@ static void handleAutohideChatbarChanged(const LLSD& new_value) gSavedSettings.setBOOL("MainChatbarVisible", !new_value.asBoolean()); if (focus) { - focus->setFocus(TRUE); + focus->setFocus(true); } } // @@ -1406,7 +1406,7 @@ DECL_LLCC(U32, (U32)666); DECL_LLCC(S32, (S32)-666); DECL_LLCC(F32, (F32)-666.666); DECL_LLCC(bool, true); -DECL_LLCC(BOOL, FALSE); +DECL_LLCC(bool, false); static LLCachedControl mySetting_string("TestCachedControlstring", "Default String Value"); DECL_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f)); DECL_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f)); @@ -1427,7 +1427,7 @@ void test_cached_control() TEST_LLCC(S32, (S32)-666); TEST_LLCC(F32, (F32)-666.666); TEST_LLCC(bool, true); - TEST_LLCC(BOOL, FALSE); + TEST_LLCC(bool, false); if((std::string)mySetting_string != "Default String Value") LL_ERRS() << "Fail string" << LL_ENDL; TEST_LLCC(LLVector3, LLVector3(1.0f, 2.0f, 3.0f)); TEST_LLCC(LLVector3d, LLVector3d(6.0f, 5.0f, 4.0f)); diff --git a/indra/newview/llviewercontrol.h b/indra/newview/llviewercontrol.h index 646e44c250..eab13e2a6b 100644 --- a/indra/newview/llviewercontrol.h +++ b/indra/newview/llviewercontrol.h @@ -34,7 +34,7 @@ // allows a hacked godmode to be toggled on and off. #define TOGGLE_HACKED_GODLIKE_VIEWER #ifdef TOGGLE_HACKED_GODLIKE_VIEWER -extern BOOL gHackGodmode; +extern bool gHackGodmode; #endif bool toggle_show_navigation_panel(const LLSD& newvalue); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 0c0d9114f3..3512e5178e 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -94,7 +94,7 @@ extern bool gShiftFrame; LLPointer gDisconnectedImagep = NULL; // used to toggle renderer back on after teleport -BOOL gTeleportDisplay = FALSE; +bool gTeleportDisplay = false; LLFrameTimer gTeleportDisplayTimer; LLFrameTimer gTeleportArrivalTimer; const F32 RESTORE_GL_TIME = 5.f; // Wait this long while reloading textures before we raise the curtain @@ -104,16 +104,16 @@ F32 gLastDrawDistanceStep = 0.0f; // FIRE-12004: Attachments getting lost on TP LLFrameTimer gPostTeleportFinishKillObjectDelayTimer; -BOOL gForceRenderLandFence = FALSE; -BOOL gDisplaySwapBuffers = FALSE; -BOOL gDepthDirty = FALSE; -BOOL gResizeScreenTexture = FALSE; -BOOL gResizeShadowTexture = FALSE; -BOOL gWindowResized = FALSE; -BOOL gSnapshot = FALSE; -BOOL gCubeSnapshot = FALSE; -BOOL gSnapshotNoPost = FALSE; -BOOL gShaderProfileFrame = FALSE; +bool gForceRenderLandFence = false; +bool gDisplaySwapBuffers = false; +bool gDepthDirty = false; +bool gResizeScreenTexture = false; +bool gResizeShadowTexture = false; +bool gWindowResized = false; +bool gSnapshot = false; +bool gCubeSnapshot = false; +bool gSnapshotNoPost = false; +bool gShaderProfileFrame = false; // This is how long the sim will try to teleport you before giving up. const F32 TELEPORT_EXPIRY = 15.0f; @@ -257,7 +257,7 @@ void display_stats() gMemoryAllocated = U64Bytes(LLMemory::getCurrentRSS()); U32Megabytes memory = gMemoryAllocated; LL_INFOS() << "MEMORY: " << memory << LL_ENDL; - LLMemory::logMemoryInfo(TRUE) ; + LLMemory::logMemoryInfo(true) ; gRecentMemoryTime.reset(); } F32 asset_storage_log_freq = gSavedSettings.getF32("AssetStorageLogFrequency"); @@ -294,7 +294,7 @@ static void update_tp_display(bool minimized) // is minimized *during* a TP. HB if (minimized) { - gViewerWindow->setShowProgress(FALSE, FALSE); + gViewerWindow->setShowProgress(false, false); } const std::string& message = gAgent.getTeleportMessage(); @@ -306,7 +306,7 @@ static void update_tp_display(bool minimized) const std::string& msg = LLAgent::sTeleportProgressMessages["pending"]; if (!minimized) { - gViewerWindow->setShowProgress(TRUE, !gSavedSettings.getBOOL("FSDisableTeleportScreens")); + gViewerWindow->setShowProgress(true, !gSavedSettings.getBOOL("FSDisableTeleportScreens")); gViewerWindow->setProgressPercent(llmin(teleport_percent, 0.0f)); gViewerWindow->setProgressString(msg); } @@ -343,7 +343,7 @@ static void update_tp_display(bool minimized) FSData::instance().selectNextMOTD(); if (!minimized) { - gViewerWindow->setShowProgress(TRUE, !gSavedSettings.getBOOL("FSDisableTeleportScreens")); + gViewerWindow->setShowProgress(true, !gSavedSettings.getBOOL("FSDisableTeleportScreens")); gViewerWindow->setProgressPercent(llmin(teleport_percent, 0.0f)); gViewerWindow->setProgressString(msg); gViewerWindow->setProgressMessage(gAgent.mMOTD); @@ -377,17 +377,17 @@ static void update_tp_display(bool minimized) gAgent.setTeleportState(LLAgent::TELEPORT_ARRIVING); gAgent.setTeleportMessage(LLAgent::sTeleportProgressMessages["arriving"]); gAgent.sheduleTeleportIM(); - gTextureList.mForceResetTextureStats = TRUE; - gAgentCamera.resetView(TRUE, TRUE); + gTextureList.mForceResetTextureStats = true; + gAgentCamera.resetView(true, true); if (!minimized) { - gViewerWindow->setProgressCancelButtonVisible(FALSE, LLTrans::getString("Cancel")); + gViewerWindow->setProgressCancelButtonVisible(false, LLTrans::getString("Cancel")); gViewerWindow->setProgressPercent(75.f); } if (!gSavedSettings.getBOOL("FSDisableTeleportScreens")) { - gAgentCamera.resetView(TRUE, TRUE); + gAgentCamera.resetView(true, true); } // FIRE-12004: Attachments getting lost on TP @@ -407,7 +407,7 @@ static void update_tp_display(bool minimized) } if (!minimized) { - gViewerWindow->setProgressCancelButtonVisible(FALSE, LLTrans::getString("Cancel")); + gViewerWindow->setProgressCancelButtonVisible(false, LLTrans::getString("Cancel")); gViewerWindow->setProgressPercent(arrival_fraction * 25.f + 75.f); gViewerWindow->setProgressString(message); } @@ -434,13 +434,13 @@ static void update_tp_display(bool minimized) case LLAgent::TELEPORT_NONE: // No teleport in progress - gViewerWindow->setShowProgress(FALSE, FALSE); - gTeleportDisplay = FALSE; + gViewerWindow->setShowProgress(false, false); + gTeleportDisplay = false; } } // Paint the display! -void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) +void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot) { LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("Render"); @@ -457,22 +457,22 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gViewerWindow->getWindow()->swapBuffers(); LLPipeline::refreshCachedSettings(); gPipeline.resizeScreenTexture(); - gResizeScreenTexture = FALSE; - gWindowResized = FALSE; + gResizeScreenTexture = false; + gWindowResized = false; return; } if (gResizeShadowTexture) { //skip render on frames where window has been resized gPipeline.resizeShadowTexture(); - gResizeShadowTexture = FALSE; + gResizeShadowTexture = false; } gSnapshot = for_snapshot; if (LLPipeline::sRenderDeferred) { //hack to make sky show up in deferred snapshots - for_snapshot = FALSE; + for_snapshot = false; } LLGLSDefault gls_default; @@ -541,7 +541,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) static F32 last_update_time = 0.f; if ((gFrameTimeSeconds - last_update_time) > 1.f) { - InvalidateRect((HWND)gViewerWindow->getPlatformWindow(), NULL, FALSE); + InvalidateRect((HWND)gViewerWindow->getPlatformWindow(), NULL, false); last_update_time = gFrameTimeSeconds; } #elif LL_DARWIN @@ -572,7 +572,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLGLSLShader::initProfile(); } - //LLGLState::verify(FALSE); + //LLGLState::verify(false); ///////////////////////////////////////////////// // @@ -600,7 +600,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLVOAvatar::sRenderGroupTitles = (nameTagShowGroupTitles && LLVOAvatar::sRenderName); // - gPipeline.mBackfaceCull = TRUE; + gPipeline.mBackfaceCull = true; gFrameCount++; gRecentFrameCount++; if (gFocusMgr.getAppHasFocus()) @@ -644,8 +644,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) F32 percent_done = gRestoreGLTimer.getElapsedTimeF32() * 100.f / RESTORE_GL_TIME; if( percent_done > 100.f ) { - gViewerWindow->setShowProgress(FALSE,FALSE); - gRestoreGL = FALSE; + gViewerWindow->setShowProgress(false,false); + gRestoreGL = false; } else { @@ -820,7 +820,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) //Increment drawable frame counter LLDrawable::incrementVisible(); - LLSpatialGroup::sNoDelete = TRUE; + LLSpatialGroup::sNoDelete = true; LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName(); S32 occlusion = LLPipeline::sUseOcclusion; @@ -828,7 +828,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { //depth buffer is invalid, don't overwrite occlusion state LLPipeline::sUseOcclusion = llmin(occlusion, 1); } - gDepthDirty = FALSE; + gDepthDirty = false; LLGLState::checkStates(); @@ -846,7 +846,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 2") if (gResizeScreenTexture) { - gResizeScreenTexture = FALSE; + gResizeScreenTexture = false; gPipeline.resizeScreenTexture(); } @@ -1008,12 +1008,12 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // gGL.popMatrix(); //} - LLPipeline::sUnderWaterRender = camera.cameraUnderWater() ? TRUE : FALSE; // Factor out calls to getInstance + LLPipeline::sUnderWaterRender = camera.cameraUnderWater() ? true : false; // Factor out calls to getInstance // Aurora Sim if (!LLWorld::getInstance()->getAllowRenderWater()) { - LLPipeline::sUnderWaterRender = FALSE; + LLPipeline::sUnderWaterRender = false; } // Aurora Sim LLGLState::checkStates(); @@ -1075,7 +1075,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gOcclusionProgram.bind(); for (U32 i = 0; i < num_types; i++) { - gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, FALSE); + gPipeline.renderObjects(types[i], LLVertexBuffer::MAP_VERTEX, false); } gOcclusionProgram.unbind(); @@ -1108,7 +1108,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gPipeline.renderDeferredLighting(); } - LLPipeline::sUnderWaterRender = FALSE; + LLPipeline::sUnderWaterRender = false; { //capture the frame buffer. @@ -1123,7 +1123,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) } - LLSpatialGroup::sNoDelete = FALSE; + LLSpatialGroup::sNoDelete = false; gPipeline.clearReferences(); } @@ -1140,7 +1140,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (gShaderProfileFrame) { - gShaderProfileFrame = FALSE; + gShaderProfileFrame = false; LLGLSLShader::finishProfile(); } } @@ -1166,7 +1166,7 @@ void display_cube_face() gPipeline.disableLights(); - gPipeline.mBackfaceCull = TRUE; + gPipeline.mBackfaceCull = true; gViewerWindow->setup3DViewport(); @@ -1188,11 +1188,11 @@ void display_cube_face() LLEnvironment::instance().update(LLViewerCamera::getInstance()); } - LLSpatialGroup::sNoDelete = TRUE; + LLSpatialGroup::sNoDelete = true; S32 occlusion = LLPipeline::sUseOcclusion; LLPipeline::sUseOcclusion = 0; // occlusion data is from main camera point of view, don't read or write it during cube snapshots - //gDepthDirty = TRUE; //let "real" render pipe know it can't trust the depth buffer for occlusion data + //gDepthDirty = true; //let "real" render pipe know it can't trust the depth buffer for occlusion data static LLCullResult result; LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; @@ -1226,7 +1226,7 @@ void display_cube_face() LLAppViewer::instance()->pingMainloopTimeout("Display:RenderStart"); - LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE; + LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? true : false; gGL.setColorMask(true, true); @@ -1249,12 +1249,12 @@ void display_cube_face() gPipeline.renderDeferredLighting(); - LLPipeline::sUnderWaterRender = FALSE; + LLPipeline::sUnderWaterRender = false; // Finalize scene //gPipeline.renderFinalize(); - LLSpatialGroup::sNoDelete = FALSE; + LLSpatialGroup::sNoDelete = false; gPipeline.clearReferences(); } @@ -1280,11 +1280,11 @@ void render_hud_attachments() if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices()) { - LLPipeline::sRenderingHUDs = TRUE; + LLPipeline::sRenderingHUDs = true; LLCamera hud_cam = *LLViewerCamera::getInstance(); hud_cam.setOrigin(-1.f,0,0); hud_cam.setAxes(LLVector3(1,0,0), LLVector3(0,1,0), LLVector3(0,0,1)); - LLViewerCamera::updateFrustumPlanes(hud_cam, TRUE); + LLViewerCamera::updateFrustumPlanes(hud_cam, true); // gSavedSettings replacement //bool render_particles = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES) && gSavedSettings.getBOOL("RenderHUDParticles"); @@ -1320,7 +1320,7 @@ void render_hud_attachments() //cull, sort, and render hud objects static LLCullResult result; - LLSpatialGroup::sNoDelete = TRUE; + LLSpatialGroup::sNoDelete = true; LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD; gPipeline.updateCull(hud_cam, result, true); @@ -1355,7 +1355,7 @@ void render_hud_attachments() gPipeline.renderGeomPostDeferred(hud_cam); - LLSpatialGroup::sNoDelete = FALSE; + LLSpatialGroup::sNoDelete = false; //gPipeline.clearReferences(); render_hud_elements(); @@ -1368,7 +1368,7 @@ void render_hud_attachments() gPipeline.toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } LLPipeline::sUseOcclusion = use_occlusion; - LLPipeline::sRenderingHUDs = FALSE; + LLPipeline::sRenderingHUDs = false; } gGL.matrixMode(LLRender::MM_PROJECTION); gGL.popMatrix(); @@ -1437,11 +1437,11 @@ bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::mat tmp_model *= mat; model = tmp_model; - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -1471,7 +1471,7 @@ bool setup_hud_matrices(const LLRect& screen_region) gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.loadMatrix(model.m); set_current_modelview(model); - return TRUE; + return true; } void render_ui(F32 zoom_factor, int subfield) @@ -1569,7 +1569,7 @@ void swap() { gViewerWindow->getWindow()->swapBuffers(); } - gDisplaySwapBuffers = TRUE; + gDisplaySwapBuffers = true; } void renderCoordinateAxes() @@ -1674,7 +1674,7 @@ void render_ui_3d() draw_axes(); } - gViewerWindow->renderSelections(FALSE, FALSE, TRUE); // Non HUD call in render_hud_elements + gViewerWindow->renderSelections(false, false, true); // Non HUD call in render_hud_elements if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { @@ -1735,7 +1735,7 @@ void render_ui_2d() F32 zoom = gAgentCamera.mHUDCurZoom; gGL.scalef(zoom,zoom,1.f); gGL.color4fv(LLColor4::white.mV); - gl_rect_2d(-half_width, half_height, half_width, -half_height, FALSE); + gl_rect_2d(-half_width, half_height, half_width, -half_height, false); gGL.popMatrix(); gUIProgram.unbind(); stop_glerror(); @@ -1864,7 +1864,7 @@ void render_disconnected_background() raw->expandToPowerOfTwo(); - gDisconnectedImagep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE ); + gDisconnectedImagep = LLViewerTextureManager::getLocalTexture(raw.get(), false ); gStartTexture = gDisconnectedImagep; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } diff --git a/indra/newview/llviewerdisplay.h b/indra/newview/llviewerdisplay.h index 5beabcbc4c..0e65e193f0 100644 --- a/indra/newview/llviewerdisplay.h +++ b/indra/newview/llviewerdisplay.h @@ -32,16 +32,16 @@ class LLPostProcess; void display_startup(); void display_cleanup(); -void display(BOOL rebuild = TRUE, F32 zoom_factor = 1.f, int subfield = 0, BOOL for_snapshot = FALSE); +void display(bool rebuild = true, F32 zoom_factor = 1.f, int subfield = 0, bool for_snapshot = false); -extern BOOL gDisplaySwapBuffers; -extern BOOL gDepthDirty; -extern BOOL gTeleportDisplay; +extern bool gDisplaySwapBuffers; +extern bool gDepthDirty; +extern bool gTeleportDisplay; extern LLFrameTimer gTeleportDisplayTimer; -extern BOOL gForceRenderLandFence; -extern BOOL gResizeScreenTexture; -extern BOOL gResizeShadowTexture; -extern BOOL gWindowResized; +extern bool gForceRenderLandFence; +extern bool gResizeScreenTexture; +extern bool gResizeShadowTexture; +extern bool gWindowResized; // Draw Distance stepping; originally based on SpeedRez by Henri Beauchamp, licensed under LGPL extern F32 gSavedDrawDistance; diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index 282ae31480..251376aa63 100644 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -42,7 +42,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry ViewerFolderEntry(const std::string &new_category_name, // default name when creating a new category of this type const std::string &icon_name_open, // name of the folder icon const std::string &icon_name_closed, - BOOL is_quiet, // folder doesn't need a UI update when changed + bool is_quiet, // folder doesn't need a UI update when changed bool hide_if_empty, // folder not shown if empty const std::string &dictionary_name = empty_string // no reverse lookup needed on non-ensembles, so in most cases just leave this blank ) @@ -71,7 +71,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry */ mIconNameOpen("Inv_FolderOpen"), mIconNameClosed("Inv_FolderClosed"), mNewCategoryName(new_category_name), - mIsQuiet(FALSE), + mIsQuiet(false), mHideIfEmpty(false) { const std::string delims (","); @@ -96,7 +96,7 @@ struct ViewerFolderEntry : public LLDictionaryEntry const std::string mNewCategoryName; typedef std::vector name_vec_t; name_vec_t mAllowedNames; - BOOL mIsQuiet; + bool mIsQuiet; bool mHideIfEmpty; }; @@ -113,83 +113,83 @@ LLViewerFolderDictionary::LLViewerFolderDictionary() // NEW CATEGORY NAME FOLDER OPEN FOLDER CLOSED QUIET? HIDE IF EMPTY? // |-------------------------|-----------------------|----------------------|-----------|--------------| // Use individual icons for different folder types - //addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", FALSE, false)); - //addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", TRUE, false)); - //addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", TRUE, true)); - //addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); + //addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", false, false)); + //addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", true, false)); + //addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", true, true)); + //addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_SysOpen", "Inv_SysClosed", false, true)); - //addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", TRUE, false)); - //addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE, true)); - //addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", TRUE, true)); - //addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_SETTINGS, new ViewerFolderEntry("Settings", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); - //addEntry(LLFolderType::FT_MATERIAL, new ViewerFolderEntry("Materials", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); + //addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_SysOpen", "Inv_SysClosed", true, false)); + //addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", true, true)); + //addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_SysOpen", "Inv_SysClosed", true, true)); + //addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_SETTINGS, new ViewerFolderEntry("Settings", "Inv_SysOpen", "Inv_SysClosed", false, true)); + //addEntry(LLFolderType::FT_MATERIAL, new ViewerFolderEntry("Materials", "Inv_SysOpen", "Inv_SysClosed", false, true)); // //bool boxes_invisible = !gSavedSettings.getBOOL("InventoryOutboxMakeVisible"); - //addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Received Items", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible)); - //addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Merchant Outbox", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); + //addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Received Items", "Inv_SysOpen", "Inv_SysClosed", false, boxes_invisible)); + //addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Merchant Outbox", "Inv_SysOpen", "Inv_SysClosed", false, true)); - addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_TexturesOpen", "Inv_TexturesClosed", FALSE, true)); - addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SoundOpen", "Inv_SoundClosed", FALSE, true)); - addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_CallingCardOpen", "Inv_CallingCardClosed",FALSE, true)); - addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_LandmarksOpen", "Inv_LandmarksClosed", FALSE, true)); - addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_ClothingOpen", "Inv_ClothingClosed", FALSE, true)); - addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_ObjectsOpen", "Inv_ObjectsClosed", FALSE, true)); - addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_NotecardsOpen", "Inv_NotecardsClosed", FALSE, true)); - addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", FALSE, false)); - addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_ScriptsOpen", "Inv_ScriptsClosed", FALSE, true)); - addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_BodyPartsOpen", "Inv_BodyPartsClosed", FALSE, true)); - addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", TRUE, false)); - addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SnapshotsOpen", "Inv_SnapshotsClosed", FALSE, true)); - addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", TRUE, true)); - addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_AnimationsOpen", "Inv_AnimationsClosed", FALSE, true)); - addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_GesturesOpen", "Inv_GesturesClosed", FALSE, true)); - addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_FavoritesOpen", "Inv_FavoritesClosed", FALSE, true)); + addEntry(LLFolderType::FT_TEXTURE, new ViewerFolderEntry("Textures", "Inv_TexturesOpen", "Inv_TexturesClosed", false, true)); + addEntry(LLFolderType::FT_SOUND, new ViewerFolderEntry("Sounds", "Inv_SoundOpen", "Inv_SoundClosed", false, true)); + addEntry(LLFolderType::FT_CALLINGCARD, new ViewerFolderEntry("Calling Cards", "Inv_CallingCardOpen", "Inv_CallingCardClosed",false, true)); + addEntry(LLFolderType::FT_LANDMARK, new ViewerFolderEntry("Landmarks", "Inv_LandmarksOpen", "Inv_LandmarksClosed", false, true)); + addEntry(LLFolderType::FT_CLOTHING, new ViewerFolderEntry("Clothing", "Inv_ClothingOpen", "Inv_ClothingClosed", false, true)); + addEntry(LLFolderType::FT_OBJECT, new ViewerFolderEntry("Objects", "Inv_ObjectsOpen", "Inv_ObjectsClosed", false, true)); + addEntry(LLFolderType::FT_NOTECARD, new ViewerFolderEntry("Notecards", "Inv_NotecardsOpen", "Inv_NotecardsClosed", false, true)); + addEntry(LLFolderType::FT_ROOT_INVENTORY, new ViewerFolderEntry("My Inventory", "Inv_SysOpen", "Inv_SysClosed", false, false)); + addEntry(LLFolderType::FT_LSL_TEXT, new ViewerFolderEntry("Scripts", "Inv_ScriptsOpen", "Inv_ScriptsClosed", false, true)); + addEntry(LLFolderType::FT_BODYPART, new ViewerFolderEntry("Body Parts", "Inv_BodyPartsOpen", "Inv_BodyPartsClosed", false, true)); + addEntry(LLFolderType::FT_TRASH, new ViewerFolderEntry("Trash", "Inv_TrashOpen", "Inv_TrashClosed", true, false)); + addEntry(LLFolderType::FT_SNAPSHOT_CATEGORY, new ViewerFolderEntry("Photo Album", "Inv_SnapshotsOpen", "Inv_SnapshotsClosed", false, true)); + addEntry(LLFolderType::FT_LOST_AND_FOUND, new ViewerFolderEntry("Lost And Found", "Inv_LostOpen", "Inv_LostClosed", true, true)); + addEntry(LLFolderType::FT_ANIMATION, new ViewerFolderEntry("Animations", "Inv_AnimationsOpen", "Inv_AnimationsClosed", false, true)); + addEntry(LLFolderType::FT_GESTURE, new ViewerFolderEntry("Gestures", "Inv_GesturesOpen", "Inv_GesturesClosed", false, true)); + addEntry(LLFolderType::FT_FAVORITE, new ViewerFolderEntry("Favorites", "Inv_FavoritesOpen", "Inv_FavoritesClosed", false, true)); - addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE, false)); - addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE, false)); - addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_LookFolderOpen", "Inv_LookFolderClosed", TRUE, true)); - addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_MeshesOpen", "Inv_MeshesClosed", FALSE, true)); - addEntry(LLFolderType::FT_SETTINGS, new ViewerFolderEntry("Settings", "Inv_SettingsOpen", "Inv_SettingsClosed", FALSE, true)); - addEntry(LLFolderType::FT_MATERIAL, new ViewerFolderEntry("Materials", "Inv_MaterialsOpen", "Inv_MaterialsClosed", FALSE, true)); + addEntry(LLFolderType::FT_CURRENT_OUTFIT, new ViewerFolderEntry("Current Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", true, false)); + addEntry(LLFolderType::FT_OUTFIT, new ViewerFolderEntry("New Outfit", "Inv_LookFolderOpen", "Inv_LookFolderClosed", true, false)); + addEntry(LLFolderType::FT_MY_OUTFITS, new ViewerFolderEntry("My Outfits", "Inv_LookFolderOpen", "Inv_LookFolderClosed", true, true)); + addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_MeshesOpen", "Inv_MeshesClosed", false, true)); + addEntry(LLFolderType::FT_SETTINGS, new ViewerFolderEntry("Settings", "Inv_SettingsOpen", "Inv_SettingsClosed", false, true)); + addEntry(LLFolderType::FT_MATERIAL, new ViewerFolderEntry("Materials", "Inv_MaterialsOpen", "Inv_MaterialsClosed", false, true)); bool boxes_invisible = !gSavedSettings.getBOOL("InventoryOutboxMakeVisible"); - addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Received Items", "Inv_InboxOpen", "Inv_InboxClosed", FALSE, true)); - addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Merchant Outbox", "Inv_OutboxOpen", "Inv_OutboxClosed", FALSE, true)); + addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Received Items", "Inv_InboxOpen", "Inv_InboxClosed", false, true)); + addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Merchant Outbox", "Inv_OutboxOpen", "Inv_OutboxClosed", false, true)); // Use individual icons for different folder types - addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); + addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", false, true)); - addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new ViewerFolderEntry("Marketplace Listings", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible)); - addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new ViewerFolderEntry("New Stock", "Inv_StockFolderOpen", "Inv_StockFolderClosed", FALSE, false, "default")); - addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new ViewerFolderEntry("New Version", "Inv_VersionFolderOpen","Inv_VersionFolderClosed", FALSE, false, "default")); + addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new ViewerFolderEntry("Marketplace Listings", "Inv_SysOpen", "Inv_SysClosed", false, boxes_invisible)); + addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new ViewerFolderEntry("New Stock", "Inv_StockFolderOpen", "Inv_StockFolderClosed", false, false, "default")); + addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new ViewerFolderEntry("New Version", "Inv_VersionFolderOpen","Inv_VersionFolderClosed", false, false, "default")); - addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false, "default")); + addEntry(LLFolderType::FT_NONE, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", false, false, "default")); // Special Firestorm folder - addEntry(LLFolderType::FT_FIRESTORM, new ViewerFolderEntry("Firestorm", "Inv_FirestormOpen", "Inv_FirestormClosed", FALSE, true)); - addEntry(LLFolderType::FT_PHOENIX, new ViewerFolderEntry("Phoenix", "Inv_PhoenixOpen", "Inv_PhoenixClosed", FALSE, true)); - addEntry(LLFolderType::FT_RLV, new ViewerFolderEntry("RLV", "Inv_RLVOpen", "Inv_RLVClosed", FALSE, true)); + addEntry(LLFolderType::FT_FIRESTORM, new ViewerFolderEntry("Firestorm", "Inv_FirestormOpen", "Inv_FirestormClosed", false, true)); + addEntry(LLFolderType::FT_PHOENIX, new ViewerFolderEntry("Phoenix", "Inv_PhoenixOpen", "Inv_PhoenixClosed", false, true)); + addEntry(LLFolderType::FT_RLV, new ViewerFolderEntry("RLV", "Inv_RLVOpen", "Inv_RLVClosed", false, true)); // Special Firestorm folder // OpenSim HG-support - addEntry(LLFolderType::FT_MY_SUITCASE, new ViewerFolderEntry("My Suitcase", "Inv_SuitcaseOpen", "Inv_SuitcaseClosed", FALSE, true)); + addEntry(LLFolderType::FT_MY_SUITCASE, new ViewerFolderEntry("My Suitcase", "Inv_SuitcaseOpen", "Inv_SuitcaseClosed", false, true)); for (U32 type = (U32)LLFolderType::FT_ENSEMBLE_START; type <= (U32)LLFolderType::FT_ENSEMBLE_END; ++type) { - addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", FALSE, false)); + addEntry((LLFolderType::EType)type, new ViewerFolderEntry("New Folder", "Inv_FolderOpen", "Inv_FolderClosed", false, false)); } } @@ -275,7 +275,7 @@ LLFolderType::EType LLViewerFolderType::lookupTypeFromXUIName(const std::string return LLViewerFolderDictionary::getInstance()->lookup(name); } -const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder_type, BOOL is_open) +const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder_type, bool is_open) { const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); if (entry) @@ -297,14 +297,14 @@ const std::string &LLViewerFolderType::lookupIconName(LLFolderType::EType folder return badLookup(); } -BOOL LLViewerFolderType::lookupIsQuietType(LLFolderType::EType folder_type) +bool LLViewerFolderType::lookupIsQuietType(LLFolderType::EType folder_type) { const ViewerFolderEntry *entry = LLViewerFolderDictionary::getInstance()->lookup(folder_type); if (entry) { return entry->mIsQuiet; } - return FALSE; + return false; } bool LLViewerFolderType::lookupIsHiddenIfEmpty(LLFolderType::EType folder_type) diff --git a/indra/newview/llviewerfoldertype.h b/indra/newview/llviewerfoldertype.h index 13d5a8fbbd..31d2f39311 100644 --- a/indra/newview/llviewerfoldertype.h +++ b/indra/newview/llviewerfoldertype.h @@ -38,8 +38,8 @@ public: static const std::string& lookupXUIName(EType folder_type); // name used by the UI static LLFolderType::EType lookupTypeFromXUIName(const std::string& name); - static const std::string& lookupIconName(EType folder_type, BOOL is_open = FALSE); // folder icon name - static BOOL lookupIsQuietType(EType folder_type); // folder doesn't require UI update when changes have occured + static const std::string& lookupIconName(EType folder_type, bool is_open = false); // folder icon name + static bool lookupIsQuietType(EType folder_type); // folder doesn't require UI update when changes have occured static bool lookupIsHiddenIfEmpty(EType folder_type); // folder is not displayed if empty static const std::string& lookupNewCategoryName(EType folder_type); // default name when creating new category static LLFolderType::EType lookupTypeFromNewCategoryName(const std::string& name); // default name when creating new category diff --git a/indra/newview/llviewergesture.cpp b/indra/newview/llviewergesture.cpp index 46b1c326ab..6ee30f4e21 100644 --- a/indra/newview/llviewergesture.cpp +++ b/indra/newview/llviewergesture.cpp @@ -157,7 +157,7 @@ LLGesture *LLViewerGestureList::create_gesture(U8 **buffer, S32 max_size) } -// See if the prefix matches any gesture. If so, return TRUE +// 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) @@ -203,7 +203,7 @@ void LLViewerGestureList::xferCallback(void *data, S32 size, void** /*user_data* LL_ERRS() << "Read off of end of array, error in serialization" << LL_ENDL; } - gGestureList.mIsLoaded = TRUE; + gGestureList.mIsLoaded = true; } else { diff --git a/indra/newview/llviewergesture.h b/indra/newview/llviewergesture.h index fea0778b1c..5b08a487f0 100644 --- a/indra/newview/llviewergesture.h +++ b/indra/newview/llviewergesture.h @@ -65,9 +65,9 @@ public: //void requestFromServer(); bool getIsLoaded() { return mIsLoaded; } - //void requestResetFromServer( BOOL is_male ); + //void requestResetFromServer( bool is_male ); - // See if the prefix matches any gesture. If so, return TRUE + // 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); diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index 7035cda219..fdcb5d62a5 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -91,10 +91,10 @@ LLViewerInput gViewerInput; bool agent_jump( EKeystate s ) { - static BOOL first_fly_attempt(TRUE); + static bool first_fly_attempt(true); if (KEYSTATE_UP == s) { - first_fly_attempt = TRUE; + first_fly_attempt = true; return true; } F32 time = gKeyboard->getCurKeyElapsedTime(); @@ -103,7 +103,7 @@ bool agent_jump( EKeystate s ) // Chalice Yao's crouch toggle if (gSavedPerAccountSettings.getBOOL("FSCrouchToggleStatus")) { - gSavedPerAccountSettings.setBOOL("FSCrouchToggleStatus", FALSE); + gSavedPerAccountSettings.setBOOL("FSCrouchToggleStatus", false); } // @@ -116,8 +116,8 @@ bool agent_jump( EKeystate s ) } else { - gAgent.setFlying(TRUE, first_fly_attempt); - first_fly_attempt = FALSE; + gAgent.setFlying(true, first_fly_attempt); + first_fly_attempt = false; gAgent.moveUp(1); } return true; @@ -132,11 +132,11 @@ bool agent_push_down( EKeystate s ) { if (gSavedPerAccountSettings.getBOOL("FSCrouchToggleStatus")) { - gSavedPerAccountSettings.setBOOL("FSCrouchToggleStatus", FALSE); + gSavedPerAccountSettings.setBOOL("FSCrouchToggleStatus", false); } else { - gSavedPerAccountSettings.setBOOL("FSCrouchToggleStatus", TRUE); + gSavedPerAccountSettings.setBOOL("FSCrouchToggleStatus", true); gAgent.moveUp(-1); } } @@ -606,7 +606,7 @@ bool camera_move_backward_fast( EKeystate s ) bool edit_avatar_spin_ccw( EKeystate s ) { if( KEYSTATE_UP == s ) return true; - gMorphView->setCameraDrivenByKeys( TRUE ); + gMorphView->setCameraDrivenByKeys( true ); gAgentCamera.setOrbitLeftKey( get_orbit_rate() ); //gMorphView->orbitLeft( get_orbit_rate() ); return true; @@ -616,7 +616,7 @@ bool edit_avatar_spin_ccw( EKeystate s ) bool edit_avatar_spin_cw( EKeystate s ) { if( KEYSTATE_UP == s ) return true; - gMorphView->setCameraDrivenByKeys( TRUE ); + gMorphView->setCameraDrivenByKeys( true ); gAgentCamera.setOrbitRightKey( get_orbit_rate() ); //gMorphView->orbitRight( get_orbit_rate() ); return true; @@ -625,7 +625,7 @@ bool edit_avatar_spin_cw( EKeystate s ) bool edit_avatar_spin_over( EKeystate s ) { if( KEYSTATE_UP == s ) return true; - gMorphView->setCameraDrivenByKeys( TRUE ); + gMorphView->setCameraDrivenByKeys( true ); gAgentCamera.setOrbitUpKey( get_orbit_rate() ); //gMorphView->orbitUp( get_orbit_rate() ); return true; @@ -635,7 +635,7 @@ bool edit_avatar_spin_over( EKeystate s ) bool edit_avatar_spin_under( EKeystate s ) { if( KEYSTATE_UP == s ) return true; - gMorphView->setCameraDrivenByKeys( TRUE ); + gMorphView->setCameraDrivenByKeys( true ); gAgentCamera.setOrbitDownKey( get_orbit_rate() ); //gMorphView->orbitDown( get_orbit_rate() ); return true; @@ -644,7 +644,7 @@ bool edit_avatar_spin_under( EKeystate s ) bool edit_avatar_move_forward( EKeystate s ) { if( KEYSTATE_UP == s ) return true; - gMorphView->setCameraDrivenByKeys( TRUE ); + gMorphView->setCameraDrivenByKeys( true ); gAgentCamera.setOrbitInKey( get_orbit_rate() ); //gMorphView->orbitIn(); return true; @@ -654,7 +654,7 @@ bool edit_avatar_move_forward( EKeystate s ) bool edit_avatar_move_backward( EKeystate s ) { if( KEYSTATE_UP == s ) return true; - gMorphView->setCameraDrivenByKeys( TRUE ); + gMorphView->setCameraDrivenByKeys( true ); gAgentCamera.setOrbitOutKey( get_orbit_rate() ); //gMorphView->orbitOut(); return true; @@ -683,7 +683,7 @@ bool start_chat( EKeystate s ) // start chat // [FS Communication UI] //LLFloaterIMNearbyChat::startChat(NULL); - FSNearbyChat::instance().showDefaultChatBar(TRUE); + FSNearbyChat::instance().showDefaultChatBar(true); // [FS Communication UI] return true; } @@ -720,7 +720,7 @@ bool start_gesture( EKeystate s ) // LLFloaterIMNearbyChat::startChat(NULL); //} - FSNearbyChat::instance().showDefaultChatBar(TRUE, "/"); + FSNearbyChat::instance().showDefaultChatBar(true, "/"); // [FS Communication UI] } return true; @@ -1072,7 +1072,7 @@ LLViewerInput::LLViewerInput() for (S32 i = 0; i < KEY_COUNT; i++) { - mKeyHandledByUI[i] = FALSE; + mKeyHandledByUI[i] = false; } for (S32 i = 0; i < CLICK_COUNT; i++) { @@ -1132,41 +1132,41 @@ bool LLViewerInput::modeFromString(const std::string& string, S32 *mode) } // static -BOOL LLViewerInput::mouseFromString(const std::string& string, EMouseClickType *mode) +bool LLViewerInput::mouseFromString(const std::string& string, EMouseClickType *mode) { if (string == "LMB") { *mode = CLICK_LEFT; - return TRUE; + return true; } else if (string == "Double LMB") { *mode = CLICK_DOUBLELEFT; - return TRUE; + return true; } else if (string == "MMB") { *mode = CLICK_MIDDLE; - return TRUE; + return true; } else if (string == "MB4") { *mode = CLICK_BUTTON4; - return TRUE; + return true; } else if (string == "MB5") { *mode = CLICK_BUTTON5; - return TRUE; + return true; } else { *mode = CLICK_NONE; - return FALSE; + return false; } } -BOOL LLViewerInput::handleKey(KEY translated_key, MASK translated_mask, BOOL repeated) +bool LLViewerInput::handleKey(KEY translated_key, MASK translated_mask, bool repeated) { // check for re-map EKeyboardMode mode = gViewerInput.getMode(); @@ -1179,17 +1179,17 @@ BOOL LLViewerInput::handleKey(KEY translated_key, MASK translated_mask, BOOL rep } // No repeats of F-keys - BOOL repeatable_key = (translated_key < KEY_F1 || translated_key > KEY_F12); + bool repeatable_key = (translated_key < KEY_F1 || translated_key > KEY_F12); if (!repeatable_key && repeated) { - return FALSE; + return false; } LL_DEBUGS("UserInput") << "keydown -" << translated_key << "-" << LL_ENDL; // skip skipped keys if(mKeysSkippedByUI.find(translated_key) != mKeysSkippedByUI.end()) { - mKeyHandledByUI[translated_key] = FALSE; + mKeyHandledByUI[translated_key] = false; //LL_INFOS("KeyboardHandling") << "Key wasn't handled by UI!" << LL_ENDL; LL_INFOS_ONCE("KeyboardHandling") << "Key wasn't handled by UI!" << LL_ENDL; // Change log message to not print out every time } @@ -1205,7 +1205,7 @@ BOOL LLViewerInput::handleKey(KEY translated_key, MASK translated_mask, BOOL rep return mKeyHandledByUI[translated_key]; } -BOOL LLViewerInput::handleKeyUp(KEY translated_key, MASK translated_mask) +bool LLViewerInput::handleKeyUp(KEY translated_key, MASK translated_mask) { return gViewerWindow->handleKeyUp(translated_key, translated_mask); } @@ -1219,7 +1219,7 @@ bool LLViewerInput::handleGlobalBindsKeyDown(KEY key, MASK mask) return false; } S32 mode = getMode(); - return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, TRUE, FALSE, FALSE, FALSE); + return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, true, false, false, false); } bool LLViewerInput::handleGlobalBindsKeyUp(KEY key, MASK mask) @@ -1232,7 +1232,7 @@ bool LLViewerInput::handleGlobalBindsKeyUp(KEY key, MASK mask) } S32 mode = getMode(); - return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, FALSE, TRUE, FALSE, FALSE); + return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, false, true, false, false); } bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down) @@ -1257,7 +1257,7 @@ bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, return res; } -BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name) +bool LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name) { S32 index; typedef boost::function function_t; @@ -1278,7 +1278,7 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons { U32 keyidx = ((mask<<16)|key); (mRemapKeys[mode])[keyidx] = ((0<<16)|(KEY_F1+(idx-1))); - return TRUE; + return true; } } } @@ -1294,13 +1294,13 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons if (!function) { LL_WARNS_ONCE() << "Can't bind key to function " << function_name << ", no function with this name found" << LL_ENDL; - return FALSE; + return false; } if (mode >= MODE_COUNT) { LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL; - return FALSE; + return false; } // check for duplicate first and overwrite @@ -1312,7 +1312,7 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons if (key == mGlobalKeyBindings[mode][index].mKey && mask == mGlobalKeyBindings[mode][index].mMask) { mGlobalKeyBindings[mode][index].mFunction = function; - return TRUE; + return true; } } } @@ -1324,7 +1324,7 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons if (key == mKeyBindings[mode][index].mKey && mask == mKeyBindings[mode][index].mMask) { mKeyBindings[mode][index].mFunction = function; - return TRUE; + return true; } } } @@ -1344,10 +1344,10 @@ BOOL LLViewerInput::bindKey(const S32 mode, const KEY key, const MASK mask, cons mKeyBindings[mode].push_back(bind); } - return TRUE; + return true; } -BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name) +bool LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name) { S32 index; typedef boost::function function_t; @@ -1364,7 +1364,7 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const // priority even over UI and is handled in LLToolCompGun::handleMouseDown // so just mark it as having default handler mLMouseDefaultHandling[mode] = true; - return TRUE; + return true; } LLKeybindFunctionData* result = LLKeyboardActionRegistry::getValue(function_name); @@ -1376,13 +1376,13 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const if (!function) { LL_WARNS_ONCE() << "Can't bind mouse key to function " << function_name << ", no function with this name found" << LL_ENDL; - return FALSE; + return false; } if (mode >= MODE_COUNT) { LL_ERRS() << "LLKeyboard::bindKey() - unknown mode passed" << mode << LL_ENDL; - return FALSE; + return false; } // check for duplicate first and overwrite @@ -1426,7 +1426,7 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const mMouseBindings[mode].push_back(bind); } - return TRUE; + return true; } LLViewerInput::KeyBinding::KeyBinding() @@ -1646,9 +1646,9 @@ bool LLViewerInput::scanKey(const std::vector &binding, S32 binding_count, KEY key, MASK mask, - BOOL key_down, - BOOL key_up, - BOOL key_level, + bool key_down, + bool key_up, + bool key_level, bool repeat) const { for (S32 i = 0; i < binding_count; i++) @@ -1684,7 +1684,7 @@ bool LLViewerInput::scanKey(const std::vector &binding, } // Called from scanKeyboard. -bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level) const +bool LLViewerInput::scanKey(KEY key, bool key_down, bool key_up, bool key_level) const { if (LLApp::isExiting()) { @@ -1693,7 +1693,7 @@ bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level) S32 mode = getMode(); // Consider keyboard scanning as NOT mouse event. JC - MASK mask = gKeyboard->currentMask(FALSE); + MASK mask = gKeyboard->currentMask(false); if (mKeyHandledByUI[key]) { @@ -1701,17 +1701,17 @@ bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level) } // don't process key down on repeated keys - BOOL repeat = gKeyboard->getKeyRepeated(key); + bool repeat = gKeyboard->getKeyRepeated(key); bool res = scanKey(mKeyBindings[mode], mKeyBindings[mode].size(), key, mask, key_down, key_up, key_level, repeat); return res; } -BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down) +bool LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down) { bool is_toolmgr_action = false; - BOOL handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down, is_toolmgr_action); + bool handled = gViewerWindow->handleAnyMouseClick(window_impl, pos, mask, clicktype, down, is_toolmgr_action); if (clicktype != CLICK_NONE) { @@ -1838,7 +1838,7 @@ bool LLViewerInput::scanMouse(EMouseClickType click, EMouseState state) const { bool res = false; S32 mode = getMode(); - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); res = scanMouse(mMouseBindings[mode], mMouseBindings[mode].size(), click, mask, state, false); // No user defined actions found or those actions can't handle the key/button, diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h index 694c6505fa..9489eab234 100644 --- a/indra/newview/llviewerinput.h +++ b/indra/newview/llviewerinput.h @@ -108,8 +108,8 @@ public: LLViewerInput(); virtual ~LLViewerInput(); - BOOL handleKey(KEY key, MASK mask, BOOL repeated); - BOOL handleKeyUp(KEY key, MASK mask); + bool handleKey(KEY key, MASK mask, bool repeated); + bool handleKeyUp(KEY key, MASK mask); // Handle 'global' keybindings that do not consume event, // yet need to be processed early @@ -122,15 +122,15 @@ public: EKeyboardMode getMode() const; static bool modeFromString(const std::string& string, S32 *mode); // False on failure - static BOOL mouseFromString(const std::string& string, EMouseClickType *mode);// False on failure + static bool mouseFromString(const std::string& string, EMouseClickType *mode);// False on failure bool scanKey(KEY key, - BOOL key_down, - BOOL key_up, - BOOL key_level) const; + bool key_down, + bool key_up, + bool key_level) const; // handleMouse() records state, scanMouse() goes through states, scanMouse(click) processes individual saved states after UI is done with them - BOOL handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down); + bool handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down); void scanMouse(); bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode) const; @@ -144,9 +144,9 @@ private: S32 binding_count, KEY key, MASK mask, - BOOL key_down, - BOOL key_up, - BOOL key_level, + bool key_down, + bool key_up, + bool key_level, bool repeat) const; enum EMouseState @@ -166,8 +166,8 @@ private: bool ignore_additional_masks) const; S32 loadBindingMode(const LLViewerInput::KeyMode& keymode, S32 mode); - BOOL bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name); - BOOL bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name); + bool bindKey(const S32 mode, const KEY key, const MASK mask, const std::string& function_name); + bool bindMouse(const S32 mode, const EMouseClickType mouse, const MASK mask, const std::string& function_name); void resetBindings(); // Hold all the ugly stuff torn out to make LLKeyboard non-viewer-specific here @@ -186,7 +186,7 @@ private: typedef std::map key_remap_t; key_remap_t mRemapKeys[MODE_COUNT]; std::set mKeysSkippedByUI; - BOOL mKeyHandledByUI[KEY_COUNT]; // key processed successfully by UI + bool mKeyHandledByUI[KEY_COUNT]; // key processed successfully by UI // This is indentical to what llkeyboard does (mKeyRepeated, mKeyLevel, mKeyDown e t c), // just instead of remembering individually as bools, we record state as enum diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index f04d7110e8..ae0c5657e1 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -302,7 +302,7 @@ public: return false; } LLUUID inventory_id; - if (!inventory_id.set(params[0], FALSE)) + if (!inventory_id.set(params[0], false)) { return false; } @@ -315,7 +315,7 @@ public: //inventory_handler is just a stub, because we don't know from who this offer // Always show item in inventory if we intentionally choose to do so //open_inventory_offer(items_to_open, "inventory_handler"); - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, items_to_open.back()); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, items_to_open.back()); // return true; } @@ -540,7 +540,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const // virtual bool LLViewerInventoryItem::unpackMessage(const LLSD& item) { - BOOL rv = LLInventoryItem::fromLLSD(item); + bool rv = LLInventoryItem::fromLLSD(item); LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName); @@ -551,7 +551,7 @@ bool LLViewerInventoryItem::unpackMessage(const LLSD& item) // virtual bool LLViewerInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num) { - BOOL rv = LLInventoryItem::unpackMessage(msg, block, block_num); + bool rv = LLInventoryItem::unpackMessage(msg, block, block_num); LLLocalizedInventoryItemsDictionary::getInstance()->localizeInventoryObjectName(mName); @@ -776,8 +776,8 @@ bool LLViewerInventoryCategory::fetch() msg->addUUID("OwnerID", mOwnerID); msg->addS32("SortOrder", sort_order); - msg->addBOOL("FetchFolders", FALSE); - msg->addBOOL("FetchItems", TRUE); + msg->addBOOL("FetchFolders", false); + msg->addBOOL("FetchItems", true); gAgent.sendReliableMessage(); } // [UDP-Msg] @@ -892,7 +892,7 @@ bool LLViewerInventoryCategory::acceptItem(LLInventoryItem* inv_item) void LLViewerInventoryCategory::determineFolderType() { /* Do NOT uncomment this code. This is for future 2.1 support of ensembles. - llassert(FALSE); + llassert(false); LLFolderType::EType original_type = getPreferredType(); if (LLFolderType::lookupIsProtectedType(original_type)) return; @@ -901,7 +901,7 @@ void LLViewerInventoryCategory::determineFolderType() U64 folder_invalid = 0; LLInventoryModel::cat_array_t category_array; LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(getUUID(),category_array,item_array,FALSE); + gInventory.collectDescendents(getUUID(),category_array,item_array,false); // For ensembles if (category_array.empty()) @@ -936,7 +936,7 @@ void LLViewerInventoryCategory::determineFolderType() { changeType(LLFolderType::FT_NONE); } - llassert(FALSE); + llassert(false); */ } @@ -1151,7 +1151,7 @@ void create_gesture_cb(const LLUUID& inv_item) LLPreviewGesture* preview = LLPreviewGesture::show(inv_item, LLUUID::null); // Force to be entirely onscreen. - gFloaterView->adjustToFitScreen(preview, FALSE); + gFloaterView->adjustToFitScreen(preview, false); } } } @@ -1523,7 +1523,7 @@ void move_inventory_item( msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, agent_id); msg->addUUIDFast(_PREHASH_SessionID, session_id); - msg->addBOOLFast(_PREHASH_Stamp, FALSE); + msg->addBOOLFast(_PREHASH_Stamp, false); msg->nextBlockFast(_PREHASH_InventoryData); msg->addUUIDFast(_PREHASH_ItemID, item_id); msg->addUUIDFast(_PREHASH_FolderID, parent_id); @@ -1901,7 +1901,7 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) // Remove items from clipboard or it will remain active even if there is nothing to paste/copy LLInventoryModel::cat_array_t categories; LLInventoryModel::item_array_t items; - gInventory.collectDescendents(id, categories, items, TRUE); + gInventory.collectDescendents(id, categories, items, true); for (LLInventoryModel::cat_array_t::const_iterator it = categories.begin(); it != categories.end(); ++it) { @@ -2270,7 +2270,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L LLInventoryPanel* panel = static_cast(handle.get()); if (panel) { - panel->setSelectionByID(new_category_id, TRUE); + panel->setSelectionByID(new_category_id, true); } LL_DEBUGS(LOG_INV) << "Done creating inventory: " << new_category_id << LL_ENDL; }; @@ -2367,7 +2367,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLUUID dest_id, const L } if(panel) { - panel->getRootFolder()->setNeedsAutoRename(TRUE); + panel->getRootFolder()->setNeedsAutoRename(true); } } @@ -2587,7 +2587,7 @@ bool LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na const char separator = getSeparator(); const string::size_type separatorPos = name.find(separator, 0); - BOOL result = false; + bool result = false; if (separatorPos < string::npos) { @@ -2673,9 +2673,9 @@ PermissionMask LLViewerInventoryItem::getPermissionMask() const { const LLPermissions& permissions = getPermissions(); - BOOL copy = permissions.allowCopyBy(gAgent.getID()); - BOOL mod = permissions.allowModifyBy(gAgent.getID()); - BOOL xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID()); + bool copy = permissions.allowCopyBy(gAgent.getID()); + bool mod = permissions.allowModifyBy(gAgent.getID()); + bool xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID()); PermissionMask perm_mask = 0; if (copy) perm_mask |= PERM_COPY; if (mod) perm_mask |= PERM_MODIFY; @@ -2738,11 +2738,11 @@ LLUUID find_possible_item_for_regeneration(const LLViewerInventoryItem *target_i // This currently dosen't work, because the sim does not allow us // to change an item's assetID. -BOOL LLViewerInventoryItem::regenerateLink() +bool LLViewerInventoryItem::regenerateLink() { const LLUUID target_item_id = find_possible_item_for_regeneration(this); if (target_item_id.isNull()) - return FALSE; + return false; LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLAssetIDMatches asset_id_matches(getAssetUUID()); diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 2254170405..9a80f2d56f 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -161,7 +161,7 @@ public: void onCallingCardNameLookup(const LLUUID& id, const LLAvatarName& name); // If this is a broken link, try to fix it and any other identical link. - BOOL regenerateLink(); + bool regenerateLink(); public: bool mIsComplete; diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index 148295e4e0..641a467ffc 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -283,7 +283,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) //if object is active, make it static if(object->mDrawable->isActive()) { - object->mDrawable->makeStatic(FALSE); + object->mDrawable->makeStatic(false); } LLVector3 cur_position = object->getRenderPosition(); @@ -291,7 +291,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) object->mDrawable->mXform.setPosition(cur_position); object->mDrawable->mXform.setRotation(cur_rotation); - gPipeline.markMoved(object->mDrawable, TRUE); + gPipeline.markMoved(object->mDrawable, true); gPipeline.markTextured(object->mDrawable); // face may need to change draw pool to/from POOL_HUD if (mIsHUDAttachment) @@ -333,7 +333,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) { if (object->mText.notNull()) { - object->mText->setOnHUDAttachment(FALSE); + object->mText->setOnHUDAttachment(false); } LLViewerObject::const_child_list_t& child_list = object->getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); @@ -342,7 +342,7 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) LLViewerObject* childp = *iter; if (childp->mText.notNull()) { - childp->mText->setOnHUDAttachment(FALSE); + childp->mText->setOnHUDAttachment(false); } } } diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 900f07bc59..b6cbdcf56b 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -442,7 +442,7 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, bool damp_w bool LLViewerJointMesh::updateLOD(F32 pixel_area, bool activate) { bool valid = mValid; - setValid(activate, TRUE); + setValid(activate, true); return (valid != activate); } diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index 4189c166e9..094aae58da 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -253,7 +253,7 @@ void LLViewerJoystick::updateEnabled(bool autoenable) } if (!gSavedSettings.getBOOL("JoystickEnabled")) { - mOverrideCamera = FALSE; + mOverrideCamera = false; } } @@ -261,7 +261,7 @@ void LLViewerJoystick::setOverrideCamera(bool val) { if (!gSavedSettings.getBOOL("JoystickEnabled")) { - mOverrideCamera = FALSE; + mOverrideCamera = false; } else { @@ -935,7 +935,7 @@ void LLViewerJoystick::moveAvatar(bool reset) else if (!button_held) { button_held = true; - gAgent.setFlying(FALSE); + gAgent.setFlying(false); } } else if (!button_held) diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 6de7e80883..cc4f309753 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -79,10 +79,10 @@ #include // for SkinFolder listener #include -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; // *TODO: Consider enabling mipmaps (they have been disabled for a long time). Likely has a significant performance impact for tiled/high texture repeat media. Mip generation in a shader may also be an option if necessary. -constexpr BOOL USE_MIPMAPS = FALSE; +constexpr bool USE_MIPMAPS = false; void init_threaded_picker_load_dialog(LLPluginClassMedia* plugin, LLFilePicker::ELoadFilter filter, bool get_multiple) { @@ -1685,7 +1685,7 @@ void LLViewerMediaImpl::destroyMediaSource() LLViewerMediaTexture* oldImage = LLViewerTextureManager::findMediaTexture( mTextureId ); if (oldImage) { - oldImage->setPlaying(FALSE) ; + oldImage->setPlaying(false) ; } cancelMimeTypeProbe(); @@ -2818,7 +2818,7 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char) { LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData(); - mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE), native_key_data); + mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(false), native_key_data); } } @@ -2828,7 +2828,7 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char) ////////////////////////////////////////////////////////////////////////////////////////// bool LLViewerMediaImpl::canNavigateForward() { - BOOL result = FALSE; + bool result = false; if (mMediaSource) { result = mMediaSource->getHistoryForwardAvailable(); @@ -2839,7 +2839,7 @@ bool LLViewerMediaImpl::canNavigateForward() ////////////////////////////////////////////////////////////////////////////////////////// bool LLViewerMediaImpl::canNavigateBack() { - BOOL result = FALSE; + bool result = false; if (mMediaSource) { result = mMediaSource->getHistoryBackAvailable(); @@ -2994,7 +2994,7 @@ bool LLViewerMediaImpl::preMediaTexUpdate(LLViewerMediaTexture*& media_tex, U8*& //S32 media_depth = mMediaSource->getTextureDepth(); // Since we're updating this texture, we know it's playing. Tell the texture to do its replacement magic so it gets rendered. - media_tex->setPlaying(TRUE); + media_tex->setPlaying(true); if (mMediaSource->getDirty(&dirty_rect)) { @@ -3615,12 +3615,12 @@ LLViewerMediaImpl::canPaste() const return false; } -void LLViewerMediaImpl::setUpdated(BOOL updated) +void LLViewerMediaImpl::setUpdated(bool updated) { mIsUpdated = updated ; } -BOOL LLViewerMediaImpl::isUpdated() +bool LLViewerMediaImpl::isUpdated() { return mIsUpdated ; } diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index d737725ad0..f6d6d70b6b 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -354,8 +354,8 @@ public: void removeObject(LLVOVolume* obj) ; const std::list< LLVOVolume* >* getObjectList() const ; LLVOVolume *getSomeObject(); - void setUpdated(BOOL updated) ; - BOOL isUpdated() ; + void setUpdated(bool updated) ; + bool isUpdated() ; // updates the javascript object in the embedded browser with viewer values void updateJavascriptObject(); @@ -488,7 +488,7 @@ private: static std::vector sMimeTypesFailed; LLPointer mRawImage; //backing buffer for texture updates private: - BOOL mIsUpdated ; + bool mIsUpdated ; std::list< LLVOVolume* > mObjectList ; void mimeDiscoveryCoro(std::string url); diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 3774f9367f..64142f7fdb 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -211,7 +211,7 @@ LLVector3d LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 n LLVector3d camera_pos; if (object) { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); LLBBox bbox = object->getBoundingBoxAgent(); LLVector3d center = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); @@ -298,7 +298,7 @@ LLVector3d LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 n else { // If we have no object, focus back on the avatar. - gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(true, ANIMATE); } return camera_pos; } @@ -377,26 +377,26 @@ bool LLViewerMediaFocus::handleUnicodeChar(llwchar uni_char, bool called_from_pa return true; } -BOOL LLViewerMediaFocus::handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y) +bool LLViewerMediaFocus::handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y) { - BOOL retval = FALSE; + bool retval = false; LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); if (media_impl && media_impl->hasMedia()) { - media_impl->scrollWheel(texture_coords, clicks_x, clicks_y, gKeyboard->currentMask(TRUE)); - retval = TRUE; + media_impl->scrollWheel(texture_coords, clicks_x, clicks_y, gKeyboard->currentMask(true)); + retval = true; } return retval; } -BOOL LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y) +bool LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y) { - BOOL retval = FALSE; + bool retval = false; LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); if(media_impl && media_impl->hasMedia()) { - media_impl->scrollWheel(x, y, clicks_x, clicks_y, gKeyboard->currentMask(TRUE)); - retval = TRUE; + media_impl->scrollWheel(x, y, clicks_x, clicks_y, gKeyboard->currentMask(true)); + retval = true; } return retval; } diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h index 661c9a46be..0fabb50d6a 100644 --- a/indra/newview/llviewermediafocus.h +++ b/indra/newview/llviewermediafocus.h @@ -58,8 +58,8 @@ public: /*virtual*/ bool handleKey(KEY key, MASK mask, bool called_from_parent); /*virtual*/ bool handleKeyUp(KEY key, MASK mask, bool called_from_parent); /*virtual*/ bool handleUnicodeChar(llwchar uni_char, bool called_from_parent); - BOOL handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y); - BOOL handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y); + bool handleScrollWheel(const LLVector2& texture_coords, S32 clicks_x, S32 clicks_y); + bool handleScrollWheel(S32 x, S32 y, S32 clicks_x, S32 clicks_y); void update(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 694dbeffa2..d16aa4f672 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -180,8 +180,8 @@ typedef LLPointer LLViewerObjectPtr; static boost::unordered_map sDefaultItemLabels; -BOOL enable_land_build(void*); -BOOL enable_object_build(void*); +bool enable_land_build(void*); +bool enable_object_build(void*); LLVOAvatar* find_avatar_from_object( LLViewerObject* object ); LLVOAvatar* find_avatar_from_object( const LLUUID& object_id ); @@ -191,15 +191,15 @@ void handle_test_load_url(void*); // // Evil hackish imported globals -//extern BOOL gHideSelectedObjects; -//extern BOOL gAllowSelectAvatar; -//extern BOOL gDebugAvatarRotation; +//extern bool gHideSelectedObjects; +//extern bool gAllowSelectAvatar; +//extern bool gDebugAvatarRotation; extern bool gDebugClicks; extern bool gDebugWindowProc; -extern BOOL gShaderProfileFrame; +extern bool gShaderProfileFrame; -//extern BOOL gDebugTextEditorTips; -//extern BOOL gDebugSelectMgr; +//extern bool gDebugTextEditorTips; +//extern bool gDebugSelectMgr; // // Globals @@ -282,15 +282,15 @@ void handle_region_dump_temp_asset_data(void*); void handle_region_clear_temp_asset_data(void*); // Object pie menu -BOOL sitting_on_selection(); +bool sitting_on_selection(); void near_sit_object(); //void label_sit_or_stand(std::string& label, void*); // buy and take alias into the same UI positions, so these // declarations handle this mess. -BOOL is_selection_buy_not_take(); +bool is_selection_buy_not_take(); S32 selection_price(); -BOOL enable_take(); +bool enable_take(); void handle_object_show_inspector(); void handle_avatar_show_inspector(); bool confirm_take(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle selection_handle); @@ -300,7 +300,7 @@ void handle_buy_object(LLSaleInfo sale_info); void handle_buy_contents(LLSaleInfo sale_info); // Land pie menu -void near_sit_down_point(BOOL success, void *); +void near_sit_down_point(bool success, void *); // Avatar pie menu @@ -310,16 +310,16 @@ void near_sit_down_point(BOOL success, void *); void velocity_interpolate( void* ); void handle_visual_leak_detector_toggle(void*); void handle_rebake_textures(void*); -BOOL check_admin_override(void*); +bool check_admin_override(void*); void handle_admin_override_toggle(void*); #ifdef TOGGLE_HACKED_GODLIKE_VIEWER void handle_toggle_hacked_godmode(void*); -BOOL check_toggle_hacked_godmode(void*); +bool check_toggle_hacked_godmode(void*); bool enable_toggle_hacked_godmode(void*); #endif void toggle_show_xui_names(void *); -BOOL check_show_xui_names(void *); +bool check_show_xui_names(void *); // Debug UI @@ -369,7 +369,7 @@ void dump_select_mgr(void*); void dump_inventory(void*); void toggle_visibility(void*); -BOOL get_visibility(void*); +bool get_visibility(void*); // Avatar Pie menu void request_friendship(const LLUUID& agent_id); @@ -382,7 +382,7 @@ void handle_dump_followcam(void*); void handle_viewer_enable_message_log(void*); void handle_viewer_disable_message_log(void*); -BOOL enable_buy_land(void*); +bool enable_buy_land(void*); // Help menu @@ -392,13 +392,13 @@ void handle_dump_attachments(void *); void handle_dump_avatar_local_textures(void*); void handle_debug_avatar_textures(void*); void handle_grab_baked_texture(void*); -BOOL enable_grab_baked_texture(void*); +bool enable_grab_baked_texture(void*); void handle_dump_region_object_cache(void*); void handle_reset_interest_lists(void *); -BOOL enable_save_into_task_inventory(void*); +bool enable_save_into_task_inventory(void*); -BOOL enable_detach(const LLSD& = LLSD()); +bool enable_detach(const LLSD& = LLSD()); void menu_toggle_attached_lights(void* user_data); void menu_toggle_attached_particles(void* user_data); @@ -441,7 +441,7 @@ void LLMenuParcelObserver::changed() //child = gMenuLand->findChild("Land Buy"); //if (child) //{ - // BOOL buyable = enable_buy_land(NULL); + // bool buyable = enable_buy_land(NULL); // child->setEnabled(buyable); //} @@ -450,11 +450,11 @@ void LLMenuParcelObserver::changed() static LLView* land_buy = gMenuHolder->getChildView("Land Buy"); static LLView* land_buy_pie = gMenuHolder->getChildView("Land Buy Pie"); - BOOL pass_buyable = LLPanelLandGeneral::enableBuyPass(NULL) && parcel->getOwnerID() != gAgentID; + bool pass_buyable = LLPanelLandGeneral::enableBuyPass(NULL) && parcel->getOwnerID() != gAgentID; land_buy_pass->setEnabled(pass_buyable); land_buy_pass_pie->setEnabled(pass_buyable); - BOOL buyable = enable_buy_land(NULL); + bool buyable = enable_buy_land(NULL); land_buy->setEnabled(buyable); land_buy_pie->setEnabled(buyable); // FIRE-4454: Cache controls because of performance reasons @@ -479,7 +479,7 @@ void initialize_menus(); void set_merchant_SLM_menu() { // All other cases (new merchant, not merchant, migrated merchant): show the new Marketplace Listings menu and enable the tool - gMenuHolder->getChild("MarketplaceListings")->setVisible(TRUE); + gMenuHolder->getChild("MarketplaceListings")->setVisible(true); LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings"); gToolBarView->enableCommand(command->id(), true); @@ -501,7 +501,7 @@ void check_merchant_status(bool force) // Don't show merchant outbox or SL Marketplace stuff outside SL if (!LLGridManager::getInstance()->isInSecondLife()) { - gMenuHolder->getChild("MarketplaceListings")->setVisible(FALSE); + gMenuHolder->getChild("MarketplaceListings")->setVisible(false); return; } // @@ -512,7 +512,7 @@ void check_merchant_status(bool force) LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED); } // Hide SLM related menu item - gMenuHolder->getChild("MarketplaceListings")->setVisible(FALSE); + gMenuHolder->getChild("MarketplaceListings")->setVisible(false); // Also disable the toolbar button for Marketplace Listings LLCommand* command = LLCommandManager::instance().getCommand("marketplacelistings"); @@ -673,19 +673,19 @@ void init_menus() gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", sound_upload_cost_str); gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", animation_upload_cost_str); - gAutorespondMenu = gMenuBarView->getChild("Set Autorespond", TRUE); - gAutorespondNonFriendsMenu = gMenuBarView->getChild("Set Autorespond to non-friends", TRUE); - gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", TRUE); - gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", TRUE); + gAutorespondMenu = gMenuBarView->getChild("Set Autorespond", true); + gAutorespondNonFriendsMenu = gMenuBarView->getChild("Set Autorespond to non-friends", true); + gAttachSubMenu = gMenuBarView->findChildMenuByName("Attach Object", true); + gDetachSubMenu = gMenuBarView->findChildMenuByName("Detach Object", true); gDetachAvatarMenu = gMenuHolder->getChild("Avatar Detach", true); gDetachHUDAvatarMenu = gMenuHolder->getChild("Avatar Detach HUD", true); // Don't display the Memory console menu if the feature is turned off - LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild("Memory", TRUE); + LLMenuItemCheckGL *memoryMenu = gMenuBarView->getChild("Memory", true); if (memoryMenu) { - memoryMenu->setVisible(FALSE); + memoryMenu->setVisible(false); } gMenuBarView->createJumpKeys(); @@ -781,7 +781,7 @@ class LLAdvancedDumpInfoToConsole : public view_listener_t { bool handleEvent(const LLSD& userdata) { - gDebugView->mDebugConsolep->setVisible(TRUE); + gDebugView->mDebugConsolep->setVisible(true); std::string info_type = userdata.asString(); if ("region" == info_type) { @@ -1103,7 +1103,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t std::string mode = userdata.asString(); if (mode == "none") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == TRUE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == true) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -1111,7 +1111,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t } else if (mode == "current") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -1119,7 +1119,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t } else if (mode == "desired") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -1128,7 +1128,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t } else if (mode == "full") { - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == FALSE) + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false) { gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY); } @@ -3037,7 +3037,7 @@ void derenderObject(bool permanent) LLViewerObject* objp; LLSelectMgr* select_mgr = LLSelectMgr::getInstance(); - while ((objp = select_mgr->getSelection()->getFirstRootObject(TRUE))) + while ((objp = select_mgr->getSelection()->getFirstRootObject(true))) { // if ( (objp) && (gAgentID != objp->getID()) ) // [RLVa:KB] - Checked: 2012-03-11 (RLVa-1.4.5) | Added: RLVa-1.4.5 | FS-specific @@ -3590,7 +3590,7 @@ class LLObjectBuild : public view_listener_t if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); @@ -3625,11 +3625,11 @@ void update_camera() // always freeze camera in space, even if camera doesn't move // so, for example, follow cam scripts can't affect you when in build mode gAgentCamera.setFocusGlobal(gAgentCamera.calcFocusPositionTargetGlobal(), LLUUID::null); - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); } else { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); LLViewerObject* selected_objectp = selection->getFirstRootObject(); if (selected_objectp) { @@ -3706,7 +3706,7 @@ void handle_attachment_touch(const LLUUID& inv_item_id) { bool apply(LLSelectNode* node) { - node->setTransient(TRUE); + node->setTransient(true); return true; } } f; @@ -3758,7 +3758,7 @@ class LLLandBuild : public view_listener_t if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gAgentCamera.cameraZoomIn(0.666f); gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); @@ -3785,7 +3785,7 @@ class LLLandBuyPass : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLPanelLandGeneral::onClickBuyPass((void *)FALSE); + LLPanelLandGeneral::onClickBuyPass((void *)false); return true; } }; @@ -3800,12 +3800,12 @@ class LLLandEnableBuyPass : public view_listener_t }; // BUG: Should really check if CLICK POINT is in a parcel where you can build. -BOOL enable_land_build(void*) +bool enable_land_build(void*) { - if (gAgent.isGodlike()) return TRUE; - if (gAgent.inPrelude()) return FALSE; + if (gAgent.isGodlike()) return true; + if (gAgent.inPrelude()) return false; - BOOL can_build = FALSE; + bool can_build = false; LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (agent_parcel) { @@ -3815,12 +3815,12 @@ BOOL enable_land_build(void*) } // BUG: Should really check if OBJECT is in a parcel where you can build. -BOOL enable_object_build(void*) +bool enable_object_build(void*) { - if (gAgent.isGodlike()) return TRUE; - if (gAgent.inPrelude()) return FALSE; + if (gAgent.isGodlike()) return true; + if (gAgent.inPrelude()) return false; - BOOL can_build = FALSE; + bool can_build = false; LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if (agent_parcel) { @@ -3927,10 +3927,10 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t } }; -BOOL enable_has_attachments(void*) +bool enable_has_attachments(void*) { - return FALSE; + return false; } //--------------------------------------------------------------------------- @@ -4142,7 +4142,7 @@ class LLObjectMute : public view_listener_t return true; // [/RLVa:KB] - avatar->mNeedsImpostorUpdate = TRUE; + avatar->mNeedsImpostorUpdate = true; avatar->mLastImpostorUpdateReason = 9; @@ -4208,7 +4208,7 @@ bool handle_go_to() else { // Snap camera back to behind avatar - gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(true, ANIMATE); } // Could be first use @@ -4693,7 +4693,7 @@ void handle_buy_object(LLSaleInfo sale_info) LLUUID owner_id; std::string owner_name; - BOOL owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); + bool owners_identical = LLSelectMgr::getInstance()->selectGetOwner(owner_id, owner_name); if (!owners_identical) { LLNotificationsUtil::add("CannotBuyObjectsFromDifferentOwners"); @@ -4701,7 +4701,7 @@ void handle_buy_object(LLSaleInfo sale_info) } LLPermissions perm; - BOOL valid = LLSelectMgr::getInstance()->selectGetPermissions(perm); + bool valid = LLSelectMgr::getInstance()->selectGetPermissions(perm); LLAggregatePermissions ag_perm; valid &= LLSelectMgr::getInstance()->selectGetAggregatePermissions(ag_perm); if(!valid || !sale_info.isForSale() || !perm.allowTransferTo(gAgent.getID())) @@ -5150,7 +5150,7 @@ class LLTogglePanelPeopleTab : public view_listener_t } }; -BOOL check_admin_override(void*) +bool check_admin_override(void*) { return gAgent.getAdminOverride(); } @@ -5250,7 +5250,7 @@ void handle_toggle_hacked_godmode(void*) set_god_level(gHackGodmode ? GOD_MAINTENANCE : GOD_NOT); } -BOOL check_toggle_hacked_godmode(void*) +bool check_toggle_hacked_godmode(void*) { return gHackGodmode; } @@ -5287,15 +5287,15 @@ public: virtual ~LLHaveCallingcard() {} virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); - BOOL isThere() const { return mIsThere;} + bool isThere() const { return mIsThere;} protected: LLUUID mID; - BOOL mIsThere; + bool mIsThere; }; LLHaveCallingcard::LLHaveCallingcard(const LLUUID& agent_id) : mID(agent_id), - mIsThere(FALSE) + mIsThere(false) { } @@ -5307,14 +5307,14 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat, if((item->getType() == LLAssetType::AT_CALLINGCARD) && (item->getCreatorUUID() == mID)) { - mIsThere = TRUE; + mIsThere = true; } } - return FALSE; + return false; } */ -BOOL is_agent_mappable(const LLUUID& agent_id) +bool is_agent_mappable(const LLUUID& agent_id) { const LLRelationship* buddy_info = NULL; bool is_friend = LLAvatarActions::isFriend(agent_id); @@ -5404,7 +5404,7 @@ class LLEnableEditPhysics : public view_listener_t bool handleEvent(const LLSD& userdata) { //return gAgentWearables.isWearableModifiable(LLWearableType::WT_SHAPE, 0); - return TRUE; + return true; } }; @@ -5497,11 +5497,11 @@ void handle_object_sit(const LLUUID& object_id) handle_object_sit(obj, offset); } -void near_sit_down_point(BOOL success, void *) +void near_sit_down_point(bool success, void *) { if (success) { - gAgent.setFlying(FALSE); + gAgent.setFlying(false); gAgent.clearControlFlags(AGENT_CONTROL_STAND_UP); // might have been set by autopilot gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); } @@ -5552,7 +5552,7 @@ class LLLandCanSit : public view_listener_t // // Major mode switching // -void reset_view_final( BOOL proceed ); +void reset_view_final( bool proceed ); void handle_reset_view() { @@ -5563,16 +5563,16 @@ void handle_reset_view() } // Added optional V1 behavior so the avatar turns into camera direction after hitting ESC - // gAgentCamera.setFocusOnAvatar(TRUE, FALSE, FALSE); + // gAgentCamera.setFocusOnAvatar(true, false, false); if (!gSavedSettings.getBOOL("ResetViewTurnsAvatar")) { - // The only thing we actually want to do here is set LLAgent::mFocusOnAvatar to TRUE, + // The only thing we actually want to do here is set LLAgent::mFocusOnAvatar to true, // since this prevents the avatar from turning. - gAgentCamera.setFocusOnAvatar(TRUE, FALSE, FALSE); + gAgentCamera.setFocusOnAvatar(true, false, false); } // - reset_view_final( TRUE ); + reset_view_final( true ); LLFloaterCamera::resetCameraMode(); } @@ -5611,14 +5611,14 @@ class LLViewResetCameraAngles : public view_listener_t // // Note: extra parameters allow this function to be called from dialog. -void reset_view_final( BOOL proceed ) +void reset_view_final( bool proceed ) { if( !proceed ) { return; } - gAgentCamera.resetView(TRUE, TRUE); + gAgentCamera.resetView(true, true); gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); } @@ -5728,7 +5728,7 @@ void handle_duplicate_in_place(void*) LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL; LLVector3 offset(0.f, 0.f, 0.f); - LLSelectMgr::getInstance()->selectDuplicate(offset, TRUE); + LLSelectMgr::getInstance()->selectDuplicate(offset, true); } @@ -5776,8 +5776,8 @@ void handle_object_owner_permissive(void*) if(gAgent.isGodlike()) { // do the objects. - LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_BASE, TRUE, PERM_ALL, TRUE); - LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, TRUE, PERM_ALL, TRUE); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_BASE, true, PERM_ALL, true); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, true, PERM_ALL, true); } } @@ -5786,14 +5786,14 @@ void handle_object_owner_self(void*) // only send this if they're a god. if(gAgent.isGodlike()) { - LLSelectMgr::getInstance()->sendOwner(gAgent.getID(), gAgent.getGroupID(), TRUE); + LLSelectMgr::getInstance()->sendOwner(gAgent.getID(), gAgent.getGroupID(), true); } } // Shortcut to set owner permissions to not editable. void handle_object_lock(void*) { - LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, FALSE, PERM_MODIFY); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_OWNER, false, PERM_MODIFY); } void handle_object_asset_ids(void*) @@ -5918,11 +5918,11 @@ static bool get_derezzable_objects( LL_WARNS() << "Attempt to derez deprecated AssetContainer object type not supported." << LL_ENDL; /* object->requestInventory(container_inventory_arrived, - (void *)(BOOL)(DRD_TAKE_INTO_AGENT_INVENTORY == dest)); + (void *)(bool)(DRD_TAKE_INTO_AGENT_INVENTORY == dest)); */ continue; } - BOOL can_derez_current = FALSE; + bool can_derez_current = false; switch(dest) { case DRD_TAKE_INTO_AGENT_INVENTORY: @@ -5931,14 +5931,14 @@ static bool get_derezzable_objects( ((node->mPermissions->allowTransferTo(gAgent.getID()) && object->permModify()) || (node->allowOperationOnNode(PERM_OWNER, GP_OBJECT_MANIPULATE)))) { - can_derez_current = TRUE; + can_derez_current = true; } break; case DRD_RETURN_TO_OWNER: if(!object->isAttachment()) { - can_derez_current = TRUE; + can_derez_current = true; } break; @@ -5947,7 +5947,7 @@ static bool get_derezzable_objects( && object->permCopy()) || gAgent.isGodlike()) { - can_derez_current = TRUE; + can_derez_current = true; } break; } @@ -6048,7 +6048,7 @@ static void derez_objects( msg->nextBlockFast(_PREHASH_ObjectData); msg->addU32Fast(_PREHASH_ObjectLocalID, object->getLocalID()); // VEFFECT: DerezObject - LLHUDEffectSpiral* effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); + LLHUDEffectSpiral* effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true); effectp->setPositionGlobal(object->getPositionGlobal()); effectp->setColor(LLColor4U(gAgent.getEffectColor())); } @@ -6104,7 +6104,7 @@ void handle_take_copy() // Allow only if the avie isn't sitting on any of the selected objects LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); RlvSelectIsSittingOn f(gAgentAvatarp); - if ( (hSel.notNull()) && (hSel->getFirstRootNode(&f, TRUE) != NULL) ) + if ( (hSel.notNull()) && (hSel->getFirstRootNode(&f, true) != NULL) ) return; } // [/RLVa:KB] @@ -6238,8 +6238,8 @@ void handle_take(bool take_separate) return; } - BOOL you_own_everything = TRUE; - BOOL locked_but_takeable_object = FALSE; + bool you_own_everything = true; + bool locked_but_takeable_object = false; LLUUID category_id; for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); @@ -6251,12 +6251,12 @@ void handle_take(bool take_separate) { if(!object->permYouOwner()) { - you_own_everything = FALSE; + you_own_everything = false; } if(!object->permMove()) { - locked_but_takeable_object = TRUE; + locked_but_takeable_object = true; } } if(node->mFolderID.notNull()) @@ -6368,7 +6368,7 @@ void handle_take(bool take_separate) void handle_object_show_inspector() { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - LLViewerObject* objectp = selection->getFirstRootObject(TRUE); + LLViewerObject* objectp = selection->getFirstRootObject(true); if (!objectp) { return; @@ -6415,14 +6415,14 @@ bool confirm_take_separate(const LLSD ¬ification, const LLSD &response, LLObj // You can take an item when it is public and transferrable, or when // you own it. We err on the side of enabling the item when at least // one item selected can be copied to inventory. -BOOL enable_take() +bool enable_take() { // if (sitting_on_selection()) // [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b if ( (sitting_on_selection()) || ((rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn())) ) // [/RLVa:KB] { - return FALSE; + return false; } for (LLObjectSelection::valid_root_iterator iter = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); @@ -6437,13 +6437,13 @@ BOOL enable_take() } #ifdef HACKED_GODLIKE_VIEWER - return TRUE; + return true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER if (LLGridManager::getInstance()->isInSLBeta() && gAgent.isGodlike()) { - return TRUE; + return true; } # endif if(!object->isPermanentEnforced() && @@ -6455,7 +6455,7 @@ BOOL enable_take() } #endif } - return FALSE; + return false; } @@ -6546,9 +6546,9 @@ class LLToolsEnableBuyOrTake : public view_listener_t // exception is if you own everything in the selection that is for // sale, in this case, you can't buy stuff from yourself, so you can // take it. -// return value = TRUE if selection is a 'buy'. -// FALSE if selection is a 'take' -BOOL is_selection_buy_not_take() +// return value = true if selection is a 'buy'. +// false if selection is a 'take' +bool is_selection_buy_not_take() { for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin(); iter != LLSelectMgr::getInstance()->getSelection()->root_end(); iter++) @@ -6564,10 +6564,10 @@ BOOL is_selection_buy_not_take() // you do not own the object and it is for sale, thus, // it's a buy - return TRUE; + return true; } } - return FALSE; + return false; } S32 selection_price() @@ -6625,7 +6625,7 @@ void handle_buy() if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return; LLSaleInfo sale_info; - BOOL valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); + bool valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info); if (!valid) return; S32 price = sale_info.getSalePrice(); @@ -6663,27 +6663,27 @@ bool for_sale_selection(LLSelectNode* nodep) || nodep->mSaleInfo.getSaleType() != LLSaleInfo::FS_COPY); } -BOOL sitting_on_selection() +bool sitting_on_selection() { LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if (!node) { - return FALSE; + return false; } if (!node->mValid) { - return FALSE; + return false; } LLViewerObject* root_object = node->getObject(); if (!root_object) { - return FALSE; + return false; } // Need to determine if avatar is sitting on this object - if (!isAgentAvatarValid()) return FALSE; + if (!isAgentAvatarValid()) return false; return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object); } @@ -6786,7 +6786,7 @@ class LLToolsSnapObjectXY : public view_listener_t pos_global.mdV[VY] += snap_size; } - obj->setPositionGlobal(pos_global, FALSE); + obj->setPositionGlobal(pos_global, false); } } LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION); @@ -7221,7 +7221,7 @@ bool enable_object_delete() { bool new_value = #ifdef HACKED_GODLIKE_VIEWER - TRUE; + true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER (LLGridManager::getInstance()->isInSLBeta() @@ -7433,8 +7433,8 @@ void show_debug_menus() // this might get called at login screen where there is no menu so only toggle it if one exists if ( gMenuBarView ) { - BOOL debug = gSavedSettings.getBOOL("UseDebugMenus"); - BOOL qamode = gSavedSettings.getBOOL("QAMode"); + bool debug = gSavedSettings.getBOOL("UseDebugMenus"); + bool qamode = gSavedSettings.getBOOL("QAMode"); gMenuBarView->setItemVisible("Advanced", debug); // gMenuBarView->setItemEnabled("Advanced", debug); // Don't disable Advanced keyboard shortcuts when hidden @@ -7457,7 +7457,7 @@ void show_debug_menus() } if (gLoginMenuBarView) { - BOOL debug = gSavedSettings.getBOOL("UseDebugMenus"); + bool debug = gSavedSettings.getBOOL("UseDebugMenus"); gLoginMenuBarView->setItemVisible("Debug", debug); gLoginMenuBarView->setItemEnabled("Debug", debug); } @@ -7847,10 +7847,10 @@ void handle_script_info() void handle_look_at_selection(const LLSD& param) { const F32 PADDING_FACTOR = 1.75f; - BOOL zoom = (param.asString() == "zoom"); + bool zoom = (param.asString() == "zoom"); if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); LLBBox selection_bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); @@ -7895,7 +7895,7 @@ void handle_zoom_to_object(LLUUID object_id, const LLVector3d& object_pos) if (object) { - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); // Fix camera zoom to look at the avatar's face from the front // LLBBox bbox = object->getBoundingBoxAgent() ; @@ -7980,8 +7980,8 @@ class LLAvatarToggleMyProfile : public view_listener_t LLFloater* instance = LLAvatarActions::getProfileFloater(gAgent.getID()); if (LLFloater::isMinimized(instance)) { - instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setMinimized(false); + instance->setFocus(true); } else if (!LLFloater::isShown(instance)) { @@ -7989,7 +7989,7 @@ class LLAvatarToggleMyProfile : public view_listener_t } else if (!instance->hasFocus() && !instance->getIsChrome()) { - instance->setFocus(TRUE); + instance->setFocus(true); } else { @@ -8006,8 +8006,8 @@ class LLAvatarTogglePicks : public view_listener_t LLFloater * instance = LLAvatarActions::getProfileFloater(gAgent.getID()); if (LLFloater::isMinimized(instance) || (instance && !instance->hasFocus() && !instance->getIsChrome())) { - instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setMinimized(false); + instance->setFocus(true); LLAvatarActions::showPicks(gAgent.getID()); } else if (picks_tab_visible()) @@ -8029,8 +8029,8 @@ class LLAvatarToggleSearch : public view_listener_t LLFloater* instance = LLFloaterReg::findInstance("search"); if (LLFloater::isMinimized(instance)) { - instance->setMinimized(FALSE); - instance->setFocus(TRUE); + instance->setMinimized(false); + instance->setFocus(true); } else if (!LLFloater::isShown(instance)) { @@ -8038,7 +8038,7 @@ class LLAvatarToggleSearch : public view_listener_t } else if (!instance->hasFocus() && !instance->getIsChrome()) { - instance->setFocus(TRUE); + instance->setFocus(true); } else { @@ -8284,7 +8284,7 @@ void handle_customize_avatar() LLFloater* floater = LLFloaterReg::findInstance("appearance"); if (floater && floater->isMinimized()) { - floater->setMinimized(FALSE); + floater->setMinimized(false); } else if (LLFloater::isShown(floater)) { @@ -8661,7 +8661,7 @@ class LLLandEdit : public view_listener_t if (gAgentCamera.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gAgentCamera.cameraOrbitOver( F_PI * 0.25f ); @@ -8743,7 +8743,7 @@ class LLWorldEnableBuyLand : public view_listener_t } }; -BOOL enable_buy_land(void*) +bool enable_buy_land(void*) { return LLViewerParcelMgr::getInstance()->canAgentBuyParcel( LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(), false); @@ -8794,7 +8794,7 @@ private: return true; } - static void onNearAttachObject(BOOL success, void *user_data); + static void onNearAttachObject(bool success, void *user_data); void confirmReplaceAttachment(S32 option, LLViewerJointAttachment* attachment_point); class CallbackData : public LLSelectionCallbackData { @@ -8813,7 +8813,7 @@ protected: LLObjectSelectionHandle LLObjectAttachToAvatar::sObjectSelection; // static -void LLObjectAttachToAvatar::onNearAttachObject(BOOL success, void *user_data) +void LLObjectAttachToAvatar::onNearAttachObject(bool success, void *user_data) { if (!user_data) return; CallbackData* cb_data = static_cast(user_data); @@ -8941,7 +8941,7 @@ class LLAttachmentDrop : public view_listener_t // NOTE: copy/paste of the code in enable_detach() LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); RlvSelectHasLockedAttach f; - if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, FALSE) != NULL) ) + if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, false) != NULL) ) return true; } if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) @@ -9090,7 +9090,7 @@ class LLAttachmentDetach : public view_listener_t { LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); RlvSelectHasLockedAttach f; - if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, FALSE) != NULL) ) + if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, false) != NULL) ) return true; } // [/RLVa:KB] @@ -9125,7 +9125,7 @@ class LLAttachmentEnableDrop : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild()); + bool can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild()); //Add an inventory observer to only allow dropping the newly attached item //once it exists in your inventory. Look at Jira 2422. @@ -9180,7 +9180,7 @@ class LLAttachmentEnableDrop : public view_listener_t } }; -BOOL enable_detach(const LLSD&) +bool enable_detach(const LLSD&) { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -9189,7 +9189,7 @@ BOOL enable_detach(const LLSD&) !object->isAttachment() || !LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) { - return FALSE; + return false; } // Find the avatar who owns this attachment @@ -9209,17 +9209,17 @@ BOOL enable_detach(const LLSD&) { LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); RlvSelectHasLockedAttach f; - if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, FALSE) != NULL) ) - return FALSE; + if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&f, false) != NULL) ) + return false; } // [/RLVa:KB] - return TRUE; + return true; } avatar = (LLViewerObject*)avatar->getParent(); } - return FALSE; + return false; } class LLAttachmentEnableDetach : public view_listener_t @@ -9232,16 +9232,16 @@ class LLAttachmentEnableDetach : public view_listener_t }; // Used to tell if the selected object can be attached to your avatar. -//BOOL object_selected_and_point_valid() +//bool object_selected_and_point_valid() // [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0a) | Added: RLVa-1.2.0a -BOOL object_selected_and_point_valid(const LLSD& sdParam) +bool object_selected_and_point_valid(const LLSD& sdParam) // [/RLVa:KB] { // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f if (rlv_handler_t::isEnabled()) { if (!isAgentAvatarValid()) - return FALSE; + return false; // RELEASE-RLVa: [SL-2.2.0] Look at the caller graph for this function on every new release // - object_is_wearable() => dead code [sdParam == 0 => default attach point => OK!] @@ -9254,7 +9254,7 @@ BOOL object_selected_and_point_valid(const LLSD& sdParam) ((pAttachPt) && ((RLV_WEAR_ADD & gRlvAttachmentLocks.canAttach(pAttachPt)) == 0)) || // or non-attachable attach point (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attach on object == "Take" { - return FALSE; + return false; } } // [/RLVa:KB] @@ -9272,7 +9272,7 @@ BOOL object_selected_and_point_valid(const LLSD& sdParam) LLViewerObject* child = *iter; if (child->isAvatar()) { - return FALSE; + return false; } } } @@ -9287,22 +9287,22 @@ BOOL object_selected_and_point_valid(const LLSD& sdParam) } -BOOL object_is_wearable() +bool object_is_wearable() { if (!isAgentAvatarValid()) { - return FALSE; + return false; } // if (!object_selected_and_point_valid()) // [RLVa:KB] - Checked: 2010-03-16 (RLVa-1.2.0a) | Added: RLVa-1.2.0a if (!object_selected_and_point_valid(LLSD(0))) // [/RLVa:KB] { - return FALSE; + return false; } if (sitting_on_selection()) { - return FALSE; + return false; } return gAgentAvatarp->canAttachMoreObjects(); } @@ -9375,10 +9375,10 @@ namespace { struct QueueObjects : public LLSelectedNodeFunctor { - BOOL scripted; - BOOL modifiable; + bool scripted; + bool modifiable; LLFloaterScriptQueue* mQueue; - QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(FALSE), modifiable(FALSE) {} + QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(false), modifiable(false) {} virtual bool apply(LLSelectNode* node) { LLViewerObject* obj = node->getObject(); @@ -9674,7 +9674,7 @@ void handle_test_male(void*) // [/RLVa:KB] LLAppearanceMgr::instance().wearOutfitByName("Male Shape & Outfit"); - //gGestureList.requestResetFromServer( TRUE ); + //gGestureList.requestResetFromServer( true ); } void handle_test_female(void*) @@ -9689,7 +9689,7 @@ void handle_test_female(void*) // [/RLVa:KB] LLAppearanceMgr::instance().wearOutfitByName("Female Shape & Outfit"); - //gGestureList.requestResetFromServer( FALSE ); + //gGestureList.requestResetFromServer( false ); } void handle_dump_attachments(void*) @@ -9707,7 +9707,7 @@ void handle_dump_attachments(void*) ++attachment_iter) { LLViewerObject *attached_object = attachment_iter->get(); - BOOL visible = (attached_object != NULL && + bool visible = (attached_object != NULL && attached_object->mDrawable.notNull() && !attached_object->mDrawable->isRenderType(0)); LLVector3 pos; @@ -9731,7 +9731,7 @@ protected: bool handleEvent(const LLSD& userdata) { std::string control_name = userdata.asString(); - BOOL checked = gSavedSettings.getBOOL( control_name ); + bool checked = gSavedSettings.getBOOL( control_name ); gSavedSettings.setBOOL( control_name, !checked ); return true; } @@ -9753,7 +9753,7 @@ class LLTogglePerAccountControl : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string control_name = userdata.asString(); - BOOL checked = gSavedPerAccountSettings.getBOOL( control_name ); + bool checked = gSavedPerAccountSettings.getBOOL( control_name ); gSavedPerAccountSettings.setBOOL( control_name, !checked ); return true; } @@ -9887,7 +9887,7 @@ class LLAdvancedClickRenderProfile: public view_listener_t { bool handleEvent(const LLSD& userdata) { - gShaderProfileFrame = TRUE; + gShaderProfileFrame = true; return true; } }; @@ -9909,7 +9909,7 @@ class LLToggleShaderControl : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string control_name = userdata.asString(); - BOOL checked = gSavedSettings.getBOOL( control_name ); + bool checked = gSavedSettings.getBOOL( control_name ); gSavedSettings.setBOOL( control_name, !checked ); LLPipeline::refreshCachedSettings(); LLViewerShaderMgr::instance()->setShaders(); @@ -10007,7 +10007,7 @@ class FSProfilerToggle : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL checked = gSavedSettings.getBOOL( "ProfilingActive" ); + bool checked = gSavedSettings.getBOOL( "ProfilingActive" ); gSavedSettings.setBOOL( "ProfilingActive", !checked ); LLProfiler::active = !checked; return true; @@ -10182,15 +10182,15 @@ bool enable_take_copy_objects() class LLHasAsset : public LLInventoryCollectFunctor { public: - LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(FALSE) {} + LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(false) {} virtual ~LLHasAsset() {} virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); - BOOL hasAsset() const { return mHasAsset; } + bool hasAsset() const { return mHasAsset; } protected: LLUUID mAssetID; - BOOL mHasAsset; + bool mHasAsset; }; bool LLHasAsset::operator()(LLInventoryCategory* cat, @@ -10198,13 +10198,13 @@ bool LLHasAsset::operator()(LLInventoryCategory* cat, { if(item && item->getAssetUUID() == mAssetID) { - mHasAsset = TRUE; + mHasAsset = true; } - return FALSE; + return false; } -BOOL enable_save_into_task_inventory(void*) +bool enable_save_into_task_inventory(void*) { LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if(node && (node->mValid) && (!node->mFromTaskID.isNull())) @@ -10213,10 +10213,10 @@ BOOL enable_save_into_task_inventory(void*) LLViewerObject* obj = node->getObject(); if( obj && !obj->isAttachment() ) { - return TRUE; + return true; } } - return FALSE; + return false; } class LLToolsEnableSaveToObjectInventory : public view_listener_t @@ -10293,12 +10293,12 @@ class LLWorldEnableTeleportHome : public view_listener_t } }; -BOOL enable_god_full(void*) +bool enable_god_full(void*) { return gAgent.getGodLevel() >= GOD_FULL; } -BOOL enable_god_liaison(void*) +bool enable_god_liaison(void*) { return gAgent.getGodLevel() >= GOD_LIAISON; } @@ -10308,7 +10308,7 @@ bool is_god_customer_service() return gAgent.getGodLevel() >= GOD_CUSTOMER_SERVICE; } -BOOL enable_god_basic(void*) +bool enable_god_basic(void*) { return gAgent.getGodLevel() > GOD_NOT; } @@ -10319,7 +10319,7 @@ void toggle_show_xui_names(void *) gSavedSettings.setBOOL("DebugShowXUINames", !gSavedSettings.getBOOL("DebugShowXUINames")); } -BOOL check_show_xui_names(void *) +bool check_show_xui_names(void *) { return gSavedSettings.getBOOL("DebugShowXUINames"); } @@ -10342,7 +10342,7 @@ class FSToolsResyncAnimations : public view_listener_t anim_it != avatarp->mPlayingAnimations.end(); anim_it++) { - avatarp->stopMotion(anim_it->first, TRUE); + avatarp->stopMotion(anim_it->first, true); avatarp->startMotion(anim_it->first); } } @@ -10450,7 +10450,7 @@ class FSAddToContactSet : public view_listener_t LLVOAvatar* avatarp = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); if (avatarp) { - LLFloaterReg::showInstance("fs_add_contact", LLSD(avatarp->getID()), TRUE); + LLFloaterReg::showInstance("fs_add_contact", LLSD(avatarp->getID()), true); } } return true; @@ -10531,7 +10531,7 @@ class LLToolsSelectOnlyMyObjects : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectOwnedOnly"); + bool cur_val = gSavedSettings.getBOOL("SelectOwnedOnly"); gSavedSettings.setBOOL("SelectOwnedOnly", ! cur_val ); @@ -10543,7 +10543,7 @@ class LLToolsSelectOnlyMovableObjects : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectMovableOnly"); + bool cur_val = gSavedSettings.getBOOL("SelectMovableOnly"); gSavedSettings.setBOOL("SelectMovableOnly", ! cur_val ); @@ -10555,7 +10555,7 @@ class LLToolsSelectInvisibleObjects : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectInvisibleObjects"); + bool cur_val = gSavedSettings.getBOOL("SelectInvisibleObjects"); gSavedSettings.setBOOL("SelectInvisibleObjects", !cur_val); @@ -10567,7 +10567,7 @@ class LLToolsSelectReflectionProbes: public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL cur_val = gSavedSettings.getBOOL("SelectReflectionProbes"); + bool cur_val = gSavedSettings.getBOOL("SelectReflectionProbes"); gSavedSettings.setBOOL("SelectReflectionProbes", !cur_val); @@ -10614,7 +10614,7 @@ class LLToolsEditLinkedParts : public view_listener_t { bool handleEvent(const LLSD& userdata) { - BOOL select_individuals = !gSavedSettings.getBOOL("EditLinkedParts"); + bool select_individuals = !gSavedSettings.getBOOL("EditLinkedParts"); gSavedSettings.setBOOL( "EditLinkedParts", select_individuals ); if (select_individuals) { @@ -10718,7 +10718,7 @@ void handle_grab_baked_texture(void* data) } } -BOOL enable_grab_baked_texture(void* data) +bool enable_grab_baked_texture(void* data) { EBakedTextureIndex index = (EBakedTextureIndex)((intptr_t)data); if (isAgentAvatarValid()) @@ -11047,7 +11047,7 @@ void toggle_visibility(void* user_data) viewp->setVisible(!viewp->getVisible()); } -BOOL get_visibility(void* user_data) +bool get_visibility(void* user_data) { LLView* viewp = (LLView*)user_data; return viewp->getVisible(); @@ -11450,9 +11450,9 @@ class LLToolsSelectTool : public view_listener_t // attempt to open it, but it won't bring it to front or de-minimize. if (gFloaterTools && (gFloaterTools->isMinimized() || !gFloaterTools->isShown() || !gFloaterTools->isFrontmost())) { - gFloaterTools->setMinimized(FALSE); + gFloaterTools->setMinimized(false); gFloaterTools->openFloater(); - gFloaterTools->setVisibleAndFrontmost(TRUE); + gFloaterTools->setVisibleAndFrontmost(true); } return true; } @@ -11470,7 +11470,7 @@ class LLWorldEnvSettings : public view_listener_t LLFloater* env_floater = LLFloaterReg::findTypedInstance(*it); if (env_floater) { - env_floater->setFocus(FALSE); + env_floater->setFocus(false); } } } @@ -11900,7 +11900,7 @@ void toggleTeleportHistory() LLFloater* floater = LLFloaterReg::findInstance("places"); if (floater && floater->isMinimized()) { - floater->setMinimized(FALSE); + floater->setMinimized(false); } else if (LLFloater::isShown(floater)) { @@ -12037,7 +12037,7 @@ void volume_controls_set_control_false(const LLUICtrl* ctrl, const LLSD& user_da LLControlVariable* control = volume_control_panel->findControl(control_name); if (control) - control->set(LLSD(FALSE)); + control->set(LLSD(false)); } } diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index f98af2a680..3d765e545d 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -69,28 +69,28 @@ void handle_deselect(void*); void handle_delete_object(); void handle_duplicate(void*); void handle_duplicate_in_place(void*); -BOOL enable_not_have_card(void *userdata); +bool enable_not_have_card(void *userdata); void process_grant_godlike_powers(LLMessageSystem* msg, void**); -BOOL enable_cut(void*); -BOOL enable_copy(void*); -BOOL enable_paste(void*); -BOOL enable_select_all(void*); -BOOL enable_deselect(void*); -BOOL enable_undo(void*); -BOOL enable_redo(void*); +bool enable_cut(void*); +bool enable_copy(void*); +bool enable_paste(void*); +bool enable_select_all(void*); +bool enable_deselect(void*); +bool enable_undo(void*); +bool enable_redo(void*); -BOOL is_agent_mappable(const LLUUID& agent_id); +bool is_agent_mappable(const LLUUID& agent_id); void confirm_replace_attachment(S32 option, void* user_data); void handle_detach_from_avatar(const LLSD& user_data); void attach_label(std::string& label, const LLSD&); void detach_label(std::string& label, const LLSD&); void handle_detach(void*); -BOOL enable_god_full(void* user_data); -BOOL enable_god_liaison(void* user_data); -BOOL enable_god_basic(void* user_data); +bool enable_god_full(void* user_data); +bool enable_god_liaison(void* user_data); +bool enable_god_basic(void* user_data); void check_merchant_status(bool force = false); void exchange_callingcard(const LLUUID& dest_id); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 9bf8fec6d0..d4397dc412 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -196,7 +196,7 @@ void LLFilePickerThread::run() void LLFilePickerThread::runModeless() { - BOOL result = FALSE; + bool result = false; LLFilePicker picker; if (mIsSaveDialog) @@ -448,7 +448,7 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad //now grab the set of valid file extensions std::string valid_extensions = build_extensions_string(type); - BOOL ext_valid = FALSE; + bool ext_valid = false; typedef boost::tokenizer > tokenizer; boost::char_separator sep(" "); @@ -459,7 +459,7 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad //and compare them to the extension of the file //to be uploaded for (token_iter = tokens.begin(); - token_iter != tokens.end() && ext_valid != TRUE; + token_iter != tokens.end() && ext_valid != true; ++token_iter) { const std::string& cur_token = *token_iter; @@ -468,11 +468,11 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad { //valid extension //or the acceptable extension is any - ext_valid = TRUE; + ext_valid = true; } }//end for (loop over all tokens) - if (ext_valid == FALSE) + if (ext_valid == false) { //should only get here if the extension exists //but is invalid @@ -755,7 +755,7 @@ class LLFileUploadModel : public view_listener_t bool handleEvent(const LLSD& userdata) { LLFloaterModelPreview::showModelPreview(); - return TRUE; + return true; } }; @@ -764,7 +764,7 @@ class LLFileUploadMaterial : public view_listener_t bool handleEvent(const LLSD& userdata) { LLMaterialEditor::importMaterial(); - return TRUE; + return true; } }; @@ -943,11 +943,11 @@ class LLFileTakeSnapshotToDisk : public view_listener_t S32 width = gViewerWindow->getWindowWidthRaw(); S32 height = gViewerWindow->getWindowHeightRaw(); - BOOL render_ui = gSavedSettings.getBOOL("RenderUIInSnapshot"); - BOOL render_hud = gSavedSettings.getBOOL("RenderHUDInSnapshot"); - BOOL render_no_post = gSavedSettings.getBOOL("RenderSnapshotNoPost"); + bool render_ui = gSavedSettings.getBOOL("RenderUIInSnapshot"); + bool render_hud = gSavedSettings.getBOOL("RenderHUDInSnapshot"); + bool render_no_post = gSavedSettings.getBOOL("RenderSnapshotNoPost"); - BOOL high_res = gSavedSettings.getBOOL("HighResSnapshot"); + bool high_res = gSavedSettings.getBOOL("HighResSnapshot"); if (high_res) { width *= 2; @@ -960,11 +960,11 @@ class LLFileTakeSnapshotToDisk : public view_listener_t if (gViewerWindow->rawSnapshot(raw, width, height, - TRUE, - FALSE, + true, + false, render_ui, render_hud, - FALSE, + false, render_no_post, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, high_res ? S32_MAX : MAX_SNAPSHOT_IMAGE_SIZE)) //per side @@ -1017,7 +1017,7 @@ void handle_compress_image(void*) LL_INFOS() << "Input: " << infile << LL_ENDL; LL_INFOS() << "Output: " << outfile << LL_ENDL; - BOOL success; + bool success; success = LLViewerTextureList::createUploadFile(infile, outfile, IMG_CODEC_TGA); @@ -1067,7 +1067,7 @@ void handle_compress_file_test(void*) S64Bytes initial_size = S64Bytes(get_file_size(infile)); - BOOL success; + bool success; F64 total_seconds = LLTimer::getTotalSeconds(); success = gzip_file(infile, packfile); @@ -1161,7 +1161,7 @@ void upload_done_callback( LLResourceData* data = (LLResourceData*)user_data; S32 expected_upload_cost = data ? data->mExpectedUploadCost : 0; //LLAssetType::EType pref_loc = data->mPreferredLocation; - BOOL is_balance_sufficient = TRUE; + bool is_balance_sufficient = true; if(data) { @@ -1179,7 +1179,7 @@ void upload_done_callback( if(!(can_afford_transaction(expected_upload_cost))) { LLBuyCurrencyHTML::openCurrencyFloater( "", expected_upload_cost ); - is_balance_sufficient = FALSE; + is_balance_sufficient = false; } else if(region) { @@ -1340,7 +1340,7 @@ void upload_new_resource( data->mAssetInfo.mType, asset_callback, (void*)data, - FALSE); + false); } } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6e0bd33d04..45abf5b2c0 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -161,7 +161,7 @@ extern void on_new_message(const LLSD& msg); -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; // // Constants @@ -456,7 +456,7 @@ static LLNotificationFunctorRegistration friendship_offer_callback_reg_nm("Offer // Functions // -void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_group, +void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, bool is_group, S32 trx_type, const std::string& desc) { if(0 == amount || !region) return; @@ -478,7 +478,7 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_ msg->nextBlockFast(_PREHASH_MoneyData); msg->addUUIDFast(_PREHASH_SourceID, gAgent.getID() ); msg->addUUIDFast(_PREHASH_DestID, uuid); - msg->addU8Fast(_PREHASH_Flags, pack_transaction_flags(FALSE, is_group)); + msg->addU8Fast(_PREHASH_Flags, pack_transaction_flags(false, is_group)); msg->addS32Fast(_PREHASH_Amount, amount); msg->addU8Fast(_PREHASH_AggregatePermNextOwner, (U8)LLAggregatePermissions::AP_EMPTY); msg->addU8Fast(_PREHASH_AggregatePermInventory, (U8)LLAggregatePermissions::AP_EMPTY); @@ -1075,13 +1075,13 @@ static void highlight_inventory_objects_in_panel(const std::vector& item // Parent folders can be different in case of 2 consecutive drag and drop // operations when the second one is started before the first one completes. LL_DEBUGS("Inventory_Move") << "Open folder: " << fv_folder->getName() << LL_ENDL; - fv_folder->setOpen(TRUE); + fv_folder->setOpen(true); if (fv_folder->isSelected()) { - fv->changeSelection(fv_folder, FALSE); + fv->changeSelection(fv_folder, false); } } - fv->changeSelection(fv_item, TRUE); + fv->changeSelection(fv_item, true); } } } @@ -1377,7 +1377,7 @@ protected: } else if (!added.empty() && gSavedSettings.getBOOL("ShowInInventory") && highlight_offered_object(added.back())) { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, added.back()); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, added.back()); } // } @@ -1402,7 +1402,7 @@ protected: } else if (!added.empty() && gSavedSettings.getBOOL("ShowInInventory")) { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, added.back()); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, added.back()); } // gInventory.removeObserver(this); @@ -1478,7 +1478,7 @@ protected: }; -//Returns TRUE if we are OK, FALSE if we are throttled +//Returns true if we are OK, false if we are throttled //Set check_only true if you want to know the throttle status //without registering a hit bool check_offer_throttle(const std::string& from_name, bool check_only) @@ -1623,7 +1623,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam { LL_DEBUGS("Messaging") << "Highlighting inventory item: " << item->getUUID() << LL_ENDL; // If we opened this ourselves, focus it - const BOOL take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO; + const bool take_focus = from_name.empty() ? TAKE_FOCUS_YES : TAKE_FOCUS_NO; switch(asset_type) { case LLAssetType::AT_NOTECARD: @@ -1729,7 +1729,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam // Highlight item // Only show if either ShowInInventory is true OR it is an inventory // offer from an agent and the asset is not previewable - const BOOL auto_open = gSavedSettings.getBOOL("ShowInInventory") || (from_agent_manual && !check_asset_previewable(asset_type)); + const bool auto_open = gSavedSettings.getBOOL("ShowInInventory") || (from_agent_manual && !check_asset_previewable(asset_type)); //gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false //!from_name.empty(); // don't open if it's not from anyone. // Use correct inventory floater @@ -1738,7 +1738,7 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam // LLFloaterReg::showInstance("inventory"); //} // - if (auto_open) // Don't mess with open inventory panels when ShowInInventory is FALSE + if (auto_open) // Don't mess with open inventory panels when ShowInInventory is false LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true); } } @@ -1810,7 +1810,7 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, { return (notification->getPayload()["from_id"].asUUID() == blocked_id); } - return FALSE; + return false; } private: const LLUUID& blocked_id; @@ -1832,8 +1832,8 @@ std::string LLOfferInfo::mResponderType = "offer_info"; LLOfferInfo::LLOfferInfo() : LLNotificationResponderInterface() - , mFromGroup(FALSE) - , mFromObject(FALSE) + , mFromGroup(false) + , mFromObject(false) , mIM(IM_NOTHING_SPECIAL) , mType(LLAssetType::AT_NONE) , mPersist(false) @@ -1923,7 +1923,7 @@ void LLOfferInfo::sendReceiveResponse(bool accept, const LLUUID &destination_fol msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_MessageBlock); - msg->addBOOLFast(_PREHASH_FromGroup, FALSE); + msg->addBOOLFast(_PREHASH_FromGroup, false); msg->addUUIDFast(_PREHASH_ToAgentID, mFromID); msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); msg->addUUIDFast(_PREHASH_ID, mTransactionID); @@ -1984,7 +1984,7 @@ void LLOfferInfo::send_decline_response(void) msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->nextBlockFast(_PREHASH_MessageBlock); - msg->addBOOLFast(_PREHASH_FromGroup, FALSE); + msg->addBOOLFast(_PREHASH_FromGroup, false); msg->addUUIDFast(_PREHASH_ToAgentID, mFromID); msg->addU8Fast(_PREHASH_Offline, IM_ONLINE); msg->addUUIDFast(_PREHASH_ID, mTransactionID); @@ -2207,7 +2207,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& } if (gSavedSettings.getBOOL("ShowInInventory")) { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mObjectID); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, mObjectID); } } // @@ -2233,7 +2233,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& chat.mText = log_message; if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::isLinden(mFromName) ) // muting for SL-42269 { - chat.mMuted = TRUE; + chat.mMuted = true; accept_to_trash = false; // will send decline message } @@ -2340,7 +2340,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const std::string from_string; // Used in the pop-up. std::string chatHistory_string; // Used in chat history. - if (mFromObject == TRUE) + if (mFromObject == true) { if (mFromGroup) { @@ -2542,7 +2542,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response) LLUUID from_id = notification["payload"]["from_id"].asUUID(); LLUUID lure_id = notification["payload"]["lure_id"].asUUID(); - BOOL godlike = notification["payload"]["godlike"].asBoolean(); + bool godlike = notification["payload"]["godlike"].asBoolean(); switch(option) { @@ -2603,7 +2603,7 @@ bool mature_lure_callback(const LLSD& notification, const LLSD& response) LLUUID from_id = notification["payload"]["from_id"].asUUID(); LLUUID lure_id = notification["payload"]["lure_id"].asUUID(); - BOOL godlike = notification["payload"]["godlike"].asBoolean(); + bool godlike = notification["payload"]["godlike"].asBoolean(); U8 region_access = static_cast(notification["payload"]["region_maturity"].asInteger()); switch(option) @@ -2728,7 +2728,7 @@ void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, c pack_instant_message( msg, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), from_id, my_name, @@ -2749,7 +2749,7 @@ void send_rejecting_tp_offers_message (LLMessageSystem* msg, const LLUUID& from_ pack_instant_message( msg, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), from_id, my_name, @@ -2770,7 +2770,7 @@ void send_rejecting_friendship_requests_message (LLMessageSystem* msg, const LLU pack_instant_message( msg, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), from_id, my_name, @@ -3026,10 +3026,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // } - BOOL is_do_not_disturb = gAgent.isDoNotDisturb(); + bool is_do_not_disturb = gAgent.isDoNotDisturb(); - BOOL is_muted = FALSE; - BOOL is_linden = FALSE; + bool is_muted = false; + bool is_linden = false; is_muted = LLMuteList::getInstance()->isMuted( from_id, from_name, @@ -3043,7 +3043,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) return; } - BOOL is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible); + bool is_audible = (CHAT_AUDIBLE_FULLY == chat.mAudible); chatter = gObjectList.findObject(from_id); if (chatter) { @@ -3086,7 +3086,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (is_audible) { - //BOOL visible_in_chat_bubble = FALSE; + //bool visible_in_chat_bubble = false; std::string verb; color.setVec(1.f,1.f,1.f,1.f); @@ -3131,8 +3131,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if ( (rlv_handler_t::isEnabled()) && (CHAT_TYPE_START != chat.mChatType) && (CHAT_TYPE_STOP != chat.mChatType) ) { // NOTE: chatter can be NULL (may not have rezzed yet, or could be another avie's HUD attachment) - BOOL is_attachment = (chatter) ? chatter->isAttachment() : FALSE; - BOOL is_owned_by_me = (chatter) ? chatter->permYouOwner() : FALSE; + bool is_attachment = (chatter) ? chatter->isAttachment() : false; + bool is_owned_by_me = (chatter) ? chatter->permYouOwner() : false; // Filtering "rules": // avatar => filter all avie text (unless it's this avie or they're an exemption) @@ -3189,7 +3189,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) { chat.mFromName = RlvStrings::getAnonym(chat.mFromName); } - chat.mRlvNamesFiltered = TRUE; + chat.mRlvNamesFiltered = true; } } @@ -3214,7 +3214,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) } // [/RLVa:KB] - BOOL ircstyle = FALSE; + bool ircstyle = false; // Look for IRC-style emotes here so chatbubbles work // Consolidate IRC /me prefix checks @@ -3223,14 +3223,14 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (is_irc_me_prefix(mesg)) // { - ircstyle = TRUE; + ircstyle = true; } chat.mText = mesg; // Look for the start of typing so we can put "..." in the bubbles. if (CHAT_TYPE_START == chat.mChatType) { - LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, TRUE); + LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, true); // Might not have the avatar constructed yet, eg on login. if (chatter && chatter->isAvatar()) @@ -3241,7 +3241,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) } else if (CHAT_TYPE_STOP == chat.mChatType) { - LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE); + LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, false); // Might not have the avatar constructed yet, eg on login. if (chatter && chatter->isAvatar()) @@ -3408,7 +3408,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // We have a real utterance now, so can stop showing "..." and proceed. if (chatter && chatter->isAvatar()) { - LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE); + LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, false); ((LLVOAvatar*)chatter)->stopTyping(); if (!is_muted && !is_do_not_disturb) @@ -3537,11 +3537,11 @@ void process_teleport_start(LLMessageSystem *msg, void**) if ( ((teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) && !gSavedSettings.getBOOL("FSAlwaysShowTPCancel")) || (!gRlvHandler.getCanCancelTp()) ) // [/RLVa:KB] { - gViewerWindow->setProgressCancelButtonVisible(FALSE); + gViewerWindow->setProgressCancelButtonVisible(false); } else { - gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Cancel")); + gViewerWindow->setProgressCancelButtonVisible(true, LLTrans::getString("Cancel")); } // Freeze the UI and show progress bar @@ -3549,7 +3549,7 @@ void process_teleport_start(LLMessageSystem *msg, void**) if( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE ) { - gTeleportDisplay = TRUE; + gTeleportDisplay = true; gAgent.setTeleportState( LLAgent::TELEPORT_START ); make_ui_sound("UISndTeleportOut"); @@ -3582,11 +3582,11 @@ void process_teleport_progress(LLMessageSystem* msg, void**) if ( ((teleport_flags & TELEPORT_FLAGS_DISABLE_CANCEL) && !gSavedSettings.getBOOL("FSAlwaysShowTPCancel")) || (!gRlvHandler.getCanCancelTp()) ) // [/RLVa:KB] { - gViewerWindow->setProgressCancelButtonVisible(FALSE); + gViewerWindow->setProgressCancelButtonVisible(false); } else { - gViewerWindow->setProgressCancelButtonVisible(TRUE, LLTrans::getString("Cancel")); + gViewerWindow->setProgressCancelButtonVisible(true, LLTrans::getString("Cancel")); } std::string buffer; msg->getString("Info", "Message", buffer); @@ -3724,7 +3724,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**) { // Race condition? Make sure all variables are set correctly for teleport to work LL_WARNS("Teleport","Messaging") << "Teleport 'finish' message without 'start'. Setting state to TELEPORT_REQUESTED" << LL_ENDL; - gTeleportDisplay = TRUE; + gTeleportDisplay = true; LLViewerMessage::getInstance()->mTeleportStartedSignal(); gAgent.setTeleportState(LLAgent::TELEPORT_REQUESTED); make_ui_sound("UISndTeleportOut"); @@ -3736,11 +3736,11 @@ void process_teleport_finish(LLMessageSystem* msg, void**) } // Teleport is finished; it can't be cancelled now. - gViewerWindow->setProgressCancelButtonVisible(FALSE); + gViewerWindow->setProgressCancelButtonVisible(false); // Do teleport effect for where you're leaving // VEFFECT: TeleportStart - LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); + LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true); effectp->setPositionGlobal(gAgent.getPositionGlobal()); effectp->setColor(LLColor4U(gAgent.getEffectColor())); LLHUDManager::getInstance()->sendEffects(); @@ -3804,7 +3804,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**) LLHost sim_host(sim_ip, sim_port); // Viewer trusts the simulator. - gMessageSystem->enableCircuit(sim_host, TRUE); + gMessageSystem->enableCircuit(sim_host, true); // Aurora Sim //LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host); LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host, region_size_x, region_size_y); @@ -3813,7 +3813,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**) // Ansariel: Disable teleport beacon after teleport if (gSavedSettings.getBOOL("FSDisableBeaconAfterTeleport")) { - LLTracker::stopTracking((void *)(intptr_t)TRUE); + LLTracker::stopTracking((void *)(intptr_t)true); LLWorldMap::getInstance()->cancelTracking(); } @@ -3822,7 +3822,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**) gAgentCamera.updateCamera(); // likewise make sure the camera is behind the avatar - gAgentCamera.resetView(TRUE); + gAgentCamera.resetView(true); LLVector3 shift_vector = regionp->getPosRegionFromGlobal(gAgent.getRegion()->getOriginGlobal()); gAgent.setRegion(regionp); gObjectList.shiftObjects(shift_vector); @@ -3867,11 +3867,11 @@ void process_teleport_finish(LLMessageSystem* msg, void**) // after a TP. if (teleport_flags & TELEPORT_FLAGS_IS_FLYING || gSavedSettings.getBOOL("FSFlyAfterTeleport")) { - gAgent.setFlying(TRUE); + gAgent.setFlying(true); } else { - gAgent.setFlying(FALSE); + gAgent.setFlying(false); } // @@ -3880,15 +3880,15 @@ void process_teleport_finish(LLMessageSystem* msg, void**) // Now do teleport effect for where you're going. // VEFFECT: TeleportEnd - effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE); + effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, true); effectp->setPositionGlobal(gAgent.getPositionGlobal()); effectp->setColor(LLColor4U(gAgent.getEffectColor())); LLHUDManager::getInstance()->sendEffects(); -// gTeleportDisplay = TRUE; +// gTeleportDisplay = true; // gTeleportDisplayTimer.reset(); -// gViewerWindow->setShowProgress(TRUE); +// gViewerWindow->setShowProgress(true); } // stuff we have to do every time we get an AvatarInitComplete from a sim @@ -4010,15 +4010,15 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if (!gSavedPerAccountSettings.getBOOL("FSRenderFriendsOnlyPersistsTP")) { // We need to turn off the RFO as we have TP'd away and have asked not to persist - gSavedPerAccountSettings.setBOOL("FSRenderFriendsOnly", FALSE); + gSavedPerAccountSettings.setBOOL("FSRenderFriendsOnly", false); } // // FIRE-30947: Auto-Unmute if (gSavedSettings.getBOOL("MuteSounds") && gSavedSettings.getBOOL("FSAutoUnmuteSounds")) - gSavedSettings.setBOOL("MuteSounds", FALSE); + gSavedSettings.setBOOL("MuteSounds", false); if (gSavedSettings.getBOOL("MuteAmbient") && gSavedSettings.getBOOL("FSAutoUnmuteAmbient")) - gSavedSettings.setBOOL("MuteAmbient", FALSE); + gSavedSettings.setBOOL("MuteAmbient", false); // if (gAgent.getTeleportKeepsLookAt()) { @@ -4027,7 +4027,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) look_at = LLViewerCamera::getInstance()->getAtAxis(); } // Force the camera back onto the agent, don't animate. - gAgentCamera.setFocusOnAvatar(TRUE, FALSE); + gAgentCamera.setFocusOnAvatar(true, false); gAgentCamera.slamLookAt(look_at); gAgentCamera.updateCamera(); @@ -4107,15 +4107,15 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) /* if (teleport_flags & TELEPORT_FLAGS_IS_FLYING) { - gAgent.setFlying(TRUE); + gAgent.setFlying(true); } else { - gAgent.setFlying(FALSE); + gAgent.setFlying(false); } */ - send_agent_update(TRUE, TRUE); + send_agent_update(true, true); if (gAgent.getRegion()->getBlockFly()) { @@ -4234,7 +4234,7 @@ const F32 THRESHOLD_HEAD_ROT_QDOT = 0.9997f; // ~= 2.5 degrees -- if its less th const F32 MAX_HEAD_ROT_QDOT = 0.99999f; // ~= 0.5 degrees -- if its greater than this then no need to update head_rot // between these values we delay the updates (but no more than one second) -void send_agent_update(BOOL force_send, BOOL send_reliable) +void send_agent_update(bool force_send, bool send_reliable) { LL_PROFILE_ZONE_SCOPED; llassert(!gCubeSnapshot); @@ -4307,7 +4307,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) // trigger a control event. U32 control_flags = gAgent.getControlFlags(); - MASK key_mask = gKeyboard->currentMask(TRUE); + MASK key_mask = gKeyboard->currentMask(true); if (key_mask & MASK_ALT || key_mask & MASK_CONTROL) { @@ -5033,7 +5033,7 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data) if (gAgent.canAccessMaturityAtGlobal(pos_global)) { // Add audioData starts a transfer internally. - sourcep->addAudioData(datap, FALSE); + sourcep->addAudioData(datap, false); } } @@ -5202,7 +5202,7 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) LLViewerRegion* regionp = gAgent.getRegion(); if (regionp) { - BOOL was_flying = gAgent.getFlying(); + bool was_flying = gAgent.getFlying(); regionp->setRegionFlags(region_flags); regionp->setMaxTasks(max_tasks_per_region); // HACK: This makes agents drop from the sky if the region is @@ -5276,7 +5276,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) // See EXT-2781. if (animation_id == ANIM_AGENT_STANDUP && gAgent.getFlying()) { - gAgent.setFlying(FALSE); + gAgent.setFlying(false); } if (i < num_source_blocks) @@ -5286,15 +5286,15 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) LLViewerObject* object = gObjectList.findObject(object_id); if (object) { - object->setFlagsWithoutUpdate(FLAGS_ANIM_SOURCE, TRUE); + object->setFlagsWithoutUpdate(FLAGS_ANIM_SOURCE, true); - BOOL anim_found = FALSE; + bool anim_found = false; LLVOAvatar::AnimSourceIterator anim_it = avatarp->mAnimationSources.find(object_id); for (;anim_it != avatarp->mAnimationSources.end(); ++anim_it) { if (anim_it->second == animation_id) { - anim_found = TRUE; + anim_found = true; break; } } @@ -5430,7 +5430,7 @@ void process_camera_constraint(LLMessageSystem *mesgsys, void **user_data) gAgentCamera.setCameraCollidePlane(cameraCollidePlane); } -void near_sit_object(BOOL success, void *data) +void near_sit_object(bool success, void *data) { if (success) { @@ -5468,7 +5468,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) gAgentCamera.setForceMouselook(force_mouselook); // Forcing turning off flying here to prevent flying after pressing "Stand" // to stand up from an object. See EXT-1655. - gAgent.setFlying(FALSE); + gAgent.setFlying(false); LLViewerObject* object = gObjectList.findObject(sitObjectID); if (object) @@ -5516,7 +5516,7 @@ void process_set_follow_cam_properties(LLMessageSystem *mesgsys, void **user_dat LLViewerObject* objectp = gObjectList.findObject(source_id); if (objectp) { - objectp->setFlagsWithoutUpdate(FLAGS_CAMERA_SOURCE, TRUE); + objectp->setFlagsWithoutUpdate(FLAGS_CAMERA_SOURCE, true); } S32 num_objects = mesgsys->getNumberOfBlocks("CameraProperty"); @@ -5701,11 +5701,11 @@ void process_user_list_reply(LLMessageSystem *msg, void **user_data) if (status & 0x01) { - dialog_friends_add_friend(buffer, TRUE); + dialog_friends_add_friend(buffer, true); } else { - dialog_friends_add_friend(buffer, FALSE); + dialog_friends_add_friend(buffer, false); } } @@ -6515,9 +6515,9 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), - FALSE, //UI + false, //UI gSavedSettings.getBOOL("RenderHUDInSnapshot"), - FALSE, + false, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG); } @@ -6582,7 +6582,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) std::string snap_filename = gDirUtilp->getLindenUserDir(); snap_filename += gDirUtilp->getDirDelimiter(); snap_filename += LLStartUp::getScreenHomeFilename(); - if (gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, gSavedSettings.getBOOL("RenderHUDInSnapshot"), FALSE, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG)) + if (gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), false, gSavedSettings.getBOOL("RenderHUDInSnapshot"), false, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG)) { LL_INFOS() << LLStartUp::getScreenHomeFilename() << " saved successfully." << LL_ENDL; } @@ -6657,9 +6657,9 @@ static void process_special_alert_messages(const std::string & message) gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), - FALSE, + false, gSavedSettings.getBOOL("RenderHUDInSnapshot"), - FALSE, + false, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG); } @@ -6703,7 +6703,7 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data) if (!attempt_standard_notification(msgsystem)) { - BOOL modal = FALSE; + bool modal = false; process_alert_core(message, modal); static LLCachedControl ban_lines_mode(gSavedSettings , "ShowBanLines" , LLViewerParcelMgr::PARCEL_BAN_LINES_ON_COLLISION); @@ -6738,7 +6738,7 @@ bool handle_special_alerts(const std::string &pAlertName) return isHandled; } -void process_alert_core(const std::string& message, BOOL modal) +void process_alert_core(const std::string& message, bool modal) { const std::string ALERT_PREFIX("ALERT: "); const std::string NOTIFY_PREFIX("NOTIFY: "); @@ -7022,7 +7022,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use } // Report Collision Messages to scripts - BOOL b_found = FALSE; + bool b_found = false; for (mean_collision_list_t::iterator iter = gMeanCollisionList.begin(); iter != gMeanCollisionList.end(); ++iter) @@ -7032,7 +7032,7 @@ void process_mean_collision_alert_message(LLMessageSystem *msgsystem, void **use { mcd->mTime = time; mcd->mMag = mag; - b_found = TRUE; + b_found = true; break; } } @@ -7109,7 +7109,7 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) gMenuHolder->getChild("Buy and Sell L$")->setLabelArg("L$", LLStringExplicit("L$")); } -void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, BOOL granted) +void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, bool granted) { // only continue if at least some permissions were requested if (orig_questions) @@ -7128,7 +7128,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp // try to lookup viewerobject that corresponds to the object that // requested permissions (here, taskid->requesting object id) - BOOL foundpos = FALSE; + bool foundpos = false; LLViewerObject* viewobj = gObjectList.findObject(notification["payload"]["task_id"].asUUID()); if (viewobj) { @@ -7144,7 +7144,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp std::string formatpos = llformat("%.1f, %.1f,%.1f", objpos[VX], objpos[VY], objpos[VZ]); notice.setArg("[REGIONPOS]", formatpos); - foundpos = TRUE; + foundpos = true; } } @@ -7169,7 +7169,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp // check each permission that was requested, and list each // permission that has been flagged as a caution permission - BOOL caution = FALSE; + bool caution = false; S32 count = 0; std::string perms; BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS) @@ -7182,7 +7182,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp // [/RLVa:KB] { count++; - caution = TRUE; + caution = true; // add a comma before the permission description if it is not the first permission // added to the list or the last permission to check @@ -7219,7 +7219,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp // if (caution) // { // LLChat chat(notice.getString()); -// // LLFloaterChat::addChat(chat, FALSE, FALSE); +// // LLFloaterChat::addChat(chat, false, false); // } } } @@ -7260,13 +7260,13 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) } // check whether permissions were granted or denied - BOOL allowed = TRUE; + bool allowed = true; // the "yes/accept" button is the first button in the template, making it button 0 // if any other button was clicked, the permissions were denied if (option != 0) { new_questions = 0; - allowed = FALSE; + allowed = false; } else if(experience.notNull()) { @@ -7703,7 +7703,7 @@ void container_inventory_arrived(LLViewerObject* object, } // we've got the inventory, now delete this object if this was a take - BOOL delete_object = (BOOL)(intptr_t)data; + bool delete_object = (bool)(intptr_t)data; LLViewerRegion *region = gAgent.getRegion(); if (delete_object && region) { @@ -7861,7 +7861,7 @@ void process_teleport_local(LLMessageSystem *msg,void**) // after tp, keep the teleport state and let progress screen clear it after a short delay // (progress screen is active but not visible) *TODO: remove when SVC-5290 is fixed gTeleportDisplayTimer.reset(); - gTeleportDisplay = TRUE; + gTeleportDisplay = true; } else { @@ -7877,11 +7877,11 @@ void process_teleport_local(LLMessageSystem *msg,void**) if (teleport_flags & TELEPORT_FLAGS_IS_FLYING || gSavedSettings.getBOOL("FSFlyAfterTeleport")) // Always fly after TP option { - gAgent.setFlying(TRUE); + gAgent.setFlying(true); } else { - gAgent.setFlying(FALSE); + gAgent.setFlying(false); } // Stop typing after teleport (possible fix for FIRE-7273) @@ -7892,13 +7892,13 @@ void process_teleport_local(LLMessageSystem *msg,void**) if ( !(gAgent.getTeleportKeepsLookAt() && LLViewerJoystick::getInstance()->getOverrideCamera()) && gSavedSettings.getBOOL("FSResetCameraOnTP") ) { - gAgentCamera.resetView(TRUE, TRUE); + gAgentCamera.resetView(true, true); } // send camera update to new region gAgentCamera.updateCamera(); - send_agent_update(TRUE, TRUE); + send_agent_update(true, true); // Let the interested parties know we've teleported. // Vadim *HACK: Agent position seems to get reset (to render position?) @@ -8187,7 +8187,7 @@ void send_improved_im(const LLUUID& to_id, pack_instant_message( gMessageSystem, gAgent.getID(), - FALSE, + false, gAgent.getSessionID(), to_id, name, @@ -8618,7 +8618,7 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) // remove above two lines and replace with below line // to re-enable parcel browser for llMapDestination() - // LLURLDispatcher::dispatch(LLSLURL::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE); + // LLURLDispatcher::dispatch(LLSLURL::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), false); } @@ -8689,7 +8689,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLFloaterBuyLand::updateLastModified(last_modified); // load the actual covenant asset data - const BOOL high_priority = TRUE; + const bool high_priority = true; if (covenant_id.notNull()) { gAssetStorage->getEstateAsset(gAgent.getRegionHost(), diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 566d0b64d5..bcef899cde 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -70,8 +70,8 @@ enum InventoryOfferResponse // }; -BOOL can_afford_transaction(S32 cost); -void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_group = FALSE, +bool can_afford_transaction(S32 cost); +void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, bool is_group = false, S32 trx_type = TRANS_GIFT, const std::string& desc = LLStringUtil::null); void send_join_group_response(LLUUID group_id, LLUUID transaction_id, @@ -89,7 +89,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data); void process_chat_from_simulator(LLMessageSystem *mesgsys, void **user_data); //void process_agent_to_new_region(LLMessageSystem *mesgsys, void **user_data); -void send_agent_update(BOOL force_send, BOOL send_reliable = FALSE); +void send_agent_update(bool force_send, bool send_reliable = false); void process_object_update(LLMessageSystem *mesgsys, void **user_data); void process_compressed_object_update(LLMessageSystem *mesgsys, void **user_data); void process_cached_object_update(LLMessageSystem *mesgsys, void **user_data); @@ -132,7 +132,7 @@ void process_adjust_balance(LLMessageSystem* msg_system, void**); bool attempt_standard_notification(LLMessageSystem* msg); void process_alert_message(LLMessageSystem* msg, void**); void process_agent_alert_message(LLMessageSystem* msgsystem, void** user_data); -void process_alert_core(const std::string& message, BOOL modal); +void process_alert_core(const std::string& message, bool modal); // "Mean" or player-vs-player abuse typedef std::list mean_collision_list_t; @@ -255,8 +255,8 @@ public: static std::string mResponderType; EInstantMessage mIM; LLUUID mFromID; - BOOL mFromGroup; - BOOL mFromObject; + bool mFromGroup; + bool mFromObject; LLUUID mTransactionID; LLUUID mFolderID; LLUUID mObjectID; @@ -317,7 +317,7 @@ public: { // FIRE-3234: Don't need a check for ShowNewInventory here; // This only gets called if the user explicity clicks "Show" or - // AutoAcceptNewInventory and ShowNewInventory are TRUE. + // AutoAcceptNewInventory and ShowNewInventory are true. //open_inventory_offer(mComplete, mFromName); open_inventory_offer(mComplete, mFromName, mIsManuallyAccepted); gInventory.removeObserver(this); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 2c9b8e32f1..88c05b88a8 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -123,19 +123,19 @@ //#define DEBUG_UPDATE_TYPE -BOOL LLViewerObject::sVelocityInterpolate = TRUE; -BOOL LLViewerObject::sPingInterpolate = TRUE; +bool LLViewerObject::sVelocityInterpolate = true; +bool LLViewerObject::sPingInterpolate = true; U32 LLViewerObject::sNumZombieObjects = 0; S32 LLViewerObject::sNumObjects = 0; -BOOL LLViewerObject::sMapDebug = TRUE; +bool LLViewerObject::sMapDebug = true; LLColor4 LLViewerObject::sEditSelectColor( 1.0f, 1.f, 0.f, 0.3f); // Edit OK LLColor4 LLViewerObject::sNoEditSelectColor( 1.0f, 0.f, 0.f, 0.3f); // Can't edit S32 LLViewerObject::sAxisArrowLength(50); -BOOL LLViewerObject::sPulseEnabled(FALSE); -BOOL LLViewerObject::sUseSharedDrawables(FALSE); // TRUE +bool LLViewerObject::sPulseEnabled(false); +bool LLViewerObject::sUseSharedDrawables(false); // true // sMaxUpdateInterpolationTime must be greater than sPhaseOutUpdateInterpolationTime F64Seconds LLViewerObject::sMaxUpdateInterpolationTime(3.0); // For motion interpolation: after X seconds with no updates, don't predict object motion @@ -265,7 +265,7 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco return res; } -LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global) +LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, bool is_global) : LLPrimitive(), mChildList(), mID(id), @@ -275,7 +275,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mTEImages(NULL), mTENormalMaps(NULL), mTESpecularMaps(NULL), - mbCanSelect(TRUE), + mbCanSelect(true), mFlags(0), mPhysicsShapeType(0), mPhysicsGravity(0), @@ -283,8 +283,8 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mPhysicsDensity(0), mPhysicsRestitution(0), mDrawable(), - mCreateSelected(FALSE), - mRenderMedia(FALSE), + mCreateSelected(false), + mRenderMedia(false), mBestUpdatePrecision(0), mText(), mHudText(""), @@ -305,14 +305,14 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mExpectedInventorySerialNum(0), mInvRequestState(INVENTORY_REQUEST_STOPPED), mInvRequestXFerId(0), - mInventoryDirty(FALSE), + mInventoryDirty(false), mRegionp(regionp), - mDead(FALSE), - mOrphaned(FALSE), - mUserSelected(FALSE), - mOnActiveList(FALSE), - mOnMap(FALSE), - mStatic(FALSE), + mDead(false), + mOrphaned(false), + mUserSelected(false), + mOnActiveList(false), + mOnMap(false), + mStatic(false), mSeatCount(0), mNumFaces(0), mRotTime(0.f), @@ -329,7 +329,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mPhysicsShapeUnknown(true), mAttachmentItemID(LLUUID::null), mLastUpdateType(OUT_UNKNOWN), - mLastUpdateCached(FALSE), + mLastUpdateCached(false), mCachedMuteListUpdateTime(0), mCachedOwnerInMuteList(false), mRiggedAttachedWarned(false) @@ -459,7 +459,7 @@ void LLViewerObject::markDead() } // Mark itself as dead - mDead = TRUE; + mDead = true; if(mRegionp) { mRegionp->removeFromCreatedList(getLocalID()); @@ -785,7 +785,7 @@ void LLViewerObject::setNameValueList(const std::string& name_value_list) } } -BOOL LLViewerObject::isAnySelected() const +bool LLViewerObject::isAnySelected() const { bool any_selected = isSelected(); for (child_list_t::const_iterator iter = mChildList.begin(); @@ -797,7 +797,7 @@ BOOL LLViewerObject::isAnySelected() const return any_selected; } -void LLViewerObject::setSelected(BOOL sel) +void LLViewerObject::setSelected(bool sel) { mUserSelected = sel; resetRot(); @@ -940,12 +940,12 @@ bool LLViewerObject::crossesParcelBounds() return mRegionp && mRegionp->objectsCrossParcel(boxes); } -BOOL LLViewerObject::setParent(LLViewerObject* parent) +bool LLViewerObject::setParent(LLViewerObject* parent) { if(mParent != parent) { LLViewerObject* old_parent = (LLViewerObject*)mParent ; - BOOL ret = LLPrimitive::setParent(parent); + bool ret = LLPrimitive::setParent(parent); if(ret && old_parent && parent) { old_parent->removeChild(this) ; @@ -953,7 +953,7 @@ BOOL LLViewerObject::setParent(LLViewerObject* parent) return ret ; } - return FALSE ; + return false ; } void LLViewerObject::addChild(LLViewerObject *childp) @@ -1025,7 +1025,7 @@ void LLViewerObject::removeChild(LLViewerObject *childp) if (childp->isSelected()) { LLSelectMgr::getInstance()->deselectObjectAndFamily(childp); - BOOL add_to_end = TRUE; + bool add_to_end = true; LLSelectMgr::getInstance()->selectObjectAndFamily(childp, add_to_end); } } @@ -1063,9 +1063,9 @@ void LLViewerObject::addThisAndNonJointChildren(std::vector& ob } } -//BOOL LLViewerObject::isChild(LLViewerObject *childp) const +//bool LLViewerObject::isChild(LLViewerObject *childp) const // [RLVa:KB] - Checked: 2011-05-28 (RLVa-1.4.0a) | Added: RLVa-1.4.0a -BOOL LLViewerObject::isChild(const LLViewerObject *childp) const +bool LLViewerObject::isChild(const LLViewerObject *childp) const // [/RLVa:KB] { for (child_list_t::const_iterator iter = mChildList.begin(); @@ -1073,28 +1073,28 @@ BOOL LLViewerObject::isChild(const LLViewerObject *childp) const { LLViewerObject* testchild = *iter; if (testchild == childp) - return TRUE; + return true; } - return FALSE; + return false; } -// returns TRUE if at least one avatar is sitting on this object -BOOL LLViewerObject::isSeat() const +// returns true if at least one avatar is sitting on this object +bool LLViewerObject::isSeat() const { return mSeatCount > 0; } -BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp) +bool LLViewerObject::setDrawableParent(LLDrawable* parentp) { if (mDrawable.isNull()) { - return FALSE; + return false; } - BOOL ret = mDrawable->mXform.setParent(parentp ? &parentp->mXform : NULL); + bool ret = mDrawable->mXform.setParent(parentp ? &parentp->mXform : NULL); if(!ret) { - return FALSE ; + return false ; } LLDrawable* old_parent = mDrawable->mParent; mDrawable->mParent = parentp; @@ -1110,11 +1110,11 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp) || (parentp && parentp->isActive())) { // *TODO we should not be relying on setDrawable parent to call markMoved - gPipeline.markMoved(mDrawable, FALSE); + gPipeline.markMoved(mDrawable, false); } else if (!mDrawable->isAvatar()) { - mDrawable->updateXform(TRUE); + mDrawable->updateXform(true); /*if (!mDrawable->getSpatialGroup()) { mDrawable->movePartition(); @@ -1125,7 +1125,7 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp) } // Show or hide particles, icon and HUD -void LLViewerObject::hideExtraDisplayItems( BOOL hidden ) +void LLViewerObject::hideExtraDisplayItems( bool hidden ) { if( mPartSourcep.notNull() ) { @@ -1155,7 +1155,7 @@ U32 LLViewerObject::checkMediaURL(const std::string &media_url) mMedia = new LLViewerObjectMedia; mMedia->mMediaURL = media_url; mMedia->mMediaType = LLViewerObject::MEDIA_SET; - mMedia->mPassedWhitelist = FALSE; + mMedia->mPassedWhitelist = false; } else if (mMedia) { @@ -1177,7 +1177,7 @@ U32 LLViewerObject::checkMediaURL(const std::string &media_url) retval |= MEDIA_URL_UPDATED; } mMedia->mMediaURL = media_url; - mMedia->mPassedWhitelist = FALSE; + mMedia->mPassedWhitelist = false; } } return retval; @@ -1381,7 +1381,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, setMaterial(material); if (mDrawable.notNull()) { - gPipeline.markMoved(mDrawable, FALSE); // undamped + gPipeline.markMoved(mDrawable, false); // undamped } } setClickAction(click_action); @@ -1568,7 +1568,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, std::unordered_map::iterator iter; for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter) { - iter->second->in_use = FALSE; + iter->second->in_use = false; } // Unpack extra parameters @@ -1600,7 +1600,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (!iter->second->in_use) { // Send an update message in case it was formerly in use - parameterChanged(iter->first, iter->second->data, FALSE, false); + parameterChanged(iter->first, iter->second->data, false, false); } } @@ -1795,7 +1795,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, setMaterial(material); if (mDrawable.notNull()) { - gPipeline.markMoved(mDrawable, FALSE); // undamped + gPipeline.markMoved(mDrawable, false); // undamped } } dp->unpackU8(click_action, "ClickAction"); @@ -1910,7 +1910,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, std::unordered_map::iterator iter; for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter) { - iter->second->in_use = FALSE; + iter->second->in_use = false; } // Unpack extra params @@ -1933,7 +1933,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (!iter->second->in_use) { // Send an update message in case it was formerly in use - parameterChanged(iter->first, iter->second->data, FALSE, false); + parameterChanged(iter->first, iter->second->data, false, false); } } @@ -1980,7 +1980,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // // Fix object parenting. // - BOOL b_changed_status = FALSE; + bool b_changed_status = false; if (OUT_TERSE_IMPROVED != update_type) { @@ -2039,7 +2039,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // // new parent is valid - b_changed_status = TRUE; + b_changed_status = true; // ...no current parent, so don't try to remove child if (mDrawable.notNull()) { @@ -2089,7 +2089,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // make sure this object gets a non-damped update if (sent_parentp->mDrawable.notNull()) { - gPipeline.markMoved(sent_parentp->mDrawable, FALSE); // undamped + gPipeline.markMoved(sent_parentp->mDrawable, false); // undamped } } } @@ -2099,7 +2099,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, } // Show particles, icon and HUD - hideExtraDisplayItems( FALSE ); + hideExtraDisplayItems( false ); setChanged(MOVED | SILHOUETTE); } @@ -2126,7 +2126,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, gObjectList.orphanize(this, parent_id, ip, port); // Hide particles, icon and HUD - hideExtraDisplayItems( TRUE ); + hideExtraDisplayItems( true ); } } } @@ -2217,7 +2217,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (sent_parentp && sent_parentp != cur_parentp && sent_parentp != this) { // New parent is valid, detach and reattach - b_changed_status = TRUE; + b_changed_status = true; if (mDrawable.notNull()) { if (!setDrawableParent(sent_parentp->mDrawable)) // LLViewerObject::processUpdateMessage 2 @@ -2244,7 +2244,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, sent_parentp->setChanged(MOVED | SILHOUETTE); if (sent_parentp->mDrawable.notNull()) { - gPipeline.markMoved(sent_parentp->mDrawable, FALSE); // undamped + gPipeline.markMoved(sent_parentp->mDrawable, false); // undamped } } else if (!sent_parentp) @@ -2266,7 +2266,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (remove_parent) { - b_changed_status = TRUE; + b_changed_status = true; if (mDrawable.notNull()) { // clear parent to removeChild can put the drawable on the damped list @@ -2280,7 +2280,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (mDrawable.notNull()) { // make sure this object gets a non-damped update - gPipeline.markMoved(mDrawable, FALSE); // undamped + gPipeline.markMoved(mDrawable, false); // undamped } } } @@ -2433,11 +2433,11 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, (MAG_CUTOFF >= accel_mag_sq) && (MAG_CUTOFF >= getAngularVelocity().magVecSquared())) { - mStatic = TRUE; // This object doesn't move! + mStatic = true; // This object doesn't move! } else { - mStatic = FALSE; + mStatic = false; } // BUG: This code leads to problems during group rotate and any scale operation. @@ -2452,7 +2452,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, // // Additionally, if any child is selected, need to update the dialogs and selection // center. - BOOL needs_refresh = mUserSelected; + bool needs_refresh = mUserSelected; for (child_list_t::iterator iter = mChildList.begin(); iter != mChildList.end(); iter++) { @@ -2460,7 +2460,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, needs_refresh = needs_refresh || child->mUserSelected; } - static LLCachedControl allow_select_avatar(gSavedSettings, "AllowSelectAvatar", FALSE); + static LLCachedControl allow_select_avatar(gSavedSettings, "AllowSelectAvatar", false); if (needs_refresh) { LLSelectMgr::getInstance()->updateSelectionCenter(); @@ -2504,9 +2504,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, return retval; } -BOOL LLViewerObject::isActive() const +bool LLViewerObject::isActive() const { - return TRUE; + return true; } //load flags from cache or from message @@ -2549,7 +2549,7 @@ void LLViewerObject::idleUpdate(LLAgent &agent, const F64 &frame_time) } } - updateDrawable(FALSE); + updateDrawable(false); } } @@ -2802,7 +2802,7 @@ void LLViewerObject::doUpdateInventory( LLUUID item_id; LLUUID new_owner; LLUUID new_group; - BOOL group_owned = FALSE; + bool group_owned = false; if(old_item) { item_id = old_item->getUUID(); @@ -2874,7 +2874,7 @@ void LLViewerObject::doUpdateInventory( // of the new and old script AFTER the bytecode has been saved. void LLViewerObject::saveScript( const LLViewerInventoryItem* item, - BOOL active, + bool active, bool is_new) { /* @@ -2948,7 +2948,7 @@ void LLViewerObject::dirtyInventory() delete mInventory; mInventory = NULL; } - mInventoryDirty = TRUE; + mInventoryDirty = true; } void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data) @@ -2977,7 +2977,7 @@ void LLViewerObject::removeInventoryListener(LLVOInventoryListener* listener) } } -BOOL LLViewerObject::isInventoryPending() +bool LLViewerObject::isInventoryPending() { return mInvRequestState != INVENTORY_REQUEST_STOPPED; } @@ -3011,7 +3011,7 @@ void LLViewerObject::requestInventory() else { // since we are going to request it now - mInventoryDirty = FALSE; + mInventoryDirty = false; // Note: throws away duplicate requests fetchInventoryFromServer(); @@ -3408,7 +3408,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS delete ft; } -BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) +bool LLViewerObject::loadTaskInvFile(const std::string& filename) { std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename); llifstream ifs(filename_and_local_path.c_str()); @@ -3470,11 +3470,11 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename) { LL_WARNS() << "unable to load task inventory: " << filename_and_local_path << LL_ENDL; - return FALSE; + return false; } doInventoryCallback(); - return TRUE; + return true; } void LLViewerObject::doInventoryCallback() @@ -3812,7 +3812,7 @@ bool LLViewerObject::updateLOD() return false; } -BOOL LLViewerObject::updateGeometry(LLDrawable *drawable) +bool LLViewerObject::updateGeometry(LLDrawable *drawable) { return false; } @@ -3832,7 +3832,7 @@ LLDrawable* LLViewerObject::createDrawable(LLPipeline *pipeline) return NULL; } -void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped) +void LLViewerObject::setScale(const LLVector3 &scale, bool damped) { LLPrimitive::setScale(scale); if (mDrawable.notNull()) @@ -3859,7 +3859,7 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped) llassert_always(LLWorld::getInstance()->getRegionFromHandle(getRegion()->getHandle())); gObjectList.addToMap(this); - mOnMap = TRUE; + mOnMap = true; } } else @@ -3867,7 +3867,7 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped) if (mOnMap) { gObjectList.removeFromMap(this); - mOnMap = FALSE; + mOnMap = false; } } } @@ -3899,7 +3899,7 @@ void LLViewerObject::setLinksetCost(F32 cost) mLinksetCost = cost; mCostStale = false; - BOOL needs_refresh = isSelected(); + bool needs_refresh = isSelected(); child_list_t::iterator iter = mChildList.begin(); while(iter != mChildList.end() && !needs_refresh) { @@ -4171,7 +4171,7 @@ void LLViewerObject::updateTextures() { } -void LLViewerObject::boostTexturePriority(BOOL boost_children /* = TRUE */) +void LLViewerObject::boostTexturePriority(bool boost_children /* = true */) { if (isDead() || !getVolume()) { @@ -4189,7 +4189,7 @@ void LLViewerObject::boostTexturePriority(BOOL boost_children /* = TRUE */) { LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); LLUUID sculpt_id = sculpt_params->getSculptTexture(); - LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLGLTexture::BOOST_SELECTED); + LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLGLTexture::BOOST_SELECTED); } if (boost_children) @@ -4282,7 +4282,7 @@ void LLViewerObject::addNVPair(const std::string& data) mNameValuePairs[nv->mName] = nv; } -BOOL LLViewerObject::removeNVPair(const std::string& name) +bool LLViewerObject::removeNVPair(const std::string& name) { char* canonical_name = gNVNameTable.addString(name); @@ -4308,14 +4308,14 @@ BOOL LLViewerObject::removeNVPair(const std::string& name) // Remove the NV pair from the local list. delete nv; mNameValuePairs.erase(iter); - return TRUE; + return true; } else { LL_DEBUGS() << "removeNVPair - No region for object" << LL_ENDL; } } - return FALSE; + return false; } @@ -4520,7 +4520,7 @@ const LLQuaternion LLViewerObject::getRotationEdit() const return global_rotation; } -void LLViewerObject::setPositionAbsoluteGlobal( const LLVector3d &pos_global, BOOL damped ) +void LLViewerObject::setPositionAbsoluteGlobal( const LLVector3d &pos_global, bool damped ) { if (isAttachment()) { @@ -4569,7 +4569,7 @@ void LLViewerObject::setPositionAbsoluteGlobal( const LLVector3d &pos_global, BO gPipeline.updateMoveNormalAsync(mDrawable); } -void LLViewerObject::setPosition(const LLVector3 &pos, BOOL damped) +void LLViewerObject::setPosition(const LLVector3 &pos, bool damped) { if (getPosition() != pos) { @@ -4585,7 +4585,7 @@ void LLViewerObject::setPosition(const LLVector3 &pos, BOOL damped) } } -void LLViewerObject::setPositionGlobal(const LLVector3d &pos_global, BOOL damped) +void LLViewerObject::setPositionGlobal(const LLVector3d &pos_global, bool damped) { if (isAttachment()) { @@ -4645,7 +4645,7 @@ void LLViewerObject::setPositionGlobal(const LLVector3d &pos_global, BOOL damped } -void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, BOOL damped) +void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, bool damped) { // Set position relative to parent, if no parent, relative to region if (!isRoot()) @@ -4659,7 +4659,7 @@ void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, BOOL damped) } } -void LLViewerObject::setPositionRegion(const LLVector3 &pos_region, BOOL damped) +void LLViewerObject::setPositionRegion(const LLVector3 &pos_region, bool damped) { if (!isRootEdit()) { @@ -4675,7 +4675,7 @@ void LLViewerObject::setPositionRegion(const LLVector3 &pos_region, BOOL damped) } } -void LLViewerObject::setPositionAgent(const LLVector3 &pos_agent, BOOL damped) +void LLViewerObject::setPositionAgent(const LLVector3 &pos_agent, bool damped) { // Crsh protection if( !getRegion() ) @@ -4690,7 +4690,7 @@ void LLViewerObject::setPositionAgent(const LLVector3 &pos_agent, BOOL damped) // and doesn't also move the joint-parent // TODO -- implement similar intelligence for joint-parents toward // their joint-children -void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped) +void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, bool damped) { if (!isRootEdit()) { @@ -4721,11 +4721,11 @@ LLViewerObject* LLViewerObject::getRootEdit() const } -BOOL LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, +bool LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -4735,11 +4735,11 @@ BOOL LLViewerObject::lineSegmentIntersect(const LLVector4a& start, const LLVecto return false; } -BOOL LLViewerObject::lineSegmentBoundingBox(const LLVector4a& start, const LLVector4a& end) +bool LLViewerObject::lineSegmentBoundingBox(const LLVector4a& start, const LLVector4a& end) { if (mDrawable.isNull() || mDrawable->isDead()) { - return FALSE; + return false; } const LLVector4a* ext = mDrawable->getSpatialExtents(); @@ -4799,20 +4799,20 @@ void LLViewerObject::setMediaURL(const std::string& media_url) { mMedia = new LLViewerObjectMedia; mMedia->mMediaURL = media_url; - mMedia->mPassedWhitelist = FALSE; + mMedia->mPassedWhitelist = false; // TODO: update materials with new image } else if (mMedia->mMediaURL != media_url) { mMedia->mMediaURL = media_url; - mMedia->mPassedWhitelist = FALSE; + mMedia->mPassedWhitelist = false; // TODO: update materials with new image } } -BOOL LLViewerObject::getMediaPassedWhitelist() const +bool LLViewerObject::getMediaPassedWhitelist() const { if (mMedia) { @@ -4820,11 +4820,11 @@ BOOL LLViewerObject::getMediaPassedWhitelist() const } else { - return FALSE; + return false; } } -void LLViewerObject::setMediaPassedWhitelist(BOOL passed) +void LLViewerObject::setMediaPassedWhitelist(bool passed) { if (mMedia) { @@ -5008,7 +5008,7 @@ LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id) LLViewerObject *root = getRootEdit(); if (root && root->isAnimatedObject()) { - return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); } LLVOAvatar* avatar = getAvatar(); @@ -5018,7 +5018,7 @@ LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id) LLViewerTexture* bakedTexture = avatar->getBakedTexture(texIndex); if (bakedTexture == NULL || bakedTexture->isMissingAsset()) { - return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); } else { @@ -5027,7 +5027,7 @@ LLViewerTexture* LLViewerObject::getBakedTextureForMagicId(const LLUUID& id) } else { - return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + return LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); } } @@ -5064,7 +5064,7 @@ void LLViewerObject::setTE(const U8 te, const LLTextureEntry& texture_entry) const LLUUID& image_id = getTEref(te).getID(); LLViewerTexture* bakedTexture = getBakedTextureForMagicId(image_id); - mTEImages[te] = bakedTexture ? bakedTexture : LLViewerTextureManager::getFetchedTexture(image_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTEImages[te] = bakedTexture ? bakedTexture : LLViewerTextureManager::getFetchedTexture(image_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); updateAvatarMeshVisibility(image_id, old_image_id); @@ -5076,10 +5076,10 @@ void LLViewerObject::updateTEMaterialTextures(U8 te) if (getTEref(te).getMaterialParams().notNull()) { const LLUUID& norm_id = getTEref(te).getMaterialParams()->getNormalID(); - mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTENormalMaps[te] = LLViewerTextureManager::getFetchedTexture(norm_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); const LLUUID& spec_id = getTEref(te).getMaterialParams()->getSpecularID(); - mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTESpecularMaps[te] = LLViewerTextureManager::getFetchedTexture(spec_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); } LLFetchedGLTFMaterial* mat = (LLFetchedGLTFMaterial*) getTE(te)->getGLTFRenderMaterial(); @@ -5126,8 +5126,8 @@ void LLViewerObject::updateTEMaterialTextures(U8 te) } else { - img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); - img->addTextureStats(64.f * 64.f, TRUE); + img = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + img->addTextureStats(64.f * 64.f, true); } } @@ -5277,21 +5277,21 @@ S32 LLViewerObject::setTETexture(const U8 te, const LLUUID& uuid) { // Invalid host == get from the agent's sim LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture( - uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); + uuid, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); return setTETextureCore(te, image); } S32 LLViewerObject::setTENormalMap(const U8 te, const LLUUID& uuid) { LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture( - uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); + uuid, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); return setTENormalMapCore(te, image); } S32 LLViewerObject::setTESpecularMap(const U8 te, const LLUUID& uuid) { LLViewerFetchedTexture *image = (uuid == LLUUID::null) ? NULL : LLViewerTextureManager::getFetchedTexture( - uuid, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); + uuid, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, LLHost()); return setTESpecularMapCore(te, image); } @@ -5831,8 +5831,8 @@ void LLViewerObject::setDebugText(const std::string &utf8text, const LLColor4& c } mText->setColor(color); mText->setString(utf8text); - mText->setZCompare(FALSE); - mText->setDoFade(FALSE); + mText->setZCompare(false); + mText->setDoFade(false); updateText(); } @@ -5848,8 +5848,8 @@ void LLViewerObject::appendDebugText(const std::string &utf8text) initHudText(); } mText->addLine(utf8text, LLColor4::white); - mText->setZCompare(FALSE); - mText->setDoFade(FALSE); + mText->setZCompare(false); + mText->setDoFade(false); updateText(); } @@ -5882,8 +5882,8 @@ void LLViewerObject::restoreHudText() else { // Restore default values - mText->setZCompare(TRUE); - mText->setDoFade(TRUE); + mText->setZCompare(true); + mText->setDoFade(true); } mText->setColor(mHudTextColor); mText->setString(mHudText); @@ -5924,7 +5924,7 @@ const LLViewerObject* LLViewerObject::getSubParent() const return (const LLViewerObject*) getParent(); } -BOOL LLViewerObject::isOnMap() +bool LLViewerObject::isOnMap() { return mOnMap; } @@ -6008,7 +6008,7 @@ LLVOAvatar* LLViewerObject::getAvatarAncestor() return NULL; } -BOOL LLViewerObject::isParticleSource() const +bool LLViewerObject::isParticleSource() const { return !mPartSourcep.isNull() && !mPartSourcep->isDead(); } @@ -6149,7 +6149,7 @@ void LLViewerObject::deleteParticleSource() } // virtual -void LLViewerObject::updateDrawable(BOOL force_damped) +void LLViewerObject::updateDrawable(bool force_damped) { if (!isChanged(MOVED)) { //most common case, having an empty if case here makes for better branch prediction @@ -6157,7 +6157,7 @@ void LLViewerObject::updateDrawable(BOOL force_damped) else if (mDrawable.notNull() && !mDrawable->isState(LLDrawable::ON_MOVE_LIST)) { - BOOL damped_motion = + bool damped_motion = !isChanged(SHIFTED) && // not shifted between regions this frame and... ( force_damped || // ...forced into damped motion by application logic or... ( !isSelected() && // ...not selected and... @@ -6244,7 +6244,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow if (mAudioSourcep) { - BOOL queue = flags & LL_SOUND_FLAG_QUEUE; + bool queue = flags & LL_SOUND_FLAG_QUEUE; mAudioGain = gain; mAudioSourcep->setGain(gain); mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP); @@ -6306,8 +6306,8 @@ bool LLViewerObject::unpackParameterEntry(U16 param_type, LLDataPacker *dp) if (param) { param->data->unpack(*dp); - param->in_use = TRUE; - parameterChanged(param_type, param->data, TRUE, false); + param->in_use = true; + parameterChanged(param_type, param->data, true, false); return true; } else @@ -6409,7 +6409,7 @@ LLNetworkData* LLViewerObject::getParameterEntry(U16 param_type) const } } -BOOL LLViewerObject::getParameterEntryInUse(U16 param_type) const +bool LLViewerObject::getParameterEntryInUse(U16 param_type) const { ExtraParameter* param = getExtraParameterEntry(param_type); if (param) @@ -6418,7 +6418,7 @@ BOOL LLViewerObject::getParameterEntryInUse(U16 param_type) const } else { - return FALSE; + return false; } } @@ -6433,7 +6433,7 @@ bool LLViewerObject::setParameterEntry(U16 param_type, const LLNetworkData& new_ } param->in_use = true; param->data->copy(new_value); - parameterChanged(param_type, param->data, TRUE, local_origin); + parameterChanged(param_type, param->data, true, local_origin); return true; } else @@ -6443,9 +6443,9 @@ bool LLViewerObject::setParameterEntry(U16 param_type, const LLNetworkData& new_ } // Assumed to be called locally -// If in_use is TRUE, will crate a new extra parameter if none exists. +// If in_use is true, will crate a new extra parameter if none exists. // Should always return true. -bool LLViewerObject::setParameterEntryInUse(U16 param_type, BOOL in_use, bool local_origin) +bool LLViewerObject::setParameterEntryInUse(U16 param_type, bool in_use, bool local_origin) { ExtraParameter* param = getExtraParameterEntryCreate(param_type); if (param && param->in_use != in_use) @@ -6466,7 +6466,7 @@ void LLViewerObject::parameterChanged(U16 param_type, bool local_origin) } } -void LLViewerObject::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin) +void LLViewerObject::parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin) { if (local_origin) { @@ -6516,7 +6516,7 @@ void LLViewerObject::parameterChanged(U16 param_type, LLNetworkData* data, BOOL } } -void LLViewerObject::setDrawableState(U32 state, BOOL recursive) +void LLViewerObject::setDrawableState(U32 state, bool recursive) { if (mDrawable) { @@ -6533,7 +6533,7 @@ void LLViewerObject::setDrawableState(U32 state, BOOL recursive) } } -void LLViewerObject::clearDrawableState(U32 state, BOOL recursive) +void LLViewerObject::clearDrawableState(U32 state, bool recursive) { if (mDrawable) { @@ -6550,9 +6550,9 @@ void LLViewerObject::clearDrawableState(U32 state, BOOL recursive) } } -BOOL LLViewerObject::isDrawableState(U32 state, BOOL recursive) const +bool LLViewerObject::isDrawableState(U32 state, bool recursive) const { - BOOL matches = FALSE; + bool matches = false; if (mDrawable) { matches = mDrawable->isState(state); @@ -6577,7 +6577,7 @@ BOOL LLViewerObject::isDrawableState(U32 state, BOOL recursive) const //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // Owned by anyone? -BOOL LLViewerObject::permAnyOwner() const +bool LLViewerObject::permAnyOwner() const { if (isRootEdit()) { @@ -6589,18 +6589,18 @@ BOOL LLViewerObject::permAnyOwner() const } } // Owned by this viewer? -BOOL LLViewerObject::permYouOwner() const +bool LLViewerObject::permYouOwner() const { if (isRootEdit()) { #ifdef HACKED_GODLIKE_VIEWER - return TRUE; + return true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER if (LLGridManager::getInstance()->isInSLBeta() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { - return TRUE; + return true; } # endif return flagObjectYouOwner(); @@ -6613,7 +6613,7 @@ BOOL LLViewerObject::permYouOwner() const } // Owned by a group? -BOOL LLViewerObject::permGroupOwner() const +bool LLViewerObject::permGroupOwner() const { if (isRootEdit()) { @@ -6626,18 +6626,18 @@ BOOL LLViewerObject::permGroupOwner() const } // Can the owner edit -BOOL LLViewerObject::permOwnerModify() const +bool LLViewerObject::permOwnerModify() const { if (isRootEdit()) { #ifdef HACKED_GODLIKE_VIEWER - return TRUE; + return true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER if (LLGridManager::getInstance()->isInSLBeta() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { - return TRUE; + return true; } # endif return flagObjectOwnerModify(); @@ -6650,18 +6650,18 @@ BOOL LLViewerObject::permOwnerModify() const } // Can edit -BOOL LLViewerObject::permModify() const +bool LLViewerObject::permModify() const { if (isRootEdit()) { #ifdef HACKED_GODLIKE_VIEWER - return TRUE; + return true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER if (LLGridManager::getInstance()->isInSLBeta() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { - return TRUE; + return true; } # endif return flagObjectModify(); @@ -6674,18 +6674,18 @@ BOOL LLViewerObject::permModify() const } // Can copy -BOOL LLViewerObject::permCopy() const +bool LLViewerObject::permCopy() const { if (isRootEdit()) { #ifdef HACKED_GODLIKE_VIEWER - return TRUE; + return true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER if (LLGridManager::getInstance()->isInSLBeta() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { - return TRUE; + return true; } # endif return flagObjectCopy(); @@ -6698,18 +6698,18 @@ BOOL LLViewerObject::permCopy() const } // Can move -BOOL LLViewerObject::permMove() const +bool LLViewerObject::permMove() const { if (isRootEdit()) { #ifdef HACKED_GODLIKE_VIEWER - return TRUE; + return true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER if (LLGridManager::getInstance()->isInSLBeta() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { - return TRUE; + return true; } # endif return flagObjectMove(); @@ -6722,18 +6722,18 @@ BOOL LLViewerObject::permMove() const } // Can be transferred -BOOL LLViewerObject::permTransfer() const +bool LLViewerObject::permTransfer() const { if (isRootEdit()) { #ifdef HACKED_GODLIKE_VIEWER - return TRUE; + return true; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER if (LLGridManager::getInstance()->isInSLBeta() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { - return TRUE; + return true; } # endif return flagObjectTransfer(); @@ -6747,7 +6747,7 @@ BOOL LLViewerObject::permTransfer() const // Can only open objects that you own, or that someone has // given you modify rights to. JC -BOOL LLViewerObject::allowOpen() const +bool LLViewerObject::allowOpen() const { // [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c return !flagInventoryEmpty() && (permYouOwner() || permModify()) && ((!RlvActions::isRlvEnabled()) || (RlvActions::canEdit(this))); @@ -6841,7 +6841,7 @@ void LLViewerObject::setRegion(LLViewerRegion *regionp) } setChanged(MOVED | SILHOUETTE); - updateDrawable(FALSE); + updateDrawable(false); } // virtual @@ -6865,7 +6865,7 @@ bool LLViewerObject::specialHoverCursor() const || (mClickAction != 0); } -void LLViewerObject::updateFlags(BOOL physics_changed) +void LLViewerObject::updateFlags(bool physics_changed) { LLViewerRegion* regionp = getRegion(); if(!regionp) return; @@ -6878,10 +6878,10 @@ void LLViewerObject::updateFlags(BOOL physics_changed) gMessageSystem->addBOOL("IsTemporary", flagTemporaryOnRez() ); gMessageSystem->addBOOL("IsPhantom", flagPhantom() ); - // stinson 02/28/2012 : This CastsShadows BOOL is no longer used in either the viewer or the simulator + // stinson 02/28/2012 : This CastsShadows bool is no longer used in either the viewer or the simulator // The simulator code does not even unpack this value when the message is received. // This could be potentially hijacked in the future for another use should the urgent need arise. - gMessageSystem->addBOOL("CastsShadows", FALSE ); + gMessageSystem->addBOOL("CastsShadows", false ); if (physics_changed) { @@ -6895,9 +6895,9 @@ void LLViewerObject::updateFlags(BOOL physics_changed) gMessageSystem->sendReliable( regionp->getHost() ); } -BOOL LLViewerObject::setFlags(U32 flags, BOOL state) +bool LLViewerObject::setFlags(U32 flags, bool state) { - BOOL setit = setFlagsWithoutUpdate(flags, state); + bool setit = setFlagsWithoutUpdate(flags, state); // BUG: Sometimes viewer physics and simulator physics get // out of sync. To fix this, always send update to simulator. @@ -6908,15 +6908,15 @@ BOOL LLViewerObject::setFlags(U32 flags, BOOL state) return setit; } -BOOL LLViewerObject::setFlagsWithoutUpdate(U32 flags, BOOL state) +bool LLViewerObject::setFlagsWithoutUpdate(U32 flags, bool state) { - BOOL setit = FALSE; + bool setit = false; if (state) { if ((mFlags & flags) != flags) { mFlags |= flags; - setit = TRUE; + setit = true; } } else @@ -6924,7 +6924,7 @@ BOOL LLViewerObject::setFlagsWithoutUpdate(U32 flags, BOOL state) if ((mFlags & flags) != 0) { mFlags &= ~flags; - setit = TRUE; + setit = true; } } return setit; @@ -7047,12 +7047,12 @@ void LLAlphaObject::getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender } // virtual -void LLStaticViewerObject::updateDrawable(BOOL force_damped) +void LLStaticViewerObject::updateDrawable(bool force_damped) { // Force an immediate rebuild on any update if (mDrawable.notNull()) { - mDrawable->updateXform(TRUE); + mDrawable->updateXform(true); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } clearChanged(SHIFTED); @@ -7130,8 +7130,8 @@ void LLViewerObject::resetChildrenRotationAndPosition(const std::vectormDrawable->mXform.setPosition(reset_pos); ((LLVOAvatar*)childp)->mDrawable->mXform.setRotation(reset_rot) ; - ((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos, TRUE); - ((LLVOAvatar*)childp)->mDrawable->getVObj()->setRotation(reset_rot, TRUE) ; + ((LLVOAvatar*)childp)->mDrawable->getVObj()->setPosition(reset_pos, true); + ((LLVOAvatar*)childp)->mDrawable->getVObj()->setRotation(reset_rot, true) ; LLManip::rebuild(childp); } @@ -7143,7 +7143,7 @@ void LLViewerObject::resetChildrenRotationAndPosition(const std::vector We can render beacons even if the floater is not visible //if (LLFloaterReg::instanceVisible("beacons") && (gPipeline.getRenderBeacons() || gPipeline.getRenderHighlights())) if (gPipeline.getRenderBeacons() || gPipeline.getRenderHighlights()) // { - BOOL has_media = (getMediaType() == LLViewerObject::MEDIA_SET); - BOOL is_scripted = !isAvatar() && !getParent() && flagScripted(); - BOOL is_physical = !isAvatar() && flagUsePhysics(); + bool has_media = (getMediaType() == LLViewerObject::MEDIA_SET); + bool is_scripted = !isAvatar() && !getParent() && flagScripted(); + bool is_physical = !isAvatar() && flagUsePhysics(); return (isParticleSource() && gPipeline.getRenderParticleBeacons()) || (isAudioSource() && gPipeline.getRenderSoundBeacons()) @@ -7222,7 +7222,7 @@ BOOL LLViewerObject::isHiglightedOrBeacon() const || (is_scripted && flagHandleTouch() && gPipeline.getRenderScriptedTouchBeacons()) || (is_physical && gPipeline.getRenderPhysicalBeacons()); } - return FALSE; + return false; } @@ -7246,12 +7246,12 @@ void LLViewerObject::setLastUpdateType(EObjectUpdateType last_update_type) mLastUpdateType = last_update_type; } -BOOL LLViewerObject::getLastUpdateCached() const +bool LLViewerObject::getLastUpdateCached() const { return mLastUpdateCached; } -void LLViewerObject::setLastUpdateCached(BOOL last_update_cached) +void LLViewerObject::setLastUpdateCached(bool last_update_cached) { mLastUpdateCached = last_update_cached; } @@ -7318,11 +7318,11 @@ void LLViewerObject::setHasRenderMaterialParams(bool has_materials) { if (has_materials) { - setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, TRUE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, true, true); } else { - setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, FALSE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, false, true); } } } diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 456a3dd9fe..a2a6d2a205 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -122,7 +122,7 @@ protected: // TomY: Provide for a list of extra parameter structures, mapped by structure name struct ExtraParameter { - BOOL in_use; + bool in_use; LLNetworkData *data; }; std::unordered_map mExtraParameterList; @@ -133,12 +133,12 @@ public: typedef const child_list_t const_child_list_t; - LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, BOOL is_global = FALSE); + LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp, bool is_global = false); virtual void markDead(); // Mark this object as dead, and clean up its references - BOOL isDead() const {return mDead;} - BOOL isOrphaned() const { return mOrphaned; } - BOOL isParticleSource() const; + bool isDead() const {return mDead;} + bool isOrphaned() const { return mOrphaned; } + bool isParticleSource() const; virtual LLVOAvatar* asAvatar(); @@ -148,7 +148,7 @@ public: static void cleanupVOClasses(); void addNVPair(const std::string& data); - BOOL removeNVPair(const std::string& name); + bool removeNVPair(const std::string& name); LLNameValue* getNVPair(const std::string& name) const; // null if no name value pair by that name // Object create and update functions @@ -174,11 +174,11 @@ public: LLDataPacker *dp); - virtual BOOL isActive() const; // Whether this object needs to do an idleUpdate. - BOOL onActiveList() const {return mOnActiveList;} - void setOnActiveList(BOOL on_active) { mOnActiveList = on_active; } + virtual bool isActive() const; // Whether this object needs to do an idleUpdate. + bool onActiveList() const {return mOnActiveList;} + void setOnActiveList(bool on_active) { mOnActiveList = on_active; } - virtual BOOL isAttachment() const { return FALSE; } + virtual bool isAttachment() const { return false; } const std::string& getAttachmentItemName() const; virtual LLVOAvatar* getAvatar() const; //get the avatar this object is attached to, or NULL if object is not an attachment @@ -195,10 +195,10 @@ public: void setRenderMaterialID(S32 te, const LLUUID& id, bool update_server = true, bool local_origin = true); void setRenderMaterialIDs(const LLUUID& id); - virtual BOOL isHUDAttachment() const { return FALSE; } - virtual BOOL isTempAttachment() const; + virtual bool isHUDAttachment() const { return false; } + virtual bool isTempAttachment() const; - virtual BOOL isHiglightedOrBeacon() const; + virtual bool isHiglightedOrBeacon() const; virtual void updateRadius() {}; virtual F32 getVObjRadius() const; // default implemenation is mDrawable->getRadius() @@ -218,14 +218,14 @@ public: // Graphical stuff for objects - maybe broken out into render class later? virtual void updateTextures(); virtual void faceMappingChanged() {} - virtual void boostTexturePriority(BOOL boost_children = TRUE); // When you just want to boost priority of this object + virtual void boostTexturePriority(bool boost_children = true); // When you just want to boost priority of this object virtual LLDrawable* createDrawable(LLPipeline *pipeline); - virtual BOOL updateGeometry(LLDrawable *drawable); + virtual bool updateGeometry(LLDrawable *drawable); virtual void updateGL(); virtual void updateFaceSize(S32 idx); virtual bool updateLOD(); - virtual BOOL setDrawableParent(LLDrawable* parentp); + virtual bool setDrawableParent(LLDrawable* parentp); F32 getRotTime() { return mRotTime; } private: void resetRotTime(); @@ -243,10 +243,10 @@ public: // Accessor functions LLViewerRegion* getRegion() const { return mRegionp; } - BOOL isSelected() const { return mUserSelected; } + bool isSelected() const { return mUserSelected; } // Check whole linkset - BOOL isAnySelected() const; - virtual void setSelected(BOOL sel); + bool isAnySelected() const; + virtual void setSelected(bool sel); const LLUUID &getID() const { return mID; } U32 getLocalID() const { return mLocalID; } @@ -254,12 +254,12 @@ public: S32 getListIndex() const { return mListIndex; } void setListIndex(S32 idx) { mListIndex = idx; } - virtual BOOL isFlexible() const { return FALSE; } - virtual BOOL isSculpted() const { return FALSE; } - virtual BOOL isMesh() const { return FALSE; } - virtual BOOL isRiggedMesh() const { return FALSE; } - virtual BOOL hasLightTexture() const { return FALSE; } - virtual BOOL isReflectionProbe() const { return FALSE; } + virtual bool isFlexible() const { return false; } + virtual bool isSculpted() const { return false; } + virtual bool isMesh() const { return false; } + virtual bool isRiggedMesh() const { return false; } + virtual bool hasLightTexture() const { return false; } + virtual bool isReflectionProbe() const { return false; } // This method returns true if the object is over land owned by // the agent, one of its groups, or it encroaches and @@ -279,10 +279,10 @@ public: // ability to modify the object. Since this calls into the // selection manager, you should avoid calling this method from // there. - BOOL isProbablyModifiable() const; + bool isProbablyModifiable() const; */ - virtual BOOL setParent(LLViewerObject* parent); + virtual bool setParent(LLViewerObject* parent); virtual void onReparent(LLViewerObject *old_parent, LLViewerObject *new_parent); virtual void afterReparent(); virtual void addChild(LLViewerObject *childp); @@ -291,20 +291,20 @@ public: S32 numChildren() const { return mChildList.size(); } void addThisAndAllChildren(std::vector& objects); void addThisAndNonJointChildren(std::vector& objects); -// BOOL isChild(LLViewerObject *childp) const; +// bool isChild(LLViewerObject *childp) const; // [RLVa:KB] - Checked: 2011-05-28 (RLVa-1.4.0a) | Added: RLVa-1.4.0a - BOOL isChild(const LLViewerObject *childp) const; + bool isChild(const LLViewerObject *childp) const; // [/RLVa:KB] - BOOL isSeat() const; + bool isSeat() const; //detect if given line segment (in agent space) intersects with this viewer object. - //returns TRUE if intersection detected and returns information about intersection - virtual BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, + //returns true if intersection detected and returns information about intersection + virtual bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = TRUE, + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = true, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -312,7 +312,7 @@ public: LLVector4a* tangent = NULL // return the surface tangent at the intersection point ); - virtual BOOL lineSegmentBoundingBox(const LLVector4a& start, const LLVector4a& end); + virtual bool lineSegmentBoundingBox(const LLVector4a& start, const LLVector4a& end); virtual const LLVector3d getPositionGlobal() const; virtual const LLVector3 &getPositionRegion() const; @@ -329,18 +329,18 @@ public: const LLQuaternion getRenderRotation() const; virtual const LLMatrix4 getRenderMatrix() const; - void setPosition(const LLVector3 &pos, BOOL damped = FALSE); - void setPositionGlobal(const LLVector3d &position, BOOL damped = FALSE); - void setPositionRegion(const LLVector3 &position, BOOL damped = FALSE); - void setPositionEdit(const LLVector3 &position, BOOL damped = FALSE); - void setPositionAgent(const LLVector3 &pos_agent, BOOL damped = FALSE); - void setPositionParent(const LLVector3 &pos_parent, BOOL damped = FALSE); - void setPositionAbsoluteGlobal( const LLVector3d &pos_global, BOOL damped = FALSE ); + void setPosition(const LLVector3 &pos, bool damped = false); + void setPositionGlobal(const LLVector3d &position, bool damped = false); + void setPositionRegion(const LLVector3 &position, bool damped = false); + void setPositionEdit(const LLVector3 &position, bool damped = false); + void setPositionAgent(const LLVector3 &pos_agent, bool damped = false); + void setPositionParent(const LLVector3 &pos_parent, bool damped = false); + void setPositionAbsoluteGlobal( const LLVector3d &pos_global, bool damped = false ); virtual const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const { return xform->getWorldMatrix(); } - inline void setRotation(const F32 x, const F32 y, const F32 z, BOOL damped = FALSE); - inline void setRotation(const LLQuaternion& quat, BOOL damped = FALSE); + inline void setRotation(const F32 x, const F32 y, const F32 z, bool damped = false); + inline void setRotation(const LLQuaternion& quat, bool damped = false); /*virtual*/ void setNumTEs(const U8 num_tes); /*virtual*/ void setTE(const U8 te, const LLTextureEntry &texture_entry); @@ -391,7 +391,7 @@ public: void fitFaceTexture(const U8 face); void sendTEUpdate() const; // Sends packed representation of all texture entry information - virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE); + virtual void setScale(const LLVector3 &scale, bool damped = false); S32 getAnimatedObjectMaxTris() const; F32 recursiveGetEstTrianglesMax() const; @@ -439,7 +439,7 @@ public: // Create if necessary LLAudioSource *getAudioSource(const LLUUID& owner_id); - BOOL isAudioSource() const {return mAudioSourcep != NULL;} + bool isAudioSource() const {return mAudioSourcep != NULL;} U8 getMediaType() const; void setMediaType(U8 media_type); @@ -447,8 +447,8 @@ public: std::string getMediaURL() const; void setMediaURL(const std::string& media_url); - BOOL getMediaPassedWhitelist() const; - void setMediaPassedWhitelist(BOOL passed); + bool getMediaPassedWhitelist() const; + void setMediaPassedWhitelist(bool passed); void sendMaterialUpdate() const; @@ -472,13 +472,13 @@ public: void updatePositionCaches() const; // Update the global and region position caches from the object (and parent's) xform. void updateText(); // update text label position - virtual void updateDrawable(BOOL force_damped); // force updates on static objects + virtual void updateDrawable(bool force_damped); // force updates on static objects bool isOwnerInMuteList(LLUUID item_id = LLUUID()); - void setDrawableState(U32 state, BOOL recursive = TRUE); - void clearDrawableState(U32 state, BOOL recursive = TRUE); - BOOL isDrawableState(U32 state, BOOL recursive = TRUE) const; + void setDrawableState(U32 state, bool recursive = true); + void clearDrawableState(U32 state, bool recursive = true); + bool isDrawableState(U32 state, bool recursive = true) const; // Called when the drawable shifts virtual void onShift(const LLVector4a &shift_vector) { } @@ -493,7 +493,7 @@ public: // viewer object has the inventory stored locally. void registerInventoryListener(LLVOInventoryListener* listener, void* user_data); void removeInventoryListener(LLVOInventoryListener* listener); - BOOL isInventoryPending(); + bool isInventoryPending(); void clearInventoryListeners(); bool hasInventoryListeners(); void requestInventory(); @@ -523,12 +523,12 @@ public: // This function will make sure that we refresh the inventory. void dirtyInventory(); - BOOL isInventoryDirty() { return mInventoryDirty; } + bool isInventoryDirty() { return mInventoryDirty; } // save a script, which involves removing the old one, and rezzing // in the new one. This method should be called with the asset id // of the new and old script AFTER the bytecode has been saved. - void saveScript(const LLViewerInventoryItem* item, BOOL active, bool is_new); + void saveScript(const LLViewerInventoryItem* item, bool active, bool is_new); // move an inventory item out of the task and into agent // inventory. This operation is based on messaging. No permissions @@ -538,37 +538,37 @@ public: // Find the number of instances of this object's inventory that are of the given type S32 countInventoryContents( LLAssetType::EType type ); - BOOL permAnyOwner() const; - BOOL permYouOwner() const; - BOOL permGroupOwner() const; - BOOL permOwnerModify() const; - BOOL permModify() const; - BOOL permCopy() const; - BOOL permMove() const; - BOOL permTransfer() const; - inline BOOL flagUsePhysics() const { return ((mFlags & FLAGS_USE_PHYSICS) != 0); } - inline BOOL flagObjectAnyOwner() const { return ((mFlags & FLAGS_OBJECT_ANY_OWNER) != 0); } - inline BOOL flagObjectYouOwner() const { return ((mFlags & FLAGS_OBJECT_YOU_OWNER) != 0); } - inline BOOL flagObjectGroupOwned() const { return ((mFlags & FLAGS_OBJECT_GROUP_OWNED) != 0); } - inline BOOL flagObjectOwnerModify() const { return ((mFlags & FLAGS_OBJECT_OWNER_MODIFY) != 0); } - inline BOOL flagObjectModify() const { return ((mFlags & FLAGS_OBJECT_MODIFY) != 0); } - inline BOOL flagObjectCopy() const { return ((mFlags & FLAGS_OBJECT_COPY) != 0); } - inline BOOL flagObjectMove() const { return ((mFlags & FLAGS_OBJECT_MOVE) != 0); } - inline BOOL flagObjectTransfer() const { return ((mFlags & FLAGS_OBJECT_TRANSFER) != 0); } - inline BOOL flagObjectPermanent() const { return ((mFlags & FLAGS_AFFECTS_NAVMESH) != 0); } - inline BOOL flagCharacter() const { return ((mFlags & FLAGS_CHARACTER) != 0); } - inline BOOL flagVolumeDetect() const { return ((mFlags & FLAGS_VOLUME_DETECT) != 0); } - inline BOOL flagIncludeInSearch() const { return ((mFlags & FLAGS_INCLUDE_IN_SEARCH) != 0); } - inline BOOL flagScripted() const { return ((mFlags & FLAGS_SCRIPTED) != 0); } - inline BOOL flagHandleTouch() const { return ((mFlags & FLAGS_HANDLE_TOUCH) != 0); } - inline BOOL flagTakesMoney() const { return ((mFlags & FLAGS_TAKES_MONEY) != 0); } - inline BOOL flagPhantom() const { return ((mFlags & FLAGS_PHANTOM) != 0); } - inline BOOL flagInventoryEmpty() const { return ((mFlags & FLAGS_INVENTORY_EMPTY) != 0); } - inline BOOL flagAllowInventoryAdd() const { return ((mFlags & FLAGS_ALLOW_INVENTORY_DROP) != 0); } - inline BOOL flagTemporaryOnRez() const { return ((mFlags & FLAGS_TEMPORARY_ON_REZ) != 0); } - inline BOOL flagAnimSource() const { return ((mFlags & FLAGS_ANIM_SOURCE) != 0); } - inline BOOL flagCameraSource() const { return ((mFlags & FLAGS_CAMERA_SOURCE) != 0); } - inline BOOL flagCameraDecoupled() const { return ((mFlags & FLAGS_CAMERA_DECOUPLED) != 0); } + bool permAnyOwner() const; + bool permYouOwner() const; + bool permGroupOwner() const; + bool permOwnerModify() const; + bool permModify() const; + bool permCopy() const; + bool permMove() const; + bool permTransfer() const; + inline bool flagUsePhysics() const { return ((mFlags & FLAGS_USE_PHYSICS) != 0); } + inline bool flagObjectAnyOwner() const { return ((mFlags & FLAGS_OBJECT_ANY_OWNER) != 0); } + inline bool flagObjectYouOwner() const { return ((mFlags & FLAGS_OBJECT_YOU_OWNER) != 0); } + inline bool flagObjectGroupOwned() const { return ((mFlags & FLAGS_OBJECT_GROUP_OWNED) != 0); } + inline bool flagObjectOwnerModify() const { return ((mFlags & FLAGS_OBJECT_OWNER_MODIFY) != 0); } + inline bool flagObjectModify() const { return ((mFlags & FLAGS_OBJECT_MODIFY) != 0); } + inline bool flagObjectCopy() const { return ((mFlags & FLAGS_OBJECT_COPY) != 0); } + inline bool flagObjectMove() const { return ((mFlags & FLAGS_OBJECT_MOVE) != 0); } + inline bool flagObjectTransfer() const { return ((mFlags & FLAGS_OBJECT_TRANSFER) != 0); } + inline bool flagObjectPermanent() const { return ((mFlags & FLAGS_AFFECTS_NAVMESH) != 0); } + inline bool flagCharacter() const { return ((mFlags & FLAGS_CHARACTER) != 0); } + inline bool flagVolumeDetect() const { return ((mFlags & FLAGS_VOLUME_DETECT) != 0); } + inline bool flagIncludeInSearch() const { return ((mFlags & FLAGS_INCLUDE_IN_SEARCH) != 0); } + inline bool flagScripted() const { return ((mFlags & FLAGS_SCRIPTED) != 0); } + inline bool flagHandleTouch() const { return ((mFlags & FLAGS_HANDLE_TOUCH) != 0); } + inline bool flagTakesMoney() const { return ((mFlags & FLAGS_TAKES_MONEY) != 0); } + inline bool flagPhantom() const { return ((mFlags & FLAGS_PHANTOM) != 0); } + inline bool flagInventoryEmpty() const { return ((mFlags & FLAGS_INVENTORY_EMPTY) != 0); } + inline bool flagAllowInventoryAdd() const { return ((mFlags & FLAGS_ALLOW_INVENTORY_DROP) != 0); } + inline bool flagTemporaryOnRez() const { return ((mFlags & FLAGS_TEMPORARY_ON_REZ) != 0); } + inline bool flagAnimSource() const { return ((mFlags & FLAGS_ANIM_SOURCE) != 0); } + inline bool flagCameraSource() const { return ((mFlags & FLAGS_CAMERA_SOURCE) != 0); } + inline bool flagCameraDecoupled() const { return ((mFlags & FLAGS_CAMERA_DECOUPLED) != 0); } // prim export U32 getFlags() { return mFlags; } @@ -586,7 +586,7 @@ public: void setIncludeInSearch(bool include_in_search); // Does "open" object menu item apply? - BOOL allowOpen() const; + bool allowOpen() const; void setClickAction(U8 action) { mClickAction = action; } U8 getClickAction() const { return mClickAction; } @@ -595,10 +595,10 @@ public: void setRegion(LLViewerRegion *regionp); virtual void updateRegion(LLViewerRegion *regionp); - void updateFlags(BOOL physics_changed = FALSE); + void updateFlags(bool physics_changed = false); void loadFlags(U32 flags); //load flags from cache or from message - BOOL setFlags(U32 flag, BOOL state); - BOOL setFlagsWithoutUpdate(U32 flag, BOOL state); + bool setFlags(U32 flag, bool state); + bool setFlagsWithoutUpdate(U32 flag, bool state); void setPhysicsShapeType(U8 type); void setPhysicsGravity(F32 gravity); void setPhysicsFriction(F32 friction); @@ -617,11 +617,11 @@ public: virtual LLNetworkData* getParameterEntry(U16 param_type) const; virtual bool setParameterEntry(U16 param_type, const LLNetworkData& new_value, bool local_origin); - virtual BOOL getParameterEntryInUse(U16 param_type) const; - virtual bool setParameterEntryInUse(U16 param_type, BOOL in_use, bool local_origin); + virtual bool getParameterEntryInUse(U16 param_type) const; + virtual bool setParameterEntryInUse(U16 param_type, bool in_use, bool local_origin); // Called when a parameter is changed virtual void parameterChanged(U16 param_type, bool local_origin); - virtual void parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin); + virtual void parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin); bool isShrinkWrapped() const { return mShouldShrinkWrap; } @@ -647,7 +647,7 @@ public: public: //counter-translation - void resetChildrenPosition(const LLVector3& offset, BOOL simplified = FALSE, BOOL skip_avatar_child = FALSE) ; + void resetChildrenPosition(const LLVector3& offset, bool simplified = false, bool skip_avatar_child = false) ; //counter-rotation void resetChildrenRotationAndPosition(const std::vector& rotations, const std::vector& positions) ; @@ -724,7 +724,7 @@ public: // true if user can select this object by clicking under any circumstances (even if pick_unselectable is true) // can likely be factored out - BOOL mbCanSelect; + bool mbCanSelect; private: // Grabbed from UPDATE_FLAGS @@ -744,10 +744,10 @@ public: LLPointer mDrawable; // Band-aid to select object after all creation initialization is done - BOOL mCreateSelected; + bool mCreateSelected; // Replace textures with web pages on this object while drawing - BOOL mRenderMedia; + bool mRenderMedia; bool mRiggedAttachedWarned; @@ -764,7 +764,7 @@ public: std::string mHudText; LLColor4 mHudTextColor; - static BOOL sUseSharedDrawables; + static bool sUseSharedDrawables; public: // Returns mControlAvatar for the edit root prim of this linkset @@ -800,7 +800,7 @@ protected: static LLViewerObject *createObject(const LLUUID &id, LLPCode pcode, LLViewerRegion *regionp, S32 flags = 0); // Hide or show HUD, icon and particles - void hideExtraDisplayItems( BOOL hidden ); + void hideExtraDisplayItems( bool hidden ); ////////////////////////// // @@ -808,10 +808,10 @@ protected: // static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status); - BOOL loadTaskInvFile(const std::string& filename); + bool loadTaskInvFile(const std::string& filename); void doInventoryCallback(); - BOOL isOnMap(); + bool isOnMap(); void unpackParticleSource(const S32 block_num, const LLUUID& owner_id); void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id, bool legacy); @@ -872,15 +872,15 @@ protected: }; EInventoryRequestState mInvRequestState; U64 mInvRequestXFerId; - BOOL mInventoryDirty; + bool mInventoryDirty; LLViewerRegion *mRegionp; // Region that this object belongs to. - BOOL mDead; - BOOL mOrphaned; // This is an orphaned child - BOOL mUserSelected; // Cached user select information - BOOL mOnActiveList; - BOOL mOnMap; // On the map. - BOOL mStatic; // Object doesn't move. + bool mDead; + bool mOrphaned; // This is an orphaned child + bool mUserSelected; // Cached user select information + bool mOnActiveList; + bool mOnMap; // On the map. + bool mStatic; // Object doesn't move. S32 mSeatCount; S32 mNumFaces; @@ -904,11 +904,11 @@ protected: static U32 sNumZombieObjects; // Objects which are dead, but not deleted - static BOOL sMapDebug; // Map render mode + static bool sMapDebug; // Map render mode static LLColor4 sEditSelectColor; static LLColor4 sNoEditSelectColor; static F32 sCurrentPulse; - static BOOL sPulseEnabled; + static bool sPulseEnabled; static S32 sAxisArrowLength; @@ -921,8 +921,8 @@ protected: static void setMaxUpdateInterpolationTime(F32 value) { sMaxUpdateInterpolationTime = (F64Seconds) value; } static void setMaxRegionCrossingInterpolationTime(F32 value) { sMaxRegionCrossingInterpolationTime = (F64Seconds) value; } - static void setVelocityInterpolate(BOOL value) { sVelocityInterpolate = value; } - static void setPingInterpolate(BOOL value) { sPingInterpolate = value; } + static void setVelocityInterpolate(bool value) { sVelocityInterpolate = value; } + static void setPingInterpolate(bool value) { sPingInterpolate = value; } private: static S32 sNumObjects; @@ -931,8 +931,8 @@ private: static F64Seconds sMaxUpdateInterpolationTime; // For motion interpolation static F64Seconds sMaxRegionCrossingInterpolationTime; // For motion interpolation - static BOOL sVelocityInterpolate; - static BOOL sPingInterpolate; + static bool sVelocityInterpolate; + static bool sPingInterpolate; bool mCachedOwnerInMuteList; F64 mCachedMuteListUpdateTime; @@ -946,8 +946,8 @@ public: const LLUUID &extractAttachmentItemID(); // find&set the inventory item ID of the attached object EObjectUpdateType getLastUpdateType() const; void setLastUpdateType(EObjectUpdateType last_update_type); - BOOL getLastUpdateCached() const; - void setLastUpdateCached(BOOL last_update_cached); + bool getLastUpdateCached() const; + void setLastUpdateCached(bool last_update_cached); virtual void updateRiggingInfo() {} @@ -956,7 +956,7 @@ public: private: LLUUID mAttachmentItemID; // ItemID of the associated object is in user inventory. EObjectUpdateType mLastUpdateType; - BOOL mLastUpdateCached; + bool mLastUpdateCached; RegionCrossExtrapolate mExtrap; // improved extrapolator @@ -981,14 +981,14 @@ public: // // -inline void LLViewerObject::setRotation(const LLQuaternion& quat, BOOL damped) +inline void LLViewerObject::setRotation(const LLQuaternion& quat, bool damped) { LLPrimitive::setRotation(quat); setChanged(ROTATED | SILHOUETTE); updateDrawable(damped); } -inline void LLViewerObject::setRotation(const F32 x, const F32 y, const F32 z, BOOL damped) +inline void LLViewerObject::setRotation(const F32 x, const F32 y, const F32 z, bool damped) { LLPrimitive::setRotation(x, y, z); setChanged(ROTATED | SILHOUETTE); @@ -998,10 +998,10 @@ inline void LLViewerObject::setRotation(const F32 x, const F32 y, const F32 z, B class LLViewerObjectMedia { public: - LLViewerObjectMedia() : mMediaURL(), mPassedWhitelist(FALSE), mMediaType(0) { } + LLViewerObjectMedia() : mMediaURL(), mPassedWhitelist(false), mMediaType(0) { } std::string mMediaURL; // for web pages on surfaces, one per prim - BOOL mPassedWhitelist; // user has OK'd display + bool mPassedWhitelist; // user has OK'd display U8 mMediaType; // see LLTextureEntry::WEB_PAGE, etc. }; @@ -1030,11 +1030,11 @@ public: class LLStaticViewerObject : public LLViewerObject { public: - LLStaticViewerObject(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp, BOOL is_global = FALSE) + LLStaticViewerObject(const LLUUID& id, const LLPCode pcode, LLViewerRegion* regionp, bool is_global = false) : LLViewerObject(id,pcode,regionp, is_global) { } - virtual void updateDrawable(BOOL force_damped); + virtual void updateDrawable(bool force_damped); }; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 352874cf58..97cdb31fea 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -94,7 +94,7 @@ #include "llavataractions.h" extern F32 gMinObjectDistance; -extern BOOL gAnimateTextures; +extern bool gAnimateTextures; #define MAX_CONCURRENT_PHYSICS_REQUESTS 256 @@ -118,7 +118,7 @@ LLViewerObjectList::LLViewerObjectList() mNumDeadObjects = 0; mNumOrphans = 0; mNumNewObjects = 0; - mWasPaused = FALSE; + mWasPaused = false; mNumDeadObjectUpdates = 0; mNumUnknownUpdates = 0; } @@ -176,7 +176,7 @@ U64 LLViewerObjectList::getIndex(const U32 local_id, return (((U64)index) << 32) | (U64)local_id; } -BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) +bool LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) { LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK; @@ -195,21 +195,21 @@ BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject* objectp) std::map::iterator iter = sIndexAndLocalIDToUUID.find(indexid); if (iter == sIndexAndLocalIDToUUID.end()) { - return FALSE; + return false; } // Found existing entry if (iter->second == objectp->getID()) { // Full UUIDs match, so remove the entry sIndexAndLocalIDToUUID.erase(iter); - return TRUE; + return true; } // UUIDs did not match - this would zap a valid entry, so don't erase it //LL_INFOS() << "Tried to erase entry where id in table (" // << iter->second << ") did not match object " << object.getID() << LL_ENDL; } - return FALSE ; + return false ; } void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id, @@ -439,7 +439,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* else { objectp->setLastUpdateType(OUT_FULL_COMPRESSED); //newly cached - objectp->setLastUpdateCached(TRUE); + objectp->setLastUpdateCached(true); } LLVOAvatar::cullAvatarsByPixelArea(); @@ -519,7 +519,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, for (i = 0; i < num_objects; i++) { - BOOL justCreated = FALSE; + bool justCreated = false; bool update_cache = false; //update object cache if it is a full-update or terse update if (compressed) @@ -708,7 +708,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, continue; } - justCreated = TRUE; + justCreated = true; mNumNewObjects++; } @@ -1501,7 +1501,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) if (objectp->onActiveList()) { //LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list in cleanupReferences." << LL_ENDL; - objectp->setOnActiveList(FALSE); + objectp->setOnActiveList(false); removeFromActiveList(objectp); } @@ -1519,7 +1519,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) // } } -BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) +bool LLViewerObjectList::killObject(LLViewerObject *objectp) { LL_PROFILE_ZONE_SCOPED; // Don't ever kill gAgentAvatarp, just force it to the agent's region @@ -1527,7 +1527,7 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) if ((objectp == gAgentAvatarp) && gAgent.getRegion()) { objectp->setRegion(gAgent.getRegion()); - return FALSE; + return false; } // When we're killing objects, all we do is mark them as dead. @@ -1540,10 +1540,10 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) // so create a pointer to make sure object will stay alive untill markDead() finishes LLPointer sp(objectp); sp->markDead(); // does the right thing if object already dead - return TRUE; + return true; } - return FALSE; + return false; } // Animated Objects kill switch @@ -1565,7 +1565,7 @@ void LLViewerObjectList::killAnimatedObjects() } } - cleanDeadObjects(FALSE); + cleanDeadObjects(false); } // @@ -1586,7 +1586,7 @@ void LLViewerObjectList::killObjects(LLViewerRegion *regionp) } // Have to clean right away because the region is becoming invalid. - cleanDeadObjects(FALSE); + cleanDeadObjects(false); } void LLViewerObjectList::killAllObjects() @@ -1602,7 +1602,7 @@ void LLViewerObjectList::killAllObjects() llassert((objectp == gAgentAvatarp) || objectp->isDead()); } - cleanDeadObjects(FALSE); + cleanDeadObjects(false); if(!mObjects.empty()) { @@ -1623,7 +1623,7 @@ void LLViewerObjectList::killAllObjects() } } -void LLViewerObjectList::cleanDeadObjects(BOOL use_timer) +void LLViewerObjectList::cleanDeadObjects(bool use_timer) { // FIRE-30694 DeadObject Spam llassert( mNumDeadObjects == mDeadObjects.size() ); @@ -1744,7 +1744,7 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) return; // We don't update dead objects! } - BOOL active = objectp->isActive(); + bool active = objectp->isActive(); if (active != objectp->onActiveList()) { if (active) @@ -1755,7 +1755,7 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) { mActiveObjects.push_back(objectp); objectp->setListIndex(mActiveObjects.size()-1); - objectp->setOnActiveList(TRUE); + objectp->setOnActiveList(true); } else { @@ -1773,7 +1773,7 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) { //LL_INFOS() << "Removing " << objectp->mID << " " << objectp->getPCodeString() << " from active list." << LL_ENDL; removeFromActiveList(objectp); - objectp->setOnActiveList(FALSE); + objectp->setOnActiveList(false); } } @@ -2119,7 +2119,7 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 ¢er) { } -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; void LLViewerObjectList::addDebugBeacon(const LLVector3 &pos_agent, const std::string &string, @@ -2300,7 +2300,7 @@ void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip LL_DEBUGS("ORPHANS") << "Orphaning object " << childp->getID() << " with parent " << parent_id << LL_ENDL; // We're an orphan, flag things appropriately. - childp->mOrphaned = TRUE; + childp->mOrphaned = true; if (childp->mDrawable.notNull()) { bool make_invisible = true; @@ -2373,7 +2373,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) } U64 parent_info = getIndex(objectp->mLocalID, ip, port); - BOOL orphans_found = FALSE; + bool orphans_found = false; // Iterate through the orphan list, and set parents of matching children. for (std::vector::iterator iter = mOrphanChildren.begin(); iter != mOrphanChildren.end(); ) @@ -2404,7 +2404,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) objectp->setChanged(LLXform::MOVED | LLXform::SILHOUETTE); // Flag the object as no longer orphaned - childp->mOrphaned = FALSE; + childp->mOrphaned = false; if (childp->mDrawable.notNull()) { // Make the drawable visible again and set the drawable parent @@ -2414,10 +2414,10 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) } // Make certain particles, icon and HUD aren't hidden - childp->hideExtraDisplayItems( FALSE ); + childp->hideExtraDisplayItems( false ); objectp->addChild(childp); - orphans_found = TRUE; + orphans_found = true; ++iter; } else diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index c2ec90ce4e..79cebf354c 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -74,13 +74,13 @@ public: LLViewerObject *replaceObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); // TomY: hack to switch VO instances on the fly - BOOL killObject(LLViewerObject *objectp); + bool killObject(LLViewerObject *objectp); void killAnimatedObjects(); void killObjects(LLViewerRegion *regionp); // Kill all objects owned by a particular region. void killAllObjects(); - void cleanDeadObjects(const BOOL use_timer = TRUE); // Clean up the dead object list. + void cleanDeadObjects(const bool use_timer = true); // Clean up the dead object list. // Simulator and viewer side object updates... void processUpdateCore(LLViewerObject* objectp, void** data, U32 block, const EObjectUpdateType update_type, @@ -185,7 +185,7 @@ public: // if we paused in the last frame // used to discount stats from this frame - BOOL mWasPaused; + bool mWasPaused; static void getUUIDFromLocal(LLUUID &id, const U32 local_id, @@ -196,7 +196,7 @@ public: const U32 ip, const U32 port); // Requires knowledge of message system info! - static BOOL removeFromLocalIDTable(const LLViewerObject* objectp); + static bool removeFromLocalIDTable(const LLViewerObject* objectp); // Used ONLY by the orphaned object code. static U64 getIndex(const U32 local_id, const U32 ip, const U32 port); diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 04a5b88f7c..7b60527722 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -38,7 +38,7 @@ //static variables definitions //----------------------------------------------------------------------------------- U32 LLViewerOctreeEntryData::sCurVisible = 10; //reserve the low numbers for special use. -BOOL LLViewerOctreeDebug::sInDebug = FALSE; +bool LLViewerOctreeDebug::sInDebug = false; static LLTrace::CountStatHandle sOcclusionQueries("occlusion_queries", "Number of occlusion queries executed"), sNumObjectsOccluded("occluded_objects", "Count of objects being occluded by a query"), @@ -566,7 +566,7 @@ void LLViewerOctreeGroup::rebound() } else if (mOctreeNode->getChildCount() == 0) { //copy object bounding box if this is a leaf - boundObjects(TRUE, mExtents[0], mExtents[1]); + boundObjects(true, mExtents[0], mExtents[1]); mBounds[0] = mObjectBounds[0]; mBounds[1] = mObjectBounds[1]; } @@ -594,7 +594,7 @@ void LLViewerOctreeGroup::rebound() newMin.setMin(newMin, min); } - boundObjects(FALSE, newMin, newMax); + boundObjects(false, newMin, newMax); mBounds[0].setAdd(newMin, newMax); mBounds[0].mul(0.5f); @@ -700,7 +700,7 @@ LLViewerOctreeGroup* LLViewerOctreeGroup::getParent() } //virtual -bool LLViewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut) +bool LLViewerOctreeGroup::boundObjects(bool empty, LLVector4a& minOut, LLVector4a& maxOut) { const OctreeNode* node = mOctreeNode; @@ -754,19 +754,19 @@ bool LLViewerOctreeGroup::boundObjects(BOOL empty, LLVector4a& minOut, LLVector4 maxOut.setMax(maxOut, newMax); } - return TRUE; + return true; } //virtual -BOOL LLViewerOctreeGroup::isVisible() const +bool LLViewerOctreeGroup::isVisible() const { - return mVisible[LLViewerCamera::sCurCameraID] >= LLViewerOctreeEntryData::getCurrentFrame() ? TRUE : FALSE; + return mVisible[LLViewerCamera::sCurCameraID] >= LLViewerOctreeEntryData::getCurrentFrame() ? true : false; } //virtual -BOOL LLViewerOctreeGroup::isRecentlyVisible() const +bool LLViewerOctreeGroup::isRecentlyVisible() const { - return FALSE; + return false; } void LLViewerOctreeGroup::setVisible() @@ -886,18 +886,18 @@ LLOcclusionCullingGroup::~LLOcclusionCullingGroup() releaseOcclusionQueryObjectNames(); } -BOOL LLOcclusionCullingGroup::needsUpdate() +bool LLOcclusionCullingGroup::needsUpdate() { - return (LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash) ? TRUE : FALSE; + return (LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash) ? true : false; } -BOOL LLOcclusionCullingGroup::isRecentlyVisible() const +bool LLOcclusionCullingGroup::isRecentlyVisible() const { const S32 MIN_VIS_FRAME_RANGE = 2; return (LLDrawable::getCurrentFrame() - mVisible[LLViewerCamera::sCurCameraID]) < MIN_VIS_FRAME_RANGE ; } -BOOL LLOcclusionCullingGroup::isAnyRecentlyVisible() const +bool LLOcclusionCullingGroup::isAnyRecentlyVisible() const { const S32 MIN_VIS_FRAME_RANGE = 2; return (LLDrawable::getCurrentFrame() - mAnyVisible) < MIN_VIS_FRAME_RANGE ; @@ -1055,12 +1055,12 @@ void LLOcclusionCullingGroup::clearOcclusionState(U32 state, S32 mode /* = STATE } } -BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* bounds) +bool LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* bounds) { LL_PROFILE_ZONE_SCOPED_CATEGORY_OCTREE; if (camera->getOrigin().isExactlyZero()) { - return FALSE; + return false; } const F32 vel = SG_OCCLUSION_FUDGE*2.f; @@ -1073,7 +1073,7 @@ BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* boun /*if (r.magVecSquared() > 1024.0*1024.0) { - return TRUE; + return true; }*/ LLVector4a e; @@ -1087,16 +1087,16 @@ BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* boun S32 lt = e.lessThan(min).getGatheredBits() & 0x7; if (lt) { - return FALSE; + return false; } S32 gt = e.greaterThan(max).getGatheredBits() & 0x7; if (gt) { - return FALSE; + return false; } - return TRUE; + return true; } U32 LLOcclusionCullingGroup::getLastOcclusionIssuedTime() @@ -1301,7 +1301,7 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh //----------------------------------------------------------------------------------- LLViewerOctreePartition::LLViewerOctreePartition() : mRegionp(NULL), - mOcclusionEnabled(TRUE), + mOcclusionEnabled(true), mDrawableType(0), mLODSeed(0), mLODPeriod(1) @@ -1324,7 +1324,7 @@ void LLViewerOctreePartition::cleanup() mOctree = nullptr; } -BOOL LLViewerOctreePartition::isOcclusionEnabled() +bool LLViewerOctreePartition::isOcclusionEnabled() { return mOcclusionEnabled || LLPipeline::sUseOcclusion > 2; } diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h index 353429d254..7d9dfe7605 100644 --- a/indra/newview/llvieweroctree.h +++ b/indra/newview/llvieweroctree.h @@ -213,11 +213,11 @@ public: virtual void unbound(); virtual void rebound(); - BOOL isDead() { return hasState(DEAD); } + bool isDead() { return hasState(DEAD); } void setVisible(); - BOOL isVisible() const; - virtual BOOL isRecentlyVisible() const; + bool isVisible() const; + virtual bool isRecentlyVisible() const; S32 getVisible(LLViewerCamera::eCameraID id) const {return mVisible[id];} S32 getAnyVisible() const {return mAnyVisible;} bool isEmpty() const { return mOctreeNode->isEmpty(); } @@ -253,7 +253,7 @@ public: protected: void checkStates(); private: - virtual bool boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut); + virtual bool boundObjects(bool empty, LLVector4a& minOut, LLVector4a& maxOut); protected: U32 mState; @@ -305,19 +305,19 @@ public: void clearOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE); void checkOcclusion(); //read back last occlusion query (if any) void doOcclusion(LLCamera* camera, const LLVector4a* shift = NULL); //issue occlusion query - BOOL isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? TRUE : FALSE; } + bool isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? true : false; } U32 getOcclusionState() const { return mOcclusionState[LLViewerCamera::sCurCameraID];} - BOOL needsUpdate(); + bool needsUpdate(); U32 getLastOcclusionIssuedTime(); //virtual void handleChildAddition(const OctreeNode* parent, OctreeNode* child); //virtual - BOOL isRecentlyVisible() const; + bool isRecentlyVisible() const; LLViewerOctreePartition* getSpatialPartition()const {return mSpatialPartition;} - BOOL isAnyRecentlyVisible() const; + bool isAnyRecentlyVisible() const; static U32 getNewOcclusionQueryObjectName(); static void releaseOcclusionQueryObjectName(U32 name); @@ -326,7 +326,7 @@ protected: void releaseOcclusionQueryObjectNames(); private: - BOOL earlyFail(LLCamera* camera, const LLVector4a* bounds); + bool earlyFail(LLCamera* camera, const LLVector4a* bounds); protected: U32 mOcclusionState[LLViewerCamera::NUM_CAMERAS]; @@ -350,7 +350,7 @@ public: // Cull on arbitrary frustum virtual S32 cull(LLCamera &camera, bool do_occlusion) = 0; - BOOL isOcclusionEnabled(); + bool isOcclusionEnabled(); protected: // MUST call from destructor of any derived classes (SL-17276) @@ -361,7 +361,7 @@ public: U32 mDrawableType; OctreeNode* mOctree; LLViewerRegion* mRegionp; // the region this partition belongs to. - BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed + bool mOcclusionEnabled; // if true, occlusion culling is performed U32 mLODSeed; U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed) }; @@ -419,7 +419,7 @@ public: virtual void visit(const OctreeNode* branch); public: - static BOOL sInDebug; + static bool sInDebug; }; #endif diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 6135f6683d..d4d4fd2bc4 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -740,7 +740,7 @@ bool callback_play_media(const LLSD& notification, const LLSD& response, LLParce { if (option == 1) { - gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); + gSavedSettings.setBOOL("AudioStreamingVideo", true); } if (gSavedSettings.getBOOL("MediaEnableFilter")) { @@ -753,23 +753,23 @@ bool callback_play_media(const LLSD& notification, const LLSD& response, LLParce } else // option == 2 { - gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); + gSavedSettings.setBOOL("AudioStreamingVideo", false); } - gWarningSettings.setBOOL("FirstStreamingVideo", FALSE); + gWarningSettings.setBOOL("FirstStreamingVideo", false); return false; } bool callback_enable_media_filter(const LLSD& notification, const LLSD& response, LLParcel* parcel) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - gWarningSettings.setBOOL("FirstMediaFilter", FALSE); + gWarningSettings.setBOOL("FirstMediaFilter", false); if (option == 0) { LLViewerParcelMedia::getInstance()->filterMediaUrl(parcel); } else // option == 1 { - gSavedSettings.setBOOL("MediaEnableFilter", FALSE); + gSavedSettings.setBOOL("MediaEnableFilter", false); LLViewerParcelMedia::getInstance()->play(parcel); } return false; @@ -1175,14 +1175,14 @@ void callback_media_alert_single(const LLSD ¬ification, const LLSD &response, bool callback_enable_audio_filter(const LLSD& notification, const LLSD& response, std::string media_url) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - gWarningSettings.setBOOL("FirstMediaFilter", FALSE); + gWarningSettings.setBOOL("FirstMediaFilter", false); if (option == 0) { LLViewerParcelMedia::getInstance()->filterAudioUrl(media_url); } else // option == 1 { - gSavedSettings.setBOOL("MediaEnableFilter", FALSE); + gSavedSettings.setBOOL("MediaEnableFilter", false); if (gAudiop) { LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(media_url); diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp index 1d9865511b..36e2df6782 100644 --- a/indra/newview/llviewerparcelmediaautoplay.cpp +++ b/indra/newview/llviewerparcelmediaautoplay.cpp @@ -49,7 +49,7 @@ LLViewerParcelMediaAutoPlay::LLViewerParcelMediaAutoPlay() : LLEventTimer(1), mLastParcelID(-1), - mPlayed(FALSE), + mPlayed(false), mTimeInParcel(0) { } @@ -57,7 +57,7 @@ LLViewerParcelMediaAutoPlay::LLViewerParcelMediaAutoPlay() : // static void LLViewerParcelMediaAutoPlay::playStarted() { - LLSingleton::getInstance()->mPlayed = TRUE; + LLSingleton::getInstance()->mPlayed = true; } bool LLViewerParcelMediaAutoPlay::tick() @@ -110,7 +110,7 @@ bool LLViewerParcelMediaAutoPlay::tick() { if (this_media_texture_id.notNull()) // and if the media texture is good { - LLViewerMediaTexture *image = LLViewerTextureManager::getMediaTexture(this_media_texture_id, FALSE) ; + LLViewerMediaTexture *image = LLViewerTextureManager::getMediaTexture(this_media_texture_id, false) ; F32 image_size = 0; @@ -156,7 +156,7 @@ bool LLViewerParcelMediaAutoPlay::tick() } } - mPlayed = TRUE; + mPlayed = true; } } } diff --git a/indra/newview/llviewerparcelmediaautoplay.h b/indra/newview/llviewerparcelmediaautoplay.h index 952747a2af..49d7d76411 100644 --- a/indra/newview/llviewerparcelmediaautoplay.h +++ b/indra/newview/llviewerparcelmediaautoplay.h @@ -45,7 +45,7 @@ public: private: S32 mLastParcelID; LLUUID mLastRegionID; - BOOL mPlayed; + bool mPlayed; F32 mTimeInParcel; }; diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 4ad209e4b1..b062765983 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -116,7 +116,7 @@ struct LLGodForceOwnerData // Methods // LLViewerParcelMgr::LLViewerParcelMgr() -: mSelected(FALSE), +: mSelected(false), mRequestResult(0), mWestSouth(), mEastNorth(), @@ -126,8 +126,8 @@ LLViewerParcelMgr::LLViewerParcelMgr() mHoverWestSouth(), mHoverEastNorth(), mTeleportInProgressPosition(), - mRenderCollision(FALSE), - mRenderSelection(TRUE), + mRenderCollision(false), + mRenderSelection(true), mCollisionBanned(0), mCollisionTimer(), // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3) @@ -166,8 +166,8 @@ LLViewerParcelMgr::LLViewerParcelMgr() // JC: Resolved a merge conflict here, eliminated // mBlockedImage->setAddressMode(LLTexUnit::TAM_WRAP); // because it is done in llviewertexturelist.cpp - mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI); - mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI); + mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryLines.png", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI); + mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("world/NoEntryPassLines.png", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI); S32 overlay_size = mParcelsPerEdge * mParcelsPerEdge / PARCEL_OVERLAY_CHUNKS; sPackedOverlay = new U8[overlay_size]; @@ -183,7 +183,7 @@ LLViewerParcelMgr::LLViewerParcelMgr() mParcelsPerEdge = S32( REGION_WIDTH_METERS / PARCEL_GRID_STEP_METERS ); // Aurora Sim - mTeleportInProgress = TRUE; // the initial parcel update is treated like teleport + mTeleportInProgress = true; // the initial parcel update is treated like teleport } // Aurora Sim @@ -264,13 +264,13 @@ LLViewerRegion* LLViewerParcelMgr::getSelectionRegion() void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out, S32* rent_out, - BOOL* for_sale_out, + bool* for_sale_out, F32* dwell_out) { S32 area = 0; S32 price = 0; S32 rent = 0; - BOOL for_sale = FALSE; + bool for_sale = false; F32 dwell = DWELL_NAN; if (mSelected) @@ -287,12 +287,12 @@ void LLViewerParcelMgr::getDisplayInfo(S32* area_out, S32* claim_out, if (mCurrentParcel->getForSale()) { price = mCurrentParcel->getSalePrice(); - for_sale = TRUE; + for_sale = true; } else { price = area * mCurrentParcel->getClaimPricePerMeter(); - for_sale = FALSE; + for_sale = false; } rent = mCurrentParcel->getTotalRent(); @@ -462,14 +462,14 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectParcelAt(const LLVector3d& pos_ northeast.mdV[VY] = ll_round( northeast.mdV[VY], (F64)PARCEL_GRID_STEP_METERS ); // Snap to parcel - return selectLand( southwest, northeast, TRUE ); + return selectLand( southwest, northeast, true ); } // Tries to select the parcel inside the rectangle LLParcelSelectionHandle LLViewerParcelMgr::selectParcelInRectangle() { - return selectLand(mWestSouth, mEastNorth, TRUE); + return selectLand(mWestSouth, mEastNorth, true); } @@ -512,8 +512,8 @@ void LLViewerParcelMgr::selectCollisionParcel() mCurrentParcelSelection->setParcel(NULL); mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel); - mSelected = TRUE; - mCurrentParcelSelection->mWholeParcelSelected = TRUE; + mSelected = true; + mCurrentParcelSelection->mWholeParcelSelected = true; notifyObservers(); return; } @@ -521,7 +521,7 @@ void LLViewerParcelMgr::selectCollisionParcel() // snap_selection = auto-select the hit parcel, if there is exactly one LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1, const LLVector3d &corner2, - BOOL snap_selection) + bool snap_selection) { sanitize_corners( corner1, corner2, mWestSouth, mEastNorth ); @@ -529,7 +529,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1, F32 delta_x = getSelectionWidth(); if (delta_x * delta_x <= 1.f * 1.f) { - mSelected = FALSE; + mSelected = false; notifyObservers(); return NULL; } @@ -538,7 +538,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1, F32 delta_y = getSelectionHeight(); if (delta_y * delta_y <= 1.f * 1.f) { - mSelected = FALSE; + mSelected = false; notifyObservers(); return NULL; } @@ -556,14 +556,14 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1, if(!region) { // just in case they somehow selected no land. - mSelected = FALSE; + mSelected = false; return NULL; } if (region != region_other) { LLNotificationsUtil::add("CantSelectLandFromMultipleRegions"); - mSelected = FALSE; + mSelected = false; notifyObservers(); return NULL; } @@ -593,7 +593,7 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectLand(const LLVector3d &corner1, mCurrentParcelSelection->setParcel(NULL); mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel); - mSelected = TRUE; + mSelected = true; mCurrentParcelSelection->mWholeParcelSelected = snap_selection; notifyObservers(); return mCurrentParcelSelection; @@ -612,7 +612,7 @@ void LLViewerParcelMgr::deselectLand() { if (mSelected) { - mSelected = FALSE; + mSelected = false; // Invalidate the selected parcel mCurrentParcel->setLocalID(-1); @@ -667,7 +667,7 @@ void LLViewerParcelMgr::notifyObservers() // // ACCESSORS // -BOOL LLViewerParcelMgr::selectionEmpty() const +bool LLViewerParcelMgr::selectionEmpty() const { return !mSelected; } @@ -789,99 +789,99 @@ bool LLViewerParcelMgr::allowAgentDamage(const LLViewerRegion* region, const LLP || (parcel && parcel->getAllowDamage()); } -BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const +bool LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const { LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global ); - if (!region) return FALSE; + if (!region) return false; LLViewerParcelOverlay* overlay = region->getParcelOverlay(); - if (!overlay) return FALSE; + if (!overlay) return false; LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global ); return overlay->isOwned( pos_region ); } -BOOL LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const +bool LLViewerParcelMgr::isOwnedSelfAt(const LLVector3d& pos_global) const { LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global ); - if (!region) return FALSE; + if (!region) return false; LLViewerParcelOverlay* overlay = region->getParcelOverlay(); - if (!overlay) return FALSE; + if (!overlay) return false; LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global ); return overlay->isOwnedSelf( pos_region ); } -BOOL LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const +bool LLViewerParcelMgr::isOwnedOtherAt(const LLVector3d& pos_global) const { LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global ); - if (!region) return FALSE; + if (!region) return false; LLViewerParcelOverlay* overlay = region->getParcelOverlay(); - if (!overlay) return FALSE; + if (!overlay) return false; LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global ); return overlay->isOwnedOther( pos_region ); } -BOOL LLViewerParcelMgr::isSoundLocal(const LLVector3d& pos_global) const +bool LLViewerParcelMgr::isSoundLocal(const LLVector3d& pos_global) const { LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( pos_global ); - if (!region) return FALSE; + if (!region) return false; LLViewerParcelOverlay* overlay = region->getParcelOverlay(); - if (!overlay) return FALSE; + if (!overlay) return false; LLVector3 pos_region = region->getPosRegionFromGlobal( pos_global ); return overlay->isSoundLocal( pos_region ); } -BOOL LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const +bool LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const { - BOOL in_agent_parcel = inAgentParcel(pos_global); + bool in_agent_parcel = inAgentParcel(pos_global); if (in_agent_parcel) { // In same parcel as the agent - return TRUE; + return true; } else { if (LLViewerParcelMgr::getInstance()->getAgentParcel()->getSoundLocal()) { // Not in same parcel, and agent parcel only has local sound - return FALSE; + return false; } else if (LLViewerParcelMgr::getInstance()->isSoundLocal(pos_global)) { // Not in same parcel, and target parcel only has local sound - return FALSE; + return false; } else { // Not in same parcel, but neither are local sound - return TRUE; + return true; } } } -BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const +bool LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const { LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal(pos_global); LLViewerRegion* agent_region = gAgent.getRegion(); if (!region || !agent_region) - return FALSE; + return false; if (region != agent_region) { // Can't be in the agent parcel if you're not in the same region. - return FALSE; + return false; } LLVector3 pos_region = agent_region->getPosRegionFromGlobal(pos_global); @@ -890,11 +890,11 @@ BOOL LLViewerParcelMgr::inAgentParcel(const LLVector3d &pos_global) const if (mAgentParcelOverlay[row*mParcelsPerEdge + column]) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -960,7 +960,7 @@ void LLViewerParcelMgr::renderParcelCollision() LLViewerRegion* regionp = gAgent.getRegion(); if (regionp) { - BOOL use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST); + bool use_pass = mCollisionParcel->getParcelFlag(PF_USE_PASS_LIST); renderCollisionSegments(mCollisionSegments, use_pass, regionp); } } @@ -1172,9 +1172,9 @@ public: LLUUID mAgent; LLUUID mSession; LLUUID mGroup; - BOOL mIsGroupOwned; - BOOL mRemoveContribution; - BOOL mIsClaim; + bool mIsGroupOwned; + bool mRemoveContribution; + bool mIsClaim; LLHost mHost; // for parcel buys @@ -1193,9 +1193,9 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy( const LLUUID& agent_id, const LLUUID& session_id, const LLUUID& group_id, - BOOL is_group_owned, - BOOL is_claim, - BOOL remove_contribution) + bool is_group_owned, + bool is_claim, + bool remove_contribution) { if (!mSelected || !mCurrentParcel) { @@ -1277,7 +1277,7 @@ void LLViewerParcelMgr::sendParcelBuy(ParcelBuyInfo* info) msg->addBOOL("RemoveContribution", info->mRemoveContribution); msg->addS32("LocalID", info->mParcelID); } - msg->addBOOL("Final", TRUE); // don't allow escrow buys + msg->addBOOL("Final", true); // don't allow escrow buys if (info->mIsClaim) { msg->nextBlock("ParcelData"); @@ -1533,7 +1533,7 @@ void LLViewerParcelMgr::setHoverParcel(const LLVector3d& pos) msg->addF32Fast(_PREHASH_South, south); msg->addF32Fast(_PREHASH_East, east); msg->addF32Fast(_PREHASH_North, north); - msg->addBOOL("SnapSelection", FALSE); + msg->addBOOL("SnapSelection", false); msg->sendReliable(region->getHost()); mHoverRequestResult = PARCEL_RESULT_NO_DATA; @@ -1761,7 +1761,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use bool environment_changed = (cur_parcel_environment_version != parcel_environment_version); parcel->init(owner_id, - FALSE, FALSE, FALSE, + false, false, false, claim_date, claim_price_per_meter, rent_price_per_meter, area, other_prims, parcel_prim_bonus, is_group_owned); parcel->setLocalID(local_id); @@ -1824,7 +1824,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use // Notify anything that wants to know when the agent changes parcels gAgent.changeParcels(); - instance->mTeleportInProgress = FALSE; + instance->mTeleportInProgress = false; } else if (agent_parcel_update) { @@ -1867,7 +1867,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use west_south.mV[VY], east_north.mV[VX], east_north.mV[VY] ); - parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = FALSE; + parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = false; } else if (0 == local_id) { @@ -1881,7 +1881,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use aabb_min.mV[VY], aabb_max.mV[VX], aabb_max.mV[VY] ); - parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE; + parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = true; } else { @@ -1901,7 +1901,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use delete[] bitmap; bitmap = NULL; - parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = TRUE; + parcel_mgr.mCurrentParcelSelection->mWholeParcelSelected = true; } // Request access list information for this land @@ -1914,7 +1914,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use parcel_mgr.sendParcelDwellRequest(); } - parcel_mgr.mSelected = TRUE; + parcel_mgr.mSelected = true; parcel_mgr.notifyObservers(); } } @@ -2244,8 +2244,8 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr S32 count = entries.size(); S32 num_sections = (S32) ceil(count/PARCEL_MAX_ENTRIES_PER_PACKET); S32 sequence_id = 1; - BOOL start_message = TRUE; - BOOL initial = TRUE; + bool start_message = true; + bool initial = true; LLUUID transactionUUID; transactionUUID.generate(); @@ -2269,7 +2269,7 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr msg->addUUIDFast(_PREHASH_TransactionID, transactionUUID); msg->addS32Fast(_PREHASH_SequenceID, sequence_id); msg->addS32Fast(_PREHASH_Sections, num_sections); - start_message = FALSE; + start_message = false; if (initial && (cit == end)) { @@ -2280,7 +2280,7 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr msg->addU32Fast(_PREHASH_Flags, 0 ); } - initial = FALSE; + initial = false; sequence_id++; } @@ -2296,7 +2296,7 @@ void LLViewerParcelMgr::sendParcelAccessListUpdate(U32 flags, const LLAccessEntr ++cit; } - start_message = TRUE; + start_message = true; msg->sendReliable( region->getHost() ); } } @@ -2442,7 +2442,7 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const && ((parcel->getSalePrice() > 0) || (authorizeBuyer.notNull())); bool isEmpowered - = forGroup ? gAgent.hasPowerInActiveGroup(GP_LAND_DEED) == TRUE : true; + = forGroup ? gAgent.hasPowerInActiveGroup(GP_LAND_DEED) == true : true; bool isOwner = parcelOwner == (forGroup ? gAgent.getGroupID() : gAgent.getID()); @@ -2457,9 +2457,9 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const } -void LLViewerParcelMgr::startBuyLand(BOOL is_for_group) +void LLViewerParcelMgr::startBuyLand(bool is_for_group) { - LLFloaterBuyLand::buyLand(getSelectionRegion(), mCurrentParcelSelection, is_for_group == TRUE); + LLFloaterBuyLand::buyLand(getSelectionRegion(), mCurrentParcelSelection, is_for_group == true); } void LLViewerParcelMgr::startSellLand() @@ -2681,39 +2681,39 @@ void LLViewerParcelMgr::buyPass() } //Tells whether we are allowed to buy a pass or not -BOOL LLViewerParcelMgr::isCollisionBanned() +bool LLViewerParcelMgr::isCollisionBanned() { if ((mCollisionBanned == BA_ALLOWED) || (mCollisionBanned == BA_NOT_ON_LIST) || (mCollisionBanned == BA_NOT_IN_GROUP)) - return FALSE; + return false; else - return TRUE; + return true; } // This implementation should mirror LLSimParcelMgr::isParcelOwnedBy // static -BOOL LLViewerParcelMgr::isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power) +bool LLViewerParcelMgr::isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power) { if (!parcelp) { - return FALSE; + return false; } // Gods can always assume ownership. if (gAgent.isGodlike()) { - return TRUE; + return true; } // The owner of a parcel automatically gets all powersr. if (parcelp->getOwnerID() == gAgent.getID()) { - return TRUE; + return true; } // Only gods can assume 'ownership' of public land. if (parcelp->isPublic()) { - return FALSE; + return false; } // Return whether or not the agent has group_proxy_power powers in the @@ -2723,10 +2723,10 @@ BOOL LLViewerParcelMgr::isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_ // This implementation should mirror llSimParcelMgr::isParcelModifiableBy // static -BOOL LLViewerParcelMgr::isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power) +bool LLViewerParcelMgr::isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power) { // If the agent can assume ownership, it is probably modifiable. - BOOL rv = FALSE; + bool rv = false; if (parcelp) { // *NOTE: This should only work for leased parcels, but group owned @@ -2738,7 +2738,7 @@ BOOL LLViewerParcelMgr::isParcelModifiableByAgent(const LLParcel* parcelp, U64 g && !gAgent.isGodlike() && (parcelp->getOwnershipStatus() != LLParcel::OS_LEASED) ) { - rv = FALSE; + rv = false; } } return rv; @@ -2810,7 +2810,7 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos // The agent parcel data has not been updated yet. // Let's wait for the update and then emit the signal. mTeleportInProgressPosition = new_pos; - mTeleportInProgress = TRUE; + mTeleportInProgress = true; } } diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h index a44fff021d..f6f4de3972 100644 --- a/indra/newview/llviewerparcelmgr.h +++ b/indra/newview/llviewerparcelmgr.h @@ -89,14 +89,14 @@ public: // Aurora Sim static void cleanupGlobals(); - BOOL selectionEmpty() const; + bool selectionEmpty() const; F32 getSelectionWidth() const { return F32(mEastNorth.mdV[VX] - mWestSouth.mdV[VX]); } F32 getSelectionHeight() const { return F32(mEastNorth.mdV[VY] - mWestSouth.mdV[VY]); } - BOOL getSelection(LLVector3d &min, LLVector3d &max) { min = mWestSouth; max = mEastNorth; return !selectionEmpty();} + bool getSelection(LLVector3d &min, LLVector3d &max) { min = mWestSouth; max = mEastNorth; return !selectionEmpty();} LLViewerRegion* getSelectionRegion(); F32 getDwelling() const { return mSelectedDwell;} - void getDisplayInfo(S32* area, S32* claim, S32* rent, BOOL* for_sale, F32* dwell); + void getDisplayInfo(S32* area, S32* claim, S32* rent, bool* for_sale, F32* dwell); // Returns selected area S32 getSelectedArea() const; @@ -124,7 +124,7 @@ public: // Select a piece of land LLParcelSelectionHandle selectLand(const LLVector3d &corner1, const LLVector3d &corner2, - BOOL snap_to_parcel); + bool snap_to_parcel); // Clear the selection, and stop drawing the highlight. void deselectLand(); @@ -134,14 +134,14 @@ public: void removeObserver(LLParcelObserver* observer); void notifyObservers(); - void setSelectionVisible(BOOL visible) { mRenderSelection = visible; } + void setSelectionVisible(bool visible) { mRenderSelection = visible; } - BOOL isOwnedAt(const LLVector3d& pos_global) const; - BOOL isOwnedSelfAt(const LLVector3d& pos_global) const; - BOOL isOwnedOtherAt(const LLVector3d& pos_global) const; - BOOL isSoundLocal(const LLVector3d &pos_global) const; + bool isOwnedAt(const LLVector3d& pos_global) const; + bool isOwnedSelfAt(const LLVector3d& pos_global) const; + bool isOwnedOtherAt(const LLVector3d& pos_global) const; + bool isSoundLocal(const LLVector3d &pos_global) const; - BOOL canHearSound(const LLVector3d &pos_global) const; + bool canHearSound(const LLVector3d &pos_global) const; // Returns a reference counted pointer to current parcel selection. // Selection does not change to reflect new selections made by user @@ -159,7 +159,7 @@ public: LLParcel *getAgentParcel() const; LLParcel *getAgentOrSelectedParcel() const; - BOOL inAgentParcel(const LLVector3d &pos_global) const; + bool inAgentParcel(const LLVector3d &pos_global) const; // Returns a pointer only when it has valid data. LLParcel* getHoverParcel() const; @@ -217,7 +217,7 @@ public: void renderOneSegment(F32 x1, F32 y1, F32 x2, F32 y2, F32 height, U8 direction, LLViewerRegion* regionp, bool absolute_height = false); // void renderHighlightSegments(const U8* segments, LLViewerRegion* regionp); - void renderCollisionSegments(U8* segments, BOOL use_pass, LLViewerRegion* regionp); + void renderCollisionSegments(U8* segments, bool use_pass, LLViewerRegion* regionp); static S32 PARCEL_BAN_LINES_HIDE; static S32 PARCEL_BAN_LINES_ON_COLLISION; @@ -251,8 +251,8 @@ public: bool canAgentBuyParcel(LLParcel*, bool forGroup) const; -// void startClaimLand(BOOL is_for_group = FALSE); - void startBuyLand(BOOL is_for_group = FALSE); +// void startClaimLand(bool is_for_group = false); + void startBuyLand(bool is_for_group = false); void startSellLand(); void startReleaseLand(); void startDivideLand(); @@ -268,9 +268,9 @@ public: ParcelBuyInfo* setupParcelBuy(const LLUUID& agent_id, const LLUUID& session_id, const LLUUID& group_id, - BOOL is_group_owned, - BOOL is_claim, - BOOL remove_contribution); + bool is_group_owned, + bool is_claim, + bool remove_contribution); // callers responsibility to call deleteParcelBuy() on return value void sendParcelBuy(ParcelBuyInfo*); void deleteParcelBuy(ParcelBuyInfo* *info); @@ -301,7 +301,7 @@ public: // Whether or not the collision border around the parcel is there because // the agent is banned or not in the allowed group - BOOL isCollisionBanned(); + bool isCollisionBanned(); boost::signals2::connection setTeleportFinishedCallback(teleport_finished_callback_t cb); boost::signals2::connection setTeleportFailedCallback(teleport_failed_callback_t cb); @@ -309,8 +309,8 @@ public: void onTeleportFailed(); bool getTeleportInProgress(); - static BOOL isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power); - static BOOL isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power); + static bool isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power); + static bool isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power); private: static void sendParcelAccessListUpdate(U32 flags, const std::map& entries, LLViewerRegion* region, S32 parcel_local_id); @@ -333,12 +333,12 @@ private: static bool callbackDivideLand(const LLSD& notification, const LLSD& response); static bool callbackJoinLand(const LLSD& notification, const LLSD& response); - //void finishClaim(BOOL user_to_user_sale, U32 join); + //void finishClaim(bool user_to_user_sale, U32 join); LLViewerTexture* getBlockedImage() const; LLViewerTexture* getPassImage() const; private: - BOOL mSelected; + bool mSelected; LLParcel* mCurrentParcel; // selected parcel info LLParcelSelectionHandle mCurrentParcelSelection; @@ -358,7 +358,7 @@ private: std::vector mObservers; - BOOL mTeleportInProgress; + bool mTeleportInProgress; LLVector3d mTeleportInProgressPosition; teleport_finished_signal_t mTeleportFinishedSignal; teleport_failed_signal_t mTeleportFailedSignal; @@ -386,7 +386,7 @@ private: // [/SL:KB] U8* mCollisionSegments; bool mRenderCollision; - BOOL mRenderSelection; + bool mRenderSelection; S32 mCollisionBanned; LLFrameTimer mCollisionTimer; LLViewerTexture* mBlockedImage; diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index e7f49d7a1c..698b0fdc71 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -62,7 +62,7 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_ // Aurora Sim mRegionSize(S32(region_width_meters)), // Aurora Sim - mDirty( FALSE ), + mDirty( false ), mTimeSinceLastUpdate(), mOverlayTextureIdx(-1), mVertexCount(0), @@ -72,9 +72,9 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_ { // Create a texture to hold color information. // 4 components - // Use mipmaps = FALSE, clamped, NEAREST filter, for sharp edges + // Use mipmaps = false, clamped, NEAREST filter, for sharp edges mImageRaw = new LLImageRaw(mParcelGridsPerEdge, mParcelGridsPerEdge, OVERLAY_IMG_COMPONENTS); - mTexture = LLViewerTextureManager::getLocalTexture(mImageRaw.get(), FALSE); + mTexture = LLViewerTextureManager::getLocalTexture(mImageRaw.get(), false); mTexture->setAddressMode(LLTexUnit::TAM_CLAMP); mTexture->setFilteringOption(LLTexUnit::TFO_POINT); @@ -123,28 +123,28 @@ LLViewerParcelOverlay::~LLViewerParcelOverlay() //--------------------------------------------------------------------------- // ACCESSORS //--------------------------------------------------------------------------- -BOOL LLViewerParcelOverlay::isOwned(const LLVector3& pos) const +bool LLViewerParcelOverlay::isOwned(const LLVector3& pos) const { S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS); S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS); return (PARCEL_PUBLIC != ownership(row, column)); } -BOOL LLViewerParcelOverlay::isOwnedSelf(const LLVector3& pos) const +bool LLViewerParcelOverlay::isOwnedSelf(const LLVector3& pos) const { S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS); S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS); return (PARCEL_SELF == ownership(row, column)); } -BOOL LLViewerParcelOverlay::isOwnedGroup(const LLVector3& pos) const +bool LLViewerParcelOverlay::isOwnedGroup(const LLVector3& pos) const { S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS); S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS); return (PARCEL_GROUP == ownership(row, column)); } -BOOL LLViewerParcelOverlay::isOwnedOther(const LLVector3& pos) const +bool LLViewerParcelOverlay::isOwnedOther(const LLVector3& pos) const { S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS); S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS); @@ -267,7 +267,7 @@ bool LLViewerParcelOverlay::encroachesOnNearbyParcel(const std::vector& return false; } -BOOL LLViewerParcelOverlay::isSoundLocal(const LLVector3& pos) const +bool LLViewerParcelOverlay::isSoundLocal(const LLVector3& pos) const { S32 row = S32(pos.mV[VY] / PARCEL_GRID_STEP_METERS); S32 column = S32(pos.mV[VX] / PARCEL_GRID_STEP_METERS); @@ -482,7 +482,7 @@ void LLViewerParcelOverlay::updatePropertyLines() new_coord_array.reserve(256); U8 overlay = 0; - BOOL add_edge = FALSE; + bool add_edge = false; const F32 GRID_STEP = PARCEL_GRID_STEP_METERS; const S32 GRIDS_PER_EDGE = mParcelGridsPerEdge; @@ -536,7 +536,7 @@ void LLViewerParcelOverlay::updatePropertyLines() } else { - add_edge = TRUE; + add_edge = true; } if (add_edge) @@ -607,7 +607,7 @@ void LLViewerParcelOverlay::updatePropertyLines() } else { - add_edge = TRUE; + add_edge = true; } if (add_edge) @@ -692,7 +692,7 @@ void LLViewerParcelOverlay::updatePropertyLines() } // Everything's clean now - mDirty = FALSE; + mDirty = false; } @@ -867,7 +867,7 @@ void LLViewerParcelOverlay::addPropertyLine( void LLViewerParcelOverlay::setDirty() { - mDirty = TRUE; + mDirty = true; } void LLViewerParcelOverlay::updateGL() diff --git a/indra/newview/llviewerparceloverlay.h b/indra/newview/llviewerparceloverlay.h index 0e30b05dab..3a3820ac0a 100644 --- a/indra/newview/llviewerparceloverlay.h +++ b/indra/newview/llviewerparceloverlay.h @@ -50,10 +50,10 @@ public: // ACCESS LLViewerTexture* getTexture() const { return mTexture; } - BOOL isOwned(const LLVector3& pos) const; - BOOL isOwnedSelf(const LLVector3& pos) const; - BOOL isOwnedGroup(const LLVector3& pos) const; - BOOL isOwnedOther(const LLVector3& pos) const; + bool isOwned(const LLVector3& pos) const; + bool isOwnedSelf(const LLVector3& pos) const; + bool isOwnedGroup(const LLVector3& pos) const; + bool isOwnedOther(const LLVector3& pos) const; // "encroaches" means the prim hangs over the parcel, but its center // might be in another parcel. for now, we simply test axis aligned @@ -62,9 +62,9 @@ public: bool encroachesOnUnowned(const std::vector& boxes) const; bool encroachesOnNearbyParcel(const std::vector& boxes) const; - BOOL isSoundLocal(const LLVector3& pos) const; + bool isSoundLocal(const LLVector3& pos) const; - BOOL isBuildCameraAllowed(const LLVector3& pos) const; + bool isBuildCameraAllowed(const LLVector3& pos) const; F32 getOwnedRatio() const; // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3) const U8* getOwnership() const { return mOwnership; } @@ -128,7 +128,7 @@ private: U8 *mOwnership; // Update propery lines and overlay texture - BOOL mDirty; + bool mDirty; LLFrameTimer mTimeSinceLastUpdate; S32 mOverlayTextureIdx; diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 423a59e5b6..139b923305 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -137,7 +137,7 @@ LLViewerPartGroup::LLViewerPartGroup(const LLVector3 ¢er_agent, const F32 bo : mHud(hud) { mVOPartGroupp = NULL; - mUniformParticles = TRUE; + mUniformParticles = true; mRegionp = LLWorld::getInstance()->getRegionFromPosAgent(center_agent); llassert_always(center_agent.isFinite()); @@ -220,48 +220,48 @@ void LLViewerPartGroup::cleanup() } } -BOOL LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size) +bool LLViewerPartGroup::posInGroup(const LLVector3 &pos, const F32 desired_size) { if ((pos.mV[VX] < mMinObjPos.mV[VX]) || (pos.mV[VY] < mMinObjPos.mV[VY]) || (pos.mV[VZ] < mMinObjPos.mV[VZ])) { - return FALSE; + return false; } if ((pos.mV[VX] > mMaxObjPos.mV[VX]) || (pos.mV[VY] > mMaxObjPos.mV[VY]) || (pos.mV[VZ] > mMaxObjPos.mV[VZ])) { - return FALSE; + return false; } if (desired_size > 0 && (desired_size < mBoxRadius*0.5f || desired_size > mBoxRadius*2.f)) { - return FALSE; + return false; } - return TRUE; + return true; } -BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) +bool LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) { if (part->mFlags & LLPartData::LL_PART_HUD && !mHud) { - return FALSE; + return false; } - BOOL uniform_part = part->mScale.mV[0] == part->mScale.mV[1] && + bool uniform_part = part->mScale.mV[0] == part->mScale.mV[1] && !(part->mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK); if (!posInGroup(part->mPosAgent, desired_size) || (mUniformParticles && !uniform_part) || (!mUniformParticles && uniform_part)) { - return FALSE; + return false; } gPipeline.markRebuild(mVOPartGroupp->mDrawable, LLDrawable::REBUILD_ALL); @@ -269,7 +269,7 @@ BOOL LLViewerPartGroup::addPart(LLViewerPart* part, F32 desired_size) mParticles.push_back(part); part->mSkipOffset=mSkippedTime; LLViewerPartSim::incPartCount(1); - return TRUE; + return true; } @@ -525,11 +525,11 @@ void LLViewerPartSim::destroyClass() } //static -BOOL LLViewerPartSim::shouldAddPart() +bool LLViewerPartSim::shouldAddPart() { if (sParticleCount >= MAX_PART_COUNT) { - return FALSE; + return false; } if (sParticleCount > PART_THROTTLE_THRESHOLD*sMaxParticleCount) @@ -540,7 +540,7 @@ BOOL LLViewerPartSim::shouldAddPart() if (ll_frand() < frac) { // Skip... - return FALSE; + return false; } } @@ -548,10 +548,10 @@ BOOL LLViewerPartSim::shouldAddPart() const F32 MIN_FRAME_RATE_FOR_NEW_PARTICLES = 4.f; if (gFPSClamped < MIN_FRAME_RATE_FOR_NEW_PARTICLES) { - return FALSE; + return false; } - return TRUE; + return true; } void LLViewerPartSim::addPart(LLViewerPart* part) @@ -703,30 +703,30 @@ void LLViewerPartSim::updateSimulation() if (!mViewerPartSources[i]->isDead()) { - BOOL upd = TRUE; + bool upd = true; LLViewerObject* vobj = mViewerPartSources[i]->mSourceObjectp; if (vobj && vobj->isAvatar() && ((LLVOAvatar*)vobj)->isInMuteList()) { - upd = FALSE; + upd = false; } if(vobj && vobj->isOwnerInMuteList(mViewerPartSources[i]->getOwnerUUID())) { - upd = FALSE; + upd = false; } if (upd && vobj && (vobj->getPCode() == LL_PCODE_VOLUME)) { if(vobj->getAvatar() && vobj->getAvatar()->isTooComplex() && vobj->getAvatar()->isTooSlow()) { - upd = FALSE; + upd = false; } LLVOVolume* vvo = (LLVOVolume *)vobj; if (!LLPipeline::sRenderAttachedParticles && vvo && vvo->isAttachment()) { - upd = FALSE; + upd = false; } } diff --git a/indra/newview/llviewerpartsim.h b/indra/newview/llviewerpartsim.h index ab1cd715ab..ffc3544c08 100644 --- a/indra/newview/llviewerpartsim.h +++ b/indra/newview/llviewerpartsim.h @@ -95,11 +95,11 @@ public: void cleanup(); - BOOL addPart(LLViewerPart* part, const F32 desired_size = -1.f); + bool addPart(LLViewerPart* part, const F32 desired_size = -1.f); void updateParticles(const F32 lastdt); - BOOL posInGroup(const LLVector3 &pos, const F32 desired_size = -1.f); + bool posInGroup(const LLVector3 &pos, const F32 desired_size = -1.f); void shift(const LLVector3 &offset); @@ -117,7 +117,7 @@ public: LLPointer mVOPartGroupp; - BOOL mUniformParticles; + bool mUniformParticles; U32 mID; F32 mSkippedTime; @@ -152,7 +152,7 @@ public: void cleanupRegion(LLViewerRegion *regionp); - static BOOL shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping) + static bool shouldAddPart(); // Just decides whether this particle should be added or not (for particle count capping) F32 maxRate() // Return maximum particle generation rate { if (sParticleCount >= MAX_PART_COUNT) @@ -177,7 +177,7 @@ public: friend class LLViewerPartGroup; - BOOL aboveParticleLimit() const { return sParticleCount > sMaxParticleCount; } + bool aboveParticleLimit() const { return sParticleCount > sMaxParticleCount; } static void setMaxPartCount(const S32 max_parts) { sMaxParticleCount = max_parts; } static S32 getMaxPartCount() { return sMaxParticleCount; } diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp index 1751ee1ebb..aa62df176f 100644 --- a/indra/newview/llviewerpartsource.cpp +++ b/indra/newview/llviewerpartsource.cpp @@ -66,8 +66,8 @@ LLViewerPartSource::LLViewerPartSource(const U32 type) : { mLastUpdateTime = 0.f; mLastPartTime = 0.f; - mIsDead = FALSE; - mIsSuspended = FALSE; + mIsDead = false; + mIsSuspended = false; static U32 id_seed = 0; mID = ++id_seed; @@ -78,7 +78,7 @@ LLViewerPartSource::LLViewerPartSource(const U32 type) : void LLViewerPartSource::setDead() { - mIsDead = TRUE; + mIsDead = true; } @@ -122,7 +122,7 @@ LLViewerPartSourceScript::LLViewerPartSourceScript(LLViewerObject *source_objp) void LLViewerPartSourceScript::setDead() { - mIsDead = TRUE; + mIsDead = true; mSourceObjectp = NULL; mTargetObjectp = NULL; } @@ -207,17 +207,17 @@ void LLViewerPartSourceScript::update(const F32 dt) } } - BOOL first_run = FALSE; + bool first_run = false; if (old_update_time <= 0.f) { - first_run = TRUE; + first_run = true; } F32 max_time = llmax(1.f, 10.f*mPartSysData.mBurstRate); dt_update = llmin(max_time, dt_update); while ((dt_update > mPartSysData.mBurstRate) || first_run) { - first_run = FALSE; + first_run = false; // Update the rotation of the particle source by the angular velocity // First check to see if there is still an angular velocity. @@ -586,7 +586,7 @@ LLViewerPartSourceSpiral::LLViewerPartSourceSpiral(const LLVector3 &pos) : void LLViewerPartSourceSpiral::setDead() { - mIsDead = TRUE; + mIsDead = true; mSourceObjectp = NULL; } @@ -690,7 +690,7 @@ LLViewerPartSourceBeam::~LLViewerPartSourceBeam() void LLViewerPartSourceBeam::setDead() { - mIsDead = TRUE; + mIsDead = true; mSourceObjectp = NULL; mTargetObjectp = NULL; } @@ -843,7 +843,7 @@ LLViewerPartSourceChat::LLViewerPartSourceChat(const LLVector3 &pos) : void LLViewerPartSourceChat::setDead() { - mIsDead = TRUE; + mIsDead = true; mSourceObjectp = NULL; } diff --git a/indra/newview/llviewerpartsource.h b/indra/newview/llviewerpartsource.h index 504229e81f..37c1d451ee 100644 --- a/indra/newview/llviewerpartsource.h +++ b/indra/newview/llviewerpartsource.h @@ -58,12 +58,12 @@ public: LLViewerPartSource(const U32 type); - virtual void update(const F32 dt); // Return FALSE if this source is dead... + virtual void update(const F32 dt); // Return false if this source is dead... virtual void setDead(); - BOOL isDead() const { return mIsDead; } - void setSuspended( BOOL state ) { mIsSuspended = state; } - BOOL isSuspended() const { return mIsSuspended; } + bool isDead() const { return mIsDead; } + void setSuspended( bool state ) { mIsSuspended = state; } + bool isSuspended() const { return mIsSuspended; } U32 getType() const { return mType; } static void updatePart(LLViewerPart &part, const F32 dt); void setOwnerUUID(const LLUUID& owner_id) { mOwnerUUID = owner_id; } @@ -81,8 +81,8 @@ public: protected: U32 mType; - BOOL mIsDead; - BOOL mIsSuspended; + bool mIsDead; + bool mIsSuspended; F32 mLastUpdateTime; F32 mLastPartTime; LLUUID mOwnerUUID; @@ -112,7 +112,7 @@ public: /*virtual*/ void setDead(); - BOOL updateFromMesg(); + bool updateFromMesg(); // Returns a new particle source to attach to an object... static LLPointer unpackPSS(LLViewerObject *source_objp, LLPointer pssp, const S32 block_num); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 7a4613cf79..c58da9e45b 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -107,7 +107,7 @@ const S32 MAX_CAP_REQUEST_ATTEMPTS = 30; const U32 DEFAULT_MAX_REGION_WIDE_PRIM_COUNT = 15000; -BOOL LLViewerRegion::sVOCacheCullingEnabled = FALSE; +bool LLViewerRegion::sVOCacheCullingEnabled = false; S32 LLViewerRegion::sLastCameraUpdated = 0; S32 LLViewerRegion::sNewObjectCreationThrottle = -1; LLViewerRegion::vocache_entry_map_t LLViewerRegion::sRegionCacheCleanup; @@ -635,7 +635,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mTimeDilation(1.0f), mName(""), mZoning(""), - mIsEstateManager(FALSE), + mIsEstateManager(false), mRegionFlags( REGION_FLAGS_DEFAULT ), mRegionProtocols( 0 ), mSimAccess( SIM_ACCESS_MIN ), @@ -652,17 +652,17 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mProductName("unknown"), mHttpUrl(""), // [UDP Assets] mViewerAssetUrl(""), - mCacheLoaded(FALSE), - mCacheDirty(FALSE), - mReleaseNotesRequested(FALSE), + mCacheLoaded(false), + mCacheDirty(false), + mReleaseNotesRequested(false), mCapabilitiesState(CAPABILITIES_STATE_INIT), mSimulatorFeaturesReceived(false), mBitsReceived(0.f), mPacketsReceived(0.f), - mDead(FALSE), + mDead(false), mLastVisitedEntry(NULL), mInvisibilityCheckHistory(-1), - mPaused(FALSE), + mPaused(false), mRegionCacheHitCount(0), mRegionCacheMissCount(0), mInterestListMode(IL_MODE_DEFAULT), @@ -771,7 +771,7 @@ static LLTrace::BlockTimerStatHandle FTM_SAVE_REGION_CACHE("Save Region Cache"); LLViewerRegion::~LLViewerRegion() { LL_PROFILE_ZONE_SCOPED; - mDead = TRUE; + mDead = true; mImpl->mActiveSet.clear(); mImpl->mVisibleEntries.clear(); mImpl->mVisibleGroups.clear(); @@ -840,7 +840,7 @@ void LLViewerRegion::loadObjectCache() } // Presume success. If it fails, we don't want to try again. - mCacheLoaded = TRUE; + mCacheLoaded = true; if(LLVOCache::instanceExists()) { @@ -850,7 +850,7 @@ void LLViewerRegion::loadObjectCache() if (mImpl->mCacheMap.empty()) { - mCacheDirty = TRUE; + mCacheDirty = true; } } } @@ -877,7 +877,7 @@ void LLViewerRegion::saveObjectCache() instance.writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, removal_enabled); instance.writeGenericExtrasToCache(mHandle, mImpl->mCacheID, mImpl->mGLTFOverridesLLSD, mCacheDirty, removal_enabled); - mCacheDirty = FALSE; + mCacheDirty = false; } // Map of LLVOCacheEntry takes time to release, store map for cleanup on idle @@ -913,7 +913,7 @@ F32 LLViewerRegion::getWaterHeight() const return mImpl->mLandp->getWaterHeight(); } -BOOL LLViewerRegion::isVoiceEnabled() const +bool LLViewerRegion::isVoiceEnabled() const { return getRegionFlag(REGION_FLAGS_ALLOW_VOICE); } @@ -992,7 +992,7 @@ void LLViewerRegion::setRegionNameAndZone (const std::string& name_zone) LLStringUtil::stripNonprintable(mZoning); } -BOOL LLViewerRegion::canManageEstate() const +bool LLViewerRegion::canManageEstate() const { return gAgent.isGodlike() || isEstateManager() @@ -1244,7 +1244,7 @@ void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry, bool for_rendering) //will remove it from the object cache, real deletion entry->setState(LLVOCacheEntry::INACTIVE); entry->removeOctreeEntry(); - entry->setValid(FALSE); + entry->setValid(false); // TODO kill extras/material overrides cache too } @@ -1573,12 +1573,12 @@ void LLViewerRegion::createVisibleObjects(F32 max_time) } if(mImpl->mWaitingList.empty()) { - mImpl->mVOCachePartition->setCullHistory(FALSE); + mImpl->mVOCachePartition->setCullHistory(false); return; } S32 throttle = sNewObjectCreationThrottle; - BOOL has_new_obj = FALSE; + bool has_new_obj = false; LLTimer update_timer; for(LLVOCacheEntry::vocache_entry_priority_list_t::iterator iter = mImpl->mWaitingList.begin(); iter != mImpl->mWaitingList.end(); ++iter) @@ -1588,7 +1588,7 @@ void LLViewerRegion::createVisibleObjects(F32 max_time) if(vo_entry->getState() < LLVOCacheEntry::WAITING) { addNewObject(vo_entry); - has_new_obj = TRUE; + has_new_obj = true; if(throttle > 0 && !(--throttle) && update_timer.getElapsedTimeF32() > max_time) { break; @@ -1608,7 +1608,7 @@ void LLViewerRegion::clearCachedVisibleObjects() //reset all occluders mImpl->mVOCachePartition->resetOccluders(); - mPaused = TRUE; + mPaused = true; //clean visible entries for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mVisibleEntries.begin(); iter != mImpl->mVisibleEntries.end();) @@ -1708,7 +1708,7 @@ void LLViewerRegion::idleUpdate(F32 max_update_time) } if(mPaused) { - mPaused = FALSE; //unpause. + mPaused = false; //unpause. } LLViewerCamera::eCameraID old_camera_id = LLViewerCamera::sCurCameraID; @@ -1781,7 +1781,7 @@ void LLViewerRegion::calcNewObjectCreationThrottle() LLVOCacheEntry::updateDebugSettings(); } -BOOL LLViewerRegion::isViewerCameraStatic() +bool LLViewerRegion::isViewerCameraStatic() { return sLastCameraUpdated < LLViewerOctreeEntryData::getCurrentFrame(); } @@ -2224,27 +2224,27 @@ S32 LLViewerRegion::getHttpResponderID() const return mImpl->mHttpResponderID; } -BOOL LLViewerRegion::pointInRegionGlobal(const LLVector3d &point_global) const +bool LLViewerRegion::pointInRegionGlobal(const LLVector3d &point_global) const { LLVector3 pos_region = getPosRegionFromGlobal(point_global); if (pos_region.mV[VX] < 0) { - return FALSE; + return false; } if (pos_region.mV[VX] >= mWidth) { - return FALSE; + return false; } if (pos_region.mV[VY] < 0) { - return FALSE; + return false; } if (pos_region.mV[VY] >= mWidth) { - return FALSE; + return false; } - return TRUE; + return true; } LLVector3 LLViewerRegion::getPosRegionFromGlobal(const LLVector3d &point_global) const @@ -2297,7 +2297,7 @@ const LLViewerRegion::tex_matrix_t& LLViewerRegion::getWorldMapTiles() const for (U32 y = 0; y != totalY; ++y) { const std::string map_url = LFSimFeatureHandler::instance().mapServerURL() + llformat("map-1-%d-%d-objects.jpg", gridX + x, gridY + y); - LLPointer tex(LLViewerTextureManager::getFetchedTextureFromUrl(map_url, FTT_MAP_TILE, TRUE, + LLPointer tex(LLViewerTextureManager::getFetchedTextureFromUrl(map_url, FTT_MAP_TILE, true, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); mWorldMapTiles.push_back(tex); tex->setBoostLevel(LLViewerTexture::BOOST_MAP); @@ -2315,30 +2315,30 @@ bool LLViewerRegion::isAlive() const return mAlive; } -//BOOL LLViewerRegion::isOwnedSelf(const LLVector3& pos) +//bool LLViewerRegion::isOwnedSelf(const LLVector3& pos) // [SL:KB] - Patch: UI-SidepanelPeople | Checked: 2010-12-02 (Catznip-2.4.0g) | Added: Catznip-2.4.0g -BOOL LLViewerRegion::isOwnedSelf(const LLVector3& pos) const +bool LLViewerRegion::isOwnedSelf(const LLVector3& pos) const // [/SL:KB] { if (mParcelOverlay) { return mParcelOverlay->isOwnedSelf(pos); } else { - return FALSE; + return false; } } // Owned by a group you belong to? (officer or member) -//BOOL LLViewerRegion::isOwnedGroup(const LLVector3& pos) +//bool LLViewerRegion::isOwnedGroup(const LLVector3& pos) // [SL:KB] - Patch: UI-SidepanelPeople | Checked: 2010-12-02 (Catznip-2.4.0g) | Added: Catznip-2.4.0g -BOOL LLViewerRegion::isOwnedGroup(const LLVector3& pos) const +bool LLViewerRegion::isOwnedGroup(const LLVector3& pos) const // [/SL:KB] { if (mParcelOverlay) { return mParcelOverlay->isOwnedGroup(pos); } else { - return FALSE; + return false; } } @@ -2383,7 +2383,7 @@ public: LLSD::array_iterator locs_it = locs.beginArray(), agents_it = agents.beginArray(); - BOOL has_agent_data = input["body"].has("AgentData"); + bool has_agent_data = input["body"].has("AgentData"); for(int i=0; locs_it != locs.endArray(); @@ -2455,7 +2455,7 @@ void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg) msg->getS16Fast(_PREHASH_Index, _PREHASH_You, agent_index); msg->getS16Fast(_PREHASH_Index, _PREHASH_Prey, target_index); - BOOL has_agent_data = msg->has(_PREHASH_AgentData); + bool has_agent_data = msg->has(_PREHASH_AgentData); S32 count = msg->getNumberOfBlocksFast(_PREHASH_Location); for(S32 i = 0; i < count; i++) { @@ -3010,7 +3010,7 @@ void LLViewerRegion::requestCacheMisses() } LLMessageSystem* msg = gMessageSystem; - BOOL start_new_message = TRUE; + bool start_new_message = true; S32 blocks = 0; //send requests for all cache-missed objects @@ -3022,7 +3022,7 @@ void LLViewerRegion::requestCacheMisses() msg->nextBlockFast(_PREHASH_AgentData); msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - start_new_message = FALSE; + start_new_message = false; } msg->nextBlockFast(_PREHASH_ObjectData); @@ -3036,7 +3036,7 @@ void LLViewerRegion::requestCacheMisses() if (blocks >= 255) { sendReliableMessage(); - start_new_message = TRUE; + start_new_message = true; blocks = 0; } } @@ -3047,7 +3047,7 @@ void LLViewerRegion::requestCacheMisses() sendReliableMessage(); } - mCacheDirty = TRUE ; + mCacheDirty = true ; // LL_INFOS() << "KILLDEBUG Sent cache miss full " << full_count << " crc " << crc_count << LL_ENDL; LLViewerStatsRecorder::instance().requestCacheMissesEvent(mCacheMissList.size()); @@ -3800,12 +3800,12 @@ void LLViewerRegion::showReleaseNotes() if (url.empty()) { // HACK haven't received the capability yet, we'll wait until // it arives. - mReleaseNotesRequested = TRUE; + mReleaseNotesRequested = true; return; } LLWeb::loadURL(url); - mReleaseNotesRequested = FALSE; + mReleaseNotesRequested = false; } std::string LLViewerRegion::getDescription() const diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 3c810f15cb..973867d87a 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -120,27 +120,27 @@ public: //void setAgentOffset(const LLVector3d &offset); void updateRenderMatrix(); - void setAllowDamage(BOOL b) { setRegionFlag(REGION_FLAGS_ALLOW_DAMAGE, b); } - void setAllowLandmark(BOOL b) { setRegionFlag(REGION_FLAGS_ALLOW_LANDMARK, b); } - void setAllowSetHome(BOOL b) { setRegionFlag(REGION_FLAGS_ALLOW_SET_HOME, b); } - void setResetHomeOnTeleport(BOOL b) { setRegionFlag(REGION_FLAGS_RESET_HOME_ON_TELEPORT, b); } - void setSunFixed(BOOL b) { setRegionFlag(REGION_FLAGS_SUN_FIXED, b); } - //void setBlockFly(BOOL b) { setRegionFlag(REGION_FLAGS_BLOCK_FLY, b); } Never used - void setAllowDirectTeleport(BOOL b) { setRegionFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT, b); } + void setAllowDamage(bool b) { setRegionFlag(REGION_FLAGS_ALLOW_DAMAGE, b); } + void setAllowLandmark(bool b) { setRegionFlag(REGION_FLAGS_ALLOW_LANDMARK, b); } + void setAllowSetHome(bool b) { setRegionFlag(REGION_FLAGS_ALLOW_SET_HOME, b); } + void setResetHomeOnTeleport(bool b) { setRegionFlag(REGION_FLAGS_RESET_HOME_ON_TELEPORT, b); } + void setSunFixed(bool b) { setRegionFlag(REGION_FLAGS_SUN_FIXED, b); } + //void setBlockFly(bool b) { setRegionFlag(REGION_FLAGS_BLOCK_FLY, b); } Never used + void setAllowDirectTeleport(bool b) { setRegionFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT, b); } - inline BOOL getAllowDamage() const; - inline BOOL getAllowLandmark() const; - inline BOOL getAllowSetHome() const; - inline BOOL getResetHomeOnTeleport() const; - inline BOOL getSunFixed() const; - inline BOOL getBlockFly() const; - inline BOOL getAllowDirectTeleport() const; - inline BOOL isPrelude() const; - inline BOOL getAllowTerraform() const; - inline BOOL getRestrictPushObject() const; - inline BOOL getAllowEnvironmentOverride() const; - inline BOOL getReleaseNotesRequested() const; + inline bool getAllowDamage() const; + inline bool getAllowLandmark() const; + inline bool getAllowSetHome() const; + inline bool getResetHomeOnTeleport() const; + inline bool getSunFixed() const; + inline bool getBlockFly() const; + inline bool getAllowDirectTeleport() const; + inline bool isPrelude() const; + inline bool getAllowTerraform() const; + inline bool getRestrictPushObject() const; + inline bool getAllowEnvironmentOverride() const; + inline bool getReleaseNotesRequested() const; // bool isAlive(); // can become false if circuit disconnects // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3) @@ -156,7 +156,7 @@ public: void rebuildWater(); // Aurora Sim - BOOL isVoiceEnabled() const; + bool isVoiceEnabled() const; void setBillableFactor(F32 billable_factor) { mBillableFactor = billable_factor; } F32 getBillableFactor() const { return mBillableFactor; } @@ -179,13 +179,13 @@ public: LLViewerParcelOverlay *getParcelOverlay() const { return mParcelOverlay; } - inline void setRegionFlag(U64 flag, BOOL on); - inline BOOL getRegionFlag(U64 flag) const; + inline void setRegionFlag(U64 flag, bool on); + inline bool getRegionFlag(U64 flag) const; void setRegionFlags(U64 flags); U64 getRegionFlags() const { return mRegionFlags; } - inline void setRegionProtocol(U64 protocol, BOOL on); - BOOL getRegionProtocol(U64 protocol) const; + inline void setRegionProtocol(U64 protocol, bool on); + bool getRegionProtocol(U64 protocol) const; void setRegionProtocols(U64 protocols) { mRegionProtocols = protocols; } U64 getRegionProtocols() const { return mRegionProtocols; } @@ -208,9 +208,9 @@ public: const LLUUID& getOwner() const; // Is the current agent on the estate manager list for this region? - void setIsEstateManager(BOOL b) { mIsEstateManager = b; } - BOOL isEstateManager() const { return mIsEstateManager; } - BOOL canManageEstate() const; + void setIsEstateManager(bool b) { mIsEstateManager = b; } + bool isEstateManager() const { return mIsEstateManager; } + bool canManageEstate() const; void setSimAccess(U8 sim_access) { mSimAccess = sim_access; } U8 getSimAccess() const { return mSimAccess; } @@ -242,7 +242,7 @@ public: static void processRegionInfo(LLMessageSystem* msg, void**); //check if the viewer camera is static - static BOOL isViewerCameraStatic(); + static bool isViewerCameraStatic(); static void calcNewObjectCreationThrottle(); void setCacheID(const LLUUID& id); @@ -317,7 +317,7 @@ public: const LLUUID& getRegionID() const; void setRegionID(const LLUUID& region_id); - BOOL pointInRegionGlobal(const LLVector3d &point_global) const; + bool pointInRegionGlobal(const LLVector3d &point_global) const; LLVector3 getPosRegionFromGlobal(const LLVector3d &point_global) const; LLVector3 getPosRegionFromAgent(const LLVector3 &agent_pos) const; LLVector3 getPosAgentFromRegion(const LLVector3 ®ion_pos) const; @@ -326,15 +326,15 @@ public: LLVLComposition *getComposition() const; F32 getCompositionXY(const S32 x, const S32 y) const; -// BOOL isOwnedSelf(const LLVector3& pos); +// bool isOwnedSelf(const LLVector3& pos); // // // Owned by a group you belong to? (officer OR member) -// BOOL isOwnedGroup(const LLVector3& pos); +// bool isOwnedGroup(const LLVector3& pos); // [SL:KB] - Patch: UI-SidepanelPeople | Checked: 2010-12-02 (Catznip-2.4.0g) | Added: Catznip-2.4.0g - BOOL isOwnedSelf(const LLVector3& pos) const; + bool isOwnedSelf(const LLVector3& pos) const; // Owned by a group you belong to? (officer OR member) - BOOL isOwnedGroup(const LLVector3& pos) const; + bool isOwnedGroup(const LLVector3& pos) const; // [/SL:KB] // deal with map object updates in the world. @@ -439,12 +439,12 @@ public: void removeFromCreatedList(U32 local_id); void addToCreatedList(U32 local_id); - BOOL isPaused() const {return mPaused;} + bool isPaused() const {return mPaused;} S32 getLastUpdate() const {return mLastUpdate;} std::string getSimHostName(); - static BOOL isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;} + static bool isNewObjectCreationThrottleDisabled() {return sNewObjectCreationThrottle < 0;} // rebuild reflection probe list void updateReflectionProbes(); @@ -501,7 +501,7 @@ public: std::vector mMapAvatars; std::vector mMapAvatarIDs; - static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not. + static bool sVOCacheCullingEnabled; //vo cache culling enabled or not. static S32 sLastCameraUpdated; LLFrameTimer & getRenderInfoRequestTimer() { return mRenderInfoRequestTimer; }; @@ -556,7 +556,7 @@ public: std::string mZoning; // Is this agent on the estate managers list for this region? - BOOL mIsEstateManager; + bool mIsEstateManager; U32 mPacketsIn; U32Bits mBitsIn, @@ -593,13 +593,13 @@ public: // Maps local ids to cache entries. // Regions can have order 10,000 objects, so assume // a structure of size 2^14 = 16,000 - BOOL mCacheLoaded; - BOOL mCacheDirty; - BOOL mAlive; // can become false if circuit disconnects - BOOL mSimulatorFeaturesReceived; - BOOL mReleaseNotesRequested; - BOOL mDead; //if true, this region is in the process of deleting. - BOOL mPaused; //pause processing the objects in the region + bool mCacheLoaded; + bool mCacheDirty; + bool mAlive; // can become false if circuit disconnects + bool mSimulatorFeaturesReceived; + bool mReleaseNotesRequested; + bool mDead; //if true, this region is in the process of deleting. + bool mPaused; //pause processing the objects in the region typedef enum { @@ -658,12 +658,12 @@ public: }; -inline BOOL LLViewerRegion::getRegionProtocol(U64 protocol) const +inline bool LLViewerRegion::getRegionProtocol(U64 protocol) const { return ((mRegionProtocols & protocol) != 0); } -inline void LLViewerRegion::setRegionProtocol(U64 protocol, BOOL on) +inline void LLViewerRegion::setRegionProtocol(U64 protocol, bool on) { if (on) { @@ -675,12 +675,12 @@ inline void LLViewerRegion::setRegionProtocol(U64 protocol, BOOL on) } } -inline BOOL LLViewerRegion::getRegionFlag(U64 flag) const +inline bool LLViewerRegion::getRegionFlag(U64 flag) const { return ((mRegionFlags & flag) != 0); } -inline void LLViewerRegion::setRegionFlag(U64 flag, BOOL on) +inline void LLViewerRegion::setRegionFlag(U64 flag, bool on) { if (on) { @@ -692,62 +692,62 @@ inline void LLViewerRegion::setRegionFlag(U64 flag, BOOL on) } } -inline BOOL LLViewerRegion::getAllowDamage() const +inline bool LLViewerRegion::getAllowDamage() const { return ((mRegionFlags & REGION_FLAGS_ALLOW_DAMAGE) !=0); } -inline BOOL LLViewerRegion::getAllowLandmark() const +inline bool LLViewerRegion::getAllowLandmark() const { return ((mRegionFlags & REGION_FLAGS_ALLOW_LANDMARK) !=0); } -inline BOOL LLViewerRegion::getAllowSetHome() const +inline bool LLViewerRegion::getAllowSetHome() const { return ((mRegionFlags & REGION_FLAGS_ALLOW_SET_HOME) != 0); } -inline BOOL LLViewerRegion::getResetHomeOnTeleport() const +inline bool LLViewerRegion::getResetHomeOnTeleport() const { return ((mRegionFlags & REGION_FLAGS_RESET_HOME_ON_TELEPORT) !=0); } -inline BOOL LLViewerRegion::getSunFixed() const +inline bool LLViewerRegion::getSunFixed() const { return ((mRegionFlags & REGION_FLAGS_SUN_FIXED) !=0); } -inline BOOL LLViewerRegion::getBlockFly() const +inline bool LLViewerRegion::getBlockFly() const { return ((mRegionFlags & REGION_FLAGS_BLOCK_FLY) !=0); } -inline BOOL LLViewerRegion::getAllowDirectTeleport() const +inline bool LLViewerRegion::getAllowDirectTeleport() const { return ((mRegionFlags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT) !=0); } -inline BOOL LLViewerRegion::isPrelude() const +inline bool LLViewerRegion::isPrelude() const { return is_prelude( mRegionFlags ); } -inline BOOL LLViewerRegion::getAllowTerraform() const +inline bool LLViewerRegion::getAllowTerraform() const { return ((mRegionFlags & REGION_FLAGS_BLOCK_TERRAFORM) == 0); } -inline BOOL LLViewerRegion::getRestrictPushObject() const +inline bool LLViewerRegion::getRestrictPushObject() const { return ((mRegionFlags & REGION_FLAGS_RESTRICT_PUSHOBJECT) != 0); } -inline BOOL LLViewerRegion::getAllowEnvironmentOverride() const +inline bool LLViewerRegion::getAllowEnvironmentOverride() const { return ((mRegionFlags & REGION_FLAGS_ALLOW_ENVIRONMENT_OVERRIDE) != 0); } -inline BOOL LLViewerRegion::getReleaseNotesRequested() const +inline bool LLViewerRegion::getReleaseNotesRequested() const { return mReleaseNotesRequested; } diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 5084effc59..b04916d966 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -64,7 +64,7 @@ using std::pair; using std::make_pair; using std::string; -BOOL LLViewerShaderMgr::sInitialized = FALSE; +bool LLViewerShaderMgr::sInitialized = false; bool LLViewerShaderMgr::sSkipReload = false; LLVector4 gShinyOrigin; @@ -453,7 +453,7 @@ void LLViewerShaderMgr::setShaders() gPipeline.mShadersLoaded = true; - BOOL loaded = loadShadersWater(); + bool loaded = loadShadersWater(); if (loaded) { @@ -598,7 +598,7 @@ std::string LLViewerShaderMgr::loadBasicShaders() attribs["MAX_JOINTS_PER_MESH_OBJECT"] = boost::lexical_cast(LLSkinningUtil::getMaxJointCount()); - BOOL ssr = gSavedSettings.getBOOL("RenderScreenSpaceReflections"); + bool ssr = gSavedSettings.getBOOL("RenderScreenSpaceReflections"); bool has_reflection_probes = gSavedSettings.getBOOL("RenderReflectionsEnabled") && gGLManager.mGLVersion > 3.99f; @@ -684,11 +684,11 @@ std::string LLViewerShaderMgr::loadBasicShaders() return std::string(); } -BOOL LLViewerShaderMgr::loadShadersWater() +bool LLViewerShaderMgr::loadShadersWater() { LL_PROFILE_ZONE_SCOPED; - BOOL success = TRUE; - BOOL terrainWaterSuccess = TRUE; + bool success = true; + bool terrainWaterSuccess = true; bool use_sun_shadow = mShaderLevel[SHADER_DEFERRED] > 1 && gSavedSettings.getS32("RenderShadowDetail") > 0; @@ -698,7 +698,7 @@ BOOL LLViewerShaderMgr::loadShadersWater() gWaterProgram.unload(); gWaterEdgeProgram.unload(); gUnderWaterProgram.unload(); - return TRUE; + return true; } if (success) @@ -791,7 +791,7 @@ BOOL LLViewerShaderMgr::loadShadersWater() if (!success) { mShaderLevel[SHADER_WATER] = 0; - return FALSE; + return false; } // if we failed to load the terrain water shaders and we need them (using class2 water), @@ -804,20 +804,20 @@ BOOL LLViewerShaderMgr::loadShadersWater() LLWorld::getInstance()->updateWaterObjects(); - return TRUE; + return true; } -BOOL LLViewerShaderMgr::loadShadersEffects() +bool LLViewerShaderMgr::loadShadersEffects() { LL_PROFILE_ZONE_SCOPED; - BOOL success = TRUE; + bool success = true; if (mShaderLevel[SHADER_EFFECT] == 0) { gGlowProgram.unload(); gGlowExtractProgram.unload(); gPostVignetteProgram.unload(); // Import Vignette from Exodus - return TRUE; + return true; } if (success) @@ -830,7 +830,7 @@ BOOL LLViewerShaderMgr::loadShadersEffects() success = gGlowProgram.createShader(NULL, NULL); if (!success) { - LLPipeline::sRenderGlow = FALSE; + LLPipeline::sRenderGlow = false; } } @@ -853,7 +853,7 @@ BOOL LLViewerShaderMgr::loadShadersEffects() success = gGlowExtractProgram.createShader(NULL, NULL); if (!success) { - LLPipeline::sRenderGlow = FALSE; + LLPipeline::sRenderGlow = false; } } @@ -873,7 +873,7 @@ BOOL LLViewerShaderMgr::loadShadersEffects() } -BOOL LLViewerShaderMgr::loadShadersDeferred() +bool LLViewerShaderMgr::loadShadersDeferred() { LL_PROFILE_ZONE_SCOPED; bool use_sun_shadow = mShaderLevel[SHADER_DEFERRED] > 1 && @@ -972,10 +972,10 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() // [RLVa:KB] - @setsphere gRlvSphereProgram.unload(); // [/RLVa:KB] - return TRUE; + return true; } - BOOL success = TRUE; + bool success = true; if (success) { @@ -2319,10 +2319,10 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() return success; } -BOOL LLViewerShaderMgr::loadShadersObject() +bool LLViewerShaderMgr::loadShadersObject() { LL_PROFILE_ZONE_SCOPED; - BOOL success = TRUE; + bool success = true; if (success) { @@ -2411,23 +2411,23 @@ BOOL LLViewerShaderMgr::loadShadersObject() if (!success) { mShaderLevel[SHADER_OBJECT] = 0; - return FALSE; + return false; } - return TRUE; + return true; } -BOOL LLViewerShaderMgr::loadShadersAvatar() +bool LLViewerShaderMgr::loadShadersAvatar() { LL_PROFILE_ZONE_SCOPED; #if 1 // DEPRECATED -- forward rendering is deprecated - BOOL success = TRUE; + bool success = true; if (mShaderLevel[SHADER_AVATAR] == 0) { gAvatarProgram.unload(); gAvatarEyeballProgram.unload(); - return TRUE; + return true; } if (success) @@ -2476,16 +2476,16 @@ BOOL LLViewerShaderMgr::loadShadersAvatar() { mShaderLevel[SHADER_AVATAR] = 0; mMaxAvatarShaderLevel = 0; - return FALSE; + return false; } #endif - return TRUE; + return true; } -BOOL LLViewerShaderMgr::loadShadersInterface() +bool LLViewerShaderMgr::loadShadersInterface() { LL_PROFILE_ZONE_SCOPED; - BOOL success = TRUE; + bool success = true; if (success) { @@ -2795,10 +2795,10 @@ BOOL LLViewerShaderMgr::loadShadersInterface() if( !success ) { mShaderLevel[SHADER_INTERFACE] = 0; - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h index 3788615c18..40d4d09adb 100644 --- a/indra/newview/llviewershadermgr.h +++ b/indra/newview/llviewershadermgr.h @@ -35,7 +35,7 @@ class LLViewerShaderMgr: public LLShaderMgr { public: - static BOOL sInitialized; + static bool sInitialized; static bool sSkipReload; LLViewerShaderMgr(); @@ -54,12 +54,12 @@ public: // name of a file error happened at, otherwise // returns an empty string std::string loadBasicShaders(); - BOOL loadShadersEffects(); - BOOL loadShadersDeferred(); - BOOL loadShadersObject(); - BOOL loadShadersAvatar(); - BOOL loadShadersWater(); - BOOL loadShadersInterface(); + bool loadShadersEffects(); + bool loadShadersDeferred(); + bool loadShadersObject(); + bool loadShadersAvatar(); + bool loadShadersWater(); + bool loadShadersInterface(); std::vector mShaderLevel; S32 mMaxAvatarShaderLevel; diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 720049455b..e1f9074f12 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -343,7 +343,7 @@ void LLViewerStats::addToMessage(LLSD &body) { LLSD &misc = body["misc"]; - misc["Version"] = TRUE; + misc["Version"] = true; //TODO RN: get last value, not mean misc["Vertex Buffers Enabled"] = getRecording().getMean(LLStatViewer::ENABLE_VBO); diff --git a/indra/newview/llviewertexlayer.cpp b/indra/newview/llviewertexlayer.cpp index 413152069c..7fc328b0f4 100644 --- a/indra/newview/llviewertexlayer.cpp +++ b/indra/newview/llviewertexlayer.cpp @@ -59,7 +59,7 @@ LLViewerTexLayerSetBuffer::LLViewerTexLayerSetBuffer(LLTexLayerSet* const owner, S32 width, S32 height) : // ORDER_LAST => must render these after the hints are created. LLTexLayerSetBuffer(owner), - LLViewerDynamicTexture(width, height, 4, LLViewerDynamicTexture::ORDER_LAST, FALSE), + LLViewerDynamicTexture(width, height, 4, LLViewerDynamicTexture::ORDER_LAST, false), // [Legacy Bake] mUploadPending(false), // Not used for any logic here, just to sync sending of updates mNeedsUpload(false), @@ -69,7 +69,7 @@ LLViewerTexLayerSetBuffer::LLViewerTexLayerSetBuffer(LLTexLayerSet* const owner, mNeedsUpdate(true), mNumLowresUpdates(0) { - mGLTexturep->setNeedsAlphaAndPickMask(FALSE); + mGLTexturep->setNeedsAlphaAndPickMask(false); LLViewerTexLayerSetBuffer::sGLByteCount += getSize(); // [Legacy Bake] @@ -130,10 +130,10 @@ void LLViewerTexLayerSetBuffer::restartUpdateTimer() } // virtual -BOOL LLViewerTexLayerSetBuffer::needsRender() +bool LLViewerTexLayerSetBuffer::needsRender() { llassert(mTexLayerSet->getAvatarAppearance() == gAgentAvatarp); - if (!isAgentAvatarValid()) return FALSE; + if (!isAgentAvatarValid()) return false; // [Legacy Bake] const bool upload_now = mNeedsUpload && isReadyToUpload(); @@ -144,13 +144,13 @@ BOOL LLViewerTexLayerSetBuffer::needsRender() //if (!update_now) if (!(update_now || upload_now)) { - return FALSE; + return false; } // Don't render if we're animating our appearance. if (gAgentAvatarp->getIsAppearanceAnimating()) { - return FALSE; + return false; } // Don't render if we are trying to create a skirt texture but aren't wearing a skirt. @@ -159,7 +159,7 @@ BOOL LLViewerTexLayerSetBuffer::needsRender() { // [Legacy Bake] cancelUpload(); - return FALSE; + return false; } // Render if we have at least minimal level of detail for each local texture. @@ -172,7 +172,7 @@ void LLViewerTexLayerSetBuffer::preRenderTexLayerSet() LLTexLayerSetBuffer::preRenderTexLayerSet(); // keep depth buffer, we don't need to clear it - LLViewerDynamicTexture::preRender(FALSE); + LLViewerDynamicTexture::preRender(false); } // virtual @@ -185,7 +185,7 @@ void LLViewerTexLayerSetBuffer::postRenderTexLayerSet(bool success) // virtual // [Legacy Bake] -//void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(BOOL success) +//void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(bool success) void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(bool success, LLRenderTarget* bound_target) // [Legacy Bake] { @@ -210,12 +210,12 @@ void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(bool success, LLRenderTarge if (layer_set->isVisible()) { // OpenSim BOM fallback - // layer_set->getAvatar()->debugBakedTextureUpload(layer_set->getBakedTexIndex(), false); // FALSE for start of upload, TRUE for finish. + // layer_set->getAvatar()->debugBakedTextureUpload(layer_set->getBakedTexIndex(), false); // false for start of upload, true for finish. //doUpload(bound_target); auto bakedTexIdx = layer_set->getBakedTexIndex(); if(bakedTexIdx <= layer_set->getAvatar()->getNumBakes()) { - layer_set->getAvatar()->debugBakedTextureUpload(bakedTexIdx, false); // FALSE for start of upload, TRUE for finish. + layer_set->getAvatar()->debugBakedTextureUpload(bakedTexIdx, false); // false for start of upload, true for finish. doUpload(bound_target); } else @@ -245,18 +245,18 @@ void LLViewerTexLayerSetBuffer::midRenderTexLayerSet(bool success, LLRenderTarge mGLTexturep->setGLTextureCreated(true); } -BOOL LLViewerTexLayerSetBuffer::isInitialized(void) const +bool LLViewerTexLayerSetBuffer::isInitialized(void) const { return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated(); } -BOOL LLViewerTexLayerSetBuffer::isReadyToUpdate() const +bool LLViewerTexLayerSetBuffer::isReadyToUpdate() const { // If we requested an update and have the final LOD ready, then update. - if (getViewerTexLayerSet()->isLocalTextureDataFinal()) return TRUE; + if (getViewerTexLayerSet()->isLocalTextureDataFinal()) return true; // If we haven't done an update yet, then just do one now regardless of state of textures. - if (mNumLowresUpdates == 0) return TRUE; + if (mNumLowresUpdates == 0) return true; // Update if we've hit a timeout. Unlike for uploads, we can make this timeout fairly small // since render unnecessarily doesn't cost much. @@ -264,22 +264,22 @@ BOOL LLViewerTexLayerSetBuffer::isReadyToUpdate() const if (texture_timeout != 0) { // If we hit our timeout and have textures available at even lower resolution, then update. - const BOOL is_update_textures_timeout = mNeedsUpdateTimer.getElapsedTimeF32() >= texture_timeout; - const BOOL has_lower_lod = getViewerTexLayerSet()->isLocalTextureDataAvailable(); - if (has_lower_lod && is_update_textures_timeout) return TRUE; + const bool is_update_textures_timeout = mNeedsUpdateTimer.getElapsedTimeF32() >= texture_timeout; + const bool has_lower_lod = getViewerTexLayerSet()->isLocalTextureDataAvailable(); + if (has_lower_lod && is_update_textures_timeout) return true; } - return FALSE; + return false; } -BOOL LLViewerTexLayerSetBuffer::requestUpdateImmediate() +bool LLViewerTexLayerSetBuffer::requestUpdateImmediate() { - mNeedsUpdate = TRUE; - BOOL result = FALSE; + mNeedsUpdate = true; + bool result = false; if (needsRender()) { - preRender(FALSE); + preRender(false); result = render(); postRender(result); } @@ -292,10 +292,10 @@ BOOL LLViewerTexLayerSetBuffer::requestUpdateImmediate() void LLViewerTexLayerSetBuffer::doUpdate() { LLViewerTexLayerSet* layer_set = getViewerTexLayerSet(); - const BOOL highest_lod = layer_set->isLocalTextureDataFinal(); + const bool highest_lod = layer_set->isLocalTextureDataFinal(); if (highest_lod) { - mNeedsUpdate = FALSE; + mNeedsUpdate = false; } else { @@ -311,7 +311,7 @@ void LLViewerTexLayerSetBuffer::doUpdate() // Print out notification that we updated this texture. if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { - const BOOL highest_lod = layer_set->isLocalTextureDataFinal(); + const bool highest_lod = layer_set->isLocalTextureDataFinal(); const std::string lod_str = highest_lod ? "HighRes" : "LowRes"; LLSD args; args["EXISTENCE"] = llformat("%d",(U32)layer_set->getAvatar()->debugGetExistenceTimeElapsedF32()); @@ -330,7 +330,7 @@ void LLViewerTexLayerSetBuffer::doUpdate() LLViewerTexLayerSet::LLViewerTexLayerSet(LLAvatarAppearance* const appearance) : LLTexLayerSet(appearance), - mUpdatesEnabled( FALSE ) + mUpdatesEnabled( false ) { } @@ -339,18 +339,18 @@ LLViewerTexLayerSet::~LLViewerTexLayerSet() { } -// Returns TRUE if at least one packet of data has been received for each of the textures that this layerset depends on. -BOOL LLViewerTexLayerSet::isLocalTextureDataAvailable() const +// Returns true if at least one packet of data has been received for each of the textures that this layerset depends on. +bool LLViewerTexLayerSet::isLocalTextureDataAvailable() const { - if (!mAvatarAppearance->isSelf()) return FALSE; + if (!mAvatarAppearance->isSelf()) return false; return getAvatar()->isLocalTextureDataAvailable(this); } -// Returns TRUE if all of the data for the textures that this layerset depends on have arrived. -BOOL LLViewerTexLayerSet::isLocalTextureDataFinal() const +// Returns true if all of the data for the textures that this layerset depends on have arrived. +bool LLViewerTexLayerSet::isLocalTextureDataFinal() const { - if (!mAvatarAppearance->isSelf()) return FALSE; + if (!mAvatarAppearance->isSelf()) return false; return getAvatar()->isLocalTextureDataFinal(this); } @@ -386,7 +386,7 @@ void LLViewerTexLayerSet::createComposite() } } -void LLViewerTexLayerSet::setUpdatesEnabled( BOOL b ) +void LLViewerTexLayerSet::setUpdatesEnabled( bool b ) { mUpdatesEnabled = b; } @@ -417,7 +417,7 @@ const std::string LLViewerTexLayerSetBuffer::dumpTextureInfo() const if (!isAgentAvatarValid()) return ""; // [Legacy Bake] - //const bool is_high_res = TRUE; + //const bool is_high_res = true; //const U32 num_low_res = 0; //const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(getViewerTexLayerSet()); diff --git a/indra/newview/llviewertexlayer.h b/indra/newview/llviewertexlayer.h index 7eecea32e3..fc1c381093 100644 --- a/indra/newview/llviewertexlayer.h +++ b/indra/newview/llviewertexlayer.h @@ -51,12 +51,12 @@ public: void requestUpload(); void cancelUpload(); // [Legacy Bake] - BOOL isLocalTextureDataAvailable() const; - BOOL isLocalTextureDataFinal() const; + bool isLocalTextureDataAvailable() const; + bool isLocalTextureDataFinal() const; void updateComposite(); /*virtual*/void createComposite(); - void setUpdatesEnabled(BOOL b); - BOOL getUpdatesEnabled() const { return mUpdatesEnabled; } + void setUpdatesEnabled(bool b); + bool getUpdatesEnabled() const { return mUpdatesEnabled; } LLVOAvatarSelf* getAvatar(); const LLVOAvatarSelf* getAvatar() const; @@ -64,7 +64,7 @@ public: const LLViewerTexLayerSetBuffer* getViewerComposite() const; private: - BOOL mUpdatesEnabled; + bool mUpdatesEnabled; }; @@ -83,7 +83,7 @@ public: public: /*virtual*/ S8 getType() const; - BOOL isInitialized(void) const; + bool isInitialized(void) const; static void dumpTotalByteCount(); const std::string dumpTextureInfo() const; virtual void restoreGLTexture(); @@ -113,12 +113,12 @@ private: // Dynamic Texture Interface //-------------------------------------------------------------------- public: - /*virtual*/ BOOL needsRender(); + /*virtual*/ bool needsRender(); protected: // Pass these along for tex layer rendering. - virtual void preRender(BOOL clear_depth) { preRenderTexLayerSet(); } - virtual void postRender(BOOL success) { postRenderTexLayerSet(success); } - virtual BOOL render() { return renderTexLayerSet(mBoundTarget); } + virtual void preRender(bool clear_depth) { preRenderTexLayerSet(); } + virtual void postRender(bool success) { postRenderTexLayerSet(success); } + virtual bool render() { return renderTexLayerSet(mBoundTarget); } // [Legacy Bake] //-------------------------------------------------------------------- @@ -152,9 +152,9 @@ private: //-------------------------------------------------------------------- public: void requestUpdate(); - BOOL requestUpdateImmediate(); + bool requestUpdateImmediate(); protected: - BOOL isReadyToUpdate() const; + bool isReadyToUpdate() const; void doUpdate(); void restartUpdateTimer(); private: diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 9d1ecbe83b..83a5242750 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -388,10 +388,10 @@ public: // return true if there are no embedded items. bool empty(); - BOOL insertEmbeddedItem(LLInventoryItem* item, llwchar* value, bool is_new); - BOOL removeEmbeddedItem( llwchar ext_char ); + bool insertEmbeddedItem(LLInventoryItem* item, llwchar* value, bool is_new); + bool removeEmbeddedItem( llwchar ext_char ); - BOOL hasEmbeddedItem(llwchar ext_char); // returns TRUE if /this/ editor has an entry for this item + bool hasEmbeddedItem(llwchar ext_char); // returns true if /this/ editor has an entry for this item LLUIImagePtr getItemImage(llwchar ext_char) const; void getEmbeddedItemList( std::vector >& items ); @@ -406,14 +406,14 @@ public: void markSaved(); static LLPointer getEmbeddedItemPtr(llwchar ext_char); // returns pointer to item from static list - static BOOL getEmbeddedItemSaved(llwchar ext_char); // returns whether item from static list is saved + static bool getEmbeddedItemSaved(llwchar ext_char); // returns whether item from static list is saved private: struct embedded_info_t { LLPointer mItemPtr; - BOOL mSaved; + bool mSaved; }; typedef std::map item_map_t; static item_map_t sEntries; @@ -458,7 +458,7 @@ bool LLEmbeddedItems::empty() } // Inserts a new unique entry -BOOL LLEmbeddedItems::insertEmbeddedItem( LLInventoryItem* item, llwchar* ext_char, bool is_new) +bool LLEmbeddedItems::insertEmbeddedItem( LLInventoryItem* item, llwchar* ext_char, bool is_new) { // Now insert a new one llwchar wc_emb; @@ -478,20 +478,20 @@ BOOL LLEmbeddedItems::insertEmbeddedItem( LLInventoryItem* item, llwchar* ext_ch wc_emb = last->first; if (wc_emb >= LLTextEditor::LAST_EMBEDDED_CHAR) { - return FALSE; + return false; } ++wc_emb; } sEntries[wc_emb].mItemPtr = item; - sEntries[wc_emb].mSaved = is_new ? FALSE : TRUE; + sEntries[wc_emb].mSaved = is_new ? false : true; *ext_char = wc_emb; mEmbeddedUsedChars.insert(wc_emb); - return TRUE; + return true; } // Removes an entry (all entries are unique) -BOOL LLEmbeddedItems::removeEmbeddedItem( llwchar ext_char ) +bool LLEmbeddedItems::removeEmbeddedItem( llwchar ext_char ) { mEmbeddedUsedChars.erase(ext_char); item_map_t::iterator iter = sEntries.find(ext_char); @@ -499,9 +499,9 @@ BOOL LLEmbeddedItems::removeEmbeddedItem( llwchar ext_char ) { sEntries.erase(ext_char); sFreeEntries.push(ext_char); - return TRUE; + return true; } - return FALSE; + return false; } // static @@ -519,7 +519,7 @@ LLPointer LLEmbeddedItems::getEmbeddedItemPtr(llwchar ext_char) } // static -BOOL LLEmbeddedItems::getEmbeddedItemSaved(llwchar ext_char) +bool LLEmbeddedItems::getEmbeddedItemSaved(llwchar ext_char) { if( ext_char >= LLTextEditor::FIRST_EMBEDDED_CHAR && ext_char <= LLTextEditor::LAST_EMBEDDED_CHAR ) { @@ -529,7 +529,7 @@ BOOL LLEmbeddedItems::getEmbeddedItemSaved(llwchar ext_char) return iter->second.mSaved; } } - return FALSE; + return false; } llwchar LLEmbeddedItems::getEmbeddedCharFromIndex(S32 index) @@ -597,14 +597,14 @@ S32 LLEmbeddedItems::getIndexFromEmbeddedChar(llwchar wch) } } -BOOL LLEmbeddedItems::hasEmbeddedItem(llwchar ext_char) +bool LLEmbeddedItems::hasEmbeddedItem(llwchar ext_char) { std::set::iterator iter = mEmbeddedUsedChars.find(ext_char); if (iter != mEmbeddedUsedChars.end()) { - return TRUE; + return true; } - return FALSE; + return false; } @@ -689,7 +689,7 @@ void LLEmbeddedItems::markSaved() for (std::set::iterator iter = mEmbeddedUsedChars.begin(); iter != mEmbeddedUsedChars.end(); ++iter) { llwchar wc = *iter; - sEntries[wc].mSaved = TRUE; + sEntries[wc].mSaved = true; } } @@ -699,7 +699,7 @@ class LLViewerTextEditor::TextCmdInsertEmbeddedItem : public LLTextBase::TextCmd { public: TextCmdInsertEmbeddedItem( S32 pos, LLInventoryItem* item ) - : TextCmd(pos, FALSE), + : TextCmd(pos, false), mExtCharValue(0) { mItem = item; @@ -765,7 +765,7 @@ struct LLNotecardCopyInfo LLViewerTextEditor::LLViewerTextEditor(const LLViewerTextEditor::Params& p) : LLTextEditor(p), mDragItemChar(0), - mDragItemSaved(FALSE), + mDragItemSaved(false), mInventoryCallback(new LLEmbeddedNotecardOpener) { mEmbeddedItemList = new LLEmbeddedItems(this); @@ -806,7 +806,7 @@ bool LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) { if( allowsEmbeddedItems() ) { - setCursorAtLocalPos( x, y, FALSE ); + setCursorAtLocalPos( x, y, false ); llwchar wc = 0; if (mCursorPos < getLength()) { @@ -828,7 +828,7 @@ bool LLViewerTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) if (hasTabStop()) { - setFocus( TRUE ); + setFocus( true ); } handled = true; @@ -920,14 +920,14 @@ bool LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) { if( allowsEmbeddedItems() ) { - S32 doc_index = getDocIndexFromLocalCoord(x, y, FALSE); + S32 doc_index = getDocIndexFromLocalCoord(x, y, false); llwchar doc_char = getWText()[doc_index]; if (mEmbeddedItemList->hasEmbeddedItem(doc_char)) { if( openEmbeddedItemAtPos( doc_index )) { deselect(); - setFocus( FALSE ); + setFocus( false ); return true; } } @@ -1001,10 +1001,10 @@ bool LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, { deselect(); S32 old_cursor = mCursorPos; - setCursorAtLocalPos( x, y, TRUE ); + setCursorAtLocalPos( x, y, true ); S32 insert_pos = mCursorPos; setCursorPos(old_cursor); - BOOL inserted = insertEmbeddedItem( insert_pos, item ); + bool inserted = insertEmbeddedItem( insert_pos, item ); if( inserted && (old_cursor > mCursorPos) ) { setCursorPos(mCursorPos + 1); @@ -1182,7 +1182,7 @@ void LLViewerTextEditor::findEmbeddedItemSegments(S32 start, S32 end) } } -BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos) +bool LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos) { if( pos < getLength()) { @@ -1190,7 +1190,7 @@ BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos) LLPointer item = LLEmbeddedItems::getEmbeddedItemPtr( wc ); if( item ) { - BOOL saved = LLEmbeddedItems::getEmbeddedItemSaved( wc ); + bool saved = LLEmbeddedItems::getEmbeddedItemSaved( wc ); if (saved) { return openEmbeddedItem(item, wc); @@ -1201,36 +1201,36 @@ BOOL LLViewerTextEditor::openEmbeddedItemAtPos(S32 pos) } } } - return FALSE; + return false; } -BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer item, llwchar wc) +bool LLViewerTextEditor::openEmbeddedItem(LLPointer item, llwchar wc) { switch( item->getType() ) { case LLAssetType::AT_TEXTURE: openEmbeddedTexture( item, wc ); - return TRUE; + return true; case LLAssetType::AT_SOUND: openEmbeddedSound( item, wc ); - return TRUE; + return true; case LLAssetType::AT_LANDMARK: openEmbeddedLandmark( item, wc ); - return TRUE; + return true; case LLAssetType::AT_CALLINGCARD: openEmbeddedCallingcard( item, wc ); - return TRUE; + return true; case LLAssetType::AT_SETTINGS: openEmbeddedSetting(item, wc); - return TRUE; + return true; case LLAssetType::AT_MATERIAL: openEmbeddedGLTFMaterial(item, wc); - return TRUE; + return true; case LLAssetType::AT_NOTECARD: case LLAssetType::AT_LSL_TEXT: case LLAssetType::AT_CLOTHING: @@ -1239,9 +1239,9 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer item, llwch case LLAssetType::AT_ANIMATION: case LLAssetType::AT_GESTURE: showCopyToInvDialog( item, wc ); - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -1257,8 +1257,8 @@ void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item, llwchar wc // LLPreviewTexture* preview = LLFloaterReg::showTypedInstance("preview_texture", LLSD(item->getAssetUUID()), TAKE_FOCUS_YES); // [SL:KB] - Patch: UI-Notecards | Checked: 2010-09-05 (Catznip-2.1.2a) | Added: Catznip-2.1.2a // If there's already a preview of the texture open then we do want it to take focus, otherwise leave it up to the debug setting - BOOL fHasInstance = (NULL != LLFloaterReg::findTypedInstance("preview_texture", LLSD(item->getAssetUUID()))); - BOOL fTakeFocus = ( (fHasInstance) || (gSavedSettings.getBOOL("EmbeddedTextureStealsFocus")) ) ? TAKE_FOCUS_YES : TAKE_FOCUS_NO; + bool fHasInstance = (NULL != LLFloaterReg::findTypedInstance("preview_texture", LLSD(item->getAssetUUID()))); + bool fTakeFocus = ( (fHasInstance) || (gSavedSettings.getBOOL("EmbeddedTextureStealsFocus")) ) ? TAKE_FOCUS_YES : TAKE_FOCUS_NO; LLPreviewTexture* preview = LLFloaterReg::showTypedInstance("preview_texture", LLSD(item->getAssetUUID()), fTakeFocus); // [/SL:KB] if (preview) @@ -1343,7 +1343,7 @@ void LLViewerTextEditor::openEmbeddedGLTFMaterial(LLInventoryItem* item, llwchar preview->setAuxItem(item); preview->setNotecardInfo(mNotecardInventoryID, mObjectID); preview->openFloater(floater_key); - preview->setFocus(TRUE); + preview->setFocus(true); } } diff --git a/indra/newview/llviewertexteditor.h b/indra/newview/llviewertexteditor.h index cecbffe975..37ab737b38 100644 --- a/indra/newview/llviewertexteditor.h +++ b/indra/newview/llviewertexteditor.h @@ -95,8 +95,8 @@ private: void findEmbeddedItemSegments(S32 start, S32 end); virtual llwchar pasteEmbeddedItem(llwchar ext_char); - BOOL openEmbeddedItemAtPos( S32 pos ); - BOOL openEmbeddedItem(LLPointer item, llwchar wc); + bool openEmbeddedItemAtPos( S32 pos ); + bool openEmbeddedItem(LLPointer item, llwchar wc); S32 insertEmbeddedItem(S32 pos, LLInventoryItem* item); @@ -118,7 +118,7 @@ private: LLPointer mDragItem; LLTextSegment* mDragSegment; llwchar mDragItemChar; - BOOL mDragItemSaved; + bool mDragItemSaved; class LLEmbeddedItems* mEmbeddedItemList; LLUUID mObjectID; diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 11c74909b2..866166b6e3 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -133,11 +133,11 @@ LLUUID LLViewerTexture::sInvisiprimTexture2 = LLUUID::null; LLLoadedCallbackEntry::LLLoadedCallbackEntry(loaded_callback_func cb, S32 discard_level, - BOOL need_imageraw, // Needs image raw for the callback + bool need_imageraw, // Needs image raw for the callback void* userdata, LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, LLViewerFetchedTexture* target, - BOOL pause) + bool pause) : mCallback(cb), mLastUsedDiscard(MAX_DISCARD_LEVEL+1), mDesiredDiscard(discard_level), @@ -183,7 +183,7 @@ void LLLoadedCallbackEntry::cleanUpCallbackList(LLLoadedCallbackEntry::source_ca } } -LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, BOOL usemipmaps, LLImageGL* gl_image) +LLViewerMediaTexture* LLViewerTextureManager::createMediaTexture(const LLUUID &media_id, bool usemipmaps, LLImageGL* gl_image) { return new LLViewerMediaTexture(media_id, usemipmaps, gl_image); } @@ -229,7 +229,7 @@ LLViewerMediaTexture* LLViewerTextureManager::findMediaTexture(const LLUUID &med return LLViewerMediaTexture::findMediaTexture(media_id); } -LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id, BOOL usemipmaps, LLImageGL* gl_image) +LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id, bool usemipmaps, LLImageGL* gl_image) { LLViewerMediaTexture* tex = LLViewerMediaTexture::findMediaTexture(id); if(!tex) @@ -242,7 +242,7 @@ LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id, return tex; } -LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTexture* tex, BOOL report_error) +LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTexture* tex, bool report_error) { if(!tex) { @@ -263,7 +263,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTex return NULL; } -LLPointer LLViewerTextureManager::getLocalTexture(BOOL usemipmaps, BOOL generate_gl_tex) +LLPointer LLViewerTextureManager::getLocalTexture(bool usemipmaps, bool generate_gl_tex) { LLPointer tex = new LLViewerTexture(usemipmaps); if(generate_gl_tex) @@ -273,7 +273,7 @@ LLPointer LLViewerTextureManager::getLocalTexture(BOOL usemipma } return tex; } -LLPointer LLViewerTextureManager::getLocalTexture(const LLUUID& id, BOOL usemipmaps, BOOL generate_gl_tex) +LLPointer LLViewerTextureManager::getLocalTexture(const LLUUID& id, bool usemipmaps, bool generate_gl_tex) { LLPointer tex = new LLViewerTexture(id, usemipmaps); if(generate_gl_tex) @@ -283,13 +283,13 @@ LLPointer LLViewerTextureManager::getLocalTexture(const LLUUID& } return tex; } -LLPointer LLViewerTextureManager::getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps) +LLPointer LLViewerTextureManager::getLocalTexture(const LLImageRaw* raw, bool usemipmaps) { LLPointer tex = new LLViewerTexture(raw, usemipmaps); tex->setCategory(LLGLTexture::LOCAL); return tex; } -LLPointer LLViewerTextureManager::getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex) +LLPointer LLViewerTextureManager::getLocalTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps, bool generate_gl_tex) { LLPointer tex = new LLViewerTexture(width, height, components, usemipmaps); if(generate_gl_tex) @@ -311,7 +311,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(const LLImageR LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture( const LLUUID &image_id, FTType f_type, - BOOL usemipmaps, + bool usemipmaps, LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, @@ -324,7 +324,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture( LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile( const std::string& filename, FTType f_type, - BOOL usemipmaps, + bool usemipmaps, LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, @@ -337,7 +337,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile( //static LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url, FTType f_type, - BOOL usemipmaps, + bool usemipmaps, LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, @@ -378,7 +378,7 @@ void LLViewerTextureManager::init() { LLPointer raw = new LLImageRaw(1,1,3); raw->clear(0x77, 0x77, 0x77, 0xFF); - LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), TRUE); + LLViewerTexture::sNullImagep = LLViewerTextureManager::getLocalTexture(raw.get(), true); } const S32 dim = 128; @@ -386,7 +386,7 @@ void LLViewerTextureManager::init() U8* data = image_raw->getData(); memset(data, 0, dim * dim * 3); - LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE); + LLViewerTexture::sBlackImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), true); #if 1 LLPointer imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT); @@ -418,7 +418,7 @@ void LLViewerTextureManager::init() imagep->setCachedRawImage(0, image_raw); image_raw = NULL; #else - LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, true, LLGLTexture::BOOST_UI); #endif LLViewerFetchedTexture::sDefaultImagep->dontDiscard(); LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER); @@ -436,7 +436,7 @@ void LLViewerTextureManager::init() data[i+2] = color; } - LLViewerTexture::sCheckerBoardImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), TRUE); + LLViewerTexture::sCheckerBoardImagep = LLViewerTextureManager::getLocalTexture(image_raw.get(), true); LLViewerTexture::initClass(); @@ -599,7 +599,7 @@ void LLViewerTexture::updateClass() //------------------------------------------------------------------------------------------- const U32 LLViewerTexture::sCurrentFileVersion = 1; -LLViewerTexture::LLViewerTexture(BOOL usemipmaps) : +LLViewerTexture::LLViewerTexture(bool usemipmaps) : LLGLTexture(usemipmaps) { init(true); @@ -608,7 +608,7 @@ LLViewerTexture::LLViewerTexture(BOOL usemipmaps) : sImageCount++; } -LLViewerTexture::LLViewerTexture(const LLUUID& id, BOOL usemipmaps) : +LLViewerTexture::LLViewerTexture(const LLUUID& id, bool usemipmaps) : LLGLTexture(usemipmaps), mID(id) { @@ -617,7 +617,7 @@ LLViewerTexture::LLViewerTexture(const LLUUID& id, BOOL usemipmaps) : sImageCount++; } -LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) : +LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps) : LLGLTexture(width, height, components, usemipmaps) { init(true); @@ -626,7 +626,7 @@ LLViewerTexture::LLViewerTexture(const U32 width, const U32 height, const U8 com sImageCount++; } -LLViewerTexture::LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps) : +LLViewerTexture::LLViewerTexture(const LLImageRaw* raw, bool usemipmaps) : LLGLTexture(raw, usemipmaps) { init(true); @@ -774,9 +774,9 @@ bool LLViewerTexture::bindDefaultImage(S32 stage) } //virtual -BOOL LLViewerTexture::isMissingAsset()const +bool LLViewerTexture::isMissingAsset()const { - return FALSE; + return false; } //virtual @@ -784,12 +784,12 @@ void LLViewerTexture::forceImmediateUpdate() { } -void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const +void LLViewerTexture::addTextureStats(F32 virtual_size, bool needs_gltexture) const { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if(needs_gltexture) { - mNeedsGLTexture = TRUE; + mNeedsGLTexture = true; } virtual_size = llmin(virtual_size, LLViewerFetchedTexture::sMaxVirtualSize); @@ -977,7 +977,7 @@ void LLViewerTexture::setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) //nothing here. } -BOOL LLViewerTexture::isLargeImage() +bool LLViewerTexture::isLargeImage() { return (S32)mTexelsPerImage > LLViewerTexture::sMinLargeImageSize; } @@ -1045,11 +1045,11 @@ LLViewerFetchedTexture* LLViewerFetchedTexture::getSmokeImage() return sSmokeImagep; } -LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type, const LLHost& host, BOOL usemipmaps) +LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type, const LLHost& host, bool usemipmaps) : LLViewerTexture(id, usemipmaps), mTargetHost(host) { - init(TRUE); + init(true); mFTType = f_type; if (mFTType == FTT_HOST_BAKE) { @@ -1061,18 +1061,18 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type, generateGLTexture(); } -LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, BOOL usemipmaps) +LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, bool usemipmaps) : LLViewerTexture(raw, usemipmaps) { - init(TRUE); + init(true); mFTType = f_type; } -LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps) +LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& url, FTType f_type, const LLUUID& id, bool usemipmaps) : LLViewerTexture(id, usemipmaps), mUrl(url) { - init(TRUE); + init(true); mFTType = f_type; generateGLTexture(); } @@ -1081,20 +1081,20 @@ void LLViewerFetchedTexture::init(bool firstinit) { mOrigWidth = 0; mOrigHeight = 0; - mHasAux = FALSE; - mNeedsAux = FALSE; + mHasAux = false; + mNeedsAux = false; mRequestedDiscardLevel = -1; mRequestedDownloadPriority = 0.f; - mFullyLoaded = FALSE; + mFullyLoaded = false; mCanUseHTTP = true; mDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; mMinDesiredDiscardLevel = MAX_DISCARD_LEVEL + 1; - mDecodingAux = FALSE; + mDecodingAux = false; mKnownDrawWidth = 0; mKnownDrawHeight = 0; - mKnownDrawSizeChanged = FALSE; + mKnownDrawSizeChanged = false; if (firstinit) { @@ -1103,43 +1103,43 @@ void LLViewerFetchedTexture::init(bool firstinit) // Only set mIsMissingAsset true when we know for certain that the database // does not contain this image. - mIsMissingAsset = FALSE; + mIsMissingAsset = false; mLoadedCallbackDesiredDiscardLevel = S8_MAX; - mPauseLoadedCallBacks = FALSE; + mPauseLoadedCallBacks = false; mNeedsCreateTexture = false; - mIsRawImageValid = FALSE; + mIsRawImageValid = false; mRawDiscardLevel = INVALID_DISCARD_LEVEL; mMinDiscardLevel = 0; - mHasFetcher = FALSE; - mIsFetching = FALSE; + mHasFetcher = false; + mIsFetching = false; mFetchState = 0; mFetchPriority = 0; mDownloadProgress = 0.f; mFetchDeltaTime = 999999.f; mRequestDeltaTime = 0.f; - mForSculpt = FALSE; - mIsFetched = FALSE; - mInFastCacheList = FALSE; + mForSculpt = false; + mIsFetched = false; + mInFastCacheList = false; mCachedRawImage = NULL; mCachedRawDiscardLevel = -1; - mCachedRawImageReady = FALSE; + mCachedRawImageReady = false; mSavedRawImage = NULL; - mForceToSaveRawImage = FALSE; - mSaveRawImage = FALSE; + mForceToSaveRawImage = false; + mSaveRawImage = false; mSavedRawDiscardLevel = -1; mDesiredSavedRawDiscardLevel = -1; mLastReferencedSavedRawImageTime = 0.0f; mKeptSavedRawImageTime = 0.f; mLastCallBackActiveTime = 0.f; - mForceCallbackFetch = FALSE; - mInDebug = FALSE; - mUnremovable = FALSE; + mForceCallbackFetch = false; + mInDebug = false; + mUnremovable = false; mFTType = FTT_UNKNOWN; } @@ -1177,18 +1177,18 @@ void LLViewerFetchedTexture::cleanup() LLLoadedCallbackEntry *entryp = *iter++; // We never finished loading the image. Indicate failure. // Note: this allows mLoadedCallbackUserData to be cleaned up. - entryp->mCallback( FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData ); + entryp->mCallback( false, this, NULL, NULL, 0, true, entryp->mUserData ); entryp->removeTexture(this); delete entryp; } mLoadedCallbackList.clear(); - mNeedsAux = FALSE; + mNeedsAux = false; // Clean up image data destroyRawImage(); mCachedRawImage = NULL; mCachedRawDiscardLevel = -1; - mCachedRawImageReady = FALSE; + mCachedRawImageReady = false; mSavedRawImage = NULL; mSavedRawDiscardLevel = -1; } @@ -1201,7 +1201,7 @@ void LLViewerFetchedTexture::loadFromFastCache() { return; //no need to access the fast cache. } - mInFastCacheList = FALSE; + mInFastCacheList = false; add(LLTextureFetch::sCacheAttempt, 1.0); @@ -1254,7 +1254,7 @@ void LLViewerFetchedTexture::loadFromFastCache() } mRequestedDiscardLevel = mDesiredDiscardLevel + 1; - mIsRawImageValid = TRUE; + mIsRawImageValid = true; addToCreateTexture(); } } @@ -1268,7 +1268,7 @@ void LLViewerFetchedTexture::setForSculpt() { static const S32 MAX_INTERVAL = 8; //frames - mForSculpt = TRUE; + mForSculpt = true; if(isForSculptOnly() && hasGLTexture() && !getBoundRecently()) { destroyGLTexture(); //sculpt image does not need gl texture. @@ -1278,22 +1278,22 @@ void LLViewerFetchedTexture::setForSculpt() setMaxVirtualSizeResetInterval(MAX_INTERVAL); } -BOOL LLViewerFetchedTexture::isForSculptOnly() const +bool LLViewerFetchedTexture::isForSculptOnly() const { return mForSculpt && !mNeedsGLTexture; } -BOOL LLViewerFetchedTexture::isDeleted() +bool LLViewerFetchedTexture::isDeleted() { return mTextureState == DELETED; } -BOOL LLViewerFetchedTexture::isInactive() +bool LLViewerFetchedTexture::isInactive() { return mTextureState == INACTIVE; } -BOOL LLViewerFetchedTexture::isDeletionCandidate() +bool LLViewerFetchedTexture::isDeletionCandidate() { return mTextureState == DELETION_CANDIDATE; } @@ -1315,7 +1315,7 @@ void LLViewerFetchedTexture::setInactive() } } -BOOL LLViewerFetchedTexture::isFullyLoaded() const +bool LLViewerFetchedTexture::isFullyLoaded() const { // Unfortunately, the boolean "mFullyLoaded" is never updated correctly so we use that logic // to check if the texture is there and completely downloaded @@ -1362,7 +1362,7 @@ void LLViewerFetchedTexture::destroyTexture() //LL_DEBUGS("Avatar") << mID << LL_ENDL; destroyGLTexture(); - mFullyLoaded = FALSE; + mFullyLoaded = false; } void LLViewerFetchedTexture::addToCreateTexture() @@ -1388,7 +1388,7 @@ void LLViewerFetchedTexture::addToCreateTexture() } //discard the cached raw image and the saved raw image - mCachedRawImageReady = FALSE; + mCachedRawImageReady = false; mCachedRawDiscardLevel = -1; mCachedRawImage = NULL; mSavedRawDiscardLevel = -1; @@ -1460,7 +1460,7 @@ void LLViewerFetchedTexture::addToCreateTexture() } // ONLY called from LLViewerTextureList -BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) +bool LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; #if LL_IMAGEGL_THREAD_CHECK @@ -1470,7 +1470,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) if (!mNeedsCreateTexture) { destroyRawImage(); - return FALSE; + return false; } mNeedsCreateTexture = false; @@ -1482,7 +1482,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) { LL_WARNS() << "Can't create a texture: invalid image data" << LL_ENDL; destroyRawImage(); - return FALSE; + return false; } // LL_INFOS() << llformat("IMAGE Creating (%d) [%d x %d] Bytes: %d ", // mRawDiscardLevel, @@ -1521,7 +1521,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) } // - BOOL res = TRUE; + bool res = true; // store original size only for locally-sourced images if (mUrl.compare(0, 7, "file://") == 0) @@ -1537,7 +1537,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) } else { // leave black border, do not scale image content - mRawImage->expandToPowerOfTwo(MAX_IMAGE_SIZE, FALSE); + mRawImage->expandToPowerOfTwo(MAX_IMAGE_SIZE, false); } mFullWidth = mRawImage->getWidth(); @@ -1583,7 +1583,7 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) LL_WARNS() << "!size_ok, setting as missing" << LL_ENDL; setIsMissingAsset(); destroyRawImage(); - return FALSE; + return false; } if (mGLTexturep->getHasExplicitFormat()) @@ -1602,21 +1602,21 @@ BOOL LLViewerFetchedTexture::preCreateTexture(S32 usename/*= 0*/) setIsMissingAsset(); destroyRawImage(); LLAppViewer::getTextureCache()->removeFromCache(mID); - return FALSE; + return false; } } return res; } -BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) +bool LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) { if (!mNeedsCreateTexture) { - return FALSE; + return false; } - BOOL res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, true, mBoostLevel); + bool res = mGLTexturep->createGLTexture(mRawDiscardLevel, mRawImage, usename, true, mBoostLevel); return res; } @@ -1636,7 +1636,7 @@ void LLViewerFetchedTexture::postCreateTexture() if (!needsToSaveRawImage()) { - mNeedsAux = FALSE; + mNeedsAux = false; destroyRawImage(); } @@ -1729,8 +1729,8 @@ void LLViewerFetchedTexture::setKnownDrawSize(S32 width, S32 height) mKnownDrawWidth = llmax(mKnownDrawWidth, width); mKnownDrawHeight = llmax(mKnownDrawHeight, height); - mKnownDrawSizeChanged = TRUE; - mFullyLoaded = FALSE; + mKnownDrawSizeChanged = true; + mFullyLoaded = false; } addTextureStats((F32)(mKnownDrawWidth * mKnownDrawHeight)); } @@ -1765,7 +1765,7 @@ void LLViewerFetchedTexture::processTextureStats() if(mDesiredDiscardLevel > mMinDesiredDiscardLevel)//need to load more { mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel); - mFullyLoaded = FALSE; + mFullyLoaded = false; } //setDebugText("fully loaded"); } @@ -1821,11 +1821,11 @@ void LLViewerFetchedTexture::processTextureStats() mDesiredDiscardLevel = llclamp(mDesiredDiscardLevel, (S8)0, (S8)getMaxDiscardLevel()); mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, mMinDesiredDiscardLevel); } - mKnownDrawSizeChanged = FALSE; + mKnownDrawSizeChanged = false; if(getDiscardLevel() >= 0 && (getDiscardLevel() <= mDesiredDiscardLevel)) { - mFullyLoaded = TRUE; + mFullyLoaded = true; } } } @@ -1835,7 +1835,7 @@ void LLViewerFetchedTexture::processTextureStats() mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel); if(getDiscardLevel() < 0 || getDiscardLevel() > mDesiredDiscardLevel) { - mFullyLoaded = FALSE; + mFullyLoaded = false; } } } @@ -1871,10 +1871,10 @@ bool LLViewerFetchedTexture::setDebugFetching(S32 debug_level) { if(debug_level < 0) { - mInDebug = FALSE; + mInDebug = false; return false; } - mInDebug = TRUE; + mInDebug = true; mDesiredDiscardLevel = debug_level; @@ -1967,12 +1967,12 @@ bool LLViewerFetchedTexture::updateFetch() if (mRawImage.notNull()) sRawCount++; if (mAuxRawImage.notNull()) { - mHasAux = TRUE; + mHasAux = true; sAuxCount++; } if (finished) { - mIsFetching = FALSE; + mIsFetching = false; mLastFetchState = -1; mLastPacketTimer.reset(); } @@ -1989,7 +1989,7 @@ bool LLViewerFetchedTexture::updateFetch() LLTexturePipelineTester* tester = (LLTexturePipelineTester*)LLMetricPerformanceTesterBasic::getTester(sTesterName); if (tester) { - mIsFetched = TRUE; + mIsFetched = true; tester->updateTextureLoadingStats(this, mRawImage, LLAppViewer::getTextureFetch()->isFromLocalCache(mID)); } mRawDiscardLevel = fetch_discard; @@ -2011,12 +2011,12 @@ bool LLViewerFetchedTexture::updateFetch() LL_WARNS() << "oversize, setting as missing" << LL_ENDL; setIsMissingAsset(); mRawDiscardLevel = INVALID_DISCARD_LEVEL; - mIsFetching = FALSE; + mIsFetching = false; mLastPacketTimer.reset(); } else { - mIsRawImageValid = TRUE; + mIsRawImageValid = true; addToCreateTexture(); } @@ -2044,7 +2044,7 @@ bool LLViewerFetchedTexture::updateFetch() } } - return TRUE; + return true; } else { @@ -2192,8 +2192,8 @@ bool LLViewerFetchedTexture::updateFetch() if (fetch_request_discard >= 0) { LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vftuf - request created"); - mHasFetcher = TRUE; - mIsFetching = TRUE; + mHasFetcher = true; + mIsFetching = true; // in some cases createRequest can modify discard, as an example // bake textures are always at discard 0 mRequestedDiscardLevel = llmin(desired_discard, fetch_request_discard); @@ -2217,7 +2217,7 @@ bool LLViewerFetchedTexture::updateFetch() { LL_DEBUGS("Texture") << "exceeded idle time " << FETCH_IDLE_TIME << ", deleting request: " << getID() << LL_ENDL; LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); - mHasFetcher = FALSE; + mHasFetcher = false; } } @@ -2227,7 +2227,7 @@ bool LLViewerFetchedTexture::updateFetch() void LLViewerFetchedTexture::clearFetchedResults() { // For texture refresh - mIsMissingAsset = FALSE; + mIsMissingAsset = false; if(mNeedsCreateTexture || mIsFetching) { @@ -2247,8 +2247,8 @@ void LLViewerFetchedTexture::forceToDeleteRequest() { if (mHasFetcher) { - mHasFetcher = FALSE; - mIsFetching = FALSE; + mHasFetcher = false; + mIsFetching = false; } resetTextureStats(); @@ -2256,7 +2256,7 @@ void LLViewerFetchedTexture::forceToDeleteRequest() mDesiredDiscardLevel = getMaxDiscardLevel() + 1; } -void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing) +void LLViewerFetchedTexture::setIsMissingAsset(bool is_missing) { if (is_missing == mIsMissingAsset) { @@ -2281,8 +2281,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing) if (mHasFetcher) { LLAppViewer::getTextureFetch()->deleteRequest(getID(), true); - mHasFetcher = FALSE; - mIsFetching = FALSE; + mHasFetcher = false; + mIsFetching = false; mLastPacketTimer.reset(); mFetchState = 0; mFetchPriority = 0; @@ -2296,8 +2296,8 @@ void LLViewerFetchedTexture::setIsMissingAsset(BOOL is_missing) } void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_callback, - S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, void* userdata, - LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, BOOL pause) + S32 discard_level, bool keep_imageraw, bool needs_aux, void* userdata, + LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, bool pause) { // // Don't do ANYTHING here, just add it to the global callback list @@ -2331,7 +2331,7 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call mNeedsAux |= needs_aux; if(keep_imageraw) { - mSaveRawImage = TRUE; + mSaveRawImage = true; } if (mNeedsAux && mAuxRawImage.isNull() && getDiscardLevel() >= 0) { @@ -2364,7 +2364,7 @@ void LLViewerFetchedTexture::clearCallbackEntryList() // We never finished loading the image. Indicate failure. // Note: this allows mLoadedCallbackUserData to be cleaned up. - entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData); + entryp->mCallback(false, this, NULL, NULL, 0, true, entryp->mUserData); iter = mLoadedCallbackList.erase(iter); delete entryp; } @@ -2396,7 +2396,7 @@ void LLViewerFetchedTexture::deleteCallbackEntry(const LLLoadedCallbackEntry::so { // We never finished loading the image. Indicate failure. // Note: this allows mLoadedCallbackUserData to be cleaned up. - entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData); + entryp->mCallback(false, this, NULL, NULL, 0, true, entryp->mUserData); iter = mLoadedCallbackList.erase(iter); delete entryp; } @@ -2440,30 +2440,30 @@ void LLViewerFetchedTexture::unpauseLoadedCallbacks(const LLLoadedCallbackEntry: { if(!callback_list) { - mPauseLoadedCallBacks = FALSE; + mPauseLoadedCallBacks = false; return; } - BOOL need_raw = FALSE; + bool need_raw = false; for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); iter != mLoadedCallbackList.end(); ) { LLLoadedCallbackEntry *entryp = *iter++; if(entryp->mSourceCallbackList == callback_list) { - entryp->mPaused = FALSE; + entryp->mPaused = false; if(entryp->mNeedsImageRaw) { - need_raw = TRUE; + need_raw = true; } } } - mPauseLoadedCallBacks = FALSE ; + mPauseLoadedCallBacks = false ; mLastCallBackActiveTime = sCurrentTime ; - mForceCallbackFetch = TRUE; + mForceCallbackFetch = true; if(need_raw) { - mSaveRawImage = TRUE; + mSaveRawImage = true; } } @@ -2482,7 +2482,7 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s LLLoadedCallbackEntry *entryp = *iter++; if(entryp->mSourceCallbackList == callback_list) { - entryp->mPaused = TRUE; + entryp->mPaused = true; } else if(!entryp->mPaused) { @@ -2492,9 +2492,9 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s if(paused) { - mPauseLoadedCallBacks = TRUE;//when set, loaded callback is paused. + mPauseLoadedCallBacks = true;//when set, loaded callback is paused. resetTextureStats(); - mSaveRawImage = FALSE; + mSaveRawImage = false; } } @@ -2545,7 +2545,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() LLLoadedCallbackEntry *entryp = *iter++; // We never finished loading the image. Indicate failure. // Note: this allows mLoadedCallbackUserData to be cleaned up. - entryp->mCallback(FALSE, this, NULL, NULL, 0, TRUE, entryp->mUserData); + entryp->mCallback(false, this, NULL, NULL, 0, true, entryp->mUserData); delete entryp; } mLoadedCallbackList.clear(); @@ -2678,11 +2678,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() { LL_WARNS() << "Raw Image with no Aux Data for callback" << LL_ENDL; } - BOOL final = mRawDiscardLevel <= entryp->mDesiredDiscard ? TRUE : FALSE; + bool final = mRawDiscardLevel <= entryp->mDesiredDiscard ? true : false; //LL_INFOS() << "Running callback for " << getID() << LL_ENDL; //LL_INFOS() << mRawImage->getWidth() << "x" << mRawImage->getHeight() << LL_ENDL; entryp->mLastUsedDiscard = mRawDiscardLevel; - entryp->mCallback(TRUE, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData); + entryp->mCallback(true, this, mRawImage, mAuxRawImage, mRawDiscardLevel, final, entryp->mUserData); if (final) { iter = mLoadedCallbackList.erase(curiter); @@ -2709,9 +2709,9 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() if (!entryp->mNeedsImageRaw && (entryp->mLastUsedDiscard > gl_discard)) { mLastCallBackActiveTime = sCurrentTime; - BOOL final = gl_discard <= entryp->mDesiredDiscard ? TRUE : FALSE; + bool final = gl_discard <= entryp->mDesiredDiscard ? true : false; entryp->mLastUsedDiscard = gl_discard; - entryp->mCallback(TRUE, this, NULL, NULL, gl_discard, final, entryp->mUserData); + entryp->mCallback(true, this, NULL, NULL, gl_discard, final, entryp->mUserData); if (final) { iter = mLoadedCallbackList.erase(curiter); @@ -2736,7 +2736,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() { //wait for long enough but no fetching request issued, force one. forceToRefetchTexture(mLoadedCallbackDesiredDiscardLevel, 5.f); - mForceCallbackFetch = FALSE; //fire once. + mForceCallbackFetch = false; //fire once. } return res; @@ -2809,7 +2809,7 @@ LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level) mRawDiscardLevel = discard_level; } } - mIsRawImageValid = TRUE; + mIsRawImageValid = true; sRawCount++; return mRawImage; @@ -2844,7 +2844,7 @@ void LLViewerFetchedTexture::destroyRawImage() mRawImage = NULL; - mIsRawImageValid = FALSE; + mIsRawImageValid = false; mRawDiscardLevel = INVALID_DISCARD_LEVEL; } } @@ -2868,7 +2868,7 @@ void LLViewerFetchedTexture::switchToCachedImage() gTextureList.dirtyImage(this); } - mIsRawImageValid = TRUE; + mIsRawImageValid = true; mRawDiscardLevel = mCachedRawDiscardLevel; scheduleCreateTexture(); @@ -2914,7 +2914,7 @@ void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* im mCachedRawImage = imageraw; } mCachedRawDiscardLevel = discard_level; - mCachedRawImageReady = TRUE; + mCachedRawImageReady = true; } } @@ -2985,7 +2985,7 @@ void LLViewerFetchedTexture::checkCachedRawSculptImage() { if(getDiscardLevel() != 0) { - mCachedRawImageReady = FALSE; + mCachedRawImageReady = false; } else if(isForSculptOnly()) { @@ -3040,7 +3040,7 @@ void LLViewerFetchedTexture::saveRawImage() if(mForceToSaveRawImage && mSavedRawDiscardLevel <= mDesiredSavedRawDiscardLevel) { - mForceToSaveRawImage = FALSE; + mForceToSaveRawImage = false; } mLastReferencedSavedRawImageTime = sCurrentTime; @@ -3056,7 +3056,7 @@ void LLViewerFetchedTexture::forceToRefetchTexture(S32 desired_discard, F32 kept } //trigger a new fetch. - mForceToSaveRawImage = TRUE ; + mForceToSaveRawImage = true ; mDesiredSavedRawDiscardLevel = desired_discard ; mKeptSavedRawImageTime = kept_time ; mLastReferencedSavedRawImageTime = sCurrentTime ; @@ -3076,7 +3076,7 @@ void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard, F32 kept_t if(!mForceToSaveRawImage || mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard) { - mForceToSaveRawImage = TRUE; + mForceToSaveRawImage = true; mDesiredSavedRawDiscardLevel = desired_discard; //copy from the cached raw image if exists. @@ -3099,14 +3099,14 @@ void LLViewerFetchedTexture::destroySavedRawImage() return; //keep the saved raw image. } - mForceToSaveRawImage = FALSE; - mSaveRawImage = FALSE; + mForceToSaveRawImage = false; + mSaveRawImage = false; clearCallbackEntryList(); mSavedRawImage = NULL ; - mForceToSaveRawImage = FALSE ; - mSaveRawImage = FALSE ; + mForceToSaveRawImage = false ; + mSaveRawImage = false ; mSavedRawDiscardLevel = -1 ; mDesiredSavedRawDiscardLevel = -1 ; mLastReferencedSavedRawImageTime = 0.0f ; @@ -3126,7 +3126,7 @@ LLImageRaw* LLViewerFetchedTexture::getSavedRawImage() return mSavedRawImage; } -BOOL LLViewerFetchedTexture::hasSavedRawImage() const +bool LLViewerFetchedTexture::hasSavedRawImage() const { return mSavedRawImage.notNull(); } @@ -3143,16 +3143,16 @@ F32 LLViewerFetchedTexture::getElapsedLastReferencedSavedRawImageTime() const //---------------------------------------------------------------------------------------------- //start of LLViewerLODTexture //---------------------------------------------------------------------------------------------- -LLViewerLODTexture::LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host, BOOL usemipmaps) +LLViewerLODTexture::LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host, bool usemipmaps) : LLViewerFetchedTexture(id, f_type, host, usemipmaps) { - init(TRUE); + init(true); } -LLViewerLODTexture::LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps) +LLViewerLODTexture::LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, bool usemipmaps) : LLViewerFetchedTexture(url, f_type, id, usemipmaps) { - init(TRUE); + init(true); } void LLViewerLODTexture::init(bool firstinit) @@ -3378,7 +3378,7 @@ LLViewerMediaTexture* LLViewerMediaTexture::findMediaTexture(const LLUUID& media return media_tex; } -LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LLImageGL* gl_image) +LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, bool usemipmaps, LLImageGL* gl_image) : LLViewerTexture(id, usemipmaps), mMediaImplp(NULL), mUpdateVirtualSizeTime(0) @@ -3394,9 +3394,9 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL mGLTexturep->setAllowCompression(false); - mGLTexturep->setNeedsAlphaAndPickMask(FALSE); + mGLTexturep->setNeedsAlphaAndPickMask(false); - mIsPlaying = FALSE; + mIsPlaying = false; setMediaImpl(); @@ -3419,17 +3419,17 @@ LLViewerMediaTexture::~LLViewerMediaTexture() } } -void LLViewerMediaTexture::reinit(BOOL usemipmaps /* = TRUE */) +void LLViewerMediaTexture::reinit(bool usemipmaps /* = true */) { llassert(mGLTexturep.notNull()); mUseMipMaps = usemipmaps; getLastReferencedTimer()->reset(); mGLTexturep->setUseMipMaps(mUseMipMaps); - mGLTexturep->setNeedsAlphaAndPickMask(FALSE); + mGLTexturep->setNeedsAlphaAndPickMask(false); } -void LLViewerMediaTexture::setUseMipMaps(BOOL mipmap) +void LLViewerMediaTexture::setUseMipMaps(bool mipmap) { mUseMipMaps = mipmap; @@ -3461,11 +3461,11 @@ void LLViewerMediaTexture::setMediaImpl() //return true if all faces to reference to this media texture are found //Note: mMediaFaceList is valid only for the current instant // because it does not check the face validity after the current frame. -BOOL LLViewerMediaTexture::findFaces() +bool LLViewerMediaTexture::findFaces() { mMediaFaceList.clear(); - BOOL ret = TRUE; + bool ret = true; LLViewerTexture* tex = gTextureList.findImage(mID, TEX_LIST_STANDARD); if(tex) //this media is a parcel media for tex. @@ -3486,7 +3486,7 @@ BOOL LLViewerMediaTexture::findFaces() if(!mMediaImplp) { - return TRUE; + return true; } //for media on a face. @@ -3502,13 +3502,13 @@ BOOL LLViewerMediaTexture::findFaces() // If this happens, viewer is likely to crash llassert(0); LL_WARNS() << "Dead object in mMediaImplp's object list" << LL_ENDL; - ret = FALSE; + ret = false; continue; } if (obj->mDrawable.isNull() || obj->mDrawable->isDead()) { - ret = FALSE; + ret = false; continue; } @@ -3523,7 +3523,7 @@ BOOL LLViewerMediaTexture::findFaces() } else { - ret = FALSE; + ret = false; } } } @@ -3572,9 +3572,9 @@ void LLViewerMediaTexture::removeMediaFromFace(LLFace* facep) return; //no need to remove the face because the media is not in playing. } - mIsPlaying = FALSE; //set to remove the media from the face. + mIsPlaying = false; //set to remove the media from the face. switchTexture(LLRender::DIFFUSE_MAP, facep); - mIsPlaying = TRUE; //set the flag back. + mIsPlaying = true; //set the flag back. if(getTotalNumFaces() < 1) //no face referencing to this media { @@ -3735,7 +3735,7 @@ void LLViewerMediaTexture::stopPlaying() // { // mMediaImplp->stop(); // } - mIsPlaying = FALSE; + mIsPlaying = false; } void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep) @@ -3776,7 +3776,7 @@ void LLViewerMediaTexture::switchTexture(U32 ch, LLFace* facep) } } -void LLViewerMediaTexture::setPlaying(BOOL playing) +void LLViewerMediaTexture::setPlaying(bool playing) { if(!mMediaImplp) { @@ -3798,7 +3798,7 @@ void LLViewerMediaTexture::setPlaying(BOOL playing) if(findFaces()) { //about to update all faces. - mMediaImplp->setUpdated(FALSE); + mMediaImplp->setUpdated(false); } if(mMediaFaceList.empty())//no face pointing to this media @@ -3836,7 +3836,7 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() if(!mMaxVirtualSizeResetCounter) { - addTextureStats(0.f, FALSE);//reset + addTextureStats(0.f, false);//reset } if(mIsPlaying) //media is playing @@ -3931,13 +3931,13 @@ void LLTexturePipelineTester::update() //start a new fetching session reset(); mStartFetchingTime = LLImageGL::sLastFrameTime; - mPause = FALSE; + mPause = false; } //update total gray time if(mUsingDefaultTexture) { - mUsingDefaultTexture = FALSE; + mUsingDefaultTexture = false; mTotalGrayTime = LLImageGL::sLastFrameTime - mStartFetchingTime; } @@ -3949,7 +3949,7 @@ void LLTexturePipelineTester::update() else if(!mPause) { //stop the current fetching session - mPause = TRUE; + mPause = true; outputTestResults(); reset(); } @@ -3957,9 +3957,9 @@ void LLTexturePipelineTester::update() void LLTexturePipelineTester::reset() { - mPause = TRUE; + mPause = true; - mUsingDefaultTexture = FALSE; + mUsingDefaultTexture = false; mStartStablizingTime = 0.0f; mEndStablizingTime = 0.0f; @@ -4010,7 +4010,7 @@ void LLTexturePipelineTester::updateTextureBindingStats(const LLViewerTexture* i } } -void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, BOOL from_cache) +void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, bool from_cache) { U32Bytes data_size = (U32Bytes)raw_imagep->getDataSize(); mTotalBytesLoaded += data_size; @@ -4039,7 +4039,7 @@ void LLTexturePipelineTester::updateTextureLoadingStats(const LLViewerFetchedTex void LLTexturePipelineTester::updateGrayTextureBinding() { - mUsingDefaultTexture = TRUE; + mUsingDefaultTexture = true; } void LLTexturePipelineTester::setStablizingTime() @@ -4166,7 +4166,7 @@ LLMetricPerformanceTesterWithSession::LLTestSession* LLTexturePipelineTester::lo //load a session std::string currentLabel = getCurrentLabelName(); - BOOL in_log = (*log).has(currentLabel); + bool in_log = (*log).has(currentLabel); while (in_log) { LLSD::String label = currentLabel; diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index cb4ca1f4bb..d852d4f394 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -60,7 +60,7 @@ class LLViewerMediaTexture ; class LLTexturePipelineTester ; -typedef void (*loaded_callback_func)( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); +typedef void (*loaded_callback_func)( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, bool final, void* userdata ); class LLFileSystem; class LLMessageSystem; @@ -76,19 +76,19 @@ public: public: LLLoadedCallbackEntry(loaded_callback_func cb, S32 discard_level, - BOOL need_imageraw, // Needs image raw for the callback + bool need_imageraw, // Needs image raw for the callback void* userdata, source_callback_list_t* src_callback_list, LLViewerFetchedTexture* target, - BOOL pause); + bool pause); ~LLLoadedCallbackEntry(); void removeTexture(LLViewerFetchedTexture* tex) ; loaded_callback_func mCallback; S32 mLastUsedDiscard; S32 mDesiredDiscard; - BOOL mNeedsImageRaw; - BOOL mPaused; + bool mNeedsImageRaw; + bool mPaused; void* mUserData; source_callback_list_t* mSourceCallbackList; @@ -124,13 +124,13 @@ public: static void initClass(); static void updateClass(); - LLViewerTexture(BOOL usemipmaps = TRUE); - LLViewerTexture(const LLUUID& id, BOOL usemipmaps) ; - LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps) ; - LLViewerTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps) ; + LLViewerTexture(bool usemipmaps = true); + LLViewerTexture(const LLUUID& id, bool usemipmaps) ; + LLViewerTexture(const LLImageRaw* raw, bool usemipmaps) ; + LLViewerTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps) ; virtual S8 getType() const; - virtual BOOL isMissingAsset() const ; + virtual bool isMissingAsset() const ; virtual void dump(); // debug info to LL_INFOS() virtual bool isViewerMediaTexture() const { return false; } @@ -146,7 +146,7 @@ public: void setTextureListType(S32 tex_type) { mTextureListType = tex_type; } S32 getTextureListType() { return mTextureListType; } - void addTextureStats(F32 virtual_size, BOOL needs_gltexture = TRUE) const; + void addTextureStats(F32 virtual_size, bool needs_gltexture = true) const; void resetTextureStats(); void setMaxVirtualSizeResetInterval(S32 interval)const {mMaxVirtualSizeResetInterval = interval;} void resetMaxVirtualSizeResetCounter()const {mMaxVirtualSizeResetCounter = mMaxVirtualSizeResetInterval;} @@ -173,12 +173,12 @@ public: virtual void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ; - BOOL isLargeImage() ; + bool isLargeImage() ; bool isInvisiprim() ; static bool isInvisiprim(LLUUID id) ; void setParcelMedia(LLViewerMediaTexture* media) {mParcelMedia = media;} - BOOL hasParcelMedia() const { return mParcelMedia != NULL;} + bool hasParcelMedia() const { return mParcelMedia != NULL;} LLViewerMediaTexture* getParcelMedia() const { return mParcelMedia;} /*virtual*/ void updateBindStatsForTester() ; @@ -283,9 +283,9 @@ class LLViewerFetchedTexture : public LLViewerTexture protected: /*virtual*/ ~LLViewerFetchedTexture(); public: - LLViewerFetchedTexture(const LLUUID& id, FTType f_type, const LLHost& host = LLHost(), BOOL usemipmaps = TRUE); - LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, BOOL usemipmaps); - LLViewerFetchedTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps = TRUE); + LLViewerFetchedTexture(const LLUUID& id, FTType f_type, const LLHost& host = LLHost(), bool usemipmaps = true); + LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, bool usemipmaps); + LLViewerFetchedTexture(const std::string& url, FTType f_type, const LLUUID& id, bool usemipmaps = true); public: @@ -338,8 +338,8 @@ public: // Set callbacks to get called when the image gets updated with higher // resolution versions. void setLoadedCallback(loaded_callback_func cb, - S32 discard_level, BOOL keep_imageraw, BOOL needs_aux, - void* userdata, LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, BOOL pause = FALSE); + S32 discard_level, bool keep_imageraw, bool needs_aux, + void* userdata, LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, bool pause = false); bool hasCallbacks() { return mLoadedCallbackList.empty() ? false : true; } void pauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list); void unpauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list); @@ -350,9 +350,9 @@ public: void addToCreateTexture(); //call to determine if createTexture is necessary - BOOL preCreateTexture(S32 usename = 0); + bool preCreateTexture(S32 usename = 0); // ONLY call from LLViewerTextureList or ImageGL background thread - BOOL createTexture(S32 usename = 0); + bool createTexture(S32 usename = 0); void postCreateTexture(); void scheduleCreateTexture(); @@ -360,7 +360,7 @@ public: virtual void processTextureStats() ; - BOOL needsAux() const { return mNeedsAux; } + bool needsAux() const { return mNeedsAux; } // Host we think might have this image, used for baked av textures. void setTargetHost(LLHost host) { mTargetHost = host; } @@ -376,7 +376,7 @@ public: bool setDebugFetching(S32 debug_level); bool isInDebug() const { return mInDebug; } - void setUnremovable(BOOL value) { mUnremovable = value; } + void setUnremovable(bool value) { mUnremovable = value; } bool isUnremovable() const { return mUnremovable; } void clearFetchedResults(); //clear all fetched results, for debug use. @@ -390,16 +390,16 @@ public: // to the specified text void setDebugText(const std::string& text); - void setIsMissingAsset(BOOL is_missing = true); - /*virtual*/ BOOL isMissingAsset() const override { return mIsMissingAsset; } + void setIsMissingAsset(bool is_missing = true); + /*virtual*/ bool isMissingAsset() const override { return mIsMissingAsset; } // returns dimensions of original image for local files (before power of two scaling) // and returns 0 for all asset system images S32 getOriginalWidth() { return mOrigWidth; } S32 getOriginalHeight() { return mOrigHeight; } - BOOL isInImageList() const {return mInImageList ;} - void setInImageList(BOOL flag) {mInImageList = flag ;} + bool isInImageList() const {return mInImageList ;} + void setInImageList(bool flag) {mInImageList = flag ;} LLFrameTimer* getLastPacketTimer() {return &mLastPacketTimer;} @@ -412,17 +412,17 @@ public: const std::string& getUrl() const {return mUrl;} //--------------- - BOOL isDeleted() ; - BOOL isInactive() ; - BOOL isDeletionCandidate(); + bool isDeleted() ; + bool isInactive() ; + bool isDeletionCandidate(); void setDeletionCandidate() ; void setInactive() ; - BOOL getUseDiscard() const { return mUseMipMaps && !mDontDiscard; } + bool getUseDiscard() const { return mUseMipMaps && !mDontDiscard; } //--------------- void setForSculpt(); - BOOL forSculpt() const {return mForSculpt;} - BOOL isForSculptOnly() const; + bool forSculpt() const {return mForSculpt;} + bool isForSculptOnly() const; //raw image management void checkCachedRawSculptImage() ; @@ -430,18 +430,18 @@ public: S32 getRawImageLevel() const {return mRawDiscardLevel;} LLImageRaw* getCachedRawImage() const { return mCachedRawImage ;} S32 getCachedRawImageLevel() const {return mCachedRawDiscardLevel;} - BOOL isCachedRawImageReady() const {return mCachedRawImageReady ;} - BOOL isRawImageValid()const { return mIsRawImageValid ; } + bool isCachedRawImageReady() const {return mCachedRawImageReady ;} + bool isRawImageValid()const { return mIsRawImageValid ; } void forceToSaveRawImage(S32 desired_discard = 0, F32 kept_time = 0.f) ; void forceToRefetchTexture(S32 desired_discard = 0, F32 kept_time = 60.f); /*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) override; void destroySavedRawImage() ; LLImageRaw* getSavedRawImage() ; - BOOL hasSavedRawImage() const ; + bool hasSavedRawImage() const ; F32 getElapsedLastReferencedSavedRawImageTime() const ; - BOOL isFullyLoaded() const; + bool isFullyLoaded() const; - BOOL hasFetcher() const { return mHasFetcher;} + bool hasFetcher() const { return mHasFetcher;} bool isFetching() const { return mIsFetching;} void setCanUseHTTP(bool can_use_http) {mCanUseHTTP = can_use_http;} @@ -469,15 +469,15 @@ private: //for atlas void resetFaceAtlas() ; - void invalidateAtlas(BOOL rebuild_geom) ; - BOOL insertToAtlas() ; + void invalidateAtlas(bool rebuild_geom) ; + bool insertToAtlas() ; private: - BOOL mFullyLoaded; - BOOL mInDebug; - BOOL mUnremovable; - BOOL mInFastCacheList; - BOOL mForceCallbackFetch; + bool mFullyLoaded; + bool mInDebug; + bool mUnremovable; + bool mInFastCacheList; + bool mForceCallbackFetch; protected: std::string mLocalFileName; @@ -489,7 +489,7 @@ protected: // Used for UI textures to not decode, even if we have more data. S32 mKnownDrawWidth; S32 mKnownDrawHeight; - BOOL mKnownDrawSizeChanged ; + bool mKnownDrawSizeChanged ; std::string mUrl; S32 mRequestedDiscardLevel; @@ -504,21 +504,21 @@ protected: S8 mDesiredDiscardLevel; // The discard level we'd LIKE to have - if we have it and there's space S8 mMinDesiredDiscardLevel; // The minimum discard level we'd like to have - S8 mNeedsAux; // We need to decode the auxiliary channels - S8 mHasAux; // We have aux channels - S8 mDecodingAux; // Are we decoding high components - S8 mIsRawImageValid; - S8 mHasFetcher; // We've made a fecth request - S8 mIsFetching; // Fetch request is active + bool mNeedsAux; // We need to decode the auxiliary channels + bool mHasAux; // We have aux channels + bool mDecodingAux; // Are we decoding high components + bool mIsRawImageValid; + bool mHasFetcher; // We've made a fecth request + bool mIsFetching; // Fetch request is active bool mCanUseHTTP; //This texture can be fetched through http if true. LLCore::HttpStatus mLastHttpGetStatus; // Result of the most recently completed http request for this texture. FTType mFTType; // What category of image is this - map tile, server bake, etc? - mutable S8 mIsMissingAsset; // True if we know that there is no image asset with this image id in the database. + mutable bool mIsMissingAsset; // True if we know that there is no image asset with this image id in the database. typedef std::list callback_list_t; S8 mLoadedCallbackDesiredDiscardLevel; - BOOL mPauseLoadedCallBacks; + bool mPauseLoadedCallBacks; callback_list_t mLoadedCallbackList; F32 mLastCallBackActiveTime; @@ -531,8 +531,8 @@ protected: //keep a copy of mRawImage for some special purposes //when mForceToSaveRawImage is set. - BOOL mForceToSaveRawImage ; - BOOL mSaveRawImage; + bool mForceToSaveRawImage ; + bool mSaveRawImage; LLPointer mSavedRawImage; S32 mSavedRawDiscardLevel; S32 mDesiredSavedRawDiscardLevel; @@ -542,7 +542,7 @@ protected: //a small version of the copy of the raw image (<= 64 * 64) LLPointer mCachedRawImage; S32 mCachedRawDiscardLevel; - BOOL mCachedRawImageReady; //the rez of the mCachedRawImage reaches the upper limit. + bool mCachedRawImageReady; //the rez of the mCachedRawImage reaches the upper limit. LLHost mTargetHost; // if invalid, just request from agent's simulator @@ -550,13 +550,13 @@ protected: LLFrameTimer mLastPacketTimer; // Time since last packet. LLFrameTimer mStopFetchingTimer; // Time since mDecodePriority == 0.f. - BOOL mInImageList; // TRUE if image is in list (in which case don't reset priority!) + bool mInImageList; // true if image is in list (in which case don't reset priority!) // This needs to be atomic, since it is written both in the main thread // and in the GL image worker thread... HB LLAtomicBool mNeedsCreateTexture; - BOOL mForSculpt ; //a flag if the texture is used as sculpt data. - BOOL mIsFetched ; //is loaded from remote or from cache, not generated locally. + bool mForSculpt ; //a flag if the texture is used as sculpt data. + bool mIsFetched ; //is loaded from remote or from cache, not generated locally. public: static F32 sMaxVirtualSize; //maximum possible value of mMaxVirtualSize @@ -585,8 +585,8 @@ protected: /*virtual*/ ~LLViewerLODTexture(){} public: - LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host = LLHost(), BOOL usemipmaps = TRUE); - LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps = TRUE); + LLViewerLODTexture(const LLUUID& id, FTType f_type, const LLHost& host = LLHost(), bool usemipmaps = true); + LLViewerLODTexture(const std::string& url, FTType f_type, const LLUUID& id, bool usemipmaps = true); /*virtual*/ S8 getType() const; // Process image stats to determine priority/quality requirements. @@ -612,16 +612,16 @@ protected: /*virtual*/ ~LLViewerMediaTexture() ; public: - LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ; + LLViewerMediaTexture(const LLUUID& id, bool usemipmaps = true, LLImageGL* gl_image = NULL) ; /*virtual*/ S8 getType() const; - void reinit(BOOL usemipmaps = TRUE); + void reinit(bool usemipmaps = true); - BOOL getUseMipMaps() {return mUseMipMaps ; } - void setUseMipMaps(BOOL mipmap) ; + bool getUseMipMaps() {return mUseMipMaps ; } + void setUseMipMaps(bool mipmap) ; - void setPlaying(BOOL playing) ; - BOOL isPlaying() const {return mIsPlaying;} + void setPlaying(bool playing) ; + bool isPlaying() const {return mIsPlaying;} void setMediaImpl() ; virtual bool isViewerMediaTexture() const { return true; } @@ -638,7 +638,7 @@ public: /*virtual*/ F32 getMaxVirtualSize() ; private: void switchTexture(U32 ch, LLFace* facep) ; - BOOL findFaces() ; + bool findFaces() ; void stopPlaying() ; private: @@ -653,7 +653,7 @@ private: std::list< LLPointer > mTextureList ; LLViewerMediaImpl* mMediaImplp ; - BOOL mIsPlaying ; + bool mIsPlaying ; U32 mUpdateVirtualSizeTime ; public: @@ -680,7 +680,7 @@ public: static LLTexturePipelineTester* sTesterp ; //returns NULL if tex is not a LLViewerFetchedTexture nor derived from LLViewerFetchedTexture. - static LLViewerFetchedTexture* staticCastToFetchedTexture(LLTexture* tex, BOOL report_error = FALSE) ; + static LLViewerFetchedTexture* staticCastToFetchedTexture(LLTexture* tex, bool report_error = false) ; // //"find-texture" just check if the texture exists, if yes, return it, otherwise return null. @@ -690,23 +690,23 @@ public: static LLViewerFetchedTexture* findFetchedTexture(const LLUUID& id, S32 tex_type); static LLViewerMediaTexture* findMediaTexture(const LLUUID& id) ; - static LLViewerMediaTexture* createMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ; + static LLViewerMediaTexture* createMediaTexture(const LLUUID& id, bool usemipmaps = true, LLImageGL* gl_image = NULL) ; // //"get-texture" will create a new texture if the texture does not exist. // - static LLViewerMediaTexture* getMediaTexture(const LLUUID& id, BOOL usemipmaps = TRUE, LLImageGL* gl_image = NULL) ; + static LLViewerMediaTexture* getMediaTexture(const LLUUID& id, bool usemipmaps = true, LLImageGL* gl_image = NULL) ; - static LLPointer getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE); - static LLPointer getLocalTexture(const LLUUID& id, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) ; - static LLPointer getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps) ; - static LLPointer getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) ; + static LLPointer getLocalTexture(bool usemipmaps = true, bool generate_gl_tex = true); + static LLPointer getLocalTexture(const LLUUID& id, bool usemipmaps, bool generate_gl_tex = true) ; + static LLPointer getLocalTexture(const LLImageRaw* raw, bool usemipmaps) ; + static LLPointer getLocalTexture(const U32 width, const U32 height, const U8 components, bool usemipmaps, bool generate_gl_tex = true) ; static LLViewerFetchedTexture* getFetchedTexture(const LLImageRaw* raw, FTType type, bool usemipmaps); static LLViewerFetchedTexture* getFetchedTexture(const LLUUID &image_id, FTType f_type = FTT_DEFAULT, - BOOL usemipmap = TRUE, + bool usemipmap = true, LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, @@ -716,7 +716,7 @@ public: static LLViewerFetchedTexture* getFetchedTextureFromFile(const std::string& filename, FTType f_type = FTT_LOCAL_FILE, - BOOL usemipmap = TRUE, + bool usemipmap = true, LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, @@ -726,7 +726,7 @@ public: static LLViewerFetchedTexture* getFetchedTextureFromUrl(const std::string& url, FTType f_type, - BOOL usemipmap = TRUE, + bool usemipmap = true, LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, @@ -756,7 +756,7 @@ public: void update(); void updateTextureBindingStats(const LLViewerTexture* imagep) ; - void updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, BOOL from_cache) ; + void updateTextureLoadingStats(const LLViewerFetchedTexture* imagep, const LLImageRaw* raw_imagep, bool from_cache) ; void updateGrayTextureBinding() ; void setStablizingTime() ; @@ -767,9 +767,9 @@ private: /*virtual*/ void outputTestRecord(LLSD* sd) ; private: - BOOL mPause ; + bool mPause ; private: - BOOL mUsingDefaultTexture; //if set, some textures are still gray. + bool mUsingDefaultTexture; //if set, some textures are still gray. U32Bytes mTotalBytesUsed ; //total bytes of textures bound/used for the current frame. U32Bytes mTotalBytesUsedForLargeImage ; //total bytes of textures bound/used for the current frame for images larger than 256 * 256. diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index fa13647f11..5fe38078f4 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -94,14 +94,14 @@ LLTextureKey::LLTextureKey(LLUUID id, ETexListType tex_type) /////////////////////////////////////////////////////////////////////////////// LLViewerTextureList::LLViewerTextureList() - : mForceResetTextureStats(FALSE), - mInitialized(FALSE) + : mForceResetTextureStats(false), + mInitialized(false) { } void LLViewerTextureList::init() { - mInitialized = TRUE ; + mInitialized = true ; sNumImages = 0; doPreloadImages(); } @@ -133,12 +133,12 @@ void LLViewerTextureList::doPreloadImages() image_list->initFromFile(); // turn off clamping and bilinear filtering for uv picking images - //LLViewerFetchedTexture* uv_test = preloadUIImage("uv_test1.tga", LLUUID::null, FALSE); - //uv_test->setClamp(FALSE, FALSE); - //uv_test->setMipFilterNearest(TRUE, TRUE); - //uv_test = preloadUIImage("uv_test2.tga", LLUUID::null, FALSE); - //uv_test->setClamp(FALSE, FALSE); - //uv_test->setMipFilterNearest(TRUE, TRUE); + //LLViewerFetchedTexture* uv_test = preloadUIImage("uv_test1.tga", LLUUID::null, false); + //uv_test->setClamp(false, false); + //uv_test->setMipFilterNearest(true, true); + //uv_test = preloadUIImage("uv_test2.tga", LLUUID::null, false); + //uv_test->setClamp(false, false); + //uv_test->setMipFilterNearest(true, true); LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTextureFromFile("silhouette.j2c", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI); if (image) @@ -182,9 +182,9 @@ void LLViewerTextureList::doPreloadImages() LLPointer img_blak_square_tex(new LLImageRaw(2, 2, 3)); memset(img_blak_square_tex->getData(), 0, img_blak_square_tex->getDataSize()); - LLPointer img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, FALSE)); + LLPointer img_blak_square(new LLViewerFetchedTexture(img_blak_square_tex, FTT_DEFAULT, false)); gBlackSquareID = img_blak_square->getID(); - img_blak_square->setUnremovable(TRUE); + img_blak_square->setUnremovable(true); addImage(img_blak_square, TEX_LIST_STANDARD); } @@ -228,7 +228,7 @@ void LLViewerTextureList::doPrefetchImages() LLViewerTextureManager::getFetchedTexture(IMG_SHOT); LLViewerTextureManager::getFetchedTexture(IMG_SMOKE_POOF); - LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + LLViewerFetchedTexture::sSmokeImagep = LLViewerTextureManager::getFetchedTexture(IMG_SMOKE, FTT_DEFAULT, true, LLGLTexture::BOOST_UI); LLViewerFetchedTexture::sSmokeImagep->setNoDelete(); LLStandardBumpmap::addstandard(); @@ -359,7 +359,7 @@ void LLViewerTextureList::shutdown() mImageList.clear(); - mInitialized = FALSE ; //prevent loading textures again. + mInitialized = false ; //prevent loading textures again. } void LLViewerTextureList::dump() @@ -380,7 +380,7 @@ void LLViewerTextureList::dump() } } -void LLViewerTextureList::destroyGL(BOOL save_state) +void LLViewerTextureList::destroyGL(bool save_state) { LLImageGL::destroyGL(save_state); } @@ -402,7 +402,7 @@ void LLViewerTextureList::restoreGL() LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename, FTType f_type, - BOOL usemipmaps, + bool usemipmaps, LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, @@ -420,7 +420,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& { LL_WARNS() << "Failed to find local image file: " << filename << LL_ENDL; LLViewerTexture::EBoostLevel priority = LLGLTexture::BOOST_UI; - return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, priority); + return LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, true, priority); } std::string url = "file://" + full_path; @@ -430,7 +430,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& url, FTType f_type, - BOOL usemipmaps, + bool usemipmaps, LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, @@ -520,7 +520,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, FTType f_type, - BOOL usemipmaps, + bool usemipmaps, LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, @@ -539,7 +539,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, if (image_id.isNull()) { - return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI)); + return (LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, true, LLGLTexture::BOOST_UI)); } LLPointer imagep = findImage(image_id, get_element_type(boost_priority)); @@ -577,7 +577,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, //when this function is called, there is no such texture in the gTextureList with image_id. LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, FTType f_type, - BOOL usemipmaps, + bool usemipmaps, LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, @@ -681,7 +681,7 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) { LL_WARNS() << "Error happens when insert image " << image->getID() << " into mImageList!" << LL_ENDL ; } - image->setInImageList(TRUE) ; + image->setInImageList(true) ; } } @@ -733,7 +733,7 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image) } } - image->setInImageList(FALSE) ; + image->setInImageList(false) ; } void LLViewerTextureList::addImage(LLViewerFetchedTexture *new_image, ETexListType tex_type) @@ -791,18 +791,18 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) void LLViewerTextureList::updateImages(F32 max_time) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; - static BOOL cleared = FALSE; + static bool cleared = false; if(gTeleportDisplay) { if(!cleared) { clearFetchingRequests(); gPipeline.clearRebuildGroups(); - cleared = TRUE; + cleared = true; } return; } - cleared = FALSE; + cleared = false; LLAppViewer::getTextureFetch()->setTextureBandwidth(LLTrace::get_frame_recording().getPeriodMeanPerSec(LLStatViewer::TEXTURE_NETWORK_DATA_RECEIVED).value()); @@ -881,7 +881,7 @@ static void touch_texture(LLViewerFetchedTexture* tex, F32 vsize) } } -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep) { @@ -922,7 +922,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag F32 radius; F32 cos_angle_to_view_dir; - BOOL in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius); + bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius); if (!in_frustum || !face->getDrawable()->isVisible()) { // further reduce by discard bias when off screen or occluded vsize /= LLViewerTexture::sDesiredDiscardBias; @@ -1185,7 +1185,7 @@ void LLViewerTextureList::updateImagesUpdateStats() LLViewerFetchedTexture* imagep = *iter++; imagep->resetTextureStats(); } - mForceResetTextureStats = FALSE; + mForceResetTextureStats = false; } } @@ -1204,7 +1204,7 @@ void LLViewerTextureList::decodeAllImages(F32 max_time) { LLViewerFetchedTexture* imagep = *iter++; image_list.push_back(imagep); - imagep->setInImageList(FALSE) ; + imagep->setInImageList(false) ; } llassert_always(image_list.size() == mImageList.size()) ; @@ -1304,7 +1304,7 @@ bool LLViewerTextureList::createUploadFile(LLPointer raw_image, return true; } -BOOL LLViewerTextureList::createUploadFile(const std::string& filename, +bool LLViewerTextureList::createUploadFile(const std::string& filename, const std::string& out_filename, const U8 codec, const S32 max_image_dimentions, @@ -1317,25 +1317,25 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, if (image.isNull()) { LL_WARNS() << "Couldn't open the image to be uploaded." << LL_ENDL; - return FALSE; + return false; } if (!image->load(filename)) { image->setLastError("Couldn't load the image to be uploaded."); - return FALSE; + return false; } // Decompress or expand it in a raw image structure LLPointer raw_image = new LLImageRaw; if (!image->decode(raw_image, 0.0f)) { image->setLastError("Couldn't decode the image to be uploaded."); - return FALSE; + return false; } // Check the image constraints if ((image->getComponents() != 3) && (image->getComponents() != 4)) { image->setLastError("Image files with less than 3 or more than 4 components are not supported."); - return FALSE; + return false; } if (image->getWidth() < min_image_dimentions || image->getHeight() < min_image_dimentions) { @@ -1345,7 +1345,7 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, image->getWidth(), image->getHeight()); image->setLastError(reason); - return FALSE; + return false; } // Convert to j2c (JPEG2000) and save the file locally LLPointer compressedImage = convertToUploadFile(raw_image, max_image_dimentions, force_square); @@ -1353,13 +1353,13 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, { image->setLastError("Couldn't convert the image to jpeg2000."); LL_INFOS() << "Couldn't convert to j2c, file : " << filename << LL_ENDL; - return FALSE; + return false; } if (!compressedImage->save(out_filename)) { image->setLastError("Couldn't create the jpeg2000 image for upload."); LL_INFOS() << "Couldn't create output file : " << out_filename << LL_ENDL; - return FALSE; + return false; } // Test to see if the encode and save worked LLPointer integrity_test = new LLImageJ2C; @@ -1367,9 +1367,9 @@ BOOL LLViewerTextureList::createUploadFile(const std::string& filename, { image->setLastError("The created jpeg2000 image is corrupt."); LL_INFOS() << "Image file : " << out_filename << " is corrupt" << LL_ENDL; - return FALSE; + return false; } - return TRUE; + return true; } // note: modifies the argument raw_image!!!! @@ -1395,7 +1395,7 @@ LLPointer LLViewerTextureList::convertToUploadFile(LLPointergetWidth() * raw_image->getHeight() <= LL_IMAGE_REZ_LOSSLESS_CUTOFF * LL_IMAGE_REZ_LOSSLESS_CUTOFF))) { - compressedImage->setReversible(TRUE); + compressedImage->setReversible(true); } @@ -1477,7 +1477,7 @@ void LLViewerTextureList::receiveImageHeader(LLMessageSystem *msg, void **user_d U8 *data = new U8[data_size]; msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); - LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); if (!image) { delete [] data; @@ -1550,7 +1550,7 @@ void LLViewerTextureList::receiveImagePacket(LLMessageSystem *msg, void **user_d U8 *data = new U8[data_size]; msg->getBinaryDataFast(_PREHASH_ImageData, _PREHASH_Data, data, data_size); - LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + LLViewerFetchedTexture *image = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); if (!image) { delete [] data; @@ -1618,7 +1618,7 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority) return found_it->second; } - const BOOL use_mips = FALSE; + const bool use_mips = false; const LLRect scale_rect = LLRect::null; const LLRect clip_rect = LLRect::null; return loadUIImageByID(image_id, use_mips, scale_rect, clip_rect, (LLViewerTexture::EBoostLevel)priority); @@ -1634,14 +1634,14 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priori return found_it->second; } - const BOOL use_mips = FALSE; + const bool use_mips = false; const LLRect scale_rect = LLRect::null; const LLRect clip_rect = LLRect::null; return loadUIImageByName(image_name, image_name, use_mips, scale_rect, clip_rect, (LLViewerTexture::EBoostLevel)priority); } LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, - BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority, + bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority, LLUIImage::EScaleStyle scale_style) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; @@ -1654,7 +1654,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std } LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, - BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority, + bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLViewerTexture::EBoostLevel boost_priority, LLUIImage::EScaleStyle scale_style) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; @@ -1666,7 +1666,7 @@ LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, return loadUIImage(imagep, id.asString(), use_mips, scale_rect, clip_rect, scale_style); } -LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, +LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; @@ -1701,12 +1701,12 @@ LLUIImagePtr LLUIImageList::loadUIImage(LLViewerFetchedTexture* imagep, const st datap->mImageScaleRegion = scale_rect; datap->mImageClipRegion = clip_rect; - imagep->setLoadedCallback(onUIImageLoaded, 0, FALSE, FALSE, datap, NULL); + imagep->setLoadedCallback(onUIImageLoaded, 0, false, false, datap, NULL); } return new_imagep; } -LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style) +LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::string& filename, bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle scale_style) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; // look for existing image @@ -1721,7 +1721,7 @@ LLUIImagePtr LLUIImageList::preloadUIImage(const std::string& name, const std::s } //static -void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* user_data ) +void LLUIImageList::onUIImageLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, bool final, void* user_data ) { LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; if(!success || !user_data) diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 0675c60069..14542430c9 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -38,25 +38,25 @@ const U32 LL_IMAGE_REZ_LOSSLESS_CUTOFF = 128; -const BOOL MIPMAP_YES = TRUE; -const BOOL MIPMAP_NO = FALSE; +const bool MIPMAP_YES = true; +const bool MIPMAP_NO = false; -const BOOL GL_TEXTURE_YES = TRUE; -const BOOL GL_TEXTURE_NO = FALSE; +const bool GL_TEXTURE_YES = true; +const bool GL_TEXTURE_NO = false; -const BOOL IMMEDIATE_YES = TRUE; -const BOOL IMMEDIATE_NO = FALSE; +const bool IMMEDIATE_YES = true; +const bool IMMEDIATE_NO = false; class LLImageJ2C; class LLMessageSystem; class LLTextureView; -typedef void (*LLImageCallback)(BOOL success, +typedef void (*LLImageCallback)(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, - BOOL final, + bool final, void* userdata); enum ETexListType @@ -96,7 +96,7 @@ public: const std::string& out_filename, const S32 max_image_dimentions = LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT, const S32 min_image_dimentions = 0); - static BOOL createUploadFile(const std::string& filename, + static bool createUploadFile(const std::string& filename, const std::string& out_filename, const U8 codec, const S32 max_image_dimentions = LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT, @@ -119,9 +119,9 @@ public: void init(); void shutdown(); void dump(); - void destroyGL(BOOL save_state = TRUE); + void destroyGL(bool save_state = true); void restoreGL(); - BOOL isInitialized() const {return mInitialized;} + bool isInitialized() const {return mInitialized;} void findTexturesByID(const LLUUID &image_id, std::vector &output); LLViewerFetchedTexture *findImage(const LLUUID &image_id, ETexListType tex_type); @@ -169,7 +169,7 @@ private: public: // PoundLife - Improved Object Inspect LLViewerFetchedTexture * getImage(const LLUUID &image_id, FTType f_type = FTT_DEFAULT, - BOOL usemipmap = TRUE, + bool usemipmap = true, LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, @@ -180,7 +180,7 @@ public: // PoundLife - Improved Object Inspect private: // PoundLife - Improved Object Inspect LLViewerFetchedTexture * getImageFromFile(const std::string& filename, FTType f_type = FTT_LOCAL_FILE, - BOOL usemipmap = TRUE, + bool usemipmap = true, LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, @@ -190,7 +190,7 @@ private: // PoundLife - Improved Object Inspect LLViewerFetchedTexture* getImageFromUrl(const std::string& url, FTType f_type, - BOOL usemipmap = TRUE, + bool usemipmap = true, LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, @@ -200,7 +200,7 @@ private: // PoundLife - Improved Object Inspect LLViewerFetchedTexture* createImage(const LLUUID &image_id, FTType f_type, - BOOL usemipmap = TRUE, + bool usemipmap = true, LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, @@ -211,7 +211,7 @@ private: // PoundLife - Improved Object Inspect // Request image from a specific host, used for baked avatar textures. // Implemented in header in case someone changes default params above. JC LLViewerFetchedTexture* getImageFromHost(const LLUUID& image_id, FTType f_type, LLHost host) - { return getImage(image_id, f_type, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); } + { return getImage(image_id, f_type, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, host); } public: typedef std::set > image_list_t; @@ -223,7 +223,7 @@ public: // Note: just raw pointers because they are never referenced, just compared against std::set mDirtyTextureList; - BOOL mForceResetTextureStats; + bool mForceResetTextureStats; // Fast cache stats static U32 sNumFastCacheReads; @@ -239,7 +239,7 @@ private: // simply holds on to LLViewerFetchedTexture references to stop them from being purged too soon std::set > mImagePreloads; - BOOL mInitialized ; + bool mInitialized ; LLFrameTimer mForceDecodeTimer; private: @@ -259,22 +259,22 @@ public: bool initFromFile(); - LLPointer preloadUIImage(const std::string& name, const std::string& filename, BOOL use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle stype); + LLPointer preloadUIImage(const std::string& name, const std::string& filename, bool use_mips, const LLRect& scale_rect, const LLRect& clip_rect, LLUIImage::EScaleStyle stype); - static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); + static void onUIImageLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, bool final, void* userdata ); private: LLPointer loadUIImageByName(const std::string& name, const std::string& filename, - BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, + bool use_mips = false, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null, LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI, LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER); LLPointer loadUIImageByID(const LLUUID& id, - BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, + bool use_mips = false, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null, LLViewerTexture::EBoostLevel boost_priority = LLGLTexture::BOOST_UI, LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER); - LLPointer loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null, LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER); + LLPointer loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, bool use_mips = false, const LLRect& scale_rect = LLRect::null, const LLRect& clip_rect = LLRect::null, LLUIImage::EScaleStyle = LLUIImage::SCALE_INNER); struct LLUIImageLoadData @@ -293,10 +293,10 @@ private: std::list< LLPointer > mUITextureList ; }; -const BOOL GLTEXTURE_TRUE = TRUE; -const BOOL GLTEXTURE_FALSE = FALSE; -const BOOL MIPMAP_TRUE = TRUE; -const BOOL MIPMAP_FALSE = FALSE; +const bool GLTEXTURE_TRUE = true; +const bool GLTEXTURE_FALSE = false; +const bool MIPMAP_TRUE = true; +const bool MIPMAP_FALSE = false; extern LLViewerTextureList gTextureList; diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp index 20390a316a..5de825e972 100644 --- a/indra/newview/llviewerthrottle.cpp +++ b/indra/newview/llviewerthrottle.cpp @@ -207,7 +207,7 @@ LLViewerThrottle::LLViewerThrottle() : } -void LLViewerThrottle::setMaxBandwidth(F32 kbits_per_second, BOOL from_event) +void LLViewerThrottle::setMaxBandwidth(F32 kbits_per_second, bool from_event) { if (!from_event) { diff --git a/indra/newview/llviewerthrottle.h b/indra/newview/llviewerthrottle.h index fe54b06662..33fb51db0e 100644 --- a/indra/newview/llviewerthrottle.h +++ b/indra/newview/llviewerthrottle.h @@ -58,7 +58,7 @@ class LLViewerThrottle public: LLViewerThrottle(); - void setMaxBandwidth(F32 kbits_per_second, BOOL from_event = FALSE); + void setMaxBandwidth(F32 kbits_per_second, bool from_event = false); void load(); void save() const; diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp index 00da2094ff..91b8273a72 100644 --- a/indra/newview/llviewerwearable.cpp +++ b/indra/newview/llviewerwearable.cpp @@ -81,7 +81,7 @@ static std::string asset_id_to_filename(const LLUUID &asset_id, const ELLPath di LLViewerWearable::LLViewerWearable(const LLTransactionID& transaction_id) : LLWearable(), - mVolatile(FALSE) + mVolatile(false) { mTransactionID = transaction_id; mAssetID = mTransactionID.makeAssetID(gAgent.getSecureSessionID()); @@ -89,7 +89,7 @@ LLViewerWearable::LLViewerWearable(const LLTransactionID& transaction_id) : LLViewerWearable::LLViewerWearable(const LLAssetID& asset_id) : LLWearable(), - mVolatile(FALSE) + mVolatile(false) { mAssetID = asset_id; mTransactionID.setNull(); @@ -135,7 +135,7 @@ LLWearable::EImportResult LLViewerWearable::importStream( std::istream& input_st LLViewerFetchedTexture* image = LLViewerTextureManager::getFetchedTexture( textureid ); if(gSavedSettings.getBOOL("DebugAvatarLocalTexLoadedTime")) { - image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(textureid, (LLAvatarAppearanceDefines::ETextureIndex)te), NULL); + image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,true,false, new LLVOAvatarSelf::LLAvatarTexData(textureid, (LLAvatarAppearanceDefines::ETextureIndex)te), NULL); } } @@ -146,9 +146,9 @@ LLWearable::EImportResult LLViewerWearable::importStream( std::istream& input_st // Avatar parameter and texture definitions can change over time. // This function returns true if parameters or textures have been added or removed // since this wearable was created. -BOOL LLViewerWearable::isOldVersion() const +bool LLViewerWearable::isOldVersion() const { - if (!isAgentAvatarValid()) return FALSE; + if (!isAgentAvatarValid()) return false; if( LLWearable::sCurrentDefinitionVersion < mDefinitionVersion ) { @@ -158,7 +158,7 @@ BOOL LLViewerWearable::isOldVersion() const if( LLWearable::sCurrentDefinitionVersion != mDefinitionVersion ) { - return TRUE; + return true; } S32 param_count = 0; @@ -171,13 +171,13 @@ BOOL LLViewerWearable::isOldVersion() const param_count++; if( !is_in_map(mVisualParamIndexMap, param->getID() ) ) { - return TRUE; + return true; } } } if( param_count != mVisualParamIndexMap.size() ) { - return TRUE; + return true; } @@ -189,16 +189,16 @@ BOOL LLViewerWearable::isOldVersion() const te_count++; if( !is_in_map(mTEMap, te ) ) { - return TRUE; + return true; } } } if( te_count != mTEMap.size() ) { - return TRUE; + return true; } - return FALSE; + return false; } // Avatar parameter and texture definitions can change over time. @@ -208,9 +208,9 @@ BOOL LLViewerWearable::isOldVersion() const // * If parameters or textures have been ADDED since the wearable was created, // they are taken to have default values, so we consider the wearable clean // only if those values are the same as the defaults. -BOOL LLViewerWearable::isDirty() const +bool LLViewerWearable::isDirty() const { - if (!isAgentAvatarValid()) return FALSE; + if (!isAgentAvatarValid()) return false; for( LLViewerVisualParam* param = (LLViewerVisualParam*) gAgentAvatarp->getFirstVisualParam(); param; @@ -229,7 +229,7 @@ BOOL LLViewerWearable::isDirty() const U8 b = F32_to_U8( current_weight, param->getMinWeight(), param->getMaxWeight() ); if( a != b ) { - return TRUE; + return true; } } } @@ -249,19 +249,19 @@ BOOL LLViewerWearable::isDirty() const if (saved_image_id != current_image_id) { // saved vs current images are different, wearable is dirty - return TRUE; + return true; } } else { // image found in current image list but not saved image list - return TRUE; + return true; } } } } - return FALSE; + return false; } @@ -351,7 +351,7 @@ void LLViewerWearable::writeToAvatar(LLAvatarAppearance *avatarp) { image_id = getDefaultTextureImageID((ETextureIndex) te); } - LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE ); + LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE ); // MULTI-WEARABLE: assume index 0 will be used when writing to avatar. TODO: eliminate the need for this. viewer_avatar->setLocalTextureTE(te, image, 0); } diff --git a/indra/newview/llviewerwearable.h b/indra/newview/llviewerwearable.h index c6b9207fd5..07699ab947 100644 --- a/indra/newview/llviewerwearable.h +++ b/indra/newview/llviewerwearable.h @@ -58,8 +58,8 @@ public: public: - BOOL isDirty() const; - BOOL isOldVersion() const; + bool isDirty() const; + bool isOldVersion() const; /*virtual*/ void writeToAvatar(LLAvatarAppearance *avatarp); // [Legacy Bake] @@ -73,8 +73,8 @@ public: void setParamsToDefaults(); void setTexturesToDefaults(); - void setVolatile(BOOL is_volatile) { mVolatile = is_volatile; } // TRUE when doing preview renders, some updates will be suppressed. - BOOL getVolatile() { return mVolatile; } + void setVolatile(bool is_volatile) { mVolatile = is_volatile; } // true when doing preview renders, some updates will be suppressed. + bool getVolatile() { return mVolatile; } /*virtual*/ LLUUID getDefaultTextureImageID(LLAvatarAppearanceDefines::ETextureIndex index) const; @@ -104,7 +104,7 @@ protected: LLAssetID mAssetID; LLTransactionID mTransactionID; - BOOL mVolatile; // True when rendering preview images. Can suppress some updates. + bool mVolatile; // True when rendering preview images. Can suppress some updates. LLUUID mItemID; // ID of the inventory item in the agent's inventory }; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b8563fb723..fa2ae0b818 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -255,18 +255,18 @@ void render_ui(F32 zoom_factor = 1.f, int subfield = 0); void swap(); extern bool gDebugClicks; -extern BOOL gDisplaySwapBuffers; -extern BOOL gDepthDirty; -extern BOOL gResizeScreenTexture; -extern BOOL gCubeSnapshot; -extern BOOL gSnapshotNoPost; +extern bool gDisplaySwapBuffers; +extern bool gDepthDirty; +extern bool gResizeScreenTexture; +extern bool gCubeSnapshot; +extern bool gSnapshotNoPost; LLViewerWindow *gViewerWindow = NULL; LLFrameTimer gAwayTimer; LLFrameTimer gAwayTriggerTimer; -BOOL gShowOverlayTitle = FALSE; +bool gShowOverlayTitle = false; LLViewerObject* gDebugRaycastObject = NULL; LLVOPartGroup* gDebugRaycastParticle = NULL; @@ -280,12 +280,12 @@ LLVector4a gDebugRaycastStart; LLVector4a gDebugRaycastEnd; // HUD display lines in lower right -BOOL gDisplayWindInfo = FALSE; -BOOL gDisplayCameraPos = FALSE; -BOOL gDisplayFOV = FALSE; +bool gDisplayWindInfo = false; +bool gDisplayCameraPos = false; +bool gDisplayFOV = false; static const U8 NO_FACE = 255; -BOOL gQuietSnapshot = FALSE; +bool gQuietSnapshot = false; const F32 MIN_AFK_TIME = 6.f; // minimum time after setting away state before coming back @@ -322,7 +322,7 @@ public: // chat.mText = message; // chat.mSourceType = CHAT_SOURCE_SYSTEM; - // chat_floater->addChat(chat, FALSE, FALSE); + // chat_floater->addChat(chat, false, false); //} //} } @@ -1059,7 +1059,7 @@ public: const Line& line = *iter; LLFontGL::getFontMonospace()->renderUTF8(line.text, 0, (F32)line.x, (F32)line.y, mTextColor, LLFontGL::LEFT, LLFontGL::TOP, - LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE); + LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false); } } @@ -1100,7 +1100,7 @@ void LLViewerWindow::handlePieMenu(S32 x, S32 y, MASK mask) } } -BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool& is_toolmgr_action) +bool LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down, bool& is_toolmgr_action) { const char* buttonname = ""; const char* buttonstatestr = ""; @@ -1192,7 +1192,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " handled by captor " << mouse_captor->getName() << LL_ENDL; } - BOOL r = mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down); + bool r = mouse_captor->handleAnyMouseClick(local_x, local_y, mask, clicktype, down); if (r) { LL_DEBUGS() << "LLViewerWindow::handleAnyMouseClick viewer with mousecaptor calling updatemouseeventinfo - local_x|global x "<< local_x << " " << x << "local/global y " << local_y << " " << y << LL_ENDL; @@ -1204,7 +1204,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m else if (down && clicktype == CLICK_RIGHT) { handlePieMenu(x, y, mask); - r = TRUE; + r = true; } return r; } @@ -1212,11 +1212,11 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m // Mark the click as handled and return if we aren't within the root view to avoid spurious bugs if( !mRootView->pointInView(x, y) ) { - return TRUE; + return true; } // Give the UI views a chance to process the click - BOOL r= mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ; + bool r= mRootView->handleAnyMouseClick(x, y, mask, clicktype, down) ; if (r) { @@ -1238,7 +1238,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m { LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " " << LLViewerEventRecorder::instance().get_xui() << LL_ENDL; } - return TRUE; + return true; } else if (LLView::sDebugMouseHandling) { LL_INFOS() << buttonname << " Mouse " << buttonstatestr << " not handled by view" << LL_ENDL; @@ -1250,18 +1250,18 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK m { LLViewerEventRecorder::instance().clear_xui(); is_toolmgr_action = true; - return TRUE; + return true; } if (down && clicktype == CLICK_RIGHT) { handlePieMenu(x, y, mask); - return TRUE; + return true; } // If we got this far on a down-click, it wasn't handled. // Up-clicks, though, are always handled as far as the OS is concerned. - BOOL default_rtn = !down; + bool default_rtn = !down; return default_rtn; } @@ -1358,8 +1358,8 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (prim_media_dnd_enabled) { LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, - TRUE /* pick_transparent */, - FALSE /* pick_rigged */); + true /* pick_transparent */, + false /* pick_rigged */); S32 object_face = pick_info.mObjectFace; std::string url = data; @@ -1477,7 +1477,7 @@ bool LLViewerWindow::handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK return true; } -BOOL LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down) +bool LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down) { switch (button) { @@ -1492,7 +1492,7 @@ BOOL LLViewerWindow::handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask } // Always handled as far as the OS is concerned. - return TRUE; + return true; } bool LLViewerWindow::handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button) @@ -1514,7 +1514,7 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask x = ll_round((F32)x / mDisplayScale.mV[VX]); y = ll_round((F32)y / mDisplayScale.mV[VY]); - mMouseInWindow = TRUE; + mMouseInWindow = true; // Save mouse point for access during idle() and display() @@ -1542,7 +1542,7 @@ void LLViewerWindow::handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK m { if (mMouseDownTimer.getElapsedTimeF32() > 0.1) { - mAllowMouseDragging = TRUE; + mAllowMouseDragging = true; mMouseDownTimer.stop(); } } @@ -1556,7 +1556,7 @@ void LLViewerWindow::handleMouseLeave(LLWindow *window) { // Note: we won't get this if we have captured the mouse. llassert( gFocusMgr.getMouseCapture() == NULL ); - mMouseInWindow = FALSE; + mMouseInWindow = false; LLToolTipMgr::instance().blockToolTips(); } @@ -1591,7 +1591,7 @@ void LLViewerWindow::handleResize(LLWindow *window, S32 width, S32 height) // The top-level window has gained focus (e.g. via ALT-TAB) void LLViewerWindow::handleFocus(LLWindow *window) { - gFocusMgr.setAppHasFocus(TRUE); + gFocusMgr.setAppHasFocus(true); LLModalDialog::onAppFocusGained(); gAgent.onAppFocusGained(); @@ -1611,7 +1611,7 @@ void LLViewerWindow::handleFocus(LLWindow *window) // The top-level window has lost focus (e.g. via ALT-TAB) void LLViewerWindow::handleFocusLost(LLWindow *window) { - gFocusMgr.setAppHasFocus(FALSE); + gFocusMgr.setAppHasFocus(false); //LLModalDialog::onAppFocusLost(); LLToolMgr::getInstance()->onAppFocusLost(); gFocusMgr.setMouseCapture( NULL ); @@ -1624,7 +1624,7 @@ void LLViewerWindow::handleFocusLost(LLWindow *window) // restore mouse cursor showCursor(); - getWindow()->setMouseClipping(FALSE); + getWindow()->setMouseClipping(false); // If losing focus while keys are down, handle them as // an 'up' to correctly release states, then reset states @@ -1919,17 +1919,17 @@ LLViewerWindow::LLViewerWindow(const Params& p) mWindowRectRaw(0, p.height, p.width, 0), mWindowRectScaled(0, p.height, p.width, 0), mWorldViewRectRaw(0, p.height, p.width, 0), - mLeftMouseDown(FALSE), - mMiddleMouseDown(FALSE), - mRightMouseDown(FALSE), - mMouseInWindow( FALSE ), - mAllowMouseDragging(TRUE), + mLeftMouseDown(false), + mMiddleMouseDown(false), + mRightMouseDown(false), + mMouseInWindow( false ), + mAllowMouseDragging(true), mMouseDownTimer(), mLastMask( MASK_NONE ), mToolStored( NULL ), - mHideCursorPermanent( FALSE ), - mCursorHidden(FALSE), - mIgnoreActivate( FALSE ), + mHideCursorPermanent( false ), + mCursorHidden(false), + mIgnoreActivate( false ), mResDirty(false), mStatesDirty(false), mCurrResolutionIndex(0), @@ -1961,10 +1961,10 @@ LLViewerWindow::LLViewerWindow(const Params& p) /* LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, S32 x, S32 y, S32 width, S32 height, U32 flags, - BOOL fullscreen, - BOOL clearBg, - BOOL disable_vsync, - BOOL ignore_pixel_depth, + bool fullscreen, + bool clearBg, + bool disable_vsync, + bool ignore_pixel_depth, U32 fsaa_samples) */ // create window @@ -2015,7 +2015,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) else if (!LLViewerShaderMgr::sInitialized) { //immediately initialize shaders - LLViewerShaderMgr::sInitialized = TRUE; + LLViewerShaderMgr::sInitialized = true; LLViewerShaderMgr::instance()->setShaders(); } @@ -2129,7 +2129,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) DESIRED_NORMAL_TEXTURE_SIZE = (U32)LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT / 2; } #else - gSavedSettings.setBOOL("FSRestrictMaxTextureSize", TRUE); + gSavedSettings.setBOOL("FSRestrictMaxTextureSize", true); #endif LL_INFOS() << "Maximum fetched texture size: " << DESIRED_NORMAL_TEXTURE_SIZE << "px" << LL_ENDL; // @@ -2263,7 +2263,7 @@ void LLViewerWindow::initBase() } gToolBarView->setShape(panel_holder->getLocalRect()); // Hide the toolbars for the moment: we'll make them visible after logging in world (see LLViewerWindow::initWorldUI()) - gToolBarView->setVisible(FALSE); + gToolBarView->setVisible(false); // initialize the utility bar (classic V1 style buttons next to the chat bar) UtilityBar::instance().init(); @@ -2320,11 +2320,11 @@ void LLViewerWindow::initBase() mProgressView = getRootView()->findChild("progress_view"); mProgressViewMini = getRootView()->findChild("progress_view_mini"); - setShowProgress(FALSE,FALSE); - setProgressCancelButtonVisible(FALSE); + setShowProgress(false,false); + setProgressCancelButtonVisible(false); if(mProgressViewMini) - mProgressViewMini->setVisible(FALSE); + mProgressViewMini->setVisible(false); // Moved this to the top right after creation of main_view.xml, so all context menus // created right after that get the correct parent assigned. // gMenuHolder = getRootView()->getChild("Menu Holder"); @@ -2338,7 +2338,7 @@ void LLViewerWindow::initWorldUI() { gIMMgr = LLIMMgr::getInstance(); LLNavigationBar::getInstance(); - gFloaterView->pushVisibleAll(FALSE); + gFloaterView->pushVisibleAll(false); return; } @@ -2360,11 +2360,11 @@ void LLViewerWindow::initWorldUI() if (gSavedSettings.getBOOL("InternalShowGroupNoticesTopRight")) { chiclet_container = getRootView()->getChild("chiclet_container"); - getRootView()->getChildView("chiclet_container_bottom")->setVisible(FALSE); + getRootView()->getChildView("chiclet_container_bottom")->setVisible(false); } else { - getRootView()->getChildView("chiclet_container")->setVisible(FALSE); + getRootView()->getChildView("chiclet_container")->setVisible(false); chiclet_container = getRootView()->getChild("chiclet_container_bottom"); } // Group notices, IMs and chiclets position @@ -2372,7 +2372,7 @@ void LLViewerWindow::initWorldUI() chiclet_bar->setShape(chiclet_container->getLocalRect()); chiclet_bar->setFollowsAll(); chiclet_container->addChild(chiclet_bar); - chiclet_container->setVisible(TRUE); + chiclet_container->setVisible(true); } LLRect morph_view_rect = full_window; @@ -2406,7 +2406,7 @@ void LLViewerWindow::initWorldUI() // gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor().get()); // // add InBack so that gStatusBar won't be drawn over menu // status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/); - // status_bar_container->setVisible(TRUE); + // status_bar_container->setVisible(true); // // Navigation bar // LLView* nav_bar_container = getRootView()->getChild("nav_bar_container"); @@ -2414,19 +2414,19 @@ void LLViewerWindow::initWorldUI() // navbar->setShape(nav_bar_container->getLocalRect()); // navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get()); // nav_bar_container->addChild(navbar); - // nav_bar_container->setVisible(TRUE); + // nav_bar_container->setVisible(true); //} //else //{ // LLPanel* status_bar_container = getRootView()->getChild("status_bar_container"); // LLView* nav_bar_container = getRootView()->getChild("nav_bar_container"); - // status_bar_container->setVisible(TRUE); - // nav_bar_container->setVisible(TRUE); + // status_bar_container->setVisible(true); + // nav_bar_container->setVisible(true); //} //if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) //{ - // navbar->setVisible(FALSE); + // navbar->setVisible(false); //} //else //{ @@ -2440,16 +2440,16 @@ void LLViewerWindow::initWorldUI() // sync bg color with menu bar gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor().get()); status_bar_container->addChildInBack(gStatusBar); - status_bar_container->setVisible(TRUE); + status_bar_container->setVisible(true); LLNavigationBar::getInstance(); // set navbar container visible which is initially hidden on the login screen, // the real visibility of navbar and favorites bar is done via visibility control -Zi - LLNavigationBar::instance().getView()->setVisible(TRUE); + LLNavigationBar::instance().getView()->setVisible(true); if (!gSavedSettings.getBOOL("ShowMenuBarLocation")) { - gStatusBar->childSetVisible("parcel_info_panel", FALSE); + gStatusBar->childSetVisible("parcel_info_panel", false); } // @@ -2461,11 +2461,11 @@ void LLViewerWindow::initWorldUI() // topinfo_bar->setShape(topinfo_bar_container->getLocalRect()); // topinfo_bar_container->addChild(topinfo_bar); - // topinfo_bar_container->setVisible(TRUE); + // topinfo_bar_container->setVisible(true); // if (!gSavedSettings.getBOOL("ShowMiniLocationPanel")) // { - // topinfo_bar->setVisible(FALSE); + // topinfo_bar->setVisible(false); // } // @@ -2491,7 +2491,7 @@ void LLViewerWindow::initWorldUI() //LLPanelHideBeacon* panel_hide_beacon = LLPanelHideBeacon::getInstance(); //panel_ssf_container->addChild(panel_hide_beacon); - panel_ssf_container->setVisible(TRUE); + panel_ssf_container->setVisible(true); LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize(); @@ -2502,13 +2502,13 @@ void LLViewerWindow::initWorldUI() if (gSavedSettings.getBOOL("ResetToolbarSettings")) { gToolBarView->loadDefaultToolbars(); - gSavedSettings.setBOOL("ResetToolbarSettings",FALSE); + gSavedSettings.setBOOL("ResetToolbarSettings", false); } else { gToolBarView->loadToolbars(); } - gToolBarView->setVisible(TRUE); + gToolBarView->setVisible(true); } if (!gNonInteractive) @@ -2587,7 +2587,7 @@ void LLViewerWindow::initWorldUI() } // Autohide main chat bar if applicable - BOOL visible=!gSavedSettings.getBOOL("AutohideChatBar"); + bool visible = !gSavedSettings.getBOOL("AutohideChatBar"); FSNearbyChat::instance().showDefaultChatBar(visible); gSavedSettings.setBOOL("MainChatbarVisible",visible); @@ -2607,7 +2607,7 @@ void LLViewerWindow::shutdownViews() gFocusMgr.setTopCtrl(NULL); if (mWindow) { - mWindow->allowLanguageTextInput(NULL, FALSE); + mWindow->allowLanguageTextInput(NULL, false); } delete mDebugText; @@ -2618,7 +2618,7 @@ void LLViewerWindow::shutdownViews() // Cleanup global views if (gMorphView) { - gMorphView->setVisible(FALSE); + gMorphView->setVisible(false); } LL_INFOS() << "Global views cleaned." << LL_ENDL ; @@ -2703,7 +2703,7 @@ void LLViewerWindow::shutdownGL() LLSelectMgr::getInstance()->cleanup(); LL_INFOS() << "Stopping GL during shutdown" << LL_ENDL; - stopGL(FALSE); + stopGL(false); stop_glerror(); gGL.shutdown(); @@ -2725,7 +2725,7 @@ LLViewerWindow::~LLViewerWindow() if (LLViewerShaderMgr::sInitialized) { LLViewerShaderMgr::releaseInstance(); - LLViewerShaderMgr::sInitialized = FALSE; + LLViewerShaderMgr::sInitialized = false; } mMaxVRAMControlConnection.disconnect(); @@ -2741,7 +2741,7 @@ void LLViewerWindow::showCursor() { mWindow->showCursor(); - mCursorHidden = FALSE; + mCursorHidden = false; } void LLViewerWindow::hideCursor() @@ -2749,7 +2749,7 @@ void LLViewerWindow::hideCursor() // And hide the cursor mWindow->hideCursor(); - mCursorHidden = TRUE; + mCursorHidden = true; } void LLViewerWindow::sendShapeToSim() @@ -2780,7 +2780,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) // may have been destructed. if (!LLApp::isExiting()) { - gWindowResized = TRUE; + gWindowResized = true; // update our window rectangle mWindowRectRaw.mRight = mWindowRectRaw.mLeft + width; @@ -2797,7 +2797,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) calcDisplayScale(); - BOOL display_scale_changed = mDisplayScale != LLUI::getScaleFactor(); + bool display_scale_changed = mDisplayScale != LLUI::getScaleFactor(); LLUI::setScaleFactor(mDisplayScale); // update our window rectangle @@ -2818,7 +2818,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) FSPanelLogin::reshapePanel(); // [FS Login Panel] } - LLView::sForceReshape = FALSE; + LLView::sForceReshape = false; // clear font width caches if (display_scale_changed) @@ -2829,7 +2829,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) sendShapeToSim(); // store new settings for the mode we are in, regardless - BOOL maximized = mWindow->getMaximized(); + bool maximized = mWindow->getMaximized(); gSavedSettings.setBOOL("WindowMaximized", maximized); // @@ -2862,7 +2862,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) // Hide normal UI when a logon fails -void LLViewerWindow::setNormalControlsVisible( BOOL visible ) +void LLViewerWindow::setNormalControlsVisible( bool visible ) { if(LLChicletBar::instanceExists()) { @@ -2987,7 +2987,7 @@ void LLViewerWindow::draw() { //#if LL_DEBUG - LLView::sIsDrawing = TRUE; + LLView::sIsDrawing = true; //#endif stop_glerror(); @@ -3157,7 +3157,7 @@ void LLViewerWindow::draw() } // - // Only show Mouselookinstructions if FSShowMouselookInstruction is TRUE + // Only show Mouselookinstructions if FSShowMouselookInstruction is true static LLCachedControl fsShowMouselookInstructions(gSavedSettings, "FSShowMouselookInstructions"); if( fsShowMouselookInstructions && (gAgentCamera.cameraMouselook() || LLFloaterCamera::inFreeCameraMode()) ) { @@ -3208,7 +3208,7 @@ void LLViewerWindow::draw() gUIProgram.unbind(); - LLView::sIsDrawing = FALSE; + LLView::sIsDrawing = false; } // Window Title Access @@ -3219,13 +3219,13 @@ void LLViewerWindow::setTitle(const std::string& win_title) // // Takes a single keyup event, usually when UI is visible -BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask) +bool LLViewerWindow::handleKeyUp(KEY key, MASK mask) { - if (LLSetKeyBindDialog::recordKey(key, mask, FALSE)) + if (LLSetKeyBindDialog::recordKey(key, mask, false)) { LL_DEBUGS() << "KeyUp handled by LLSetKeyBindDialog" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key, mask); - return TRUE; + return true; } LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus(); @@ -3237,7 +3237,7 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask) // We have keyboard focus, and it's not an accelerator if (keyboard_focus && keyboard_focus->wantsKeyUpKeyDown()) { - return keyboard_focus->handleKeyUp(key, mask, FALSE); + return keyboard_focus->handleKeyUp(key, mask, false); } else if (key < 0x80) { @@ -3248,14 +3248,14 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask) if (keyboard_focus) { - if (keyboard_focus->handleKeyUp(key, mask, FALSE)) + if (keyboard_focus->handleKeyUp(key, mask, false)) { LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned true" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key, mask); - return TRUE; + return true; } else { - LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned FALSE" << LL_ENDL; + LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned false" << LL_ENDL; } } @@ -3266,18 +3266,18 @@ BOOL LLViewerWindow::handleKeyUp(KEY key, MASK mask) } // Takes a single keydown event, usually when UI is visible -BOOL LLViewerWindow::handleKey(KEY key, MASK mask) +bool LLViewerWindow::handleKey(KEY key, MASK mask) { // hide tooltips on keypress LLToolTipMgr::instance().blockToolTips(); // Menus get handled on key down instead of key up // so keybindings have to be recorded before that - if (LLSetKeyBindDialog::recordKey(key, mask, TRUE)) + if (LLSetKeyBindDialog::recordKey(key, mask, true)) { LL_DEBUGS() << "Key handled by LLSetKeyBindDialog" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus(); @@ -3290,7 +3290,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // FIRE-31852: Now it aggressively executes gestures within focussed floaters... //if ((key == KEY_MOUSELOOK) && !(mask & (MASK_CONTROL | MASK_ALT))) //{ - // return TRUE; + // return true; //} //LLUICtrl* cur_focus = dynamic_cast(keyboard_focus); @@ -3334,7 +3334,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if (res == 1 && chars[0] >= 0x20) { // Let it fall through to character handler and get a WM_CHAR. - return TRUE; + return true; } } } @@ -3345,25 +3345,25 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // We have keyboard focus, and it's not an accelerator if (keyboard_focus && keyboard_focus->wantsKeyUpKeyDown()) { - return keyboard_focus->handleKey(key, mask, FALSE); + return keyboard_focus->handleKey(key, mask, false); } else if (key < 0x80) { // Not a special key, so likely (we hope) to generate a character. Let it fall through to character handler first. - return TRUE; + return true; } } } } // let menus handle navigation keys for navigation - if ((gMenuBarView && gMenuBarView->handleKey(key, mask, TRUE)) - ||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE)) - ||(gMenuHolder && gMenuHolder->handleKey(key, mask, TRUE))) + if ((gMenuBarView && gMenuBarView->handleKey(key, mask, true)) + ||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, true)) + ||(gMenuHolder && gMenuHolder->handleKey(key, mask, true))) { LL_DEBUGS() << "LLviewerWindow::handleKey handle nav keys for nav" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } @@ -3374,10 +3374,10 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // Check the current floater's menu first, if it has one. if (gFocusMgr.keyboardFocusHasAccelerators() && keyboard_focus - && keyboard_focus->handleKey(key,mask,FALSE)) + && keyboard_focus->handleKey(key,mask,false)) { LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } if (gAgent.isInitialized() @@ -3386,13 +3386,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) && gMenuBarView->handleAcceleratorKey(key, mask)) { LLViewerEventRecorder::instance().logKeyEvent(key, mask); - return TRUE; + return true; } if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)) { LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } } @@ -3417,13 +3417,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) mRootView->focusNextRoot(); } LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } // hidden edit menu for cut/copy/paste if (gEditMenu && gEditMenu->handleAcceleratorKey(key, mask)) { LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } LLFloater* focused_floaterp = gFloaterView->getFocusedFloater(); @@ -3453,7 +3453,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // case KEY_HOME: // // when chatbar is empty or ArrowKeysAlwaysMove set, // // pass arrow keys on to avatar... - // return FALSE; + // return false; // default: // break; // } @@ -3481,7 +3481,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) case KEY_HOME: // when chatbar is empty or ArrowKeysAlwaysMove set, // pass arrow keys on to avatar... - return FALSE; + return false; default: break; } @@ -3489,14 +3489,14 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } // [FS Communication UI] - if (keyboard_focus->handleKey(key, mask, FALSE)) + if (keyboard_focus->handleKey(key, mask, false)) { LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned true" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } else { - LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned FALSE" << LL_ENDL; + LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned false" << LL_ENDL; } } @@ -3504,7 +3504,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { LL_DEBUGS() << "LLviewerWindow::handleKey toolbar handling?" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } // Try for a new-format gesture @@ -3512,7 +3512,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { LL_DEBUGS() << "LLviewerWindow::handleKey new gesture feature" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } // See if this is a gesture trigger. If so, eat the key and @@ -3521,7 +3521,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { LL_DEBUGS() << "LLviewerWindow::handleKey check gesture trigger" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); - return TRUE; + return true; } // If "Pressing letter keys starts local chat" option is selected, we are not in mouselook, @@ -3549,7 +3549,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) // { // // passing NULL here, character will be added later when it is handled by character handler. // nearby_chat->startChat(NULL); - // return TRUE; + // return true; // } //} @@ -3566,13 +3566,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) FSFloaterNearbyChat* nearby_chat = FSFloaterNearbyChat::findInstance(); if (fsLetterKeysFocusNearbyChatBar && fsNearbyChatbar && nearby_chat && nearby_chat->getVisible()) { - nearby_chat->setFocus(TRUE); + nearby_chat->setFocus(true); } else { - FSNearbyChat::instance().showDefaultChatBar(TRUE); + FSNearbyChat::instance().showDefaultChatBar(true); } - return TRUE; + return true; } // [FS Communication UI] @@ -3583,12 +3583,12 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) && gMenuBarView->handleAcceleratorKey(key, mask)) { LLViewerEventRecorder::instance().logKeyEvent(key, mask); - return TRUE; + return true; } if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)) { - return TRUE; + return true; } // don't pass keys on to world when something in ui has focus @@ -3851,12 +3851,12 @@ void LLViewerWindow::updateUI() S32 x = mCurrentMousePoint.mX; S32 y = mCurrentMousePoint.mY; - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST)) { gDebugRaycastFaceHit = -1; - gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, FALSE, + gDebugRaycastObject = cursorIntersect(-1, -1, 512.f, NULL, -1, false, false, true, false, &gDebugRaycastFaceHit, &gDebugRaycastIntersection, &gDebugRaycastTexCoord, @@ -3870,7 +3870,7 @@ void LLViewerWindow::updateUI() updateMouseDelta(); updateKeyboardFocus(); - BOOL handled = FALSE; + bool handled = false; LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); LLMouseHandler* mouse_captor = gFocusMgr.getMouseCapture(); @@ -4122,7 +4122,7 @@ void LLViewerWindow::updateUI() last_handle_msg = LLView::sMouseHandlerMessage; LL_INFOS() << "Hover" << LLView::sMouseHandlerMessage << LL_ENDL; } - handled = TRUE; + handled = true; } else if (LLView::sDebugMouseHandling) { @@ -4146,7 +4146,7 @@ void LLViewerWindow::updateUI() } // Show a new tool tip (or update one that is already shown) - BOOL tool_tip_handled = FALSE; + bool tool_tip_handled = false; std::string tool_tip_msg; if( handled && !mWindow->isCursorHidden()) @@ -4298,12 +4298,12 @@ void LLViewerWindow::updateLayout() } // Update the location of the blue box tool popup LLCoordGL select_center_screen; - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); gFloaterTools->updatePopup( select_center_screen, mask ); } else { - gFloaterTools->setVisible(FALSE); + gFloaterTools->setVisible(false); } //gMenuBarView->setItemVisible("BuildTools", gFloaterTools->getVisible()); } @@ -4337,11 +4337,11 @@ void LLViewerWindow::updateMouseDelta() mouse_pos.mX > mWindowRectRaw.getWidth() || mouse_pos.mY > mWindowRectRaw.getHeight()) { - mMouseInWindow = FALSE; + mMouseInWindow = false; } else { - mMouseInWindow = TRUE; + mMouseInWindow = true; } LLVector2 mouse_vel; @@ -4399,7 +4399,7 @@ void LLViewerWindow::updateKeyboardFocus() { if (!parent->focusFirstItem()) { - parent->setFocus(TRUE); + parent->setFocus(true); } new_focus_found = true; break; @@ -4412,7 +4412,7 @@ void LLViewerWindow::updateKeyboardFocus() // are only moving focus higher in the hierarchy if (!new_focus_found) { - cur_focus->setFocus(FALSE); + cur_focus->setFocus(false); } } else if (cur_focus->isFocusRoot()) @@ -4434,11 +4434,11 @@ void LLViewerWindow::updateKeyboardFocus() // sync all floaters with their focus state gFloaterView->highlightFocusedFloater(); gSnapshotFloaterView->highlightFocusedFloater(); - MASK mask = gKeyboard->currentMask(TRUE); + MASK mask = gKeyboard->currentMask(true); if ((mask & MASK_CONTROL) == 0) { // control key no longer held down, finish cycle mode - gFloaterView->setCycleMode(FALSE); + gFloaterView->setCycleMode(false); gFloaterView->syncFloaterTabOrder(); } @@ -4481,7 +4481,7 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) if (mWorldViewRectRaw != new_world_rect) { mWorldViewRectRaw = new_world_rect; - gResizeScreenTexture = TRUE; + gResizeScreenTexture = true; LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() ); LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() ); @@ -4818,13 +4818,13 @@ void renderOnePhysicsShape(LLViewerObject* objectp) LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification physics_spec; LLUUID mesh_id; LLModel::Decomposition* decomp = nullptr; - bool hasConvexDecomp = FALSE; + bool hasConvexDecomp = false; // If we are a mesh and the mesh has a hul decomp (is analysed) then set hasDecomp to true if (vovolume->isMesh()){ mesh_id = volume_params.getSculptID(); decomp = gMeshRepo.getDecomposition(mesh_id); - if (decomp && !decomp->mHull.empty()){ hasConvexDecomp = TRUE; } + if (decomp && !decomp->mHull.empty()){ hasConvexDecomp = true; } } LLPhysicsShapeBuilderUtil::determinePhysicsShape(physics_params, vovolume->getScale(), hasConvexDecomp, physics_spec); @@ -5084,9 +5084,9 @@ void renderOnePhysicsShape(LLViewerObject* objectp) // Draws the selection outlines for the currently selected objects // Must be called after displayObjects is called, which sets the mGLName parameter // NOTE: This function gets called 3 times: -// render_ui_3d: FALSE, FALSE, TRUE -// render_hud_elements: FALSE, FALSE, FALSE -void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL for_hud ) +// render_ui_3d: false, false, true +// render_hud_elements: false, false, false +void LLViewerWindow::renderSelections( bool for_gl_pick, bool pick_parcel_walls, bool for_hud ) { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); @@ -5271,21 +5271,21 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, // make whole viewer benefit. LLSelectMgr::getInstance()->selectGetEditMoveLinksetPermissions(all_selected_objects_move, all_selected_objects_modify); - BOOL draw_handles = TRUE; + bool draw_handles = true; if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isMovableAvatarSelected()) { - draw_handles = FALSE; + draw_handles = false; } if (tool == LLToolCompRotate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isMovableAvatarSelected()) { - draw_handles = FALSE; + draw_handles = false; } if ( !all_selected_objects_modify && tool == LLToolCompScale::getInstance() ) { - draw_handles = FALSE; + draw_handles = false; } if( draw_handles ) @@ -5329,9 +5329,9 @@ LLVector3d LLViewerWindow::clickPointInWorldGlobal(S32 x, S32 y_from_bot, LLView } -BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const +bool LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const { - BOOL intersect = FALSE; + bool intersect = false; // U8 shape = objectp->mPrimitiveCode & LL_PCODE_BASE_MASK; if (!intersect) @@ -5351,20 +5351,20 @@ void LLViewerWindow::pickAsync( S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& info), - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, - BOOL pick_reflection_probes) + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, + bool pick_reflection_probes) { // "Show Debug Alpha" means no object actually transparent - BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); + bool in_build_mode = LLFloaterReg::instanceVisible("build"); if (LLDrawPoolAlpha::sShowDebugAlpha || (in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects"))) { - pick_transparent = TRUE; + pick_transparent = true; } - LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, pick_reflection_probes, pick_unselectable, TRUE, callback); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, false, pick_reflection_probes, pick_unselectable, true, callback); schedulePick(pick_info); } @@ -5420,19 +5420,19 @@ void LLViewerWindow::returnEmptyPicks() } // Performs the GL object/land pick. -LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_particle, BOOL pick_unselectable, BOOL pick_reflection_probe) +LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, bool pick_transparent, bool pick_rigged, bool pick_particle, bool pick_unselectable, bool pick_reflection_probe) { - BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); + bool in_build_mode = LLFloaterReg::instanceVisible("build"); if ((in_build_mode && gSavedSettings.getBOOL("SelectInvisibleObjects")) || LLDrawPoolAlpha::sShowDebugAlpha) { // build mode allows interaction with all transparent objects // "Show Debug Alpha" means no object actually transparent - pick_transparent = TRUE; + pick_transparent = true; } // shortcut queueing in mPicks and just update mLastPick in place - MASK key_mask = gKeyboard->currentMask(TRUE); - mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, pick_reflection_probe, TRUE, FALSE, NULL); + MASK key_mask = gKeyboard->currentMask(true); + mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, pick_rigged, pick_particle, pick_reflection_probe, true, false, NULL); mLastPick.fetchResults(); return mLastPick; @@ -5467,10 +5467,10 @@ LLHUDIcon* LLViewerWindow::cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 dep LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 depth, LLViewerObject *this_object, S32 this_face, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, - BOOL pick_reflection_probe, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, + bool pick_reflection_probe, S32* face_hit, LLVector4a *intersection, LLVector2 *uv, @@ -5564,7 +5564,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de // [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c if ( (rlv_handler_t::isEnabled()) && (found) && - (LLToolCamera::getInstance()->hasMouseCapture()) && (gKeyboard->currentMask(TRUE) & MASK_ALT) ) + (LLToolCamera::getInstance()->hasMouseCapture()) && (gKeyboard->currentMask(true) & MASK_ALT) ) { found = NULL; } @@ -5678,7 +5678,7 @@ LLVector3 LLViewerWindow::mouseDirectionCamera(const S32 x, const S32 y) const -BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, +bool LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, const LLVector3d &plane_point_global, const LLVector3 &plane_normal_global) { @@ -5709,11 +5709,11 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con // Returns global position -BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, BOOL ignore_distance) +bool LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_position_global, bool ignore_distance) { LLVector3 mouse_direction_global = mouseDirectionGlobal(x,y); F32 mouse_dir_scale; - BOOL hit_land = FALSE; + bool hit_land = false; LLViewerRegion *regionp; F32 land_z; const F32 FIRST_PASS_STEP = 1.0f; // meters @@ -5759,7 +5759,7 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d // cout << "under land at " << probe_point << " scale " << mouse_vec_scale << endl; - hit_land = TRUE; + hit_land = true; break; } } @@ -5807,16 +5807,16 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d // ...just went under land again *land_position_global = probe_point_global; - return TRUE; + return true; } } } - return FALSE; + return false; } // Saves an image to the harddrive as "SnapshotX" where X >= 1. -void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb) +void LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb) { if (!image) { @@ -5915,7 +5915,7 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save } // Look for an unused file name - BOOL is_snapshot_name_loc_set = isSnapshotLocSet(); + bool is_snapshot_name_loc_set = isSnapshotLocSet(); std::string filepath; S32 i = 1; S32 err = 0; @@ -5988,12 +5988,12 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height) } -BOOL LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format) +bool LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, bool show_ui, bool show_hud, bool do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format) { LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL; LLPointer raw = new LLImageRaw; - BOOL success = rawSnapshot(raw, image_width, image_height, TRUE, FALSE, show_ui, show_hud, do_rebuild); + bool success = rawSnapshot(raw, image_width, image_height, true, false, show_ui, show_hud, do_rebuild); if (success) { @@ -6044,7 +6044,7 @@ void LLViewerWindow::playSnapshotAnimAndSound() send_sound_trigger(LLUUID(gSavedSettings.getString("UISndSnapshot")), 1.0f); } -BOOL LLViewerWindow::isSnapshotLocSet() const +bool LLViewerWindow::isSnapshotLocSet() const { std::string snapshot_dir = sSnapshotDir; return !snapshot_dir.empty(); @@ -6055,20 +6055,20 @@ void LLViewerWindow::resetSnapshotLoc() const gSavedPerAccountSettings.setString("SnapshotBaseDir", std::string()); } -BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type) +bool LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type) { - return rawSnapshot(raw, preview_width, preview_height, FALSE, FALSE, show_ui, show_hud, do_rebuild, no_post, type); + return rawSnapshot(raw, preview_width, preview_height, false, false, show_ui, show_hud, do_rebuild, no_post, type); } // Saves the image from the screen to a raw image // Since the required size might be bigger than the available screen, this method rerenders the scene in parts (called subimages) and copy // the results over to the final raw image. -BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, - BOOL keep_window_aspect, BOOL is_texture, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type, S32 max_size) +bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, + bool keep_window_aspect, bool is_texture, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type, S32 max_size) { if (!raw) { - return FALSE; + return false; } //check if there is enough memory for the snapshot image @@ -6077,29 +6077,29 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if(!LLMemory::tryToAlloc(NULL, image_width * image_height * 3)) { LL_WARNS() << "No enough memory to take the snapshot with size (w : h): " << image_width << " : " << image_height << LL_ENDL ; - return FALSE ; //there is no enough memory for taking this snapshot. + return false ; //there is no enough memory for taking this snapshot. } } // PRE SNAPSHOT gSnapshotNoPost = no_post; - gDisplaySwapBuffers = FALSE; + gDisplaySwapBuffers = false; glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT); setCursor(UI_CURSOR_WAIT); // Hide all the UI widgets first and draw a frame - BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE; + bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false; if ( prev_draw_ui != show_ui) { LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } - BOOL hide_hud = !show_hud && LLPipeline::sShowHUDAttachments; + bool hide_hud = !show_hud && LLPipeline::sShowHUDAttachments; if (hide_hud) { - LLPipeline::sShowHUDAttachments = FALSE; + LLPipeline::sShowHUDAttachments = false; } // if not showing ui, use full window to render world view @@ -6209,15 +6209,15 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei else { gStatusBar->showBalance(true); // Hide currency balance in snapshots - return FALSE ; + return false ; } if (raw->isBufferInvalid()) { gStatusBar->showBalance(true); // Hide currency balance in snapshots - return FALSE ; + return false ; } - BOOL high_res = scale_factor >= 2.f; // Font scaling is slow, only do so if rez is much higher + bool high_res = scale_factor >= 2.f; // Font scaling is slow, only do so if rez is much higher if (high_res && show_ui) { // Note: we should never get there... @@ -6245,8 +6245,8 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei S32 output_buffer_offset_x = 0; for (int subimage_x = 0; subimage_x < scale_factor; ++subimage_x) { - gDisplaySwapBuffers = FALSE; - gDepthDirty = TRUE; + gDisplaySwapBuffers = false; + gDepthDirty = true; S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width); // handle fractional rows @@ -6257,12 +6257,12 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if (read_width && read_height) { const U32 subfield = subimage_x+(subimage_y*llceil(scale_factor)); - display(do_rebuild, scale_factor, subfield, TRUE); + display(do_rebuild, scale_factor, subfield, true); if (!LLPipeline::sRenderDeferred) { // Required for showing the GUI in snapshots and performing bloom composite overlay - // Call even if show_ui is FALSE + // Call even if show_ui is false render_ui(scale_factor, subfield); swap(); } @@ -6361,9 +6361,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei output_buffer_offset_y += subimage_y_offset; } - gDisplaySwapBuffers = FALSE; - gSnapshotNoPost = FALSE; - gDepthDirty = TRUE; + gDisplaySwapBuffers = false; + gSnapshotNoPost = false; + gDepthDirty = true; // POST SNAPSHOT if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) @@ -6373,7 +6373,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei if (hide_hud) { - LLPipeline::sShowHUDAttachments = TRUE; + LLPipeline::sShowHUDAttachments = true; } /*if (high_res) @@ -6386,7 +6386,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei // Note: this formula depends on the number of components being 3. Not obvious, but it's correct. image_width += (image_width * 3) % 4; - BOOL ret = TRUE ; + bool ret = true ; // Resize image if(llabs(image_width - image_buffer_x) > 4 || llabs(image_height - image_buffer_y) > 4) { @@ -6394,7 +6394,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei } else if(image_width != image_buffer_x || image_height != image_buffer_y) { - ret = raw->scale( image_width, image_height, FALSE ); + ret = raw->scale( image_width, image_height, false ); } @@ -6435,24 +6435,24 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei return ret; } -BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes) +bool LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes) { LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; - gDisplaySwapBuffers = FALSE; + gDisplaySwapBuffers = false; glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT); setCursor(UI_CURSOR_WAIT); - BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE; + bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false; if (prev_draw_ui != false) { LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } - BOOL hide_hud = LLPipeline::sShowHUDAttachments; + bool hide_hud = LLPipeline::sShowHUDAttachments; if (hide_hud) { - LLPipeline::sShowHUDAttachments = FALSE; + LLPipeline::sShowHUDAttachments = false; } LLRect window_rect = getWorldViewRectRaw(); @@ -6493,14 +6493,14 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ // the black flash in between captures when the number // of render passes is more than 1. We need to also // set it here because code in LLViewerDisplay resets - // it to TRUE each time. - gDisplaySwapBuffers = FALSE; + // it to true each time. + gDisplaySwapBuffers = false; // actually render the scene const U32 subfield = 0; const bool do_rebuild = true; const F32 zoom = 1.0; - const bool for_snapshot = TRUE; + const bool for_snapshot = true; display(do_rebuild, zoom, subfield, for_snapshot); } @@ -6515,8 +6515,8 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ ); stop_glerror(); - gDisplaySwapBuffers = FALSE; - gDepthDirty = TRUE; + gDisplaySwapBuffers = false; + gDepthDirty = true; if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { @@ -6528,7 +6528,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ if (hide_hud) { - LLPipeline::sShowHUDAttachments = TRUE; + LLPipeline::sShowHUDAttachments = true; } setCursor(UI_CURSOR_ARROW); @@ -6544,7 +6544,7 @@ BOOL LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_ void display_cube_face(); -BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face, F32 near_clip, bool dynamic_render) +bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 cubeIndex, S32 face, F32 near_clip, bool dynamic_render) { // NOTE: implementation derived from LLFloater360Capture::capture360Images() and simpleSnapshot LL_PROFILE_ZONE_SCOPED_CATEGORY_APP; @@ -6598,16 +6598,16 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea } } - BOOL prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? TRUE : FALSE; + bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false; if (prev_draw_ui != false) { LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI); } - BOOL hide_hud = LLPipeline::sShowHUDAttachments; + bool hide_hud = LLPipeline::sShowHUDAttachments; if (hide_hud) { - LLPipeline::sShowHUDAttachments = FALSE; + LLPipeline::sShowHUDAttachments = false; } LLRect window_rect = getWorldViewRectRaw(); @@ -6644,16 +6644,16 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea // the black flash in between captures when the number // of render passes is more than 1. We need to also // set it here because code in LLViewerDisplay resets - // it to TRUE each time. - gDisplaySwapBuffers = FALSE; + // it to true each time. + gDisplaySwapBuffers = false; // actually render the scene - gCubeSnapshot = TRUE; + gCubeSnapshot = true; display_cube_face(); - gCubeSnapshot = FALSE; + gCubeSnapshot = false; } - gDisplaySwapBuffers = TRUE; + gDisplaySwapBuffers = true; if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { @@ -6676,7 +6676,7 @@ BOOL LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea if (hide_hud) { - LLPipeline::sShowHUDAttachments = TRUE; + LLPipeline::sShowHUDAttachments = true; } gPipeline.resetDrawOrders(); @@ -6807,7 +6807,7 @@ void LLViewerWindow::setup2DViewport(S32 x_offset, S32 y_offset) void LLViewerWindow::setup3DRender() { // setup perspective camera - LLViewerCamera::getInstance()->setPerspective(NOT_FOR_SELECTION, mWorldViewRectRaw.mLeft, mWorldViewRectRaw.mBottom, mWorldViewRectRaw.getWidth(), mWorldViewRectRaw.getHeight(), FALSE, LLViewerCamera::getInstance()->getNear(), MAX_FAR_CLIP*2.f); + LLViewerCamera::getInstance()->setPerspective(NOT_FOR_SELECTION, mWorldViewRectRaw.mLeft, mWorldViewRectRaw.mBottom, mWorldViewRectRaw.getWidth(), mWorldViewRectRaw.getHeight(), false, LLViewerCamera::getInstance()->getNear(), MAX_FAR_CLIP*2.f); setup3DViewport(); } @@ -6840,28 +6840,28 @@ void LLViewerWindow::initTextures(S32 location_id) } } -void LLViewerWindow::setShowProgress(const BOOL show, BOOL fullscreen) +void LLViewerWindow::setShowProgress(const bool show, bool fullscreen) { if(show) { if(fullscreen) { if(mProgressView) - mProgressView->fade(TRUE); + mProgressView->fade(true); } else { if(mProgressViewMini) - mProgressViewMini->setVisible(TRUE); + mProgressViewMini->setVisible(true); } } else { if(mProgressView && mProgressView->getVisible()) - mProgressView->fade(FALSE); + mProgressView->fade(false); if(mProgressViewMini) - mProgressViewMini->setVisible(FALSE); + mProgressViewMini->setVisible(false); } } @@ -6879,7 +6879,7 @@ void LLViewerWindow::setStartupComplete() #endif } -BOOL LLViewerWindow::getShowProgress() const +bool LLViewerWindow::getShowProgress() const { return (mProgressView && mProgressView->getVisible()); } @@ -6918,7 +6918,7 @@ void LLViewerWindow::setProgressPercent(const F32 percent) } } -void LLViewerWindow::setProgressCancelButtonVisible( BOOL b, const std::string& label ) +void LLViewerWindow::setProgressCancelButtonVisible( bool b, const std::string& label ) { if (mProgressView) { @@ -6944,7 +6944,7 @@ void LLViewerWindow::dumpState() << LL_ENDL; } -void LLViewerWindow::stopGL(BOOL save_state) +void LLViewerWindow::stopGL(bool save_state) { //Note: --bao //if not necessary, do not change the order of the function calls in this function. @@ -6993,7 +6993,7 @@ void LLViewerWindow::stopGL(BOOL save_state) gTextureList.destroyGL(save_state); stop_glerror(); - gGLManager.mIsDisabled = TRUE; + gGLManager.mIsDisabled = true; stop_glerror(); //unload shader's @@ -7014,7 +7014,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) if (gGLManager.mIsDisabled) { LL_INFOS() << "Restoring GL..." << LL_ENDL; - gGLManager.mIsDisabled = FALSE; + gGLManager.mIsDisabled = false; initGLDefaults(); LLGLState::restoreGL(); @@ -7034,8 +7034,8 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) LLVOAvatar::restoreGL(); LLVOPartGroup::restoreGL(); - gResizeScreenTexture = TRUE; - gWindowResized = TRUE; + gResizeScreenTexture = true; + gWindowResized = true; if (isAgentAvatarValid() && gAgentAvatarp->isEditingAppearance()) { @@ -7045,8 +7045,8 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) if (!progress_message.empty()) { gRestoreGLTimer.reset(); - gRestoreGL = TRUE; - setShowProgress(TRUE,TRUE); + gRestoreGL = true; + setShowProgress(true,true); setProgressString(progress_message); } LL_INFOS() << "...Restoring GL done" << LL_ENDL; @@ -7098,7 +7098,7 @@ void LLViewerWindow::checkSettings() } } -void LLViewerWindow::restartDisplay(BOOL show_progress_bar) +void LLViewerWindow::restartDisplay(bool show_progress_bar) { LL_INFOS() << "Restaring GL" << LL_ENDL; stopGL(); @@ -7112,11 +7112,11 @@ void LLViewerWindow::restartDisplay(BOOL show_progress_bar) } } -BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync, BOOL show_progress_bar) +bool LLViewerWindow::changeDisplaySettings(LLCoordScreen size, bool enable_vsync, bool show_progress_bar) { - //BOOL was_maximized = gSavedSettings.getBOOL("WindowMaximized"); + //bool was_maximized = gSavedSettings.getBOOL("WindowMaximized"); - //gResizeScreenTexture = TRUE; + //gResizeScreenTexture = true; //U32 fsaa = gSavedSettings.getU32("RenderFSAASamples"); @@ -7130,7 +7130,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync //if (fsaa == old_fsaa) { - return TRUE; + return true; } /* @@ -7138,14 +7138,14 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync // Close floaters that don't handle settings change LLFloaterReg::hideInstance("snapshot"); - BOOL result_first_try = FALSE; - BOOL result_second_try = FALSE; + bool result_first_try = false; + bool result_second_try = false; LLFocusableElement* keyboard_focus = gFocusMgr.getKeyboardFocus(); send_agent_pause(); LL_INFOS() << "Stopping GL during changeDisplaySettings" << LL_ENDL; stopGL(); - mIgnoreActivate = TRUE; + mIgnoreActivate = true; LLCoordScreen old_size; LLCoordScreen old_pos; mWindow->getSize(&old_size); @@ -7163,8 +7163,8 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync { // we are stuck...try once again with a minimal resolution? send_agent_resume(); - mIgnoreActivate = FALSE; - return FALSE; + mIgnoreActivate = false; + return false; } } send_agent_resume(); @@ -7188,7 +7188,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync size = old_size; // for reshape below } - BOOL success = result_first_try || result_second_try; + bool success = result_first_try || result_second_try; if (success) { @@ -7206,7 +7206,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync } } - mIgnoreActivate = FALSE; + mIgnoreActivate = false; gFocusMgr.setKeyboardFocus(keyboard_focus); return success; @@ -7376,7 +7376,7 @@ void LLViewerWindow::reshapeStatusBarContainer() // collapse status_bar_container new_height -= nav_bar_container->getRect().getHeight(); } - status_bar_container->reshape(new_width, new_height, TRUE); + status_bar_container->reshape(new_width, new_height, true); } // Improved menu and navigation bar @@ -7391,7 +7391,7 @@ void LLViewerWindow::reshapeStatusBarContainer() // S32 new_height = status_bar_container->getRect().getHeight(); // S32 new_width = status_bar_container->getRect().getWidth(); // new_height -= nav_bar_container->getRect().getHeight(); -// status_bar_container->reshape(new_width, new_height, TRUE); +// status_bar_container->reshape(new_width, new_height, true); // } //} // @@ -7404,7 +7404,7 @@ void LLViewerWindow::setUIVisibility(bool visible) if (!visible) { - gAgentCamera.changeCameraToThirdPerson(FALSE); + gAgentCamera.changeCameraToThirdPerson(false); gFloaterView->hideAllFloaters(); } else @@ -7426,9 +7426,9 @@ void LLViewerWindow::setUIVisibility(bool visible) // // Is done inside XUI now, using visibility_control - //LLNavigationBar::getInstance()->setVisible(visible ? gSavedSettings.getBOOL("ShowNavbarNavigationPanel") : FALSE); + //LLNavigationBar::getInstance()->setVisible(visible ? gSavedSettings.getBOOL("ShowNavbarNavigationPanel") : false); // We don't use the mini location panel in Firestorm - // LLPanelTopInfoBar::getInstance()->setVisible(visible? gSavedSettings.getBOOL("ShowMiniLocationPanel") : FALSE); + // LLPanelTopInfoBar::getInstance()->setVisible(visible? gSavedSettings.getBOOL("ShowMiniLocationPanel") : false); mRootView->getChildView("status_bar_container")->setVisible(visible); // hide utility bar if we are on a skin that uses it, e.g. Vintage @@ -7453,7 +7453,7 @@ LLPickInfo::LLPickInfo() : mKeyMask(MASK_NONE), mPickCallback(NULL), mPickType(PICK_INVALID), - mWantSurfaceInfo(FALSE), + mWantSurfaceInfo(false), mObjectFace(-1), mUVCoords(-1.f, -1.f), mSTCoords(-1.f, -1.f), @@ -7463,20 +7463,20 @@ LLPickInfo::LLPickInfo() mTangent(), mBinormal(), mHUDIcon(NULL), - mPickTransparent(FALSE), - mPickRigged(FALSE), - mPickParticle(FALSE) + mPickTransparent(false), + mPickRigged(false), + mPickParticle(false) { } LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, MASK keyboard_mask, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_particle, - BOOL pick_reflection_probe, - BOOL pick_uv_coords, - BOOL pick_unselectable, + bool pick_transparent, + bool pick_rigged, + bool pick_particle, + bool pick_reflection_probe, + bool pick_uv_coords, + bool pick_unselectable, void (*pick_callback)(const LLPickInfo& pick_info)) : mMousePt(mouse_pos), mKeyMask(keyboard_mask), diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 33c7e2ab90..3dd0fbdb26 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -92,12 +92,12 @@ public: LLPickInfo(); LLPickInfo(const LLCoordGL& mouse_pos, MASK keyboard_mask, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_particle, - BOOL pick_reflection_probe, - BOOL pick_surface_info, - BOOL pick_unselectable, + bool pick_transparent, + bool pick_rigged, + bool pick_particle, + bool pick_reflection_probe, + bool pick_surface_info, + bool pick_unselectable, void (*pick_callback)(const LLPickInfo& pick_info)); void fetchResults(); @@ -128,17 +128,17 @@ public: LLVector3 mNormal; LLVector4 mTangent; LLVector3 mBinormal; - BOOL mPickTransparent; - BOOL mPickRigged; - BOOL mPickParticle; - BOOL mPickUnselectable; - BOOL mPickReflectionProbe = FALSE; + bool mPickTransparent; + bool mPickRigged; + bool mPickParticle; + bool mPickUnselectable; + bool mPickReflectionProbe = false; void getSurfaceInfo(); private: void updateXYCoords(); - BOOL mWantSurfaceInfo; // do we populate mUVCoord, mNormal, mBinormal? + bool mWantSurfaceInfo; // do we populate mUVCoord, mNormal, mBinormal? }; @@ -186,7 +186,7 @@ public: // Improved menu and navigation bar //void resetStatusBarContainer(); // undo changes done by resetStatusBarContainer on initWorldUI() - BOOL handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down, bool &is_toolmgr_action); + bool handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK mask, EMouseClickType clicktype, bool down, bool &is_toolmgr_action); // // LLWindowCallback interface implementation @@ -205,7 +205,7 @@ public: /*virtual*/ bool handleMiddleMouseUp(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ bool handleOtherMouseDown(LLWindow *window, LLCoordGL pos, MASK mask, S32 button); /*virtual*/ bool handleOtherMouseUp(LLWindow *window, LLCoordGL pos, MASK mask, S32 button); - BOOL handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down); + bool handleOtherMouse(LLWindow *window, LLCoordGL pos, MASK mask, S32 button, bool down); /*virtual*/ LLWindowCallbacks::DragNDropResult handleDragNDrop(LLWindow *window, LLCoordGL pos, MASK mask, LLWindowCallbacks::DragNDropAction action, std::string data); void handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask); void handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask); @@ -281,9 +281,9 @@ public: S32 getCurrentMouseDY() const { return mCurrentMouseDelta.mY; } LLCoordGL getCurrentMouseDelta() const { return mCurrentMouseDelta; } static LLTrace::SampleStatHandle<>* getMouseVelocityStat() { return &sMouseVelocityStat; } - BOOL getLeftMouseDown() const { return mLeftMouseDown; } - BOOL getMiddleMouseDown() const { return mMiddleMouseDown; } - BOOL getRightMouseDown() const { return mRightMouseDown; } + bool getLeftMouseDown() const { return mLeftMouseDown; } + bool getMiddleMouseDown() const { return mMiddleMouseDown; } + bool getRightMouseDown() const { return mRightMouseDown; } const LLPickInfo& getLastPick() const { return mLastPick; } @@ -298,7 +298,7 @@ public: // Is window of our application frontmost? - BOOL getActive() const { return mActive; } + bool getActive() const { return mActive; } const std::string& getInitAlert() { return mInitAlert; } @@ -310,16 +310,16 @@ public: void setCursor( ECursorType c ); void showCursor(); void hideCursor(); - BOOL getCursorHidden() { return mCursorHidden; } + bool getCursorHidden() { return mCursorHidden; } void moveCursorToCenter(); // move to center of window void initTextures(S32 location_id); - void setShowProgress(const BOOL show, BOOL fullscreen); - BOOL getShowProgress() const; + void setShowProgress(const bool show, bool fullscreen); + bool getShowProgress() const; void setProgressString(const std::string& string); void setProgressPercent(const F32 percent); void setProgressMessage(const std::string& msg); - void setProgressCancelButtonVisible( BOOL b, const std::string& label = LLStringUtil::null ); + void setProgressCancelButtonVisible( bool b, const std::string& label = LLStringUtil::null ); LLProgressView *getProgressView() const; void revealIntroPanel(); void setStartupComplete(); @@ -335,8 +335,8 @@ public: LLView* getToolBarHolder() { return mToolBarHolder.get(); } LLView* getHintHolder() { return mHintHolder.get(); } LLView* getLoginPanelHolder() { return mLoginPanelHolder.get(); } - BOOL handleKey(KEY key, MASK mask); - BOOL handleKeyUp(KEY key, MASK mask); + bool handleKey(KEY key, MASK mask); + bool handleKeyUp(KEY key, MASK mask); void handleScrollWheel(S32 clicks); void handleScrollHWheel (S32 clicks); @@ -346,7 +346,7 @@ public: void clearPopups(); // Hide normal UI when a logon fails, re-show everything when logon is attempted again - void setNormalControlsVisible( BOOL visible ); + void setNormalControlsVisible( bool visible ); void setMenuBackgroundColor(bool god_mode = false, bool dev_grid = false); void reshape(S32 width, S32 height); @@ -363,11 +363,11 @@ public: // snapshot functionality. // perhaps some of this should move to llfloatershapshot? -MG - BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL show_hud = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::ESnapshotFormat format = LLSnapshotModel::SNAPSHOT_FORMAT_BMP); - BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE, - BOOL show_ui = TRUE, BOOL show_hud = TRUE, BOOL do_rebuild = FALSE, BOOL no_post = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE); + bool saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, bool show_ui = true, bool show_hud = true, bool do_rebuild = false, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::ESnapshotFormat format = LLSnapshotModel::SNAPSHOT_FORMAT_BMP); + bool rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, bool keep_window_aspect = true, bool is_texture = false, + bool show_ui = true, bool show_hud = true, bool do_rebuild = false, bool no_post = false, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE); - BOOL simpleSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, const int num_render_passes); + bool simpleSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, const int num_render_passes); @@ -377,19 +377,19 @@ public: // index - cube index in the array to use (cube index, not face-layer) // face - which cube face to update // near_clip - near clip setting to use - BOOL cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 index, S32 face, F32 near_clip, bool render_avatars); + bool cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubearray, S32 index, S32 face, F32 near_clip, bool render_avatars); // special implementation of simpleSnapshot for reflection maps - BOOL reflectionSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes); + bool reflectionSnapshot(LLImageRaw* raw, S32 image_width, S32 image_height, const int num_render_passes); - BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL show_hud, BOOL do_rebuild, BOOL no_post, LLSnapshotModel::ESnapshotLayerType type); - BOOL isSnapshotLocSet() const; + bool thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, bool show_ui, bool show_hud, bool do_rebuild, bool no_post, LLSnapshotModel::ESnapshotLayerType type); + bool isSnapshotLocSet() const; void resetSnapshotLoc() const; typedef boost::signals2::signal snapshot_saved_signal_t; - void saveImageNumbered(LLImageFormatted *image, BOOL force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb); + void saveImageNumbered(LLImageFormatted *image, bool force_picker, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb); void onDirectorySelected(const std::vector& filenames, LLImageFormatted *image, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb); void saveImageLocal(LLImageFormatted *image, const snapshot_saved_signal_t::slot_type& success_cb, const snapshot_saved_signal_t::slot_type& failure_cb); void onSelectionFailure(const snapshot_saved_signal_t::slot_type& failure_cb); @@ -401,7 +401,7 @@ public: void playSnapshotAnimAndSound(); // draws selection boxes around selected objects, must call displayObjects first - void renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL for_hud ); + void renderSelections( bool for_gl_pick, bool pick_parcel_walls, bool for_hud ); void performPick(); void returnEmptyPicks(); @@ -409,21 +409,21 @@ public: S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& pick_info), - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = FALSE, - BOOL pick_reflection_probes = FALSE); - LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE, BOOL pick_unselectable = TRUE, BOOL pick_reflection_probe = FALSE); + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = false, + bool pick_reflection_probes = false); + LLPickInfo pickImmediate(S32 x, S32 y, bool pick_transparent, bool pick_rigged = false, bool pick_particle = false, bool pick_unselectable = true, bool pick_reflection_probe = false); LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth, LLVector4a* intersection); LLViewerObject* cursorIntersect(S32 mouse_x = -1, S32 mouse_y = -1, F32 depth = 512.f, LLViewerObject *this_object = NULL, S32 this_face = -1, - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = TRUE, - BOOL pick_reflection_probe = TRUE, + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = true, + bool pick_reflection_probe = true, S32* face_hit = NULL, LLVector4a *intersection = NULL, LLVector2 *uv = NULL, @@ -441,10 +441,10 @@ public: //const LLVector3d& lastNonFloraObjectHitOffset(); // mousePointOnLand() returns true if found point - BOOL mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global, BOOL ignore_distance = FALSE); - BOOL mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, const LLVector3d &plane_point, const LLVector3 &plane_normal); + bool mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d *land_pos_global, bool ignore_distance = false); + bool mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, const S32 y, const LLVector3d &plane_point, const LLVector3 &plane_normal); LLVector3d clickPointInWorldGlobal(const S32 x, const S32 y_from_bot, LLViewerObject* clicked_object) const; - BOOL clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const; + bool clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewerObject *objectp, LLVector3d &point_global) const; // Prints window implementation details void dumpState(); @@ -452,9 +452,9 @@ public: // handle shutting down GL and bringing it back up void requestResolutionUpdate(); void checkSettings(); - void restartDisplay(BOOL show_progress_bar); - BOOL changeDisplaySettings(LLCoordScreen size, BOOL enable_vsync, BOOL show_progress_bar); - BOOL getIgnoreDestroyWindow() { return mIgnoreActivate; } + void restartDisplay(bool show_progress_bar); + bool changeDisplaySettings(LLCoordScreen size, bool enable_vsync, bool show_progress_bar); + bool getIgnoreDestroyWindow() { return mIgnoreActivate; } F32 getWorldViewAspectRatio() const; const LLVector2& getDisplayScale() const { return mDisplayScale; } void calcDisplayScale(); @@ -471,7 +471,7 @@ private: void switchToolByMask(MASK mask); void destroyWindow(); void drawMouselookInstructions(); - void stopGL(BOOL save_state = TRUE); + void stopGL(bool save_state = true); void restoreGL(const std::string& progress_message = LLStringUtil::null); void initFonts(F32 zoom_factor = 1.f); void schedulePick(LLPickInfo& pick_info); @@ -498,9 +498,9 @@ private: LLCoordGL mCurrentMousePoint; // last mouse position in GL coords LLCoordGL mLastMousePoint; // Mouse point at last frame. LLCoordGL mCurrentMouseDelta; //amount mouse moved this frame - BOOL mLeftMouseDown; - BOOL mMiddleMouseDown; - BOOL mRightMouseDown; + bool mLeftMouseDown; + bool mMiddleMouseDown; + bool mRightMouseDown; LLProgressView *mProgressView; LLProgressViewMini *mProgressViewMini; @@ -510,9 +510,9 @@ private: std::string mLastToolTipMessage; LLRect mToolTipStickyRect; // Once a tool tip is shown, it will stay visible until the mouse leaves this rect. - BOOL mMouseInWindow; // True if the mouse is over our window or if we have captured the mouse. - BOOL mFocusCycleMode; - BOOL mAllowMouseDragging; + bool mMouseInWindow; // True if the mouse is over our window or if we have captured the mouse. + bool mFocusCycleMode; + bool mAllowMouseDragging; LLFrameTimer mMouseDownTimer; typedef std::set > view_handle_set_t; view_handle_set_t mMouseHoverViews; @@ -520,8 +520,8 @@ private: // Variables used for tool override switching based on modifier keys. JC MASK mLastMask; // used to detect changes in modifier mask LLTool* mToolStored; // the tool we're overriding - BOOL mHideCursorPermanent; // true during drags, mouselook - BOOL mCursorHidden; + bool mHideCursorPermanent; // true during drags, mouselook + bool mCursorHidden; LLPickInfo mLastPick; std::vector mPicks; LLRect mPickScreenRegion; // area of frame buffer for rendering pick frames (generally follows mouse to avoid going offscreen) @@ -529,7 +529,7 @@ private: std::string mOverlayTitle; // Used for special titles such as "Second Life - Special E3 2003 Beta" - BOOL mIgnoreActivate; + bool mIgnoreActivate; std::string mInitAlert; // Window / GL initialization requires an alert @@ -576,9 +576,9 @@ extern S32 gDebugRaycastFaceHit; extern LLVector4a gDebugRaycastStart; extern LLVector4a gDebugRaycastEnd; -extern BOOL gDisplayCameraPos; -extern BOOL gDisplayWindInfo; -extern BOOL gDisplayFOV; -extern BOOL gDisplayBadge; +extern bool gDisplayCameraPos; +extern bool gDisplayWindInfo; +extern bool gDisplayFOV; +extern bool gDisplayBadge; #endif diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index d462c9aabb..9e1f132eb3 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -60,7 +60,7 @@ F32 bilinear(const F32 v00, const F32 v01, const F32 v10, const F32 v11, const F LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32 scale) : LLViewerLayer(width, scale), - mParamsReady(FALSE) + mParamsReady(false) { mSurfacep = surfacep; @@ -78,7 +78,7 @@ LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32 } mTexScaleX = 16.f; mTexScaleY = 16.f; - mTexturesLoaded = FALSE; + mTexturesLoaded = false; } @@ -106,13 +106,13 @@ void LLVLComposition::setDetailTextureID(S32 corner, const LLUUID& id) mRawImages[corner] = NULL; } -BOOL LLVLComposition::generateHeights(const F32 x, const F32 y, +bool LLVLComposition::generateHeights(const F32 x, const F32 y, const F32 width, const F32 height) { if (!mParamsReady) { // All the parameters haven't been set yet (we haven't gotten the message from the sim) - return FALSE; + return false; } llassert(mSurfacep); @@ -120,7 +120,7 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y, if (!mSurfacep || !mSurfacep->getRegion()) { // We don't always have the region yet here.... - return FALSE; + return false; } S32 x_begin, y_begin, x_end, y_end; @@ -209,18 +209,18 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y, *(mDatap + i + j*mWidth) = scaled_noisy_height; } } - return TRUE; + return true; } static const U32 BASE_SIZE = 128; -BOOL LLVLComposition::generateComposition() +bool LLVLComposition::generateComposition() { if (!mParamsReady) { // All the parameters haven't been set yet (we haven't gotten the message from the sim) - return FALSE; + return false; } for (S32 i = 0; i < 4; i++) @@ -229,7 +229,7 @@ BOOL LLVLComposition::generateComposition() { mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN); // in case we are at low detail mDetailTextures[i]->addTextureStats(BASE_SIZE*BASE_SIZE); - return FALSE; + return false; } if ((mDetailTextures[i]->getDiscardLevel() != 0 && (mDetailTextures[i]->getWidth() < BASE_SIZE || @@ -247,14 +247,14 @@ BOOL LLVLComposition::generateComposition() mDetailTextures[i]->setBoostLevel(LLGLTexture::BOOST_TERRAIN); // in case we are at low detail mDetailTextures[i]->setMinDiscardLevel(ddiscard); mDetailTextures[i]->addTextureStats(BASE_SIZE*BASE_SIZE); // priority - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, +bool LLVLComposition::generateTexture(const F32 x, const F32 y, const F32 width, const F32 height) { LL_PROFILE_ZONE_SCOPED @@ -287,7 +287,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, min_dim /= 2; } - BOOL delete_raw = (mDetailTextures[i]->reloadRawImage(ddiscard) != NULL) ; + bool delete_raw = (mDetailTextures[i]->reloadRawImage(ddiscard) != NULL) ; if(mDetailTextures[i]->getRawImageLevel() != ddiscard)//raw iamge is not ready, will enter here again later. { if (mDetailTextures[i]->getFetchPriority() <= 0.0f && !mDetailTextures[i]->hasSavedRawImage()) @@ -301,7 +301,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, mDetailTextures[i]->destroyRawImage() ; } LL_DEBUGS("Terrain") << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << " Discard: " << ddiscard << LL_ENDL; - return FALSE; + return false; } mRawImages[i] = mDetailTextures[i]->getRawImage() ; @@ -319,7 +319,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, { // Not much that is useful to do here, this ship is sinking it seems. LL_WARNS("Terrain") << "allocation of new raw image failed" << LL_ENDL; - return(FALSE); + return(false); } // newraw->composite(mRawImages[i]); @@ -380,7 +380,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, if (tex_comps != st_comps) { LL_WARNS("Terrain") << "Base texture comps != input texture comps" << LL_ENDL; - return FALSE; + return false; } tex_x_scalef = (F32)tex_width / (F32)mWidth; @@ -477,7 +477,7 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, mDetailTextures[i]->setMinDiscardLevel(MAX_DISCARD_LEVEL + 1); } - return TRUE; + return true; } LLUUID LLVLComposition::getDetailTextureID(S32 corner) diff --git a/indra/newview/llvlcomposition.h b/indra/newview/llvlcomposition.h index 2dd04ac5a5..4915d8d2e0 100644 --- a/indra/newview/llvlcomposition.h +++ b/indra/newview/llvlcomposition.h @@ -41,10 +41,10 @@ public: void setSurface(LLSurface *surfacep); // Viewer side hack to generate composition values - BOOL generateHeights(const F32 x, const F32 y, const F32 width, const F32 height); - BOOL generateComposition(); + bool generateHeights(const F32 x, const F32 y, const F32 width, const F32 height); + bool generateComposition(); // Generate texture from composition values. - BOOL generateTexture(const F32 x, const F32 y, const F32 width, const F32 height); + bool generateTexture(const F32 x, const F32 y, const F32 width, const F32 height); // Use these as indeces ito the get/setters below that use 'corner' enum ECorner @@ -66,12 +66,12 @@ public: friend class LLVOSurfacePatch; friend class LLDrawPoolTerrain; - void setParamsReady() { mParamsReady = TRUE; } - BOOL getParamsReady() const { return mParamsReady; } + void setParamsReady() { mParamsReady = true; } + bool getParamsReady() const { return mParamsReady; } protected: - BOOL mParamsReady; + bool mParamsReady; LLSurface *mSurfacep; - BOOL mTexturesLoaded; + bool mTexturesLoaded; LLPointer mDetailTextures[CORNER_COUNT]; LLPointer mRawImages[CORNER_COUNT]; diff --git a/indra/newview/llvlmanager.cpp b/indra/newview/llvlmanager.cpp index f3cc27d5d2..8d73f39b94 100644 --- a/indra/newview/llvlmanager.cpp +++ b/indra/newview/llvlmanager.cpp @@ -113,12 +113,12 @@ void LLVLManager::unpackData(const S32 num_packets) decode_patch_group_header(bit_pack, &goph); if (LAND_LAYER_CODE == datap->mType) { - datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, FALSE); + datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, false); } // Aurora Sim else if (AURORA_LAND_LAYER_CODE == datap->mType) { - datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, TRUE); + datap->mRegionp->getLand().decompressDCTPatch(bit_pack, &goph, true); } //else if (WIND_LAYER_CODE == datap->mType) else if (WIND_LAYER_CODE == datap->mType || AURORA_WIND_LAYER_CODE == datap->mType) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index adcdbd8d6e..aaabd7ded1 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -348,13 +348,13 @@ public: } // 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; } // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. + // must return true while it is active, and + // must return false when the motion is completed. virtual bool onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; @@ -445,7 +445,7 @@ public: virtual LLMotionInitStatus onInitialize(LLCharacter *character) { mCharacter = character; - BOOL success = true; + bool success = true; if ( !mChestState->setJoint( character->getJoint( "mChest" ) ) ) { @@ -469,13 +469,13 @@ public: } // 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; } // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. + // must return true while it is active, and + // must return false when the motion is completed. virtual bool onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; @@ -571,13 +571,13 @@ public: } // 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; } // called per time step - // must return TRUE while it is active, and - // must return FALSE when the motion is completed. + // must return true while it is active, and + // must return false when the motion is completed. virtual bool onUpdate(F32 time, U8* joint_mask) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; @@ -625,15 +625,15 @@ const LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] = }; S32 LLVOAvatar::sRenderName = RENDER_NAME_ALWAYS; -BOOL LLVOAvatar::sRenderGroupTitles = TRUE; +bool LLVOAvatar::sRenderGroupTitles = true; S32 LLVOAvatar::sNumVisibleChatBubbles = 0; -BOOL LLVOAvatar::sDebugInvisible = FALSE; -BOOL LLVOAvatar::sShowAttachmentPoints = FALSE; -BOOL LLVOAvatar::sShowAnimationDebug = FALSE; -BOOL LLVOAvatar::sVisibleInFirstPerson = FALSE; +bool LLVOAvatar::sDebugInvisible = false; +bool LLVOAvatar::sShowAttachmentPoints = false; +bool LLVOAvatar::sShowAnimationDebug = false; +bool LLVOAvatar::sVisibleInFirstPerson = false; F32 LLVOAvatar::sLODFactor = 1.f; F32 LLVOAvatar::sPhysicsLODFactor = 1.f; -BOOL LLVOAvatar::sJointDebug = FALSE; +bool LLVOAvatar::sJointDebug = false; F32 LLVOAvatar::sUnbakedTime = 0.f; F32 LLVOAvatar::sUnbakedUpdateTime = 0.f; F32 LLVOAvatar::sGreyTime = 0.f; @@ -660,20 +660,20 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mAttachmentVisibleTriangleCount(0), mAttachmentEstTriangleCount(0.f), mReportedVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN), - mTurning(FALSE), + mTurning(false), mLastSkeletonSerialNum( 0 ), - mIsSitting(FALSE), + mIsSitting(false), mTimeVisible(), - mTyping(FALSE), - mMeshValid(FALSE), - mVisible(FALSE), + mTyping(false), + mMeshValid(false), + mVisible(false), mLastImpostorUpdateFrameTime(0.f), mLastImpostorUpdateReason(0), mWindFreq(0.f), mRipplePhase( 0.f ), - mBelowWater(FALSE), + mBelowWater(false), mLastAppearanceBlendTime(0.f), - mAppearanceAnimating(FALSE), + mAppearanceAnimating(false), mNameIsSet(false), // FIRE-13414: Avatar name isn't updated when the simulator sends a new name mNameFirstname(), @@ -694,29 +694,29 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mNameAlpha(0.f), mRenderGroupTitles(sRenderGroupTitles), mNameCloud(false), - mFirstTEMessageReceived( FALSE ), - mFirstAppearanceMessageReceived( FALSE ), - mCulled( FALSE ), + mFirstTEMessageReceived( false ), + mFirstAppearanceMessageReceived( false ), + mCulled( false ), mVisibilityRank(0), - mNeedsSkin(FALSE), + mNeedsSkin(false), mLastSkinTime(0.f), mUpdatePeriod(1), mOverallAppearance(AOA_INVISIBLE), mVisualComplexityStale(true), mVisuallyMuteSetting(AV_RENDER_NORMALLY), mMutedAVColor(LLColor4::white /* used for "uninitialize" */), - mFirstFullyVisible(TRUE), + mFirstFullyVisible(true), mFirstUseDelaySeconds(FIRST_APPEARANCE_CLOUD_MIN_DELAY), - mFullyLoaded(FALSE), - mPreviousFullyLoaded(FALSE), - mFullyLoadedInitialized(FALSE), + mFullyLoaded(false), + mPreviousFullyLoaded(false), + mFullyLoadedInitialized(false), mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN), - mLoadedCallbacksPaused(FALSE), + mLoadedCallbacksPaused(false), mLoadedCallbackTextures(0), mRenderUnloadedAvatar(LLCachedControl(gSavedSettings, "RenderUnloadedAvatar", false)), mLastRezzedStatus(-1), - mIsEditingAppearance(FALSE), - mUseLocalAppearance(FALSE), + mIsEditingAppearance(false), + mUseLocalAppearance(false), // [Legacy Bake] mUseServerBakes(false), // [Legacy Bake] @@ -734,14 +734,14 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, setHoverOffset(LLVector3(0.0, 0.0, 0.0)); // mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline - const BOOL needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job + const bool needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job mVoiceVisualizer = ( LLVoiceVisualizer *)LLHUDManager::getInstance()->createViewerEffect( LLHUDObject::LL_HUD_EFFECT_VOICE_VISUALIZER, needsSendToSim ); LL_DEBUGS("Avatar","Message") << "LLVOAvatar Constructor (0x" << this << ") id:" << mID << LL_ENDL; mPelvisp = NULL; mDirtyMesh = 2; // Dirty geometry, need to regenerate. - mMeshTexturesDirty = FALSE; + mMeshTexturesDirty = false; mHeadp = NULL; @@ -749,9 +749,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mSpeed = 0.f; setAnimationData("Speed", &mSpeed); - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; mLastImpostorUpdateReason = 0; - mNeedsAnimUpdate = TRUE; + mNeedsAnimUpdate = true; mNeedsExtentUpdate = true; @@ -760,22 +760,22 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, setNumTEs(TEX_NUM_INDICES); - mbCanSelect = TRUE; + mbCanSelect = true; mSignaledAnimations.clear(); mPlayingAnimations.clear(); - mWasOnGroundLeft = FALSE; - mWasOnGroundRight = FALSE; + mWasOnGroundLeft = false; + mWasOnGroundRight = false; mTimeLast = 0.0f; mSpeedAccum = 0.0f; mRippleTimeLast = 0.f; - mInAir = FALSE; + mInAir = false; - mStepOnLand = TRUE; + mStepOnLand = true; mStepMaterial = 0; mLipSyncActive = false; @@ -912,7 +912,7 @@ LLVOAvatar::~LLVOAvatar() std::for_each(mAttachmentPoints.begin(), mAttachmentPoints.end(), DeletePairedPointer()); mAttachmentPoints.clear(); - mDead = TRUE; + mDead = true; mAnimationSources.clear(); LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ; @@ -936,10 +936,10 @@ void LLVOAvatar::markDead() } -BOOL LLVOAvatar::isFullyBaked() +bool LLVOAvatar::isFullyBaked() { - if (mIsDummy) return TRUE; - if (getNumTEs() == 0) return FALSE; + if (mIsDummy) return true; + if (getNumTEs() == 0) return false; // OS BOM limit the tests to avoid "invalid face error" // for (U32 i = 0; i < mBakedTextureDatas.size(); i++) for (U32 i = 0; i < getNumBakes(); i++) @@ -948,13 +948,13 @@ BOOL LLVOAvatar::isFullyBaked() && ((i != BAKED_SKIRT) || isWearingWearableType(LLWearableType::WT_SKIRT)) && (i != BAKED_LEFT_ARM) && (i != BAKED_LEFT_LEG) && (i != BAKED_AUX1) && (i != BAKED_AUX2) && (i != BAKED_AUX3)) { - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLVOAvatar::isFullyTextured() const +bool LLVOAvatar::isFullyTextured() const { for (S32 i = 0; i < mMeshLOD.size(); i++) { @@ -984,13 +984,13 @@ BOOL LLVOAvatar::isFullyTextured() const continue; // Mesh exists and has a composite texture. } // Fail - return FALSE; + return false; } } - return TRUE; + return true; } -BOOL LLVOAvatar::hasGray() const +bool LLVOAvatar::hasGray() const { return !getIsCloud() && !isFullyTextured(); } @@ -1027,9 +1027,9 @@ void LLVOAvatar::deleteLayerSetCaches(bool clearAll) } // static -BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars) +bool LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars) { - BOOL res = TRUE; + bool res = true; grey_avatars = 0; for (std::vector::iterator iter = LLCharacter::sInstances.begin(); iter != LLCharacter::sInstances.end(); ++iter) @@ -1041,7 +1041,7 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars) } else if( !inst->isFullyBaked() ) { - res = FALSE; + res = false; if (inst->mHasGrey) { ++grey_avatars; @@ -1162,7 +1162,7 @@ void LLVOAvatar::restoreGL() { if (!isAgentAvatarValid()) return; - gAgentAvatarp->setCompositeUpdatesEnabled(TRUE); + gAgentAvatarp->setCompositeUpdatesEnabled(true); for (U32 i = 0; i < gAgentAvatarp->mBakedTextureDatas.size(); i++) { // [Legacy Bake] @@ -1188,7 +1188,7 @@ void LLVOAvatar::resetImpostors() { LLVOAvatar* avatar = (LLVOAvatar*) *iter; avatar->mImpostor.release(); - avatar->mNeedsImpostorUpdate = TRUE; + avatar->mNeedsImpostorUpdate = true; avatar->mLastImpostorUpdateReason = 1; } } @@ -1204,7 +1204,7 @@ void LLVOAvatar::deleteCachedImages(bool clearAll) LLVOAvatar* inst = (LLVOAvatar*) *iter; inst->deleteLayerSetCaches(clearAll); } - LLViewerTexLayerSet::sHasCaches = FALSE; + LLViewerTexLayerSet::sHasCaches = false; } LLVOAvatarSelf::deleteScratchTextures(); LLTexLayerStaticImageList::getInstance()->deleteCachedImages(); @@ -1409,7 +1409,7 @@ const LLVector3 LLVOAvatar::getRenderPosition() const } } -void LLVOAvatar::updateDrawable(BOOL force_damped) +void LLVOAvatar::updateDrawable(bool force_damped) { clearChanged(SHIFTED); } @@ -1743,7 +1743,7 @@ void LLVOAvatar::renderCollisionVolumes() { LLVector4a unused; - mNameText->lineSegmentIntersect(unused, unused, unused, TRUE); + mNameText->lineSegmentIntersect(unused, unused, unused, true); } } @@ -1913,11 +1913,11 @@ void LLVOAvatar::renderJoints() addDebugText(nullstr.str()); } -BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, +bool LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -1926,12 +1926,12 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& { if ((isSelf() && !gAgent.needsRenderAvatar()) || !LLPipeline::sPickAvatar) { - return FALSE; + return false; } if (isControlAvatar()) { - return FALSE; + return false; } if (lineSegmentBoundingBox(start, end)) @@ -1972,7 +1972,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& normal->load3(res_norm.v); } - return TRUE; + return true; } } @@ -2020,18 +2020,18 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& *intersection = position; } - return TRUE; + return true; } - return FALSE; + return false; } // virtual LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end, S32 face, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -2124,7 +2124,7 @@ void LLVOAvatar::buildCharacter() LLAvatarAppearance::buildCharacter(); // Not done building yet; more to do. - mIsBuilt = FALSE; + mIsBuilt = false; //------------------------------------------------------------------------- // set head offset from pelvis @@ -2162,10 +2162,10 @@ void LLVOAvatar::buildCharacter() //------------------------------------------------------------------------- processAnimationStateChanges(); - mIsBuilt = TRUE; + mIsBuilt = true; stop_glerror(); - mMeshValid = TRUE; + mMeshValid = true; } //----------------------------------------------------------------------------- @@ -2239,7 +2239,7 @@ void LLVOAvatar::applyDefaultParams() F32 newWeight = U8_to_F32(value, param->getMinWeight(), param->getMaxWeight()); // [Legacy Bake] //param->setWeight(newWeight); - param->setWeight(newWeight, false); // Most likely FALSE is correct here because it's used in resetSkeleton, which is a local operation + param->setWeight(newWeight, false); // Most likely false is correct here because it's used in resetSkeleton, which is a local operation } } @@ -2318,10 +2318,10 @@ void LLVOAvatar::resetSkeleton(bool reset_animations) // Stripped down approximation of // applyParsedAppearanceMessage, but with alternative default // (jellydoll) params - setCompositeUpdatesEnabled( FALSE ); + setCompositeUpdatesEnabled( false ); gPipeline.markGLRebuild(this); applyDefaultParams(); - setCompositeUpdatesEnabled( TRUE ); + setCompositeUpdatesEnabled( true ); updateMeshTextures(); updateMeshVisibility(); } @@ -2372,7 +2372,7 @@ void LLVOAvatar::releaseMeshData() ++iter) { LLAvatarJoint* joint = (*iter); - joint->setValid(FALSE, TRUE); + joint->setValid(false, true); } //cleanup data @@ -2403,10 +2403,10 @@ void LLVOAvatar::releaseMeshData() if (attachment && !attachment->getIsHUDAttachment()) // { - attachment->setAttachmentVisibility(FALSE); + attachment->setAttachmentVisibility(false); } } - mMeshValid = FALSE; + mMeshValid = false; } //----------------------------------------------------------------------------- @@ -2422,7 +2422,7 @@ void LLVOAvatar::restoreMeshData() } //LL_INFOS() << "Restoring" << LL_ENDL; - mMeshValid = TRUE; + mMeshValid = true; updateJointLODs(); for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); @@ -2432,7 +2432,7 @@ void LLVOAvatar::restoreMeshData() LLViewerJointAttachment* attachment = iter->second; if (!attachment->getIsHUDAttachment()) { - attachment->setAttachmentVisibility(TRUE); + attachment->setAttachmentVisibility(true); } } @@ -2600,7 +2600,7 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, U32 block_num, const EObjectUpdateType update_type, LLDataPacker *dp) { - const BOOL has_name = !getNVPair("FirstName"); + const bool has_name = !getNVPair("FirstName"); // Do base class updates... U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp); @@ -2652,7 +2652,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU } LL_DEBUGS("Avatar") << avString() << "get server-bake image from URL " << url << LL_ENDL; result = LLViewerTextureManager::getFetchedTextureFromUrl( - url, FTT_SERVER_BAKE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); + url, FTT_SERVER_BAKE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE, 0, 0, uuid); if (result->isMissingAsset()) { result->setIsMissingAsset(false); @@ -2819,7 +2819,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) // animate the character // store off last frame's root position to be consistent with camera position mLastRootPos = mRoot->getWorldPosition(); - BOOL detailed_update = updateCharacter(agent); + bool detailed_update = updateCharacter(agent); static LLUICachedControl visualizers_in_calls("ShowVoiceVisualizersInCalls", false); bool voice_enabled = (visualizers_in_calls || LLVoiceClient::getInstance()->inProximalChannel()) && @@ -3018,7 +3018,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) LLJoint::sNumUpdates = 0; LLJoint::sNumTouches = 0; - BOOL visible = isVisible() || mNeedsAnimUpdate; + bool visible = isVisible() || mNeedsAnimUpdate; // update attachments positions if (detailed_update) @@ -3114,7 +3114,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) } } - mNeedsAnimUpdate = FALSE; + mNeedsAnimUpdate = false; if (isImpostor() && !mNeedsImpostorUpdate) { @@ -3132,7 +3132,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) if (angle_diff > F_PI/512.f*distance*mUpdatePeriod) { - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; mLastImpostorUpdateReason = 2; } } @@ -3144,7 +3144,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) F32 dist_diff = fabsf(distance-mImpostorDistance); if (dist_diff/mImpostorDistance > 0.1f) { - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; mLastImpostorUpdateReason = 3; } else @@ -3157,7 +3157,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) diff.setSub(ext[1], mImpostorExtents[1]); if (diff.getLength3().getF32() > 0.05f) { - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; mLastImpostorUpdateReason = 4; } else @@ -3165,7 +3165,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) diff.setSub(ext[0], mImpostorExtents[0]); if (diff.getLength3().getF32() > 0.05f) { - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; mLastImpostorUpdateReason = 5; } } @@ -3180,7 +3180,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) //force a move if sitting on an active object if (getParent() && ((LLViewerObject*) getParent())->mDrawable->isActive()) { - gPipeline.markMoved(mDrawable, TRUE); + gPipeline.markMoved(mDrawable, true); } } } @@ -3194,7 +3194,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation() F32 appearance_anim_time = mAppearanceMorphTimer.getElapsedTimeF32(); if (appearance_anim_time >= APPEARANCE_MORPH_TIME) { - mAppearanceAnimating = FALSE; + mAppearanceAnimating = false; for (LLVisualParam *param = getFirstVisualParam(); param; param = getNextVisualParam()) @@ -3316,7 +3316,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() { if (mFirstFullyVisible) { - mFirstFullyVisible = FALSE; + mFirstFullyVisible = false; if (isSelf()) { LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL; @@ -3500,16 +3500,16 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) return; } - bool new_name = FALSE; + bool new_name = false; if (visible_chat != mVisibleChat) { mVisibleChat = visible_chat; - new_name = TRUE; + new_name = true; } if (visible_typing != mVisibleTyping) { mVisibleTyping = visible_typing; - new_name = TRUE; + new_name = true; } // [RLVa:KB] - Checked: RLVa-0.2.0 @@ -3517,8 +3517,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) { if (mRenderGroupTitles) { - mRenderGroupTitles = FALSE; - new_name = TRUE; + mRenderGroupTitles = false; + new_name = true; } } else if (sRenderGroupTitles != mRenderGroupTitles) @@ -3526,7 +3526,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) // if (sRenderGroupTitles != mRenderGroupTitles) { mRenderGroupTitles = sRenderGroupTitles; - new_name = TRUE; + new_name = true; } // First Calculate Alpha @@ -3569,11 +3569,11 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) //mNameText->setMass(10.f); mNameText->setSourceObject(this); mNameText->setVertAlignment(LLHUDNameTag::ALIGN_VERT_TOP); - mNameText->setVisibleOffScreen(TRUE); + mNameText->setVisibleOffScreen(true); mNameText->setMaxLines(11); mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); sNumVisibleChatBubbles++; - new_name = TRUE; + new_name = true; } idleUpdateNameTagPosition(root_pos_last); @@ -3980,7 +3980,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name) mNameArcColor = complexity_color; // LLStringFn::replace_ascii_controlchars(mTitle,LL_UNKNOWN_CHAR); - new_name = TRUE; + new_name = true; } @@ -4045,7 +4045,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name) } } } - mNameText->setVisibleOffScreen(TRUE); + mNameText->setVisibleOffScreen(true); if (mVisibleTyping && mTyping) { @@ -4070,7 +4070,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name) // ...not using chat bubbles, just names mNameText->setTextAlignment(LLHUDNameTag::ALIGN_TEXT_CENTER); mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); - mNameText->setVisibleOffScreen(FALSE); + mNameText->setVisibleOffScreen(false); } } @@ -4253,7 +4253,7 @@ void LLVOAvatar::idleUpdateBelowWater() water_height = getRegion()->getWaterHeight(); // Animation Overrider - BOOL wasBelowWater = mBelowWater; + bool wasBelowWater = mBelowWater; mBelowWater = avatar_height < water_height; // Animation Overrider if (isSelf() && wasBelowWater != mBelowWater) @@ -4366,7 +4366,7 @@ bool LLVOAvatar::isRlvSilhouette() const if (fIsRlvSilhouette != mCachedIsRlvSilhouette) { mCachedIsRlvSilhouette = fIsRlvSilhouette; - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; } mCachedRlvSilhouetteUpdateTime = now + SECONDS_BETWEEN_SILHOUETTE_UPDATES; } @@ -4705,24 +4705,24 @@ void LLVOAvatar::updateFootstepSounds() if ( gAudiop && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) ) { - BOOL playSound = FALSE; + bool playSound = false; LLVector3 foot_pos_agent; - BOOL onGroundLeft = (leftElev <= 0.05f); - BOOL onGroundRight = (rightElev <= 0.05f); + bool onGroundLeft = (leftElev <= 0.05f); + bool onGroundRight = (rightElev <= 0.05f); // did left foot hit the ground? if ( onGroundLeft && !mWasOnGroundLeft ) { foot_pos_agent = ankle_left_pos_agent; - playSound = TRUE; + playSound = true; } // did right foot hit the ground? if ( onGroundRight && !mWasOnGroundRight ) { foot_pos_agent = ankle_right_pos_agent; - playSound = TRUE; + playSound = true; } mWasOnGroundLeft = onGroundLeft; @@ -4891,7 +4891,7 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time) // When moving very slow, the pelvis is allowed to deviate from the // forward direction to allow it to hold its position while the torso // and head turn. Once in motion, it must conform however. - BOOL self_in_mouselook = isSelf() && gAgentCamera.cameraMouselook(); + bool self_in_mouselook = isSelf() && gAgentCamera.cameraMouselook(); LLVector3 pelvisDir( mRoot->getWorldMatrix().getFwdRow4().mV ); @@ -4917,7 +4917,7 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time) // smaller correction vector means pelvis follows prim direction more closely if (!mTurning && angle > pelvis_rot_threshold*0.75f) { - mTurning = TRUE; + mTurning = true; } // use tighter threshold when turning @@ -4929,7 +4929,7 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time) // am I done turning? if (angle < pelvis_rot_threshold) { - mTurning = FALSE; + mTurning = false; } LLVector3 correction_vector = (pelvisDir - fwdDir) * clamp_rescale(angle, pelvis_rot_threshold*0.75f, pelvis_rot_threshold, 1.0f, 0.0f); @@ -4937,7 +4937,7 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time) } else { - mTurning = FALSE; + mTurning = false; } // Now compute the full world space rotation for the whole body (wQv) @@ -5086,7 +5086,7 @@ void LLVOAvatar::updateRootPositionAndRotation(LLAgent& agent, F32 speed, bool w LLVector3 normal; resolveHeightGlobal(root_pos, ground_under_pelvis, normal); F32 foot_to_ground = (F32) (root_pos.mdV[VZ] - mPelvisToFoot - ground_under_pelvis.mdV[VZ]); - BOOL in_air = ((!LLWorld::getInstance()->getRegionFromPosGlobal(ground_under_pelvis)) || + bool in_air = ((!LLWorld::getInstance()->getRegionFromPosGlobal(ground_under_pelvis)) || foot_to_ground > FOOT_GROUND_COLLISION_TOLERANCE); if (in_air && !mInAir) @@ -5202,12 +5202,12 @@ bool LLVOAvatar::computeNeedsUpdate() { if (needs_update_by_max_time) { - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; mLastImpostorUpdateReason = 11; } else { - //mNeedsImpostorUpdate = TRUE; + //mNeedsImpostorUpdate = true; //mLastImpostorUpdateReason = 10; } } @@ -5242,10 +5242,10 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent) if (!mIsBuilt) { - return FALSE; + return false; } - BOOL visible = isVisible(); + bool visible = isVisible(); bool is_control_avatar = isControlAvatar(); // capture state to simplify tracing bool is_attachment = false; @@ -5282,7 +5282,7 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent) if (!needs_update && !isSelf()) { updateMotions(LLCharacter::HIDDEN_UPDATE); - return FALSE; + return false; } //-------------------------------------------------------------------- @@ -5380,7 +5380,7 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent) if (visible) { // System avatar mesh vertices need to be reskinned. - mNeedsSkin = TRUE; + mNeedsSkin = true; } return visible; @@ -5492,37 +5492,37 @@ void LLVOAvatar::postPelvisSetRecalc() //------------------------------------------------------------------------ void LLVOAvatar::updateVisibility() { - BOOL visible = FALSE; + bool visible = false; if (mIsDummy) { - visible = FALSE; + visible = false; } else if (mDrawable.isNull()) { - visible = FALSE; + visible = false; } else { if (!mDrawable->getSpatialGroup() || mDrawable->getSpatialGroup()->isVisible()) { - visible = TRUE; + visible = true; } else { - visible = FALSE; + visible = false; } if(isSelf()) { if (!gAgentWearables.areWearablesLoaded()) { - visible = FALSE; + visible = false; } } else if( !mFirstAppearanceMessageReceived ) { - visible = FALSE; + visible = false; } if (sDebugInvisible) @@ -5670,7 +5670,7 @@ U32 LLVOAvatar::renderSkinned() { updateMeshData(); mDirtyMesh = 0; - mNeedsSkin = TRUE; + mNeedsSkin = true; mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY); } } @@ -5719,7 +5719,7 @@ U32 LLVOAvatar::renderSkinned() hair_mesh->updateJointGeometry(); } } - mNeedsSkin = FALSE; + mNeedsSkin = false; mLastSkinTime = gFrameTimeSeconds; LLFace * face = mDrawable->getFace(0); @@ -5735,7 +5735,7 @@ U32 LLVOAvatar::renderSkinned() } else { - mNeedsSkin = FALSE; + mNeedsSkin = false; } if (sDebugInvisible) @@ -5777,7 +5777,7 @@ U32 LLVOAvatar::renderSkinned() // render all geometry attached to the skeleton //-------------------------------------------------------------------- - BOOL first_pass = TRUE; + bool first_pass = true; if (!LLDrawPoolAvatar::sSkipOpaque) { if (isUIAvatar() && mIsDummy) @@ -5787,7 +5787,7 @@ U32 LLVOAvatar::renderSkinned() { num_indices += hair_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy); } - first_pass = FALSE; + first_pass = false; } if (!isSelf() || gAgent.needsRenderHead() || LLPipeline::sShadowRender) { @@ -5799,7 +5799,7 @@ U32 LLVOAvatar::renderSkinned() { num_indices += head_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy); } - first_pass = FALSE; + first_pass = false; } } if (isTextureVisible(TEX_UPPER_BAKED) || (getOverallAppearance() == AOA_JELLYDOLL && !isControlAvatar()) || isUIAvatar()) @@ -5809,7 +5809,7 @@ U32 LLVOAvatar::renderSkinned() { num_indices += upper_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy); } - first_pass = FALSE; + first_pass = false; } if (isTextureVisible(TEX_LOWER_BAKED) || (getOverallAppearance() == AOA_JELLYDOLL && !isControlAvatar()) || isUIAvatar()) @@ -5819,7 +5819,7 @@ U32 LLVOAvatar::renderSkinned() { num_indices += lower_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy); } - first_pass = FALSE; + first_pass = false; } } @@ -5832,7 +5832,7 @@ U32 LLVOAvatar::renderSkinned() return num_indices; } -U32 LLVOAvatar::renderTransparent(BOOL first_pass) +U32 LLVOAvatar::renderTransparent(bool first_pass) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; // Tracy accounting for render tracking U32 num_indices = 0; @@ -5842,9 +5842,9 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) LLViewerJoint* skirt_mesh = getViewerJoint(MESH_ID_SKIRT); if (skirt_mesh) { - num_indices += skirt_mesh->render(mAdjustedPixelArea, FALSE); + num_indices += skirt_mesh->render(mAdjustedPixelArea, false); } - first_pass = FALSE; + first_pass = false; gGL.flush(); } @@ -5862,7 +5862,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) { num_indices += eyelash_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy); } - first_pass = FALSE; + first_pass = false; } if (isTextureVisible(TEX_HAIR_BAKED) && (getOverallAppearance() != AOA_JELLYDOLL)) { @@ -5871,7 +5871,7 @@ U32 LLVOAvatar::renderTransparent(BOOL first_pass) { num_indices += hair_mesh->render(mAdjustedPixelArea, first_pass, mIsDummy); } - first_pass = FALSE; + first_pass = false; } if (LLPipeline::sImpostorRender) { @@ -5909,11 +5909,11 @@ U32 LLVOAvatar::renderRigid() LLViewerJoint* eyeball_right = getViewerJoint(MESH_ID_EYEBALL_RIGHT); if (eyeball_left) { - num_indices += eyeball_left->render(mAdjustedPixelArea, TRUE, mIsDummy); + num_indices += eyeball_left->render(mAdjustedPixelArea, true, mIsDummy); } if(eyeball_right) { - num_indices += eyeball_right->render(mAdjustedPixelArea, TRUE, mIsDummy); + num_indices += eyeball_right->render(mAdjustedPixelArea, true, mIsDummy); } } @@ -6043,7 +6043,7 @@ std::string LLVOAvatar::bakedTextureOriginInfo() { ETextureIndex texture_index = mBakedTextureDatas[i].mTextureIndex; LLViewerFetchedTexture *imagep = - LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE); + LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), true); if (!imagep || imagep->getID() == IMG_DEFAULT || imagep->getID() == IMG_DEFAULT_AVATAR) @@ -6101,7 +6101,7 @@ void LLVOAvatar::collectLocalTextureUUIDs(std::set& ids) const LLViewerFetchedTexture *imagep = NULL; for (U32 wearable_index = 0; wearable_index < num_wearables; wearable_index++) { - imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index, wearable_index), TRUE); + imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index, wearable_index), true); if (imagep) { const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearance::getDictionary()->getTexture((ETextureIndex)texture_index); @@ -6124,7 +6124,7 @@ void LLVOAvatar::collectBakedTextureUUIDs(std::set& ids) const LLViewerFetchedTexture *imagep = NULL; if (isIndexBakedTexture((ETextureIndex) texture_index)) { - imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE); + imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), true); if (imagep) { ids.insert(imagep->getID()); @@ -6196,7 +6196,7 @@ void LLVOAvatar::updateTextures() { releaseOldTextures(); - BOOL render_avatar = TRUE; + bool render_avatar = true; if (mIsDummy) { @@ -6205,7 +6205,7 @@ void LLVOAvatar::updateTextures() if( isSelf() ) { - render_avatar = TRUE; + render_avatar = true; } else { @@ -6217,7 +6217,7 @@ void LLVOAvatar::updateTextures() render_avatar = !mCulled; //visible and not culled. } - std::vector layer_baked; + std::vector layer_baked; // GL NOT ACTIVE HERE - *TODO for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { @@ -6235,7 +6235,7 @@ void LLVOAvatar::updateTextures() mMaxPixelArea = 0.f; mMinPixelArea = 99999999.f; - mHasGrey = FALSE; // debug + mHasGrey = false; // debug for (U32 texture_index = 0; texture_index < getNumTEs(); texture_index++) { LLWearableType::EType wearable_type = LLAvatarAppearance::getDictionary()->getTEWearableType((ETextureIndex)texture_index); @@ -6258,7 +6258,7 @@ void LLVOAvatar::updateTextures() LLViewerFetchedTexture *imagep = NULL; for (U32 wearable_index = 0; wearable_index < num_wearables; wearable_index++) { - imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index, wearable_index), TRUE); + imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index, wearable_index), true); if (imagep) { const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearance::getDictionary()->getTexture((ETextureIndex)texture_index); @@ -6272,7 +6272,7 @@ void LLVOAvatar::updateTextures() if (isIndexBakedTexture((ETextureIndex) texture_index) && render_avatar) { const S32 boost_level = getAvatarBakedBoostLevel(); - imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), TRUE); + imagep = LLViewerTextureManager::staticCastToFetchedTexture(getImage(texture_index,0), true); addBakedTextureStats( imagep, mPixelArea, texel_area_ratio, boost_level ); // [Legacy Bake] // Spam if this is a baked texture, not set to default image, without valid host info @@ -6299,7 +6299,7 @@ void LLVOAvatar::updateTextures() void LLVOAvatar::addLocalTextureStats( ETextureIndex idx, LLViewerFetchedTexture* imagep, - F32 texel_area_ratio, BOOL render_avatar, BOOL covered_by_baked) + F32 texel_area_ratio, bool render_avatar, bool covered_by_baked) { // No local texture stats for non-self avatars return; @@ -6311,7 +6311,7 @@ void LLVOAvatar::checkTextureLoading() { static const F32 MAX_INVISIBLE_WAITING_TIME = 15.f ; //seconds - BOOL pause = !isVisible() ; + bool pause = !isVisible() ; if(!pause) { mInvisibleTimer.reset() ; @@ -6485,13 +6485,13 @@ void LLVOAvatar::resolveHeightGlobal(const LLVector3d &inPos, LLVector3d &outPos LLWorld::getInstance()->resolveStepHeightGlobal(this, p0, p1, outPos, outNorm, &obj); if (!obj) { - mStepOnLand = TRUE; + mStepOnLand = true; mStepMaterial = 0; mStepObjectVelocity.setVec(0.0f, 0.0f, 0.0f); } else { - mStepOnLand = FALSE; + mStepOnLand = false; mStepMaterial = obj->getMaterial(); // We want the primitive velocity, not our velocity... (which actually subtracts the @@ -6575,7 +6575,7 @@ void LLVOAvatar::processAnimationStateChanges() // playing, but not signaled, so stop if (found_anim == mSignaledAnimations.end()) { - processSingleAnimationStateChange(anim_it->first, FALSE); + processSingleAnimationStateChange(anim_it->first, false); mPlayingAnimations.erase(anim_it++); continue; } @@ -6599,7 +6599,7 @@ void LLVOAvatar::processAnimationStateChanges() // signaled but not playing, or different sequence id, start motion if (found_anim == mPlayingAnimations.end() || found_anim->second != anim_it->second) { - if (processSingleAnimationStateChange(anim_it->first, TRUE)) + if (processSingleAnimationStateChange(anim_it->first, true)) { mPlayingAnimations[anim_it->first] = anim_it->second; ++anim_it; @@ -6636,7 +6636,7 @@ void LLVOAvatar::processAnimationStateChanges() //----------------------------------------------------------------------------- // processSingleAnimationStateChange(); //----------------------------------------------------------------------------- -BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL start ) +bool LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, bool start ) { // SL-402, SL-427 - we need to update body size often enough to // keep appearances in sync, but not so often that animations @@ -6644,7 +6644,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL // compromise is to do it on animation changes: computeBodySize(); - BOOL result = FALSE; + bool result = false; if ( start ) // start animation { @@ -6680,13 +6680,13 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL } else if (anim_id == ANIM_AGENT_SIT_GROUND_CONSTRAINED) { - sitDown(TRUE); + sitDown(true); } if (startMotion(anim_id)) { - result = TRUE; + result = true; } else { @@ -6697,7 +6697,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL { if (anim_id == ANIM_AGENT_SIT_GROUND_CONSTRAINED) { - sitDown(FALSE); + sitDown(false); } if ((anim_id == ANIM_AGENT_DO_NOT_DISTURB) && gAgent.isDoNotDisturb()) { @@ -6706,7 +6706,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL return result; } stopMotion(anim_id); - result = TRUE; + result = true; } return result; @@ -6715,16 +6715,16 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL //----------------------------------------------------------------------------- // isAnyAnimationSignaled() //----------------------------------------------------------------------------- -BOOL LLVOAvatar::isAnyAnimationSignaled(const LLUUID *anim_array, const S32 num_anims) const +bool LLVOAvatar::isAnyAnimationSignaled(const LLUUID *anim_array, const S32 num_anims) const { for (S32 i = 0; i < num_anims; i++) { if(mSignaledAnimations.find(anim_array[i]) != mSignaledAnimations.end()) { - return TRUE; + return true; } } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -7865,9 +7865,9 @@ void LLVOAvatar::updateVisualParams() //----------------------------------------------------------------------------- // isActive() //----------------------------------------------------------------------------- -BOOL LLVOAvatar::isActive() const +bool LLVOAvatar::isActive() const { - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -7913,7 +7913,7 @@ void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent) //----------------------------------------------------------------------------- // updateJointLODs() //----------------------------------------------------------------------------- -BOOL LLVOAvatar::updateJointLODs() +bool LLVOAvatar::updateJointLODs() { const F32 MAX_PIXEL_AREA = 100000000.f; F32 lod_factor = (sLODFactor * AVATAR_LOD_TWEAK_RANGE + (1.f - AVATAR_LOD_TWEAK_RANGE)); @@ -7944,19 +7944,19 @@ BOOL LLVOAvatar::updateJointLODs() // now select meshes to render based on adjusted pixel area LLViewerJoint* root = dynamic_cast(mRoot); - BOOL res = FALSE; + bool res = false; if (root) { - res = root->updateLOD(mAdjustedPixelArea, TRUE); + res = root->updateLOD(mAdjustedPixelArea, true); } if (res) { sNumLODChangesThisFrame++; dirtyMesh(2); - return TRUE; + return true; } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -7965,7 +7965,7 @@ BOOL LLVOAvatar::updateJointLODs() LLDrawable *LLVOAvatar::createDrawable(LLPipeline *pipeline) { pipeline->allocDrawable(this); - mDrawable->setLit(FALSE); + mDrawable->setLit(false); LLDrawPoolAvatar *poolp = (LLDrawPoolAvatar*)gPipeline.getPool(mIsControlAvatar ? LLDrawPool::POOL_CONTROL_AV : LLDrawPool::POOL_AVATAR); @@ -7989,24 +7989,24 @@ void LLVOAvatar::updateGL() { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR updateMeshTextures(); - mMeshTexturesDirty = FALSE; + mMeshTexturesDirty = false; } } //----------------------------------------------------------------------------- // updateGeometry() //----------------------------------------------------------------------------- -BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) +bool LLVOAvatar::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; if (!(gPipeline.hasRenderType(mIsControlAvatar ? LLPipeline::RENDER_TYPE_CONTROL_AV : LLPipeline::RENDER_TYPE_AVATAR))) { - return TRUE; + return true; } if (!mMeshValid) { - return TRUE; + return true; } if (!drawable) @@ -8014,7 +8014,7 @@ BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) LL_ERRS() << "LLVOAvatar::updateGeometry() called with NULL drawable" << LL_ENDL; } - return TRUE; + return true; } //----------------------------------------------------------------------------- @@ -8060,7 +8060,7 @@ LLViewerJoint* LLVOAvatar::getViewerJoint(S32 idx) //----------------------------------------------------------------------------- void LLVOAvatar::hideHair() { - mMeshLOD[MESH_ID_HAIR]->setVisible(FALSE, TRUE); + mMeshLOD[MESH_ID_HAIR]->setVisible(false, true); } //----------------------------------------------------------------------------- @@ -8068,12 +8068,12 @@ void LLVOAvatar::hideHair() //----------------------------------------------------------------------------- void LLVOAvatar::hideSkirt() { - mMeshLOD[MESH_ID_SKIRT]->setVisible(FALSE, TRUE); + mMeshLOD[MESH_ID_SKIRT]->setVisible(false, true); } -BOOL LLVOAvatar::setParent(LLViewerObject* parent) +bool LLVOAvatar::setParent(LLViewerObject* parent) { - BOOL ret ; + bool ret ; if (parent == NULL) { getOffObject(); @@ -8266,7 +8266,7 @@ S32 LLVOAvatar::getMaxAttachments() const // canAttachMoreObjects() // Returns true if we can attach more objects. //----------------------------------------------------------------------------- -BOOL LLVOAvatar::canAttachMoreObjects(U32 n) const +bool LLVOAvatar::canAttachMoreObjects(U32 n) const { return (getNumAttachments() + n) <= getMaxAttachments(); } @@ -8300,7 +8300,7 @@ S32 LLVOAvatar::getMaxAnimatedObjectAttachments() const // canAttachMoreAnimatedObjects() // Returns true if we can attach more animated objects. //----------------------------------------------------------------------------- -BOOL LLVOAvatar::canAttachMoreAnimatedObjects(U32 n) const +bool LLVOAvatar::canAttachMoreAnimatedObjects(U32 n) const { return (getNumAnimatedObjectAttachments() + n) <= getMaxAnimatedObjectAttachments(); } @@ -8501,7 +8501,7 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO ) //----------------------------------------------------------------------------- // detachObject() //----------------------------------------------------------------------------- -BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object) +bool LLVOAvatar::detachObject(LLViewerObject *viewer_object) { for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); @@ -8539,7 +8539,7 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object) updateMeshVisibility(); LL_DEBUGS() << "Detaching object " << viewer_object->mID << " from " << attachment->getName() << LL_ENDL; - return TRUE; + return true; } } @@ -8547,16 +8547,16 @@ BOOL LLVOAvatar::detachObject(LLViewerObject *viewer_object) if (iter != mPendingAttachment.end()) { mPendingAttachment.erase(iter); - return TRUE; + return true; } - return FALSE; + return false; } //----------------------------------------------------------------------------- // sitDown() //----------------------------------------------------------------------------- -void LLVOAvatar::sitDown(BOOL bSitting) +void LLVOAvatar::sitDown(bool bSitting) { mIsSitting = bSitting; if (isSelf()) @@ -8590,7 +8590,7 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) // Might be first sit //LLFirstUse::useSit(); - gAgent.setFlying(FALSE); + gAgent.setFlying(false); gAgentCamera.setThirdPersonHeadOffset(LLVector3::zero); //interpolate to new camera position gAgentCamera.startCameraAnimation(); @@ -8637,10 +8637,10 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) mDrawable->mXform.setPosition(rel_pos); mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot); - gPipeline.markMoved(mDrawable, TRUE); + gPipeline.markMoved(mDrawable, true); // Notice that removing sitDown() from here causes avatars sitting on // objects to be not rendered for new arrivals. See EXT-6835 and EXT-1655. - sitDown(TRUE); + sitDown(true); mRoot->getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject // SL-315 mRoot->setPosition(getPosition()); @@ -8666,7 +8666,7 @@ void LLVOAvatar::getOffObject() if (sit_object) { stopMotionFromSource(sit_object->getID()); - LLFollowCamMgr::getInstance()->setCameraActive(sit_object->getID(), FALSE); + LLFollowCamMgr::getInstance()->setCameraActive(sit_object->getID(), false); LLViewerObject::const_child_list_t& child_list = sit_object->getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); @@ -8675,7 +8675,7 @@ void LLVOAvatar::getOffObject() LLViewerObject* child_objectp = *iter; stopMotionFromSource(child_objectp->getID()); - LLFollowCamMgr::getInstance()->setCameraActive(child_objectp->getID(), FALSE); + LLFollowCamMgr::getInstance()->setCameraActive(child_objectp->getID(), false); } } @@ -8697,9 +8697,9 @@ void LLVOAvatar::getOffObject() mDrawable->mXform.setPosition(cur_position_world); mDrawable->mXform.setRotation(cur_rotation_world); - gPipeline.markMoved(mDrawable, TRUE); + gPipeline.markMoved(mDrawable, true); - sitDown(FALSE); + sitDown(false); mRoot->getXform()->setParent(NULL); // LLVOAvatar::getOffObject // SL-315 @@ -8944,7 +8944,7 @@ bool LLVOAvatar::shouldRenderRigged() const // related to whether the actual avatar mesh is shown, and isVisible() // to whether anything about the avatar is displayed in the scene. // Maybe better naming could make this clearer? -BOOL LLVOAvatar::isVisible() const +bool LLVOAvatar::isVisible() const { return mDrawable.notNull() && (!mOrphaned || isSelf()) @@ -9143,7 +9143,7 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse // call periodically to keep isFullyLoaded up to date. // returns true if the value has changed. -BOOL LLVOAvatar::updateIsFullyLoaded() +bool LLVOAvatar::updateIsFullyLoaded() { S32 rez_status = getRezzedStatus(); bool loading = getIsCloud(); @@ -9194,7 +9194,7 @@ void LLVOAvatar::updateRuthTimer(bool loading) } } -BOOL LLVOAvatar::processFullyLoadedChange(bool loading) +bool LLVOAvatar::processFullyLoadedChange(bool loading) { // We wait a little bit before giving the 'all clear', to let things to // settle down (models to snap into place, textures to get first packets). @@ -9241,14 +9241,14 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) // FIXME runway - why are we updating every 30 calls even if nothing has changed? // This causes updateLOD() to run every 30 frames, among other things. const S32 UPDATE_RATE = 30; - BOOL changed = + bool changed = ((mFullyLoaded != mPreviousFullyLoaded) || // if the value is different from the previous call (!mFullyLoadedInitialized) || // if we've never been called before (mFullyLoadedFrameCounter % UPDATE_RATE == 0)); // every now and then issue a change - BOOL fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded); + bool fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded); mPreviousFullyLoaded = mFullyLoaded; - mFullyLoadedInitialized = TRUE; + mFullyLoadedInitialized = true; mFullyLoadedFrameCounter++; if (changed && isSelf()) @@ -9260,13 +9260,13 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) if (fully_loaded_changed && !isSelf() && mFullyLoaded && isImpostor()) { // Fix for jellydoll initially invisible - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; mLastImpostorUpdateReason = 6; } return changed; } -BOOL LLVOAvatar::isFullyLoaded() const +bool LLVOAvatar::isFullyLoaded() const { // [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.2 // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp @@ -9513,35 +9513,35 @@ void LLVOAvatar::updateMeshVisibility() LLAvatarJoint* joint = mMeshLOD[i]; if (i == MESH_ID_HAIR) { - joint->setVisible(!bake_flag[BAKED_HAIR], TRUE); + joint->setVisible(!bake_flag[BAKED_HAIR], true); } else if (i == MESH_ID_HEAD) { - joint->setVisible(!bake_flag[BAKED_HEAD], TRUE); + joint->setVisible(!bake_flag[BAKED_HEAD], true); } else if (i == MESH_ID_SKIRT) { - joint->setVisible(!bake_flag[BAKED_SKIRT], TRUE); + joint->setVisible(!bake_flag[BAKED_SKIRT], true); } else if (i == MESH_ID_UPPER_BODY) { - joint->setVisible(!bake_flag[BAKED_UPPER], TRUE); + joint->setVisible(!bake_flag[BAKED_UPPER], true); } else if (i == MESH_ID_LOWER_BODY) { - joint->setVisible(!bake_flag[BAKED_LOWER], TRUE); + joint->setVisible(!bake_flag[BAKED_LOWER], true); } else if (i == MESH_ID_EYEBALL_LEFT) { - joint->setVisible(!bake_flag[BAKED_EYES], TRUE); + joint->setVisible(!bake_flag[BAKED_EYES], true); } else if (i == MESH_ID_EYEBALL_RIGHT) { - joint->setVisible(!bake_flag[BAKED_EYES], TRUE); + joint->setVisible(!bake_flag[BAKED_EYES], true); } else if (i == MESH_ID_EYELASH) { - joint->setVisible(!bake_flag[BAKED_HEAD], TRUE); + joint->setVisible(!bake_flag[BAKED_HEAD], true); } } } @@ -9569,19 +9569,19 @@ void LLVOAvatar::updateMeshTextures() } } - const BOOL other_culled = !isSelf() && mCulled; + const bool other_culled = !isSelf() && mCulled; LLLoadedCallbackEntry::source_callback_list_t* src_callback_list = NULL ; - BOOL paused = FALSE; + bool paused = false; if(!isSelf()) { src_callback_list = &mCallbackTextureList ; paused = !isVisible(); } - std::vector is_layer_baked; + std::vector is_layer_baked; is_layer_baked.resize(mBakedTextureDatas.size(), false); - std::vector use_lkg_baked_layer; // lkg = "last known good" + std::vector use_lkg_baked_layer; // lkg = "last known good" use_lkg_baked_layer.resize(mBakedTextureDatas.size(), false); mBakedTextureDebugText += llformat("%06d\n",update_counter++); @@ -9606,7 +9606,7 @@ void LLVOAvatar::updateMeshTextures() && layerset_invalid); if (use_lkg_baked_layer[i]) { - layerset->setUpdatesEnabled(TRUE); + layerset->setUpdatesEnabled(true); } } else @@ -9648,7 +9648,7 @@ void LLVOAvatar::updateMeshTextures() { // use last known good layer (no new one) LLViewerFetchedTexture* baked_img = LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[i].mLastTextureID); - mBakedTextureDatas[i].mIsUsed = TRUE; + mBakedTextureDatas[i].mIsUsed = true; debugColorizeSubMeshes(i,LLColor4::red); @@ -9668,7 +9668,7 @@ void LLVOAvatar::updateMeshTextures() // use new layer LLViewerFetchedTexture* baked_img = LLViewerTextureManager::staticCastToFetchedTexture( - getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), TRUE) ; + getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), true) ; if( baked_img->getID() == mBakedTextureDatas[i].mLastTextureID ) { // Even though the file may not be finished loading, @@ -9680,14 +9680,14 @@ void LLVOAvatar::updateMeshTextures() } else { - mBakedTextureDatas[i].mIsLoaded = FALSE; + mBakedTextureDatas[i].mIsLoaded = false; if ( (baked_img->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { - baked_img->setLoadedCallback(onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ), + baked_img->setLoadedCallback(onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, true, true, new LLTextureMaskData( mID ), src_callback_list, paused); } - baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, FALSE, FALSE, new LLUUID( mID ), + baked_img->setLoadedCallback(onBakedTextureLoaded, SWITCH_TO_BAKED_DISCARD, false, false, new LLUUID( mID ), src_callback_list, paused ); if (baked_img->getDiscardLevel() < 0 && !paused) { @@ -9705,8 +9705,8 @@ void LLVOAvatar::updateMeshTextures() debugColorizeSubMeshes(i,LLColor4::yellow ); layerset->createComposite(); - layerset->setUpdatesEnabled( TRUE ); - mBakedTextureDatas[i].mIsUsed = FALSE; + layerset->setUpdatesEnabled( true ); + mBakedTextureDatas[i].mIsUsed = false; avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin(); avatar_joint_mesh_list_t::iterator end = mBakedTextureDatas[i].mJointMeshes.end(); @@ -9759,7 +9759,7 @@ void LLVOAvatar::updateMeshTextures() ++local_tex_iter) { const ETextureIndex texture_index = *local_tex_iter; - const BOOL is_baked_ready = (is_layer_baked[baked_index] && mBakedTextureDatas[baked_index].mIsLoaded) || other_culled; + const bool is_baked_ready = (is_layer_baked[baked_index] && mBakedTextureDatas[baked_index].mIsLoaded) || other_culled; if (isSelf()) { setBakedReady(texture_index, is_baked_ready); @@ -9814,14 +9814,14 @@ void LLVOAvatar::updateMeshTextures() //----------------------------------------------------------------------------- // setLocalTexture() //----------------------------------------------------------------------------- -void LLVOAvatar::setLocalTexture( ETextureIndex type, LLViewerTexture* in_tex, BOOL baked_version_ready, U32 index ) +void LLVOAvatar::setLocalTexture( ETextureIndex type, LLViewerTexture* in_tex, bool baked_version_ready, U32 index ) { // invalid for anyone but self llassert(0); } //virtual -void LLVOAvatar::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, BOOL baked_version_exists, U32 index) +void LLVOAvatar::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, bool baked_version_exists, U32 index) { // invalid for anyone but self llassert(0); @@ -9877,12 +9877,12 @@ void LLVOAvatar::applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 n } } -// returns TRUE if morph masks are present and not valid for a given baked texture, FALSE otherwise -BOOL LLVOAvatar::morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIndex index) +// returns true if morph masks are present and not valid for a given baked texture, false otherwise +bool LLVOAvatar::morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIndex index) { if (index >= BAKED_NUM_INDICES) { - return FALSE; + return false; } if (!mBakedTextureDatas[index].mMaskedMorphs.empty()) @@ -9897,11 +9897,11 @@ BOOL LLVOAvatar::morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIn } else { - return FALSE; + return false; } } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -9999,7 +9999,7 @@ void LLVOAvatar::clampAttachmentPositions() } } -BOOL LLVOAvatar::hasHUDAttachment() const +bool LLVOAvatar::hasHUDAttachment() const { for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); @@ -10016,10 +10016,10 @@ BOOL LLVOAvatar::hasHUDAttachment() const if (attachment->getIsHUDAttachment() && attachment->getNumObjects() > 0) { - return TRUE; + return true; } } - return FALSE; + return false; } LLBBox LLVOAvatar::getHUDBBox() const @@ -10072,10 +10072,10 @@ void LLVOAvatar::onFirstTEMessageReceived() LL_DEBUGS("Avatar") << avString() << LL_ENDL; if( !mFirstTEMessageReceived ) { - mFirstTEMessageReceived = TRUE; + mFirstTEMessageReceived = true; LLLoadedCallbackEntry::source_callback_list_t* src_callback_list = NULL ; - BOOL paused = FALSE ; + bool paused = false ; if(!isSelf()) { src_callback_list = &mCallbackTextureList ; @@ -10084,22 +10084,22 @@ void LLVOAvatar::onFirstTEMessageReceived() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { - const BOOL layer_baked = isTextureDefined(mBakedTextureDatas[i].mTextureIndex); + const bool layer_baked = isTextureDefined(mBakedTextureDatas[i].mTextureIndex); // Use any baked textures that we have even if they haven't downloaded yet. // (That is, don't do a transition from unbaked to baked.) if (layer_baked) { - LLViewerFetchedTexture* image = LLViewerTextureManager::staticCastToFetchedTexture(getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), TRUE) ; + LLViewerFetchedTexture* image = LLViewerTextureManager::staticCastToFetchedTexture(getImage( mBakedTextureDatas[i].mTextureIndex, 0 ), true) ; mBakedTextureDatas[i].mLastTextureID = image->getID(); // If we have more than one texture for the other baked layers, we'll want to call this for them too. if ( (image->getID() != IMG_INVISIBLE) && ((i == BAKED_HEAD) || (i == BAKED_UPPER) || (i == BAKED_LOWER)) ) { - image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, TRUE, TRUE, new LLTextureMaskData( mID ), + image->setLoadedCallback( onBakedTextureMasksLoaded, MORPH_MASK_REQUESTED_DISCARD, true, true, new LLTextureMaskData( mID ), src_callback_list, paused); } LL_DEBUGS("Avatar") << avString() << "layer_baked, setting onInitialBakedTextureLoaded as callback" << LL_ENDL; - image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, FALSE, FALSE, new LLUUID( mID ), + image->setLoadedCallback( onInitialBakedTextureLoaded, MAX_DISCARD_LEVEL, false, false, new LLUUID( mID ), src_callback_list, paused ); if (image->getDiscardLevel() < 0 && !paused) { @@ -10110,7 +10110,7 @@ void LLVOAvatar::onFirstTEMessageReceived() } } - mMeshTexturesDirty = TRUE; + mMeshTexturesDirty = true; gPipeline.markGLRebuild(this); mFirstAppearanceMessageTimer.reset(); @@ -10573,7 +10573,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte //LL_DEBUGS("Avatar") << avString() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << LL_ENDL; LL_DEBUGS("Avatar") << avString() << "sb " << (S32) isUsingServerBakes() << " baked_index " << (S32) baked_index << " using mLastTextureID " << mBakedTextureDatas[baked_index].mLastTextureID << LL_ENDL; setTEImage(mBakedTextureDatas[baked_index].mTextureIndex, - LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); + LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[baked_index].mLastTextureID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } else { @@ -10587,8 +10587,8 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte // runway - was // if (!is_first_appearance_message ) // which means it would be called on second appearance message - probably wrong. - BOOL is_first_appearance_message = !mFirstAppearanceMessageReceived; - mFirstAppearanceMessageReceived = TRUE; + bool is_first_appearance_message = !mFirstAppearanceMessageReceived; + mFirstAppearanceMessageReceived = true; //LL_DEBUGS("Avatar") << avString() << "processAvatarAppearance start " << mID // << " first? " << is_first_appearance_message << " self? " << isSelf() << LL_ENDL; @@ -10598,15 +10598,15 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte onFirstTEMessageReceived(); } - setCompositeUpdatesEnabled( FALSE ); + setCompositeUpdatesEnabled( false ); gPipeline.markGLRebuild(this); // Apply visual params if( num_params > 1) { //LL_DEBUGS("Avatar") << avString() << " handle visual params, num_params " << num_params << LL_ENDL; - BOOL params_changed = FALSE; - BOOL interp_params = FALSE; + bool params_changed = false; + bool interp_params = false; S32 params_changed_count = 0; for( S32 i = 0; i < num_params; i++ ) @@ -10616,7 +10616,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte if (slam_params || is_first_appearance_message || (param->getWeight() != newWeight)) { - params_changed = TRUE; + params_changed = true; params_changed_count++; if(is_first_appearance_message || slam_params) @@ -10628,7 +10628,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte } else { - interp_params = TRUE; + interp_params = true; // [Legacy Bake] //param->setAnimationTarget(newWeight); param->setAnimationTarget(newWeight, false); @@ -10699,7 +10699,7 @@ void LLVOAvatar::applyParsedAppearanceMessage(LLAppearanceMessageContents& conte setHoverOffset(LLVector3(0.0, 0.0, 0.0)); } - setCompositeUpdatesEnabled( TRUE ); + setCompositeUpdatesEnabled( true ); // If all of the avatars are completely baked, release the global image caches to conserve memory. LLVOAvatar::cullAvatarsByPixelArea(); @@ -10724,7 +10724,7 @@ LLViewerTexture* LLVOAvatar::getBakedTexture(const U8 te) return NULL; } - BOOL is_layer_baked = isTextureDefined(mBakedTextureDatas[te].mTextureIndex); + bool is_layer_baked = isTextureDefined(mBakedTextureDatas[te].mTextureIndex); LLViewerTexLayerSet* layerset = NULL; layerset = getTexLayerSet(te); @@ -10732,13 +10732,13 @@ LLViewerTexture* LLVOAvatar::getBakedTexture(const U8 te) if (!isEditingAppearance() && is_layer_baked) { - LLViewerFetchedTexture* baked_img = LLViewerTextureManager::staticCastToFetchedTexture(getImage(mBakedTextureDatas[te].mTextureIndex, 0), TRUE); + LLViewerFetchedTexture* baked_img = LLViewerTextureManager::staticCastToFetchedTexture(getImage(mBakedTextureDatas[te].mTextureIndex, 0), true); return baked_img; } else if (layerset && isEditingAppearance()) { layerset->createComposite(); - layerset->setUpdatesEnabled(TRUE); + layerset->setUpdatesEnabled(true); return layerset->getViewerComposite(); } @@ -10826,7 +10826,7 @@ void LLVOAvatar::getAnimNames( std::vector* names ) } // static -void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) +void LLVOAvatar::onBakedTextureMasksLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ) { if (!userdata) return; @@ -10873,7 +10873,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture //LL_INFOS() << "onBakedTextureMasksLoaded for head " << id << " discard = " << discard_level << LL_ENDL; self->mBakedTextureDatas[BAKED_HEAD].mTexLayerSet->applyMorphMask(aux_src->getData(), aux_src->getWidth(), aux_src->getHeight(), 1); maskData->mLastDiscardLevel = discard_level; */ - BOOL found_texture_id = false; + bool found_texture_id = false; for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearance::getDictionary()->getTextures().begin(); iter != LLAvatarAppearance::getDictionary()->getTextures().end(); ++iter) @@ -10920,7 +10920,7 @@ void LLVOAvatar::onBakedTextureMasksLoaded( BOOL success, LLViewerFetchedTexture } // static -void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata ) +void LLVOAvatar::onInitialBakedTextureLoaded( bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata ) { LLUUID *avatar_idp = (LLUUID *)userdata; LLVOAvatar *selfp = (LLVOAvatar *)gObjectList.findObject(*avatar_idp); @@ -10941,9 +10941,9 @@ void LLVOAvatar::onInitialBakedTextureLoaded( BOOL success, LLViewerFetchedTextu } // Static -void LLVOAvatar::onBakedTextureLoaded(BOOL success, +void LLVOAvatar::onBakedTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, - S32 discard_level, BOOL final, void* userdata) + S32 discard_level, bool final, void* userdata) { //LL_DEBUGS("Avatar") << "onBakedTextureLoaded: " << src_vi->getID() << LL_ENDL; @@ -11011,7 +11011,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id ) local_tex_iter != baked_dict->mLocalTextures.end(); ++local_tex_iter) { - if (isSelf()) setBakedReady(*local_tex_iter, TRUE); + if (isSelf()) setBakedReady(*local_tex_iter, true); } // ! BACKWARDS COMPATIBILITY ! @@ -11387,7 +11387,7 @@ S32 LLVOAvatar::getUnbakedPixelAreaRank() struct CompareScreenAreaGreater { - BOOL operator()(const LLCharacter* const& lhs, const LLCharacter* const& rhs) + bool operator()(const LLCharacter* const& lhs, const LLCharacter* const& rhs) { return lhs->getPixelArea() > rhs->getPixelArea(); } @@ -11404,14 +11404,14 @@ void LLVOAvatar::cullAvatarsByPixelArea() iter != LLCharacter::sInstances.end(); ++iter) { LLVOAvatar* inst = (LLVOAvatar*) *iter; - BOOL culled; + bool culled; if (inst->isSelf() || inst->isFullyBaked()) { - culled = FALSE; + culled = false; } else { - culled = TRUE; + culled = true; } if (inst->mCulled != culled) @@ -11455,7 +11455,7 @@ void LLVOAvatar::startAppearanceAnimation() { if(!mAppearanceAnimating) { - mAppearanceAnimating = TRUE; + mAppearanceAnimating = true; mAppearanceMorphTimer.reset(); mLastAppearanceBlendTime = 0.f; } @@ -11504,15 +11504,15 @@ bool LLVOAvatar::updateLOD() { if (mDrawable.isNull()) { - return FALSE; + return false; } if (!LLPipeline::sImpostorRender && isImpostor() && 0 != mDrawable->getNumFaces() && mDrawable->getFace(0)->hasGeometry()) { - return TRUE; + return true; } - BOOL res = updateJointLODs(); + bool res = updateJointLODs(); LLFace* facep = mDrawable->getFace(0); if (!facep || !facep->getVertexBuffer()) @@ -11524,7 +11524,7 @@ bool LLVOAvatar::updateLOD() { //LOD changed or new mesh created, allocate new vertex buffer if needed updateMeshData(); mDirtyMesh = 0; - mNeedsSkin = TRUE; + mNeedsSkin = true; mDrawable->clearState(LLDrawable::REBUILD_GEOMETRY); } updateVisibility(); @@ -11714,11 +11714,11 @@ void LLVOAvatar::updateImpostors() } } - LLCharacter::sAllowInstancesChange = TRUE; + LLCharacter::sAllowInstancesChange = true; } // virtual -BOOL LLVOAvatar::isImpostor() +bool LLVOAvatar::isImpostor() { // render time handling using tooSlow() // return isVisuallyMuted() || (sLimitNonImpostors && (mUpdatePeriod > 1)); @@ -11730,7 +11730,7 @@ BOOL LLVOAvatar::isImpostor() // } -BOOL LLVOAvatar::shouldImpostor(const F32 rank_factor) +bool LLVOAvatar::shouldImpostor(const F32 rank_factor) { if (isSelf()) { @@ -11752,7 +11752,7 @@ BOOL LLVOAvatar::shouldImpostor(const F32 rank_factor) return sLimitNonImpostors && (mVisibilityRank > sMaxNonImpostors * rank_factor); } -BOOL LLVOAvatar::needsImpostorUpdate() const +bool LLVOAvatar::needsImpostorUpdate() const { return mNeedsImpostorUpdate; } @@ -12096,7 +12096,7 @@ void LLVOAvatar::accountRenderComplexityForObject( const LLVOVolume* volume = attached_object->mDrawable->getVOVolume(); if (volume) { - BOOL is_rigged_mesh = volume->isRiggedMeshFast(); + bool is_rigged_mesh = volume->isRiggedMeshFast(); LLHUDComplexity hud_object_complexity; hud_object_complexity.objectName = attached_object->getAttachmentItemName(); hud_object_complexity.objectId = attached_object->getAttachmentItemID(); @@ -12326,7 +12326,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity() void LLVOAvatar::setVisualMuteSettings(VisualMuteSettings set) { mVisuallyMuteSetting = set; - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; mLastImpostorUpdateReason = 7; // [FS Persisted Avatar Render Settings] @@ -12371,7 +12371,7 @@ void LLVOAvatar::setOverallAppearanceJellyDoll() ++anim_it) { { - stopMotion(anim_it->first, TRUE); + stopMotion(anim_it->first, true); } } } @@ -12410,7 +12410,7 @@ void LLVOAvatar::updateOverallAppearance() mOverallAppearance = new_overall; if (!isSelf()) { - mNeedsImpostorUpdate = TRUE; + mNeedsImpostorUpdate = true; mLastImpostorUpdateReason = 8; } updateMeshVisibility(); @@ -12450,7 +12450,7 @@ void LLVOAvatar::updateOverallAppearanceAnimations() if (!is_playing) { // Anim was not requested for this av by sim, but may be playing locally - stopMotion(*it, TRUE); + stopMotion(*it, true); } } mJellyAnims.clear(); @@ -12572,7 +12572,7 @@ void LLVOAvatar::calcMutedAVColor() } // static -BOOL LLVOAvatar::isIndexLocalTexture(ETextureIndex index) +bool LLVOAvatar::isIndexLocalTexture(ETextureIndex index) { return (index < 0 || index >= TEX_NUM_INDICES) ? false @@ -12580,7 +12580,7 @@ BOOL LLVOAvatar::isIndexLocalTexture(ETextureIndex index) } // static -BOOL LLVOAvatar::isIndexBakedTexture(ETextureIndex index) +bool LLVOAvatar::isIndexBakedTexture(ETextureIndex index) { return (index < 0 || index >= TEX_NUM_INDICES) ? false @@ -12652,7 +12652,7 @@ bool LLVOAvatar::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U if( !pImage ) { LL_WARNS() << "getImage( " << (S32)te << ", " << index << " ) returned invalid ptr" << LL_ENDL; - return FALSE; + return false; } // @@ -12661,7 +12661,7 @@ bool LLVOAvatar::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U } //virtual -BOOL LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const +bool LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const { if (isIndexLocalTexture(type)) { @@ -12677,10 +12677,10 @@ BOOL LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, } //virtual -BOOL LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const +bool LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const { // non-self avatars don't have wearables - return FALSE; + return false; } void LLVOAvatar::placeProfileQuery() diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index fe0cdec7b9..2b6a19aade 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -134,9 +134,9 @@ public: LLDataPacker *dp); virtual void idleUpdate(LLAgent &agent, const F64 &time); /*virtual*/ bool updateLOD(); - BOOL updateJointLODs(); + bool updateJointLODs(); void updateLODRiggedAttachments( void ); - /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. + /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate. S32Bytes totalTextureMemForUUIDS(std::set& ids); bool allTexturesCompletelyDownloaded(std::set& ids) const; bool allLocalTexturesCompletelyDownloaded() const; @@ -154,18 +154,18 @@ public: /*virtual*/ void onShift(const LLVector4a& shift_vector); /*virtual*/ U32 getPartitionType() const; /*virtual*/ const LLVector3 getRenderPosition() const; - /*virtual*/ void updateDrawable(BOOL force_damped); + /*virtual*/ void updateDrawable(bool force_damped); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); - /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); + /*virtual*/ bool updateGeometry(LLDrawable *drawable); /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); /*virtual*/ void updateRegion(LLViewerRegion *regionp); /*virtual*/ void updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax); void calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax); - /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, + /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = TRUE, + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = true, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -174,9 +174,9 @@ public: virtual LLViewerObject* lineSegmentIntersectRiggedAttachments( const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = TRUE, + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = true, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -194,7 +194,7 @@ public: /*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 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); @@ -364,22 +364,22 @@ public: //-------------------------------------------------------------------- public: static S32 sRenderName; - static BOOL sRenderGroupTitles; + static bool sRenderGroupTitles; static const U32 NON_IMPOSTORS_MAX_SLIDER; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors * slider in panel_preferences_graphics1.xml */ static U32 sMaxNonImpostors; // affected by control "RenderAvatarMaxNonImpostors" static bool sLimitNonImpostors; // use impostors for far away avatars static F32 sRenderDistance; // distance at which avatars will render. - static BOOL sShowAnimationDebug; // show animation debug info - static BOOL sShowCollisionVolumes; // show skeletal collision volumes - static BOOL sVisibleInFirstPerson; + static bool sShowAnimationDebug; // show animation debug info + static bool sShowCollisionVolumes; // show skeletal collision volumes + static bool sVisibleInFirstPerson; static S32 sNumLODChangesThisFrame; static S32 sNumVisibleChatBubbles; - static BOOL sDebugInvisible; - static BOOL sShowAttachmentPoints; + static bool sDebugInvisible; + static bool sShowAttachmentPoints; static F32 sLODFactor; // user-settable LOD factor static F32 sPhysicsLODFactor; // user-settable physics LOD factor - static BOOL sJointDebug; // output total number of joints being touched for each avatar + static bool sJointDebug; // output total number of joints being touched for each avatar static LLPartSysData sCloud; static LLPointer sCloudTexture; @@ -397,7 +397,7 @@ public: // Loading state //-------------------------------------------------------------------- public: - BOOL isFullyLoaded() const; + bool isFullyLoaded() const; // check and return current state relative to limits // default will test only the geometry (combined=false). @@ -411,8 +411,8 @@ public: virtual bool isTooComplex() const; // FIRE-29012: Standalone animesh avatars get affected by complexity limit; changed to virtual bool visualParamWeightsAreDefault(); virtual bool getIsCloud() const; - BOOL isFullyTextured() const; - BOOL hasGray() const; + bool isFullyTextured() const; + bool hasGray() const; S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded. void updateRezzedStatusTimers(S32 status); S32 getNumBakes() const;// BOM bake limits @@ -432,19 +432,19 @@ public: protected: LLViewerStats::PhaseMap& getPhases() { return mPhases; } - BOOL updateIsFullyLoaded(); - BOOL processFullyLoadedChange(bool loading); + bool updateIsFullyLoaded(); + bool processFullyLoadedChange(bool loading); void updateRuthTimer(bool loading); F32 calcMorphAmount(); private: - BOOL mFirstFullyVisible; + bool mFirstFullyVisible; F32 mFirstUseDelaySeconds; LLFrameTimer mFirstAppearanceMessageTimer; - BOOL mFullyLoaded; - BOOL mPreviousFullyLoaded; - BOOL mFullyLoadedInitialized; + bool mFullyLoaded; + bool mPreviousFullyLoaded; + bool mFullyLoadedInitialized; S32 mFullyLoadedFrameCounter; LLColor4 mMutedAVColor; LLFrameTimer mFullyLoadedTimer; @@ -552,7 +552,7 @@ public: U32 renderRigid(); U32 renderSkinned(); F32 getLastSkinTime() { return mLastSkinTime; } - U32 renderTransparent(BOOL first_pass); + U32 renderTransparent(bool first_pass); void renderCollisionVolumes(); void renderBones(const std::string &selected_joint = std::string()); void renderJoints(); @@ -569,7 +569,7 @@ private: F32 mAttachmentEstTriangleCount; bool shouldAlphaMask(); - BOOL mNeedsSkin; // avatar has been animated and verts have not been updated + bool mNeedsSkin; // avatar has been animated and verts have not been updated F32 mLastSkinTime; //value of gFrameTimeSeconds at last skin update S32 mUpdatePeriod; @@ -615,7 +615,7 @@ public: //-------------------------------------------------------------------- public: /*virtual*/ void applyMorphMask(const U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES); - BOOL morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES); + bool morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES); //-------------------------------------------------------------------- @@ -633,7 +633,7 @@ protected: void updateVisibility(); private: U32 mVisibilityRank; - BOOL mVisible; + bool mVisible; //-------------------------------------------------------------------- // Shadowing @@ -650,9 +650,9 @@ private: // Impostors //-------------------------------------------------------------------- public: - virtual BOOL isImpostor(); - BOOL shouldImpostor(const F32 rank_factor = 1.0); - BOOL needsImpostorUpdate() const; + virtual bool isImpostor(); + bool shouldImpostor(const F32 rank_factor = 1.0); + bool needsImpostorUpdate() const; const LLVector3& getImpostorOffset() const; const LLVector2& getImpostorDim() const; void getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& distance) const; @@ -662,9 +662,9 @@ public: static void updateImpostors(); LLRenderTarget mImpostor; // [RLVa:KB] - Checked: RLVa-2.4 (@setcam_avdist) - mutable BOOL mNeedsImpostorUpdate; + mutable bool mNeedsImpostorUpdate; // [/RLVa:KB] -// BOOL mNeedsImpostorUpdate; +// bool mNeedsImpostorUpdate; S32 mLastImpostorUpdateReason; F32SecondsImplicit mLastImpostorUpdateFrameTime; const LLVector3* getLastAnimExtents() const { return mLastAnimExtents; } @@ -675,7 +675,7 @@ private: LLVector2 mImpostorDim; // This becomes true in the constructor and false after the first // idleUpdateMisc(). Not clear it serves any purpose. - BOOL mNeedsAnimUpdate; + bool mNeedsAnimUpdate; bool mNeedsExtentUpdate; LLVector3 mImpostorAngle; F32 mImpostorDistance; @@ -691,7 +691,7 @@ private: public: LLVector4 mWindVec; F32 mRipplePhase; - BOOL mBelowWater; + bool mBelowWater; private: F32 mWindFreq; LLFrameTimer mRippleTimer; @@ -704,9 +704,9 @@ private: //-------------------------------------------------------------------- public: static void cullAvatarsByPixelArea(); - BOOL isCulled() const { return mCulled; } + bool isCulled() const { return mCulled; } private: - BOOL mCulled; + bool mCulled; //-------------------------------------------------------------------- // Constants @@ -731,11 +731,11 @@ public: //-------------------------------------------------------------------- public: virtual bool isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const; - virtual BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const; - virtual BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const; + virtual bool isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const; + virtual bool isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const; - BOOL isFullyBaked(); - static BOOL areAllNearbyInstancesBaked(S32& grey_avatars); + bool isFullyBaked(); + static bool areAllNearbyInstancesBaked(S32& grey_avatars); static void getNearbyRezzedStats(std::vector& counts); static std::string rezStatusToString(S32 status); @@ -747,16 +747,16 @@ public: void releaseComponentTextures(); // ! BACKWARDS COMPATIBILITY ! protected: - static void onBakedTextureMasksLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); - static void onInitialBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); - static void onBakedTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + static void onBakedTextureMasksLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata); + static void onInitialBakedTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata); + static void onBakedTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata); virtual void removeMissingBakedTextures(); void useBakedTexture(const LLUUID& id); LLViewerTexLayerSet* getTexLayerSet(const U32 index) const { return dynamic_cast(mBakedTextureDatas[index].mTexLayerSet); } LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ; - BOOL mLoadedCallbacksPaused; + bool mLoadedCallbacksPaused; S32 mLoadedCallbackTextures; // count of 'loaded' baked textures, filled from mCallbackTextureList LLFrameTimer mLastTexCallbackAddedTime; std::set mTextureIDs; @@ -764,10 +764,10 @@ protected: // Local Textures //-------------------------------------------------------------------- protected: - virtual void setLocalTexture(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index = 0); - virtual void addLocalTextureStats(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked); + virtual void setLocalTexture(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture* tex, bool baked_version_exits, U32 index = 0); + virtual void addLocalTextureStats(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, bool rendered, bool covered_by_baked); // MULTI-WEARABLE: make self-only? - virtual void setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, BOOL baked_version_exists, U32 index = 0); + virtual void setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, bool baked_version_exists, U32 index = 0); //-------------------------------------------------------------------- // Texture accessors @@ -804,8 +804,8 @@ public: // Static texture/mesh/baked dictionary //-------------------------------------------------------------------- public: - static BOOL isIndexLocalTexture(LLAvatarAppearanceDefines::ETextureIndex i); - static BOOL isIndexBakedTexture(LLAvatarAppearanceDefines::ETextureIndex i); + static bool isIndexLocalTexture(LLAvatarAppearanceDefines::ETextureIndex i); + static bool isIndexBakedTexture(LLAvatarAppearanceDefines::ETextureIndex i); //-------------------------------------------------------------------- // Messaging @@ -813,8 +813,8 @@ public: public: void onFirstTEMessageReceived(); private: - BOOL mFirstTEMessageReceived; - BOOL mFirstAppearanceMessageReceived; + bool mFirstTEMessageReceived; + bool mFirstAppearanceMessageReceived; /** Textures ** ** @@ -871,13 +871,13 @@ private: virtual void dirtyMesh(S32 priority); // Dirty the avatar mesh, with priority LLViewerJoint* getViewerJoint(S32 idx); S32 mDirtyMesh; // 0 -- not dirty, 1 -- morphed, 2 -- LOD - BOOL mMeshTexturesDirty; + bool mMeshTexturesDirty; //-------------------------------------------------------------------- // Destroy invisible mesh //-------------------------------------------------------------------- protected: - BOOL mMeshValid; + bool mMeshValid; LLFrameTimer mMeshInvisibleTime; /** Meshes @@ -905,7 +905,7 @@ public: // Appearance morphing //-------------------------------------------------------------------- public: - BOOL getIsAppearanceAnimating() const { return mAppearanceAnimating; } + bool getIsAppearanceAnimating() const { return mAppearanceAnimating; } // True if we are computing our appearance via local compositing // instead of baked textures, as for example during wearable @@ -927,11 +927,11 @@ public: // FIXME review isUsingLocalAppearance uses, some should be isEditing instead. private: - BOOL mAppearanceAnimating; + bool mAppearanceAnimating; LLFrameTimer mAppearanceMorphTimer; F32 mLastAppearanceBlendTime; bool mIsEditingAppearance; // flag for if we're actively in appearance editing mode - BOOL mUseLocalAppearance; // flag for if we're using a local composite + bool mUseLocalAppearance; // flag for if we're using a local composite // [Legacy Bake] bool mUseServerBakes; // flag for if baked textures should be fetched from baking service (false if they're temporary uploads) @@ -939,7 +939,7 @@ private: // Visibility //-------------------------------------------------------------------- public: - BOOL isVisible() const; + bool isVisible() const; virtual bool shouldRenderRigged() const; void setVisibilityRank(U32 rank); U32 getVisibilityRank() const { return mVisibilityRank; } @@ -959,7 +959,7 @@ public: public: void clampAttachmentPositions(); virtual const LLViewerJointAttachment* attachObject(LLViewerObject *viewer_object); - virtual BOOL detachObject(LLViewerObject *viewer_object); + virtual bool detachObject(LLViewerObject *viewer_object); static bool getRiggedMeshID( LLViewerObject* pVO, LLUUID& mesh_id ); void cleanupAttachedMesh( LLViewerObject* pVO ); // bool hasPendingAttachedMeshes(); // remove mesh rezzing delay @@ -987,13 +987,13 @@ public: // HUD functions //-------------------------------------------------------------------- public: - BOOL hasHUDAttachment() const; + bool hasHUDAttachment() const; LLBBox getHUDBBox() const; void resetHUDAttachments(); S32 getMaxAttachments() const; - BOOL canAttachMoreObjects(U32 n=1) const; + bool canAttachMoreObjects(U32 n=1) const; S32 getMaxAnimatedObjectAttachments() const; - BOOL canAttachMoreAnimatedObjects(U32 n=1) const; + bool canAttachMoreAnimatedObjects(U32 n=1) const; protected: U32 getNumAttachments() const; // O(N), not O(1) U32 getNumAnimatedObjectAttachments() const; // O(N), not O(1) @@ -1011,10 +1011,10 @@ protected: // Animations //-------------------------------------------------------------------- public: - BOOL isAnyAnimationSignaled(const LLUUID *anim_array, const S32 num_anims) const; + bool isAnyAnimationSignaled(const LLUUID *anim_array, const S32 num_anims) const; void processAnimationStateChanges(); protected: - BOOL processSingleAnimationStateChange(const LLUUID &anim_id, BOOL start); + bool processSingleAnimationStateChange(const LLUUID &anim_id, bool start); void resetAnimations(); private: LLTimer mAnimTimer; @@ -1038,8 +1038,8 @@ public: public: void addChat(const LLChat& chat); void clearChat(); - void startTyping() { mTyping = TRUE; mTypingTimer.reset(); } - void stopTyping() { mTyping = FALSE; } + void startTyping() { mTyping = true; mTypingTimer.reset(); } + void stopTyping() { mTyping = false; } // Get typing status bool isTyping() const { return mTyping; } private: @@ -1058,7 +1058,7 @@ private: // Flight //-------------------------------------------------------------------- public: - BOOL mInAir; + bool mInAir; LLFrameTimer mTimeInAir; /** Actions @@ -1072,7 +1072,7 @@ public: private: F32 mSpeedAccum; // measures speed (for diagnostics mostly). - BOOL mTurning; // controls hysteresis on avatar rotation + bool mTurning; // controls hysteresis on avatar rotation F32 mSpeed; // misc. animation repeated state //-------------------------------------------------------------------- @@ -1090,7 +1090,7 @@ protected: // Material being stepped on //-------------------------------------------------------------------- private: - BOOL mStepOnLand; + bool mStepOnLand; U8 mStepMaterial; LLVector3 mStepObjectVelocity; @@ -1104,7 +1104,7 @@ private: **/ public: - /*virtual*/ BOOL setParent(LLViewerObject* parent); + /*virtual*/ bool setParent(LLViewerObject* parent); /*virtual*/ void addChild(LLViewerObject *childp); /*virtual*/ void removeChild(LLViewerObject *childp); @@ -1112,14 +1112,14 @@ public: // Sitting //-------------------------------------------------------------------- public: - void sitDown(BOOL bSitting); - BOOL isSitting(){return mIsSitting;} + void sitDown(bool bSitting); + bool isSitting(){return mIsSitting;} void sitOnObject(LLViewerObject *sit_object); void getOffObject(); void revokePermissionsOnObject(LLViewerObject *sit_object); private: // set this property only with LLVOAvatar::sitDown method - BOOL mIsSitting; + bool mIsSitting; // position backup in case of missing data LLVector3 mLastRootPos; @@ -1157,7 +1157,7 @@ private: bool mNameCloud; F32 mNameAlpha; LLColor4 mNameColor; - BOOL mRenderGroupTitles; + bool mRenderGroupTitles; std::string mDistanceString; // Show Arc in nametag (for Jelly Dolls) U32 mNameArc; @@ -1173,7 +1173,7 @@ public: private: LLFrameTimer mTimeVisible; std::deque mChats; - BOOL mTyping; + bool mTyping; LLFrameTimer mTypingTimer; /** Name @@ -1211,8 +1211,8 @@ public: void setFootPlane(const LLVector4 &plane) { mFootPlane = plane; } LLVector4 mFootPlane; private: - BOOL mWasOnGroundLeft; - BOOL mWasOnGroundRight; + bool mWasOnGroundLeft; + bool mWasOnGroundRight; /** Sounds ** ** @@ -1242,7 +1242,7 @@ public: static F32 sGreyUpdateTime; // Last time stats were updated (to prevent multiple updates per frame) protected: S32 getUnbakedPixelAreaRank(); - BOOL mHasGrey; + bool mHasGrey; private: F32 mMinPixelArea; F32 mMaxPixelArea; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index eff772f935..a4d74ac410 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -95,7 +95,7 @@ LLPointer gAgentAvatarp = NULL; -BOOL isAgentAvatarValid() +bool isAgentAvatarValid() { return (gAgentAvatarp.notNull() && gAgentAvatarp->isValid()); } @@ -202,7 +202,7 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, #endif // [Legacy Bake] - mMotionController.mIsSelf = TRUE; + mMotionController.mIsSelf = true; LL_DEBUGS() << "Marking avatar as self " << id << LL_ENDL; } @@ -241,7 +241,7 @@ bool check_for_unsupported_baked_appearance() void LLVOAvatarSelf::initInstance() { - BOOL status = TRUE; + bool status = true; // creates hud joint(mScreen) among other things status &= loadAvatarSelf(); @@ -358,7 +358,7 @@ void LLVOAvatarSelf::markDead() bool success = LLVOAvatar::loadAvatar(); // set all parameters stored directly in the avatar to have - // the isSelfParam to be TRUE - this is used to prevent + // the isSelfParam to be true - this is used to prevent // them from being animated or trigger accidental rebakes // when we copy params from the wearable to the base avatar. for (LLViewerVisualParam* param = (LLViewerVisualParam*) getFirstVisualParam(); @@ -375,20 +375,20 @@ void LLVOAvatarSelf::markDead() } -BOOL LLVOAvatarSelf::loadAvatarSelf() +bool LLVOAvatarSelf::loadAvatarSelf() { - BOOL success = TRUE; + bool success = true; // avatar_skeleton.xml if (!buildSkeletonSelf(sAvatarSkeletonInfo)) { LL_WARNS() << "avatar file: buildSkeleton() failed" << LL_ENDL; - return FALSE; + return false; } return success; } -BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLAvatarSkeletonInfo *info) +bool LLVOAvatarSelf::buildSkeletonSelf(const LLAvatarSkeletonInfo *info) { // add special-purpose "screen" joint mScreenp = new LLViewerJoint("mScreen", NULL); @@ -400,11 +400,11 @@ BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLAvatarSkeletonInfo *info) // SL-315 mScreenp->setWorldPosition(LLVector3::zero); // need to update screen agressively when sidebar opens/closes, for example - mScreenp->mUpdateXform = TRUE; - return TRUE; + mScreenp->mUpdateXform = true; + return true; } -BOOL LLVOAvatarSelf::buildMenus() +bool LLVOAvatarSelf::buildMenus() { //------------------------------------------------------------------------- // build the attach and detach menus @@ -971,7 +971,7 @@ BOOL LLVOAvatarSelf::buildMenus() } // Pie menu - return TRUE; + return true; } void LLVOAvatarSelf::cleanup() @@ -1202,7 +1202,7 @@ void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id) LLViewerObject* object = gObjectList.findObject(source_id); if (object) { - object->setFlagsWithoutUpdate(FLAGS_ANIM_SOURCE, FALSE); + object->setFlagsWithoutUpdate(FLAGS_ANIM_SOURCE, false); } } @@ -1231,7 +1231,7 @@ void LLVOAvatarSelf::setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index) //virtual void LLVOAvatarSelf::removeMissingBakedTextures() { - BOOL removed = FALSE; + bool removed = false; for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { const S32 te = mBakedTextureDatas[i].mTextureIndex; @@ -1246,7 +1246,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures() if (imagep && imagep != tex) { setTEImage(te, imagep); - removed = TRUE; + removed = true; } } } @@ -1256,7 +1256,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { LLViewerTexLayerSet *layerset = getTexLayerSet(i); - layerset->setUpdatesEnabled(TRUE); + layerset->setUpdatesEnabled(true); // [Legacy Bake] //invalidateComposite(layerset); invalidateComposite(layerset, false); @@ -1422,7 +1422,7 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() if (mBeamTimer.getElapsedTimeF32() > gLggBeamMaps.setUpAndGetDuration()) { mBeam->setColor(rgb); - mBeam->setNeedsSendToSim(TRUE); + mBeam->setNeedsSendToSim(true); mBeamTimer.reset(); gLggBeamMaps.fireCurrentBeams(mBeam, rgb); } @@ -1436,7 +1436,7 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() void LLVOAvatarSelf::restoreMeshData() { //LL_INFOS() << "Restoring" << LL_ENDL; - mMeshValid = TRUE; + mMeshValid = true; updateJointLODs(); updateAttachmentVisibility(gAgentCamera.getCameraMode()); @@ -1464,7 +1464,7 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode) // if (attachment->getIsHUDAttachment()) { - attachment->setAttachmentVisibility(TRUE); + attachment->setAttachmentVisibility(true); } else { @@ -1486,18 +1486,18 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode) // [RLVa:KB] - Checked: RLVa-2.0.2 attachment->setAttachmentVisibility(fRlvCanShowAttachment); // [/RLVa:KB] -// attachment->setAttachmentVisibility(TRUE); +// attachment->setAttachmentVisibility(true); } else { - attachment->setAttachmentVisibility(FALSE); + attachment->setAttachmentVisibility(false); } break; default: // [RLVa:KB] - Checked: RLVa-2.0.2 attachment->setAttachmentVisibility(fRlvCanShowAttachment); // [/RLVa:KB] -// attachment->setAttachmentVisibility(TRUE); +// attachment->setAttachmentVisibility(true); break; } } @@ -1507,7 +1507,7 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode) //----------------------------------------------------------------------------- // updatedWearable( LLWearableType::EType type ) // forces an update to any baked textures relevant to type. -// will force an upload of the resulting bake if the second parameter is TRUE +// will force an upload of the resulting bake if the second parameter is true //----------------------------------------------------------------------------- // [Legacy Bake] //void LLVOAvatarSelf::wearableUpdated(LLWearableType::EType type) @@ -1556,7 +1556,7 @@ void LLVOAvatarSelf::wearableUpdated(LLWearableType::EType type, bool upload_res //----------------------------------------------------------------------------- // isWearingAttachment() //----------------------------------------------------------------------------- -BOOL LLVOAvatarSelf::isWearingAttachment(const LLUUID& inv_item_id) const +bool LLVOAvatarSelf::isWearingAttachment(const LLUUID& inv_item_id) const { const LLUUID& base_inv_item_id = gInventory.getLinkedItemID(inv_item_id); for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); @@ -1566,10 +1566,10 @@ BOOL LLVOAvatarSelf::isWearingAttachment(const LLUUID& inv_item_id) const const LLViewerJointAttachment* attachment = iter->second; if (attachment->getAttachedObject(base_inv_item_id)) { - return TRUE; + return true; } } - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -1698,7 +1698,7 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view } //virtual -BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) +bool LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) { const LLUUID attachment_id = viewer_object->getAttachmentItemID(); @@ -1749,7 +1749,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) // the simulator should automatically handle permission revocation stopMotionFromSource(attachment_id); - LLFollowCamMgr::getInstance()->setCameraActive(viewer_object->getID(), FALSE); + LLFollowCamMgr::getInstance()->setCameraActive(viewer_object->getID(), false); LLViewerObject::const_child_list_t& child_list = viewer_object->getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); @@ -1761,7 +1761,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) // permissions revocation stopMotionFromSource(child_objectp->getID()); - LLFollowCamMgr::getInstance()->setCameraActive(child_objectp->getID(), FALSE); + LLFollowCamMgr::getInstance()->setCameraActive(child_objectp->getID(), false); } // Make sure the inventory is in sync with the avatar. @@ -1781,9 +1781,9 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) gRlvAttachmentLocks.updateLockedHUD(); // [/RLVa:KB] - return TRUE; + return true; } - return FALSE; + return false; } bool LLVOAvatarSelf::hasAttachmentsInTrash() @@ -1808,7 +1808,7 @@ bool LLVOAvatarSelf::hasAttachmentsInTrash() } // static -BOOL LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id) +bool LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id) { LLInventoryItem* item = gInventory.getItem(item_id); // if (item) @@ -1841,9 +1841,9 @@ BOOL LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id) LLAppearanceMgr::instance().removeCOFItemLinks(item_id); } } - return TRUE; + return true; } - return FALSE; + return false; } U32 LLVOAvatarSelf::getNumWearables(LLAvatarAppearanceDefines::ETextureIndex i) const @@ -1853,7 +1853,7 @@ U32 LLVOAvatarSelf::getNumWearables(LLAvatarAppearanceDefines::ETextureIndex i) } // virtual -void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +void LLVOAvatarSelf::localTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata) { const LLUUID& src_id = src_vi->getID(); @@ -1902,20 +1902,20 @@ void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *sr } // virtual -BOOL LLVOAvatarSelf::getLocalTextureGL(ETextureIndex type, LLViewerTexture** tex_pp, U32 index) const +bool LLVOAvatarSelf::getLocalTextureGL(ETextureIndex type, LLViewerTexture** tex_pp, U32 index) const { *tex_pp = NULL; - if (!isIndexLocalTexture(type)) return FALSE; - if (getLocalTextureID(type, index) == IMG_DEFAULT_AVATAR) return TRUE; + if (!isIndexLocalTexture(type)) return false; + if (getLocalTextureID(type, index) == IMG_DEFAULT_AVATAR) return true; const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type, index); if (!local_tex_obj) { - return FALSE; + return false; } *tex_pp = dynamic_cast (local_tex_obj->getImage()); - return TRUE; + return true; } LLViewerFetchedTexture* LLVOAvatarSelf::getLocalTextureGL(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const @@ -1955,7 +1955,7 @@ const LLUUID& LLVOAvatarSelf::getLocalTextureID(ETextureIndex type, U32 index) c // Returns true if at least the lowest quality discard level exists for every texture // in the layerset. //----------------------------------------------------------------------------- -BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const +bool LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const { /* if (layerset == mBakedTextureDatas[BAKED_HEAD].mTexLayerSet) return getLocalDiscardLevel(TEX_HEAD_BODYPAINT) >= 0; */ @@ -1966,7 +1966,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* laye const EBakedTextureIndex baked_index = baked_iter->first; if (layerset == mBakedTextureDatas[baked_index].mTexLayerSet) { - BOOL ret = true; + bool ret = true; const LLAvatarAppearanceDictionary::BakedEntry *baked_dict = baked_iter->second; for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin(); local_tex_iter != baked_dict->mLocalTextures.end(); @@ -1977,7 +1977,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* laye const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { - BOOL tex_avail = (getLocalDiscardLevel(tex_index, wearable_index) >= 0); + bool tex_avail = (getLocalDiscardLevel(tex_index, wearable_index) >= 0); ret &= tex_avail; } } @@ -1985,7 +1985,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* laye } } llassert(0); - return FALSE; + return false; } //----------------------------------------------------------------------------- @@ -1994,7 +1994,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLViewerTexLayerSet* laye // Returns true if the highest quality discard level exists for every texture // in the layerset. //----------------------------------------------------------------------------- -BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) const +bool LLVOAvatarSelf::isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) const { // Replace frequently called gSavedSettings //const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); @@ -2021,19 +2021,19 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset if ((local_discard_level > (S32)(desired_tex_discard_level)) || (local_discard_level < 0 )) { - return FALSE; + return false; } } } - return TRUE; + return true; } } llassert(0); - return FALSE; + return false; } -BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const +bool LLVOAvatarSelf::isAllLocalTextureDataFinal() const { // Replace frequently called gSavedSettings //const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); @@ -2058,18 +2058,18 @@ BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const if ((local_discard_level > (S32)(desired_tex_discard_level)) || (local_discard_level < 0 )) { - return FALSE; + return false; } } } } - return TRUE; + return true; } bool LLVOAvatarSelf::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const { LLUUID id; - BOOL isDefined = TRUE; + bool isDefined = true; if (isIndexLocalTexture(type)) { const LLWearableType::EType wearable_type = sAvatarDictionary->getTEWearableType(type); @@ -2099,7 +2099,7 @@ bool LLVOAvatarSelf::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex t } //virtual -BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const +bool LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const { if (isIndexBakedTexture(type)) { @@ -2112,7 +2112,7 @@ BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex t } //virtual -BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const +bool LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const { if (isIndexBakedTexture(type)) { @@ -2127,7 +2127,7 @@ BOOL LLVOAvatarSelf::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex t else { LL_WARNS() << "Wearable not found" << LL_ENDL; - return FALSE; + return false; } } @@ -2212,7 +2212,7 @@ void LLVOAvatarSelf::setupComposites() for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { ETextureIndex tex_index = mBakedTextureDatas[i].mTextureIndex; - BOOL layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index)); + bool layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index)); LLViewerTexLayerSet *layerset = getTexLayerSet(i); if (layerset) { @@ -2237,7 +2237,7 @@ void LLVOAvatarSelf::updateComposites() // virtual S32 LLVOAvatarSelf::getLocalDiscardLevel(ETextureIndex type, U32 wearable_index) const { - if (!isIndexLocalTexture(type)) return FALSE; + if (!isIndexLocalTexture(type)) return false; const LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type, wearable_index); if (local_tex_obj) @@ -2288,11 +2288,11 @@ void LLVOAvatarSelf::getLocalTextureByteCount(S32* gl_bytes) const } // virtual -void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_tex, BOOL baked_version_ready, U32 index) +void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_tex, bool baked_version_ready, U32 index) { if (!isIndexLocalTexture(type)) return; - LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(src_tex, TRUE) ; + LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(src_tex, true) ; if(!tex) { return ; @@ -2353,7 +2353,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te } else { - tex->setLoadedCallback(onLocalTextureLoaded, desired_discard, TRUE, FALSE, new LLAvatarTexData(getID(), type), NULL); + tex->setLoadedCallback(onLocalTextureLoaded, desired_discard, true, false, new LLAvatarTexData(getID(), type), NULL); } } tex->setMinDiscardLevel(desired_discard); @@ -2365,7 +2365,7 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te } //virtual -void LLVOAvatarSelf::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, BOOL baked_version_exists, U32 index) +void LLVOAvatarSelf::setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, bool baked_version_exists, U32 index) { if (!isIndexLocalTexture(type)) return; LLLocalTextureObject *local_tex_obj = getLocalTextureObject(type,index); @@ -2442,7 +2442,7 @@ void LLVOAvatarSelf::dumpLocalTextures() const // onLocalTextureLoaded() //----------------------------------------------------------------------------- -void LLVOAvatarSelf::onLocalTextureLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +void LLVOAvatarSelf::onLocalTextureLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src_raw, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata) { LLAvatarTexData *data = (LLAvatarTexData *)userdata; LLVOAvatarSelf *self = (LLVOAvatarSelf *)gObjectList.findObject(data->mAvatarID); @@ -2462,7 +2462,7 @@ void LLVOAvatarSelf::onLocalTextureLoaded(BOOL success, LLViewerFetchedTexture * { if (isIndexLocalTexture((ETextureIndex)te)) { - setLocalTexture((ETextureIndex)te, imagep, FALSE ,index); + setLocalTexture((ETextureIndex)te, imagep, false ,index); } else { @@ -2581,7 +2581,7 @@ bool LLVOAvatarSelf::getIsCloud() const } /*static*/ -void LLVOAvatarSelf::debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +void LLVOAvatarSelf::debugOnTimingLocalTexLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata) { if (gAgentAvatarp.notNull()) { @@ -2589,7 +2589,7 @@ void LLVOAvatarSelf::debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTe } } -void LLVOAvatarSelf::debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata) +void LLVOAvatarSelf::debugTimingLocalTexLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata) { LLAvatarTexData *data = (LLAvatarTexData *)userdata; if (!data) @@ -2614,7 +2614,7 @@ void LLVOAvatarSelf::debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedText } } -void LLVOAvatarSelf::debugBakedTextureUpload(EBakedTextureIndex index, BOOL finished) +void LLVOAvatarSelf::debugBakedTextureUpload(EBakedTextureIndex index, bool finished) { U32 done = 0; if (finished) @@ -2753,7 +2753,7 @@ const std::string LLVOAvatarSelf::debugDumpAllLocalTextureDataInfo() const for (U32 i = 0; i < mBakedTextureDatas.size(); i++) { const LLAvatarAppearanceDictionary::BakedEntry *baked_dict = sAvatarDictionary->getBakedTexture((EBakedTextureIndex)i); - BOOL is_texture_final = TRUE; + bool is_texture_final = true; for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin(); local_tex_iter != baked_dict->mLocalTextures.end(); ++local_tex_iter) @@ -2949,22 +2949,22 @@ const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) c return LLUUID::null; } -BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const +bool LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const { ETextureIndex tex_index = sAvatarDictionary->bakedToLocalTextureIndex(baked_index); if (tex_index == TEX_NUM_INDICES) { - return FALSE; + return false; } // Check if the texture hasn't been baked yet. if (!isTextureDefined(tex_index, 0)) { LL_DEBUGS() << "getTEImage( " << (U32) tex_index << " )->getID() == IMG_DEFAULT_AVATAR" << LL_ENDL; - return FALSE; + return false; } if (gAgent.isGodlikeWithoutAdminMenuFakery()) - return TRUE; + return true; // Check permissions of textures that show up in the // baked texture. We don't want people copying people's @@ -2999,7 +2999,7 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const LLInventoryModel::INCLUDE_TRASH, asset_id_matches); - BOOL can_grab = FALSE; + bool can_grab = false; LL_DEBUGS() << "item count for asset " << texture_id << ": " << items.size() << LL_ENDL; if (items.size()) { @@ -3009,22 +3009,22 @@ BOOL LLVOAvatarSelf::canGrabBakedTexture(EBakedTextureIndex baked_index) const LLViewerInventoryItem* itemp = items[i]; if (itemp->getIsFullPerm()) { - can_grab = TRUE; + can_grab = true; break; } } } - if (!can_grab) return FALSE; + if (!can_grab) return false; } } } } - return TRUE; + return true; } void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTexture* imagep, - F32 texel_area_ratio, BOOL render_avatar, BOOL covered_by_baked) + F32 texel_area_ratio, bool render_avatar, bool covered_by_baked) { if (!isIndexLocalTexture(type)) return; @@ -3049,14 +3049,14 @@ void LLVOAvatarSelf::addLocalTextureStats( ETextureIndex type, LLViewerFetchedTe imagep->forceUpdateBindStats() ; if (imagep->getDiscardLevel() < 0) { - mHasGrey = TRUE; // for statistics gathering + mHasGrey = true; // for statistics gathering } } } else { // texture asset is missing - mHasGrey = TRUE; // for statistics gathering + mHasGrey = true; // for statistics gathering } } } @@ -3182,7 +3182,7 @@ void LLVOAvatarSelf::forceBakeAllTextures(bool slam_for_debug) { if (slam_for_debug) { - layer_set->setUpdatesEnabled(TRUE); + layer_set->setUpdatesEnabled(true); // [Legacy Bake] layer_set->cancelUpload(); } @@ -3443,18 +3443,18 @@ void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_upd //------------------------------------------------------------------------ // needsRenderBeam() //------------------------------------------------------------------------ -BOOL LLVOAvatarSelf::needsRenderBeam() +bool LLVOAvatarSelf::needsRenderBeam() { LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); - BOOL is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing()); + bool is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing()); LLViewerObject* objp = LLToolGrab::getInstance()->getEditingObject(); if (objp // might need to be "!objp ||" instead of "objp &&". && (objp->isAttachment() || objp->isAvatar())) { // don't render grab tool's selection beam on hud objects, // attachments or avatars - is_touching_or_grabbing = FALSE; + is_touching_or_grabbing = false; } return is_touching_or_grabbing || (getAttachmentState() & AGENT_STATE_EDITING && LLSelectMgr::getInstance()->shouldShowSelection()); } @@ -3575,7 +3575,7 @@ void LLVOAvatarSelf::requestLayerSetUploads() void LLVOAvatarSelf::requestLayerSetUpload(LLAvatarAppearanceDefines::EBakedTextureIndex i) { ETextureIndex tex_index = mBakedTextureDatas[i].mTextureIndex; - const BOOL layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index)); + const bool layer_baked = isTextureDefined(tex_index, gAgentWearables.getWearableCount(tex_index)); LLViewerTexLayerSet *layerset = getLayerSet(i); if (!layer_baked && layerset) { @@ -3673,7 +3673,7 @@ void LLVOAvatarSelf::setNewBakedTexture( ETextureIndex te, const LLUUID& uuid ) const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearance::getDictionary()->getTexture(te); if (texture_dict->mIsBakedTexture) { - debugBakedTextureUpload(texture_dict->mBakedTextureIndex, true); // FALSE for start of upload, TRUE for finish. + debugBakedTextureUpload(texture_dict->mBakedTextureIndex, true); // false for start of upload, true for finish. LL_INFOS() << "New baked texture: " << texture_dict->mName << " UUID: " << uuid < [Legacy Bake] - //BOOL setParamWeight(const LLViewerVisualParam *param, F32 weight); + //bool setParamWeight(const LLViewerVisualParam *param, F32 weight); bool setParamWeight(const LLViewerVisualParam *param, F32 weight, bool upload_bake = false); /******************************************************************************** @@ -175,7 +175,7 @@ private: // Render beam //-------------------------------------------------------------------- protected: - BOOL needsRenderBeam(); + bool needsRenderBeam(); private: LLPointer mBeam; LLFrameTimer mBeamTimer; @@ -205,34 +205,34 @@ public: /*virtual*/ bool hasPendingBakedUploads() const; S32 getLocalDiscardLevel(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const; bool areTexturesCurrent() const; - BOOL isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const; - BOOL isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) const; + bool isLocalTextureDataAvailable(const LLViewerTexLayerSet* layerset) const; + bool isLocalTextureDataFinal(const LLViewerTexLayerSet* layerset) const; // [Legacy Bake] bool isBakedTextureFinal(const LLAvatarAppearanceDefines::EBakedTextureIndex index) const; // If you want to check all textures of a given type, pass gAgentWearables.getWearableCount() for index /*virtual*/ bool isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const; - /*virtual*/ BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const; - /*virtual*/ BOOL isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const; + /*virtual*/ bool isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, U32 index = 0) const; + /*virtual*/ bool isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerWearable *wearable) const; //-------------------------------------------------------------------- // Local Textures //-------------------------------------------------------------------- public: - BOOL getLocalTextureGL(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture** image_gl_pp, U32 index) const; + bool getLocalTextureGL(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture** image_gl_pp, U32 index) const; LLViewerFetchedTexture* getLocalTextureGL(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const; const LLUUID& getLocalTextureID(LLAvatarAppearanceDefines::ETextureIndex type, U32 index) const; void setLocalTextureTE(U8 te, LLViewerTexture* image, U32 index); - /*virtual*/ void setLocalTexture(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index); + /*virtual*/ void setLocalTexture(LLAvatarAppearanceDefines::ETextureIndex type, LLViewerTexture* tex, bool baked_version_exits, U32 index); protected: - /*virtual*/ void setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, BOOL baked_version_exists, U32 index); - void localTextureLoaded(BOOL succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + /*virtual*/ void setBakedReady(LLAvatarAppearanceDefines::ETextureIndex type, bool baked_version_exists, U32 index); + void localTextureLoaded(bool succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata); void getLocalTextureByteCount(S32* gl_byte_count) const; - /*virtual*/ void addLocalTextureStats(LLAvatarAppearanceDefines::ETextureIndex i, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, BOOL rendered, BOOL covered_by_baked); + /*virtual*/ void addLocalTextureStats(LLAvatarAppearanceDefines::ETextureIndex i, LLViewerFetchedTexture* imagep, F32 texel_area_ratio, bool rendered, bool covered_by_baked); LLLocalTextureObject* getLocalTextureObject(LLAvatarAppearanceDefines::ETextureIndex i, U32 index) const; private: - static void onLocalTextureLoaded(BOOL succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + static void onLocalTextureLoaded(bool succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata); /*virtual*/ void setImage(const U8 te, LLViewerTexture *imagep, const U32 index); /*virtual*/ LLViewerTexture* getImage(const U8 te, const U32 index) const; @@ -282,7 +282,7 @@ public: void updateComposites(); const LLUUID& grabBakedTexture(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index) const; - BOOL canGrabBakedTexture(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index) const; + bool canGrabBakedTexture(LLAvatarAppearanceDefines::EBakedTextureIndex baked_index) const; //-------------------------------------------------------------------- @@ -326,15 +326,15 @@ protected: //-------------------------------------------------------------------- public: void updateAttachmentVisibility(U32 camera_mode); - BOOL isWearingAttachment(const LLUUID& inv_item_id) const; + bool isWearingAttachment(const LLUUID& inv_item_id) const; LLViewerObject* getWornAttachment(const LLUUID& inv_item_id); bool getAttachedPointName(const LLUUID& inv_item_id, std::string& name) const; // [RLVa:KB] - Checked: 2009-12-18 (RLVa-1.1.0i) | Added: RLVa-1.1.0i LLViewerJointAttachment* getWornAttachmentPoint(const LLUUID& inv_item_id) const; // [/RLVa:KB] /*virtual*/ const LLViewerJointAttachment *attachObject(LLViewerObject *viewer_object); - /*virtual*/ BOOL detachObject(LLViewerObject *viewer_object); - static BOOL detachAttachmentIntoInventory(const LLUUID& item_id); + /*virtual*/ bool detachObject(LLViewerObject *viewer_object); + static bool detachAttachmentIntoInventory(const LLUUID& item_id); bool hasAttachmentsInTrash(); @@ -431,10 +431,10 @@ public: void outputRezDiagnostics() const; void outputRezTiming(const std::string& msg) const; void reportAvatarRezTime() const; - void debugBakedTextureUpload(LLAvatarAppearanceDefines::EBakedTextureIndex index, BOOL finished); - static void debugOnTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + void debugBakedTextureUpload(LLAvatarAppearanceDefines::EBakedTextureIndex index, bool finished); + static void debugOnTimingLocalTexLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata); - BOOL isAllLocalTextureDataFinal() const; + bool isAllLocalTextureDataFinal() const; const LLViewerTexLayerSet* debugGetLayerSet(LLAvatarAppearanceDefines::EBakedTextureIndex index) const { return (LLViewerTexLayerSet*)(mBakedTextureDatas[index].mTexLayerSet); } const std::string verboseDebugDumpLocalTextureDataInfo(const LLViewerTexLayerSet* layerset) const; // Lists out state of this particular baked texture layer @@ -450,7 +450,7 @@ private: F32 mDebugTimeAvatarVisible; F32 mDebugTextureLoadTimes[LLAvatarAppearanceDefines::TEX_NUM_INDICES][MAX_DISCARD_LEVEL+1]; // load time for each texture at each discard level F32 mDebugBakedTextureTimes[LLAvatarAppearanceDefines::BAKED_NUM_INDICES][2]; // time to start upload and finish upload of each baked texture - void debugTimingLocalTexLoaded(BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata); + void debugTimingLocalTexLoaded(bool success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, bool final, void* userdata); void checkBOMRebakeRequired(); void appearanceChangeMetricsCoro(std::string url); bool mInitialMetric; @@ -464,7 +464,7 @@ private: extern LLPointer gAgentAvatarp; -BOOL isAgentAvatarValid(); +bool isAgentAvatarValid(); void selfStartPhase(const std::string& phase_name); void selfStopPhase(const std::string& phase_name, bool err_check = true); diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 5bf990c806..d5cd07f262 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -41,17 +41,17 @@ F32 LLVOCacheEntry::sNearRadius = 1.0f; F32 LLVOCacheEntry::sRearFarRadius = 1.0f; F32 LLVOCacheEntry::sFrontPixelThreshold = 1.0f; F32 LLVOCacheEntry::sRearPixelThreshold = 1.0f; -BOOL LLVOCachePartition::sNeedsOcclusionCheck = FALSE; +bool LLVOCachePartition::sNeedsOcclusionCheck = false; const S32 ENTRY_HEADER_SIZE = 6 * sizeof(S32); const S32 MAX_ENTRY_BODY_SIZE = 10000; -BOOL check_read(LLAPRFile* apr_file, void* src, S32 n_bytes) +bool check_read(LLAPRFile* apr_file, void* src, S32 n_bytes) { return apr_file->read(src, n_bytes) == n_bytes ; } -BOOL check_write(LLAPRFile* apr_file, void* src, S32 n_bytes) +bool check_write(LLAPRFile* apr_file, void* src, S32 n_bytes) { return apr_file->write(src, n_bytes) == n_bytes ; } @@ -162,7 +162,7 @@ LLVOCacheEntry::LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer & mCRCChangeCount(0), mState(INACTIVE), mSceneContrib(0.f), - mValid(TRUE), + mValid(true), mParentID(0), mBSphereRadius(-1.0f) { @@ -182,7 +182,7 @@ LLVOCacheEntry::LLVOCacheEntry() mBuffer(NULL), mState(INACTIVE), mSceneContrib(0.f), - mValid(TRUE), + mValid(true), mParentID(0), mBSphereRadius(-1.0f) { @@ -195,12 +195,12 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) mUpdateFlags(-1), mState(INACTIVE), mSceneContrib(0.f), - mValid(FALSE), + mValid(false), mParentID(0), mBSphereRadius(-1.0f) { S32 size = -1; - BOOL success; + bool success; static U8 data_buffer[ENTRY_HEADER_SIZE]; mDP.assignBuffer(mBuffer, 0); @@ -222,7 +222,7 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) // We won't bother seeking, because the rest of this file // is likely bogus, and will be tossed anyway. LL_WARNS() << "Bogus cache entry, size " << size << ", aborting!" << LL_ENDL; - success = FALSE; + success = false; } } if(success && size > 0) @@ -1037,7 +1037,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion) } if(LLViewerOctreeEntryData::getCurrentFrame() % seed != mIdleHash) { - mFrontCull = FALSE; + mFrontCull = false; //process back objects selection selectBackObjects(camera, LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull), @@ -1054,7 +1054,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion) LLVector3 region_agent = mRegionp->getOriginAgent(); camera.calcRegionFrustumPlanes(region_agent, gAgentCamera.mDrawDistance); - mFrontCull = TRUE; + mFrontCull = true; LLVOCacheOctreeCull culler(&camera, mRegionp, region_agent, do_occlusion && use_object_cache_occlusion, LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull), this); culler.traverse(mOctree); @@ -1067,10 +1067,10 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion) } #endif // LL_TEST -void LLVOCachePartition::setCullHistory(BOOL has_new_object) +void LLVOCachePartition::setCullHistory(bool has_new_object) { mCullHistory <<= 1; - mCullHistory |= has_new_object; + mCullHistory |= static_cast(has_new_object); } void LLVOCachePartition::addOccluders(LLViewerOctreeGroup* gp) @@ -1109,7 +1109,7 @@ void LLVOCachePartition::processOccluders(LLCamera* camera) //safe to clear mOccludedGroups here because only the world camera accesses it. mOccludedGroups.clear(); - sNeedsOcclusionCheck = FALSE; + sNeedsOcclusionCheck = false; } void LLVOCachePartition::resetOccluders() @@ -1125,7 +1125,7 @@ void LLVOCachePartition::resetOccluders() group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION); } mOccludedGroups.clear(); - sNeedsOcclusionCheck = FALSE; + sNeedsOcclusionCheck = false; } void LLVOCachePartition::removeOccluder(LLVOCacheGroup* group) @@ -1495,12 +1495,12 @@ void LLVOCache::writeCacheHeader() if(!success) { clearCacheInMemory() ; - mReadOnly = TRUE ; //disable the cache. + mReadOnly = true ; //disable the cache. } return ; } -BOOL LLVOCache::updateEntry(const HeaderEntryInfo* entry) +bool LLVOCache::updateEntry(const HeaderEntryInfo* entry) { LLAPRFile apr_file(mHeaderFileName, APR_WRITE|APR_BINARY, mLocalAPRFilePoolp); apr_file.seek(APR_SET, entry->mIndex * sizeof(HeaderEntryInfo) + sizeof(HeaderMetaInfo)) ; @@ -1666,7 +1666,7 @@ void LLVOCache::purgeEntries(U32 size) mNumEntries = mHandleEntryMap.size() ; } -void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled) +void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, bool dirty_cache, bool removal_enabled) { if(!mEnabled) { @@ -1789,7 +1789,7 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: return ; } -void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, BOOL dirty_cache, bool removal_enabled) +void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, bool dirty_cache, bool removal_enabled) { if(!mEnabled) { diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 8525edd121..a618664faa 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -150,8 +150,8 @@ public: void updateParentBoundingInfo(); void saveBoundingSphere(); - void setValid(BOOL valid = TRUE) {mValid = valid;} - BOOL isValid() const {return mValid;} + void setValid(bool valid = true) {mValid = valid;} + bool isValid() const {return mValid;} void setUpdateFlags(U32 flags) {mUpdateFlags = flags;} U32 getUpdateFlags() const {return mUpdateFlags;} @@ -185,7 +185,7 @@ protected: U32 mState; //high 16 bits reserved for special use. vocache_entry_set_t mChildrenList; //children entries in a linked set. - BOOL mValid; //if set, this entry is valid, otherwise it is invalid and will be removed. + bool mValid; //if set, this entry is valid, otherwise it is invalid and will be removed. LLVector4a mBSphereCenter; //bounding sphere center F32 mBSphereRadius; //bounding sphere radius @@ -224,7 +224,7 @@ public: void processOccluders(LLCamera* camera); void removeOccluder(LLVOCacheGroup* group); - void setCullHistory(BOOL has_new_object); + void setCullHistory(bool has_new_object); bool isFrontCull() const {return mFrontCull;} @@ -232,10 +232,10 @@ private: void selectBackObjects(LLCamera &camera, F32 projection_area_cutoff, bool use_occlusion); //select objects behind camera. public: - static BOOL sNeedsOcclusionCheck; + static bool sNeedsOcclusionCheck; private: - BOOL mFrontCull; //the view frustum cull if set, otherwise is back sphere cull. + bool mFrontCull; //the view frustum cull if set, otherwise is back sphere cull. U32 mCullHistory; U32 mCulledTime[LLViewerCamera::NUM_CAMERAS]; std::set mOccludedGroups; @@ -292,8 +292,8 @@ public: void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ; void readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map); - void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled); - void writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, BOOL dirty_cache, bool removal_enabled); + void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, bool dirty_cache, bool removal_enabled); + void writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, bool dirty_cache, bool removal_enabled); void removeEntry(U64 handle) ; U32 getCacheEntries() { return mNumEntries; } @@ -311,7 +311,7 @@ private: void removeCache() ; void removeEntry(HeaderEntryInfo* entry) ; void purgeEntries(U32 size); - BOOL updateEntry(const HeaderEntryInfo* entry); + bool updateEntry(const HeaderEntryInfo* entry); private: bool mEnabled; diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index c437643617..3c06fe0a14 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -73,7 +73,7 @@ LLVOGrass::LLVOGrass(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regi mLastPatchUpdateTime = 0; mGrassVel.clearVec(); mGrassBend.clearVec(); - mbCanSelect = TRUE; + mbCanSelect = true; mBladeWindAngle = 35.f; mBWAOverlap = 2.f; @@ -99,7 +99,7 @@ void LLVOGrass::updateSpecies() SpeciesMap::const_iterator it = sSpeciesTable.begin(); mSpecies = (*it).first; } - setTEImage(0, LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); + setTEImage(0, LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); } @@ -280,9 +280,9 @@ U32 LLVOGrass::processUpdateMessage(LLMessageSystem *mesgsys, return retval; } -BOOL LLVOGrass::isActive() const +bool LLVOGrass::isActive() const { - return TRUE; + return true; } void LLVOGrass::idleUpdate(LLAgent &agent, const F64 &time) @@ -413,7 +413,7 @@ LLDrawable* LLVOGrass::createDrawable(LLPipeline *pipeline) static LLTrace::BlockTimerStatHandle FTM_UPDATE_GRASS("Update Grass"); -BOOL LLVOGrass::updateGeometry(LLDrawable *drawable) +bool LLVOGrass::updateGeometry(LLDrawable *drawable) { LL_RECORD_BLOCK_TIME(FTM_UPDATE_GRASS); @@ -434,7 +434,7 @@ BOOL LLVOGrass::updateGeometry(LLDrawable *drawable) { plantBlades(); } - return TRUE; + return true; } void LLVOGrass::plantBlades() @@ -603,12 +603,12 @@ U32 LLVOGrass::getPartitionType() const } LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, regionp) +: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, true, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_GRASS; mPartitionType = LLViewerRegion::PARTITION_GRASS; mLODPeriod = 16; - mDepthMask = TRUE; + mDepthMask = true; mSlopRatio = 0.1f; mRenderPass = LLRenderPass::PASS_GRASS; } @@ -776,27 +776,27 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group) } // virtual -void LLVOGrass::updateDrawable(BOOL force_damped) +void LLVOGrass::updateDrawable(bool force_damped) { // Force an immediate rebuild on any update if (mDrawable.notNull()) { - mDrawable->updateXform(TRUE); + mDrawable->updateXform(true); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } clearChanged(SHIFTED); } // virtual -BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32 *face_hitp, +bool LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { - BOOL ret = FALSE; + bool ret = false; if (!mbCanSelect || mDrawable->isDead() || !gPipeline.hasRenderType(mDrawable->getRenderType())) { - return FALSE; + return false; } LLVector4a dir; @@ -863,7 +863,7 @@ BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& F32 a,b,t; - BOOL hit = FALSE; + bool hit = false; U32 idx0 = 0,idx1 = 0,idx2 = 0; @@ -878,24 +878,24 @@ BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& if (LLTriangleRayIntersect(v0a, v1a, v2a, start, dir, a, b, t)) { - hit = TRUE; + hit = true; idx0 = 0; idx1 = 1; idx2 = 2; } else if (LLTriangleRayIntersect(v1a, v3a, v2a, start, dir, a, b, t)) { - hit = TRUE; + hit = true; idx0 = 1; idx1 = 3; idx2 = 2; } else if (LLTriangleRayIntersect(v2a, v1a, v0a, start, dir, a, b, t)) { normal1 = -normal1; - hit = TRUE; + hit = true; idx0 = 2; idx1 = 1; idx2 = 0; } else if (LLTriangleRayIntersect(v2a, v3a, v1a, start, dir, a, b, t)) { normal1 = -normal1; - hit = TRUE; + hit = true; idx0 = 2; idx1 = 3; idx2 = 1; } @@ -928,7 +928,7 @@ BOOL LLVOGrass::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& { normal->load3(normal1.mV); } - ret = TRUE; + ret = true; } } } diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h index 282ca78e3a..5097aacc36 100644 --- a/indra/newview/llvograss.h +++ b/indra/newview/llvograss.h @@ -53,10 +53,10 @@ public: static void import(LLFILE *file, LLMessageSystem *mesgsys, const LLVector3 &pos); /*virtual*/ void exportFile(LLFILE *file, const LLVector3 &position); - void updateDrawable(BOOL force_damped); + void updateDrawable(bool force_damped); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); - /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); + /*virtual*/ bool updateGeometry(LLDrawable *drawable); /*virtual*/ void getGeometry(S32 idx, LLStrider& verticesp, LLStrider& normalsp, @@ -72,14 +72,14 @@ public: void plantBlades(); - /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. + /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate. /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); - /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, + /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = TRUE, + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = true, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvoicecallhandler.cpp b/indra/newview/llvoicecallhandler.cpp index 95e11abd82..0387b81c6b 100644 --- a/indra/newview/llvoicecallhandler.cpp +++ b/indra/newview/llvoicecallhandler.cpp @@ -54,7 +54,7 @@ public: //Get the ID LLUUID id; - if (!id.set( params[0], FALSE )) + if (!id.set( params[0], false )) { return false; } diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index b0eb8d962c..c974a4b466 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -44,7 +44,7 @@ LLVoiceChannel* LLVoiceChannel::sCurrentVoiceChannel = NULL; LLVoiceChannel* LLVoiceChannel::sSuspendedVoiceChannel = NULL; LLVoiceChannel::channel_changed_signal_t LLVoiceChannel::sCurrentVoiceChannelChangedSignal; -BOOL LLVoiceChannel::sSuspended = FALSE; +bool LLVoiceChannel::sSuspended = false; // // Constants @@ -59,7 +59,7 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess mState(STATE_NO_CHANNEL_INFO), mSessionName(session_name), mCallDirection(OUTGOING_CALL), - mIgnoreNextSessionLeave(FALSE), + mIgnoreNextSessionLeave(false), mCallEndedByAgent(false) { mNotifyArgs["VOICE_CHANNEL_NAME"] = mSessionName; @@ -164,7 +164,7 @@ void LLVoiceChannel::handleStatusChange(EStatusType type) // update the UI and revert to default channel deactivate(); } - mIgnoreNextSessionLeave = FALSE; + mIgnoreNextSessionLeave = false; break; case STATUS_JOINING: if (callStarted()) @@ -190,13 +190,13 @@ void LLVoiceChannel::handleError(EStatusType type) setState(STATE_ERROR); } -BOOL LLVoiceChannel::isActive() +bool LLVoiceChannel::isActive() { // only considered active when currently bound channel matches what our channel return callStarted() && LLVoiceClient::getInstance()->getCurrentChannel() == mURI; } -BOOL LLVoiceChannel::callStarted() +bool LLVoiceChannel::callStarted() { return mState >= STATE_CALL_STARTED; } @@ -206,7 +206,7 @@ void LLVoiceChannel::deactivate() if (mState >= STATE_RINGING) { // ignore session leave event - mIgnoreNextSessionLeave = TRUE; + mIgnoreNextSessionLeave = true; } if (callStarted()) @@ -370,7 +370,7 @@ void LLVoiceChannel::suspend() if (!sSuspended) { sSuspendedVoiceChannel = sCurrentVoiceChannel; - sSuspended = TRUE; + sSuspended = true; } } @@ -390,7 +390,7 @@ void LLVoiceChannel::resume() LLVoiceChannelProximal::getInstance()->activate(); } } - sSuspended = FALSE; + sSuspended = false; } } @@ -414,7 +414,7 @@ LLVoiceChannelGroup::LLVoiceChannelGroup(const LLUUID& session_id, const std::st LLVoiceChannel(session_id, session_name) { mRetries = DEFAULT_RETRIES_COUNT; - mIsRetrying = FALSE; + mIsRetrying = false; } void LLVoiceChannelGroup::deactivate() @@ -529,7 +529,7 @@ void LLVoiceChannelGroup::handleStatusChange(EStatusType type) { case STATUS_JOINED: mRetries = 3; - mIsRetrying = FALSE; + mIsRetrying = false; default: break; } @@ -553,8 +553,8 @@ void LLVoiceChannelGroup::handleError(EStatusType status) if ( mRetries > 0 ) { mRetries--; - mIsRetrying = TRUE; - mIgnoreNextSessionLeave = TRUE; + mIsRetrying = true; + mIgnoreNextSessionLeave = true; getChannelInfo(); return; @@ -563,7 +563,7 @@ void LLVoiceChannelGroup::handleError(EStatusType status) { notify = "VoiceChannelJoinFailed"; mRetries = DEFAULT_RETRIES_COUNT; - mIsRetrying = FALSE; + mIsRetrying = false; } break; @@ -670,7 +670,7 @@ LLVoiceChannelProximal::LLVoiceChannelProximal() : { } -BOOL LLVoiceChannelProximal::isActive() +bool LLVoiceChannelProximal::isActive() { return callStarted() && LLVoiceClient::getInstance()->inProximalChannel(); } @@ -767,7 +767,7 @@ void LLVoiceChannelProximal::deactivate() LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID& session_id, const std::string& session_name, const LLUUID& other_user_id) : LLVoiceChannelGroup(session_id, session_name), mOtherUserID(other_user_id), - mReceivedCall(FALSE) + mReceivedCall(false) { // make sure URI reflects encoded version of other user's agent id setURI(LLVoiceClient::getInstance()->sipURIFromID(other_user_id)); @@ -796,12 +796,12 @@ void LLVoiceChannelP2P::handleStatusChange(EStatusType type) } deactivate(); } - mIgnoreNextSessionLeave = FALSE; + mIgnoreNextSessionLeave = false; return; case STATUS_JOINING: // because we join session we expect to process session leave event in the future. EXT-7371 // may be this should be done in the LLVoiceChannel::handleStatusChange. - mIgnoreNextSessionLeave = FALSE; + mIgnoreNextSessionLeave = false; break; default: @@ -839,7 +839,7 @@ void LLVoiceChannelP2P::activate() // no session handle yet, we're starting the call if (mSessionHandle.empty()) { - mReceivedCall = FALSE; + mReceivedCall = false; LLVoiceClient::getInstance()->callUser(mOtherUserID); } // otherwise answering the call @@ -879,7 +879,7 @@ void LLVoiceChannelP2P::getChannelInfo() // receiving session from other user who initiated call void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::string &inURI) { - BOOL needs_activate = FALSE; + bool needs_activate = false; if (callStarted()) { // defer to lower agent id when already active @@ -887,7 +887,7 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s { // pretend we haven't started the call yet, so we can connect to this session instead deactivate(); - needs_activate = TRUE; + needs_activate = true; } else { @@ -913,7 +913,7 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s setURI(LLVoiceClient::getInstance()->sipURIFromID(mOtherUserID)); } - mReceivedCall = TRUE; + mReceivedCall = true; if (needs_activate) { diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h index 309c3eebdd..5add85986c 100644 --- a/indra/newview/llvoicechannel.h +++ b/indra/newview/llvoicechannel.h @@ -76,8 +76,8 @@ public: const std::string& uri, const std::string& credentials); virtual void getChannelInfo(); - virtual BOOL isActive(); - virtual BOOL callStarted(); + virtual bool isActive(); + virtual bool callStarted(); // Session name is a UI label used for feedback about which person, // group, or phone number you are talking to @@ -124,7 +124,7 @@ protected: LLSD mCallDialogPayload; // true if call was ended by agent bool mCallEndedByAgent; - BOOL mIgnoreNextSessionLeave; + bool mIgnoreNextSessionLeave; LLHandle mLoginNotificationHandle; typedef std::map voice_channel_map_t; @@ -135,7 +135,7 @@ protected: static LLVoiceChannel* sCurrentVoiceChannel; static LLVoiceChannel* sSuspendedVoiceChannel; - static BOOL sSuspended; + static bool sSuspended; private: state_changed_signal_t mStateChangedCallback; @@ -162,7 +162,7 @@ private: void voiceCallCapCoro(std::string url); U32 mRetries; - BOOL mIsRetrying; + bool mIsRetrying; }; class LLVoiceChannelProximal : public LLVoiceChannel, public LLSingleton @@ -173,7 +173,7 @@ public: /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); /*virtual*/ void handleStatusChange(EStatusType status); /*virtual*/ void handleError(EStatusType status); - /*virtual*/ BOOL isActive(); + /*virtual*/ bool isActive(); /*virtual*/ void activate(); /*virtual*/ void deactivate(); @@ -204,7 +204,7 @@ private: std::string mSessionHandle; LLUUID mOtherUserID; - BOOL mReceivedCall; + bool mReceivedCall; }; #endif // LL_VOICECHANNEL_H diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 76e10b7615..5ffe64a4bf 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -379,7 +379,7 @@ bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) // text chat -BOOL LLVoiceClient::isSessionTextIMPossible(const LLUUID& id) +bool LLVoiceClient::isSessionTextIMPossible(const LLUUID& id) { if (mVoiceModule) { @@ -387,11 +387,11 @@ BOOL LLVoiceClient::isSessionTextIMPossible(const LLUUID& id) } else { - return FALSE; + return false; } } -BOOL LLVoiceClient::isSessionCallBackPossible(const LLUUID& id) +bool LLVoiceClient::isSessionCallBackPossible(const LLUUID& id) { if (mVoiceModule) { @@ -399,12 +399,12 @@ BOOL LLVoiceClient::isSessionCallBackPossible(const LLUUID& id) } else { - return FALSE; + return false; } } /* obsolete -BOOL LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) +bool LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::string& message) { if (mVoiceModule) { @@ -412,7 +412,7 @@ BOOL LLVoiceClient::sendTextMessage(const LLUUID& participant_id, const std::str } else { - return FALSE; + return false; } } */ @@ -591,12 +591,12 @@ void LLVoiceClient::updateMicMuteLogic() if (mVoiceModule) mVoiceModule->setMuteMic(new_mic_mute); } -void LLVoiceClient::setLipSyncEnabled(BOOL enabled) +void LLVoiceClient::setLipSyncEnabled(bool enabled) { if (mVoiceModule) mVoiceModule->setLipSyncEnabled(enabled); } -BOOL LLVoiceClient::lipSyncEnabled() +bool LLVoiceClient::lipSyncEnabled() { if (mVoiceModule) { @@ -691,7 +691,7 @@ void LLVoiceClient::toggleUserPTTState(void) //------------------------------------------- // nearby speaker accessors -BOOL LLVoiceClient::getVoiceEnabled(const LLUUID& id) +bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) { if (mVoiceModule) { @@ -699,7 +699,7 @@ BOOL LLVoiceClient::getVoiceEnabled(const LLUUID& id) } else { - return FALSE; + return false; } } @@ -724,7 +724,7 @@ bool LLVoiceClient::isVoiceWorking() const return false; } -BOOL LLVoiceClient::isParticipantAvatar(const LLUUID& id) +bool LLVoiceClient::isParticipantAvatar(const LLUUID& id) { if (mVoiceModule) { @@ -732,16 +732,16 @@ BOOL LLVoiceClient::isParticipantAvatar(const LLUUID& id) } else { - return FALSE; + return false; } } -BOOL LLVoiceClient::isOnlineSIP(const LLUUID& id) +bool LLVoiceClient::isOnlineSIP(const LLUUID& id) { - return FALSE; + return false; } -BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id) +bool LLVoiceClient::getIsSpeaking(const LLUUID& id) { if (mVoiceModule) { @@ -749,11 +749,11 @@ BOOL LLVoiceClient::getIsSpeaking(const LLUUID& id) } else { - return FALSE; + return false; } } -BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id) +bool LLVoiceClient::getIsModeratorMuted(const LLUUID& id) { if (mVoiceModule) { @@ -761,7 +761,7 @@ BOOL LLVoiceClient::getIsModeratorMuted(const LLUUID& id) } else { - return FALSE; + return false; } } @@ -777,7 +777,7 @@ F32 LLVoiceClient::getCurrentPower(const LLUUID& id) } } -BOOL LLVoiceClient::getOnMuteList(const LLUUID& id) +bool LLVoiceClient::getOnMuteList(const LLUUID& id) { if (mVoiceModule) { @@ -785,7 +785,7 @@ BOOL LLVoiceClient::getOnMuteList(const LLUUID& id) } else { - return FALSE; + return false; } } @@ -912,7 +912,7 @@ LLVoiceEffectInterface* LLVoiceClient::getVoiceEffectInterface() const class LLViewerRequiredVoiceVersion : public LLHTTPNode { - static BOOL sAlertedUser; + static bool sAlertedUser; virtual void post( LLHTTPNode::ResponsePtr response, const LLSD& context, @@ -932,7 +932,7 @@ class LLViewerRequiredVoiceVersion : public LLHTTPNode { if (!sAlertedUser) { - //sAlertedUser = TRUE; + //sAlertedUser = true; LLNotificationsUtil::add("VoiceVersionMismatch"); gSavedSettings.setBOOL("EnableVoiceChat", false); // toggles listener } @@ -1147,7 +1147,7 @@ void LLSpeakerVolumeStorage::save() } } -BOOL LLViewerRequiredVoiceVersion::sAlertedUser = FALSE; +bool LLViewerRequiredVoiceVersion::sAlertedUser = false; LLHTTPRegistration gHTTPRegistrationMessageParcelVoiceInfo( diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index b4896aba8b..b31fc0e54f 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -209,21 +209,21 @@ public: virtual bool voiceEnabled(bool no_cache = false)=0; // virtual void setVoiceEnabled(bool enabled)=0; - virtual void setLipSyncEnabled(BOOL enabled)=0; - virtual BOOL lipSyncEnabled()=0; + virtual void setLipSyncEnabled(bool enabled)=0; + virtual bool lipSyncEnabled()=0; virtual void setMuteMic(bool muted)=0; // Set the mute state of the local mic. //@} ////////////////////////// /// @name nearby speaker accessors //@{ - virtual BOOL getVoiceEnabled(const LLUUID& id)=0; // true if we've received data for this avatar + virtual bool getVoiceEnabled(const LLUUID& id)=0; // true if we've received data for this avatar virtual std::string getDisplayName(const LLUUID& id)=0; - virtual BOOL isParticipantAvatar(const LLUUID &id)=0; - virtual BOOL getIsSpeaking(const LLUUID& id)=0; - virtual BOOL getIsModeratorMuted(const LLUUID& id)=0; + virtual bool isParticipantAvatar(const LLUUID &id)=0; + virtual bool getIsSpeaking(const LLUUID& id)=0; + virtual bool getIsModeratorMuted(const LLUUID& id)=0; virtual F32 getCurrentPower(const LLUUID& id)=0; // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... - virtual BOOL getOnMuteList(const LLUUID& id)=0; + virtual bool getOnMuteList(const LLUUID& id)=0; virtual F32 getUserVolume(const LLUUID& id)=0; virtual void setUserVolume(const LLUUID& id, F32 volume)=0; // set's volume for specified agent, from 0-1 (where .5 is nominal) //@} @@ -231,9 +231,9 @@ public: ////////////////////////// /// @name text chat //@{ - virtual BOOL isSessionTextIMPossible(const LLUUID& id)=0; - virtual BOOL isSessionCallBackPossible(const LLUUID& id)=0; - //virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message)=0; + virtual bool isSessionTextIMPossible(const LLUUID& id)=0; + virtual bool isSessionCallBackPossible(const LLUUID& id)=0; + //virtual bool sendTextMessage(const LLUUID& participant_id, const std::string& message)=0; virtual void endUserIMSession(const LLUUID &uuid)=0; //@} @@ -425,7 +425,7 @@ public: //bool voiceEnabled(); bool voiceEnabled(bool no_cache = false); // - void setLipSyncEnabled(BOOL enabled); + void setLipSyncEnabled(bool enabled); void setMuteMic(bool muted); // Use this to mute the local mic (for when the client is minimized, etc), ignoring user PTT state. void setUserPTTState(bool ptt); bool getUserPTTState(); @@ -439,7 +439,7 @@ public: void updateMicMuteLogic(); - BOOL lipSyncEnabled(); + bool lipSyncEnabled(); boost::signals2::connection MicroChangedCallback(const micro_changed_signal_t::slot_type& cb ) { return mMicroChangedSignal.connect(cb); } @@ -448,14 +448,14 @@ public: ///////////////////////////// // Accessors for data related to nearby speakers - BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar + bool getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar std::string getDisplayName(const LLUUID& id); - BOOL isOnlineSIP(const LLUUID &id); - BOOL isParticipantAvatar(const LLUUID &id); - BOOL getIsSpeaking(const LLUUID& id); - BOOL getIsModeratorMuted(const LLUUID& id); + bool isOnlineSIP(const LLUUID &id); + bool isParticipantAvatar(const LLUUID &id); + bool getIsSpeaking(const LLUUID& id); + bool getIsModeratorMuted(const LLUUID& id); F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... - BOOL getOnMuteList(const LLUUID& id); + bool getOnMuteList(const LLUUID& id); F32 getUserVolume(const LLUUID& id); // Centralized voice power level @@ -463,7 +463,7 @@ public: // Centralized voice power level ///////////////////////////// - BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. + bool getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. // Use this to determine whether to show a "no speech" icon in the menu bar. void getParticipantList(std::set &participants); bool isParticipant(const LLUUID& speaker_id); @@ -471,9 +471,9 @@ public: ////////////////////////// /// @name text chat //@{ - BOOL isSessionTextIMPossible(const LLUUID& id); - BOOL isSessionCallBackPossible(const LLUUID& id); - //BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message) const {return true;} ; + bool isSessionTextIMPossible(const LLUUID& id); + bool isSessionCallBackPossible(const LLUUID& id); + //bool sendTextMessage(const LLUUID& participant_id, const std::string& message) const {return true;} ; void endUserIMSession(const LLUUID &uuid); //@} diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp index ccbfe39328..7d5275402f 100644 --- a/indra/newview/llvoicevisualizer.cpp +++ b/indra/newview/llvoicevisualizer.cpp @@ -76,7 +76,7 @@ const LLVector3 WORLD_UPWARD_DIRECTION = LLVector3( 0.0f, 0.0f, 1.0f ); // Z is // Initialize the statics //------------------------------------------------------------------ bool LLVoiceVisualizer::sPrefsInitialized = false; -BOOL LLVoiceVisualizer::sLipSyncEnabled = FALSE; +bool LLVoiceVisualizer::sLipSyncEnabled = false; F32* LLVoiceVisualizer::sOoh = NULL; F32* LLVoiceVisualizer::sAah = NULL; U32 LLVoiceVisualizer::sOohs = 0; @@ -124,7 +124,7 @@ LLVoiceVisualizer::LLVoiceVisualizer( const U8 type ) for (int i=0; i= sOohPowerTransfers) diff --git a/indra/newview/llvoicevisualizer.h b/indra/newview/llvoicevisualizer.h index 36c78252d1..66956022b6 100644 --- a/indra/newview/llvoicevisualizer.h +++ b/indra/newview/llvoicevisualizer.h @@ -135,7 +135,7 @@ class LLVoiceVisualizer : public LLHUDEffect // private static members //--------------------------------------------------- - static BOOL sLipSyncEnabled; // 0 disabled, 1 babble loop + static bool sLipSyncEnabled; // 0 disabled, 1 babble loop static bool sPrefsInitialized; // the first instance will initialize the static members static F32* sOoh; // the babble loop of amplitudes for the ooh morph static F32* sAah; // the babble loop of amplitudes for the ooh morph diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index a6414e9265..8fc00232cf 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -2056,7 +2056,7 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait) << " VoiceEnabled " << mVoiceEnabled << " IsInitialized " << mIsInitialized << " RelogRequested " << mRelogRequested - << " ShuttingDown " << (sShuttingDown ? "TRUE" : "FALSE") + << " ShuttingDown " << (sShuttingDown ? "true" : "false") << " returning " << status << LL_ENDL; return status; @@ -5314,16 +5314,16 @@ bool LLVivoxVoiceClient::isVoiceWorking() const // Returns true if the indicated participant in the current audio session is really an SL avatar. // Currently this will be false only for PSTN callers into group chats, and PSTN p2p calls. -BOOL LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id) +bool LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id) { - BOOL result = TRUE; + bool result = true; sessionStatePtr_t session(findSession(id)); if(session) { // this is a p2p session with the indicated caller, or the session with the specified UUID. if(session->mSynthesizedCallerID) - result = FALSE; + result = false; } else { @@ -5343,9 +5343,9 @@ BOOL LLVivoxVoiceClient::isParticipantAvatar(const LLUUID &id) // Returns true if calling back the session URI after the session has closed is possible. // Currently this will be false only for PSTN P2P calls. -BOOL LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id) +bool LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id) { - BOOL result = TRUE; + bool result = true; sessionStatePtr_t session(findSession(session_id)); if(session != NULL) @@ -5358,9 +5358,9 @@ BOOL LLVivoxVoiceClient::isSessionCallBackPossible(const LLUUID &session_id) // Returns true if the session can accept text IM's. // Currently this will be false only for PSTN P2P calls. -BOOL LLVivoxVoiceClient::isSessionTextIMPossible(const LLUUID &session_id) +bool LLVivoxVoiceClient::isSessionTextIMPossible(const LLUUID &session_id) { - bool result = TRUE; + bool result = true; sessionStatePtr_t session(findSession(session_id)); if(session != NULL) @@ -5801,12 +5801,12 @@ bool LLVivoxVoiceClient::voiceEnabled(bool no_cache) } // -void LLVivoxVoiceClient::setLipSyncEnabled(BOOL enabled) +void LLVivoxVoiceClient::setLipSyncEnabled(bool enabled) { mLipSyncEnabled = enabled; } -BOOL LLVivoxVoiceClient::lipSyncEnabled() +bool LLVivoxVoiceClient::lipSyncEnabled() { if ( mVoiceEnabled ) @@ -5815,7 +5815,7 @@ BOOL LLVivoxVoiceClient::lipSyncEnabled() } else { - return FALSE; + return false; } } @@ -5861,15 +5861,15 @@ void LLVivoxVoiceClient::setMicGain(F32 volume) ///////////////////////////// // Accessors for data related to nearby speakers -BOOL LLVivoxVoiceClient::getVoiceEnabled(const LLUUID& id) +bool LLVivoxVoiceClient::getVoiceEnabled(const LLUUID& id) { - BOOL result = FALSE; + bool result = false; participantStatePtr_t participant(findParticipantByID(id)); if(participant) { // I'm not sure what the semantics of this should be. // For now, if we have any data about the user that came through the chat channel, assume they're voice-enabled. - result = TRUE; + result = true; } return result; @@ -5889,16 +5889,16 @@ std::string LLVivoxVoiceClient::getDisplayName(const LLUUID& id) -BOOL LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id) +bool LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id) { - BOOL result = FALSE; + bool result = false; participantStatePtr_t participant(findParticipantByID(id)); if(participant) { if (participant->mSpeakingTimeout.getElapsedTimeF32() > SPEAKING_TIMEOUT) { - participant->mIsSpeaking = FALSE; + participant->mIsSpeaking = false; } result = participant->mIsSpeaking; } @@ -5906,9 +5906,9 @@ BOOL LLVivoxVoiceClient::getIsSpeaking(const LLUUID& id) return result; } -BOOL LLVivoxVoiceClient::getIsModeratorMuted(const LLUUID& id) +bool LLVivoxVoiceClient::getIsModeratorMuted(const LLUUID& id) { - BOOL result = FALSE; + bool result = false; participantStatePtr_t participant(findParticipantByID(id)); if(participant) @@ -5933,9 +5933,9 @@ F32 LLVivoxVoiceClient::getCurrentPower(const LLUUID& id) -BOOL LLVivoxVoiceClient::getUsingPTT(const LLUUID& id) +bool LLVivoxVoiceClient::getUsingPTT(const LLUUID& id) { - BOOL result = FALSE; + bool result = false; participantStatePtr_t participant(findParticipantByID(id)); if(participant) @@ -5948,9 +5948,9 @@ BOOL LLVivoxVoiceClient::getUsingPTT(const LLUUID& id) return result; } -BOOL LLVivoxVoiceClient::getOnMuteList(const LLUUID& id) +bool LLVivoxVoiceClient::getOnMuteList(const LLUUID& id) { - BOOL result = FALSE; + bool result = false; participantStatePtr_t participant(findParticipantByID(id)); if(participant) @@ -6020,7 +6020,7 @@ std::string LLVivoxVoiceClient::getGroupID(const LLUUID& id) return result; } -BOOL LLVivoxVoiceClient::getAreaVoiceDisabled() +bool LLVivoxVoiceClient::getAreaVoiceDisabled() { return mAreaVoiceDisabled; } @@ -7258,7 +7258,7 @@ void LLVivoxVoiceClient::updateVoiceMorphingMenu() const voice_effect_list_t& effect_list = effect_interfacep->getVoiceEffectList(); if (!effect_list.empty()) { - LLMenuGL * voice_morphing_menup = gMenuBarView->findChildMenuByName("VoiceMorphing", TRUE); + LLMenuGL * voice_morphing_menup = gMenuBarView->findChildMenuByName("VoiceMorphing", true); if (NULL != voice_morphing_menup) { diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index 19725849f8..2ba61caa9d 100644 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -111,7 +111,7 @@ public: virtual bool isParticipant(const LLUUID& speaker_id); // Send a text message to the specified user, initiating the session if necessary. - // virtual BOOL sendTextMessage(const LLUUID& participant_id, const std::string& message) const {return false;}; + // virtual bool sendTextMessage(const LLUUID& participant_id, const std::string& message) const {return false;}; // close any existing text IM session with the specified user virtual void endUserIMSession(const LLUUID &uuid); @@ -119,12 +119,12 @@ public: // Returns true if calling back the session URI after the session has closed is possible. // Currently this will be false only for PSTN P2P calls. // NOTE: this will return true if the session can't be found. - virtual BOOL isSessionCallBackPossible(const LLUUID &session_id); + virtual bool isSessionCallBackPossible(const LLUUID &session_id); // Returns true if the session can accepte text IM's. // Currently this will be false only for PSTN P2P calls. // NOTE: this will return true if the session can't be found. - virtual BOOL isSessionTextIMPossible(const LLUUID &session_id); + virtual bool isSessionTextIMPossible(const LLUUID &session_id); //////////////////////////// @@ -175,21 +175,21 @@ public: virtual bool voiceEnabled(bool no_cache = false); // virtual void setVoiceEnabled(bool enabled); - virtual BOOL lipSyncEnabled(); - virtual void setLipSyncEnabled(BOOL enabled); + virtual bool lipSyncEnabled(); + virtual void setLipSyncEnabled(bool enabled); virtual void setMuteMic(bool muted); // Set the mute state of the local mic. //@} ////////////////////////// /// @name nearby speaker accessors //@{ - virtual BOOL getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar + virtual bool getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar virtual std::string getDisplayName(const LLUUID& id); - virtual BOOL isParticipantAvatar(const LLUUID &id); - virtual BOOL getIsSpeaking(const LLUUID& id); - virtual BOOL getIsModeratorMuted(const LLUUID& id); + virtual bool isParticipantAvatar(const LLUUID &id); + virtual bool getIsSpeaking(const LLUUID& id); + virtual bool getIsModeratorMuted(const LLUUID& id); virtual F32 getCurrentPower(const LLUUID& id); // "power" is related to "amplitude" in a defined way. I'm just not sure what the formula is... - virtual BOOL getOnMuteList(const LLUUID& id); + virtual bool getOnMuteList(const LLUUID& id); virtual F32 getUserVolume(const LLUUID& id); virtual void setUserVolume(const LLUUID& id, F32 volume); // set's volume for specified agent, from 0-1 (where .5 is nominal) //@} @@ -500,11 +500,11 @@ protected: // Accessors for data related to nearby speakers // MBW -- XXX -- Not sure how to get this data out of the TVC - BOOL getUsingPTT(const LLUUID& id); + bool getUsingPTT(const LLUUID& id); std::string getGroupID(const LLUUID& id); // group ID if the user is in group chat (empty string if not applicable) ///////////////////////////// - BOOL getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. + bool getAreaVoiceDisabled(); // returns true if the area the avatar is in is speech-disabled. // Use this to determine whether to show a "no speech" icon in the menu bar. @@ -818,7 +818,7 @@ private: std::string mWriteString; size_t mWriteOffset; - BOOL mLipSyncEnabled; + bool mLipSyncEnabled; typedef std::set observer_set_t; observer_set_t mParticipantObservers; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index f3fe25e309..a275357d71 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -153,7 +153,7 @@ LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegi { setNumTEs(1); setTETexture(0, LLUUID::null); - mbCanSelect = FALSE; // users can't select particle systems + mbCanSelect = false; // users can't select particle systems } @@ -161,9 +161,9 @@ LLVOPartGroup::~LLVOPartGroup() { } -BOOL LLVOPartGroup::isActive() const +bool LLVOPartGroup::isActive() const { - return FALSE; + return false; } F32 LLVOPartGroup::getBinRadius() @@ -221,7 +221,7 @@ void LLVOPartGroup::updateTextures() LLDrawable* LLVOPartGroup::createDrawable(LLPipeline *pipeline) { pipeline->allocDrawable(this); - mDrawable->setLit(FALSE); + mDrawable->setLit(false); mDrawable->setRenderType(LLPipeline::RENDER_TYPE_PARTICLES); return mDrawable; } @@ -284,7 +284,7 @@ LLVector3 LLVOPartGroup::getCameraPosition() const return gAgentCamera.getCameraPositionAgent(); } -BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) +bool LLVOPartGroup::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED; @@ -312,12 +312,12 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) } drawable->setNumFaces(0, NULL, getTEImage(0)); LLPipeline::sCompiles++; - return TRUE; + return true; } if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_PARTICLES))) { - return TRUE; + return true; } if (num_parts > drawable->getNumFaces()) @@ -455,15 +455,15 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) mDrawable->movePartition(); LLPipeline::sCompiles++; - return TRUE; + return true; } -BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, +bool LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -474,7 +474,7 @@ BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector dir.setSub(end, start); F32 closest_t = 2.f; - BOOL ret = FALSE; + bool ret = false; for (U32 idx = 0; idx < mViewerPartGroupp->mParticles.size(); ++idx) { @@ -494,7 +494,7 @@ BOOL LLVOPartGroup::lineSegmentIntersect(const LLVector4a& start, const LLVector t <= 1.f && t < closest_t) { - ret = TRUE; + ret = true; closest_t = t; if (face_hit) { @@ -716,7 +716,7 @@ U32 LLVOPartGroup::getPartitionType() const } LLParticlePartition::LLParticlePartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, regionp) +: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, true, regionp) { mRenderPass = LLRenderPass::PASS_ALPHA; mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES; @@ -903,7 +903,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group) object->getGeometry(facep->getTEOffset(), cur_vert, cur_norm, cur_tc, cur_col, cur_glow, cur_idx); - bool has_glow = FALSE; + bool has_glow = false; if (cur_glow.get() != start_glow) { @@ -986,7 +986,7 @@ U32 LLVOHUDPartGroup::getPartitionType() const LLDrawable* LLVOHUDPartGroup::createDrawable(LLPipeline *pipeline) { pipeline->allocDrawable(this); - mDrawable->setLit(FALSE); + mDrawable->setLit(false); mDrawable->setRenderType(LLPipeline::RENDER_TYPE_HUD_PARTICLES); return mDrawable; } diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h index 4d471134d4..c6f56087dc 100644 --- a/indra/newview/llvopartgroup.h +++ b/indra/newview/llvopartgroup.h @@ -56,18 +56,18 @@ public: LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); - /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. + /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate. void idleUpdate(LLAgent &agent, const F64 &time); virtual F32 getBinRadius(); virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax); virtual U32 getPartitionType() const; - /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, + /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, - BOOL pick_transparent, - BOOL pick_rigged, - BOOL pick_unselectable, + bool pick_transparent, + bool pick_rigged, + bool pick_unselectable, S32* face_hit, LLVector4a* intersection, LLVector2* tex_coord, @@ -78,7 +78,7 @@ public: /*virtual*/ void updateTextures(); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); - /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); + /*virtual*/ bool updateGeometry(LLDrawable *drawable); void getGeometry(const LLViewerPart& part, LLStrider& verticesp); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 162efd2656..cdc558804e 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -105,7 +105,7 @@ void LLSkyTex::init(bool isShiny) for (S32 i = 0; i < 2; ++i) { - mTexture[i] = LLViewerTextureManager::getLocalTexture(FALSE); + mTexture[i] = LLViewerTextureManager::getLocalTexture(false); mTexture[i]->setAddressMode(LLTexUnit::TAM_CLAMP); mImageRaw[i] = new LLImageRaw(SKYTEX_RESOLUTION, SKYTEX_RESOLUTION, SKYTEX_COMPONENTS); @@ -123,7 +123,7 @@ void LLSkyTex::restoreGL() { for (S32 i = 0; i < 2; i++) { - mTexture[i] = LLViewerTextureManager::getLocalTexture(FALSE); + mTexture[i] = LLViewerTextureManager::getLocalTexture(false); mTexture[i]->setAddressMode(LLTexUnit::TAM_CLAMP); } } @@ -158,7 +158,7 @@ S32 LLSkyTex::getNext() return ((sCurrent+1) & 1); } -S32 LLSkyTex::getWhich(const BOOL curr) +S32 LLSkyTex::getWhich(const bool curr) { int tex = curr ? sCurrent : getNext(); return tex; @@ -211,13 +211,13 @@ void LLSkyTex::createGLImage(S32 which) mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP); } -void LLSkyTex::bindTexture(BOOL curr) +void LLSkyTex::bindTexture(bool curr) { int tex = getWhich(curr); gGL.getTexUnit(0)->bind(mTexture[tex], true); } -LLImageRaw* LLSkyTex::getImageRaw(BOOL curr) +LLImageRaw* LLSkyTex::getImageRaw(bool curr) { int tex = getWhich(curr); return mImageRaw[tex]; @@ -234,10 +234,10 @@ LLHeavenBody::LLHeavenBody(const F32 rad) mDirection(LLVector3(0,0,0)), mIntensity(0.f), mDiskRadius(rad), - mDraw(FALSE), + mDraw(false), mHorizonVisibility(1.f), mVisibility(1.f), - mVisible(FALSE) + mVisible(false) { mColor.setToBlack(); mColorCached.setToBlack(); @@ -396,24 +396,24 @@ const S32 SKYTEX_TILE_RES_X = SKYTEX_RESOLUTION / NUM_TILES_X; const S32 SKYTEX_TILE_RES_Y = SKYTEX_RESOLUTION / NUM_TILES_Y; LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) -: LLStaticViewerObject(id, pcode, regionp, TRUE), +: LLStaticViewerObject(id, pcode, regionp, true), mSun(SUN_DISK_RADIUS), mMoon(MOON_DISK_RADIUS), mBrightnessScale(1.f), mBrightnessScaleNew(0.f), mBrightnessScaleGuess(1.f), - mWeatherChange(FALSE), + mWeatherChange(false), mCloudDensity(0.2f), mWind(0.f), - mForceUpdate(FALSE), - mNeedUpdate(TRUE), + mForceUpdate(false), + mNeedUpdate(true), mCubeMapUpdateStage(-1), mWorldScale(1.f), mBumpSunDir(0.f, 0.f, 1.f) { /// WL PARAMS - mInitialized = FALSE; - mbCanSelect = FALSE; + mInitialized = false; + mbCanSelect = false; mUpdateTimer.reset(); mForceUpdateThrottle.setTimerExpirySec(UPDATE_EXPRY); @@ -436,7 +436,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) mSun.setIntensity(SUN_INTENSITY); mMoon.setIntensity(0.1f * SUN_INTENSITY); - mHeavenlyBodyUpdated = FALSE ; + mHeavenlyBodyUpdated = false ; mDrawRefl = 0; mInterpVal = 0.f; @@ -479,10 +479,10 @@ void LLVOSky::init() mInitialized = true; - mHeavenlyBodyUpdated = FALSE ; + mHeavenlyBodyUpdated = false ; - mRainbowMap = LLViewerTextureManager::getFetchedTexture(psky->getRainbowTextureId(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - mHaloMap = LLViewerTextureManager::getFetchedTexture(psky->getHaloTextureId(), FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + mRainbowMap = LLViewerTextureManager::getFetchedTexture(psky->getRainbowTextureId(), FTT_DEFAULT, true, LLGLTexture::BOOST_UI); + mHaloMap = LLViewerTextureManager::getFetchedTexture(psky->getHaloTextureId(), FTT_DEFAULT, true, LLGLTexture::BOOST_UI); } @@ -661,7 +661,7 @@ void LLVOSky::idleUpdate(LLAgent &agent, const F64 &time) void LLVOSky::forceSkyUpdate() { - mForceUpdate = TRUE; + mForceUpdate = true; m_lastAtmosphericsVars = {}; @@ -675,12 +675,12 @@ bool LLVOSky::updateSky() if (mDead || !(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_SKY))) { // It's dead. Don't update it. - return TRUE; + return true; } if (gGLManager.mIsDisabled) { - return TRUE; + return true; } LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT; @@ -699,8 +699,8 @@ bool LLVOSky::updateSky() if (!mCubeMap || LLPipeline::sReflectionProbesEnabled) { mCubeMapUpdateStage = NUM_CUBEMAP_FACES; - mForceUpdate = FALSE; - return TRUE; + mForceUpdate = false; + return true; } if (mCubeMapUpdateStage < 0) @@ -716,7 +716,7 @@ bool LLVOSky::updateSky() // start updating cube map sides updateFog(LLViewerCamera::getInstance()->getFar()); mCubeMapUpdateStage = 0; - mForceUpdate = FALSE; + mForceUpdate = false; } } else if (mCubeMapUpdateStage == NUM_CUBEMAP_FACES && !LLPipeline::sReflectionProbesEnabled) @@ -726,7 +726,7 @@ bool LLVOSky::updateSky() bool is_alm_wl_sky = gPipeline.canUseWindLightShaders(); - int tex = mSkyTex[0].getWhich(TRUE); + int tex = mSkyTex[0].getWhich(true); for (int side = 0; side < NUM_CUBEMAP_FACES; side++) { @@ -735,14 +735,14 @@ bool LLVOSky::updateSky() if (!is_alm_wl_sky) { - raw1 = mSkyTex[side].getImageRaw(TRUE); - raw2 = mSkyTex[side].getImageRaw(FALSE); + raw1 = mSkyTex[side].getImageRaw(true); + raw2 = mSkyTex[side].getImageRaw(false); raw2->copy(raw1); mSkyTex[side].createGLImage(tex); } - raw1 = mShinyTex[side].getImageRaw(TRUE); - raw2 = mShinyTex[side].getImageRaw(FALSE); + raw1 = mShinyTex[side].getImageRaw(true); + raw2 = mShinyTex[side].getImageRaw(false); raw2->copy(raw1); mShinyTex[side].createGLImage(tex); } @@ -767,8 +767,8 @@ bool LLVOSky::updateSky() m_lastAtmosphericsVars = m_atmosphericsVars; - mNeedUpdate = FALSE; - mForceUpdate = FALSE; + mNeedUpdate = false; + mForceUpdate = false; mForceUpdateThrottle.setTimerExpirySec(UPDATE_EXPRY); @@ -795,7 +795,7 @@ bool LLVOSky::updateSky() mCubeMapUpdateStage++; } - return TRUE; + return true; } void LLVOSky::updateTextures() @@ -834,7 +834,7 @@ void LLVOSky::updateTextures() LLDrawable *LLVOSky::createDrawable(LLPipeline *pipeline) { pipeline->allocDrawable(this); - mDrawable->setLit(FALSE); + mDrawable->setLit(false); LLDrawPoolSky *poolp = (LLDrawPoolSky*) gPipeline.getPool(LLDrawPool::POOL_SKY); poolp->setSkyTex(mSkyTex); @@ -869,8 +869,8 @@ void LLVOSky::setMoonScale(F32 moon_scale) void LLVOSky::setSunTextures(const LLUUID& sun_texture, const LLUUID& sun_texture_next) { // We test the UUIDs here because we explicitly do not want the default image returned by getFetchedTexture in that case... - mSunTexturep[0] = sun_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - mSunTexturep[1] = sun_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + mSunTexturep[0] = sun_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture, FTT_DEFAULT, true, LLGLTexture::BOOST_UI); + mSunTexturep[1] = sun_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(sun_texture_next, FTT_DEFAULT, true, LLGLTexture::BOOST_UI); bool can_use_wl = gPipeline.canUseWindLightShaders(); @@ -913,8 +913,8 @@ void LLVOSky::setMoonTextures(const LLUUID& moon_texture, const LLUUID& moon_tex bool can_use_wl = gPipeline.canUseWindLightShaders(); - mMoonTexturep[0] = moon_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - mMoonTexturep[1] = moon_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + mMoonTexturep[0] = moon_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture, FTT_DEFAULT, true, LLGLTexture::BOOST_UI); + mMoonTexturep[1] = moon_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(moon_texture_next, FTT_DEFAULT, true, LLGLTexture::BOOST_UI); if (mFace[FACE_MOON]) { @@ -936,8 +936,8 @@ void LLVOSky::setCloudNoiseTextures(const LLUUID& cloud_noise_texture, const LLU { LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - mCloudNoiseTexturep[0] = cloud_noise_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - mCloudNoiseTexturep[1] = cloud_noise_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + mCloudNoiseTexturep[0] = cloud_noise_texture.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture, FTT_DEFAULT, true, LLGLTexture::BOOST_UI); + mCloudNoiseTexturep[1] = cloud_noise_texture_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(cloud_noise_texture_next, FTT_DEFAULT, true, LLGLTexture::BOOST_UI); if (mCloudNoiseTexturep[0]) { @@ -957,8 +957,8 @@ void LLVOSky::setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_ LLUUID bloom_tex = bloom_texture.isNull() ? psky->GetDefaultBloomTextureId() : bloom_texture; LLUUID bloom_tex_next = bloom_texture_next.isNull() ? (bloom_texture.isNull() ? psky->GetDefaultBloomTextureId() : bloom_texture) : bloom_texture_next; - mBloomTexturep[0] = bloom_tex.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); - mBloomTexturep[1] = bloom_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex_next, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + mBloomTexturep[0] = bloom_tex.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex, FTT_DEFAULT, true, LLGLTexture::BOOST_UI); + mBloomTexturep[1] = bloom_tex_next.isNull() ? nullptr : LLViewerTextureManager::getFetchedTexture(bloom_tex_next, FTT_DEFAULT, true, LLGLTexture::BOOST_UI); if (mBloomTexturep[0]) { @@ -971,7 +971,7 @@ void LLVOSky::setBloomTextures(const LLUUID& bloom_texture, const LLUUID& bloom_ } } -BOOL LLVOSky::updateGeometry(LLDrawable *drawable) +bool LLVOSky::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE; if (mFace[FACE_REFLECTION] == NULL) @@ -1076,7 +1076,7 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) const F32 camera_height = mCameraPosAgent.mV[2]; const F32 height_above_water = camera_height - water_height; - bool sun_flag = FALSE; + bool sun_flag = false; if (mSun.isVisible()) { sun_flag = !mMoon.isVisible() || ((look_at * mSun.getDirection()) > 0); @@ -1091,12 +1091,12 @@ BOOL LLVOSky::updateGeometry(LLDrawable *drawable) } LLPipeline::sCompiles++; - return TRUE; + return true; } bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const S32 f, LLHeavenBody& hb, const LLVector3 &up, const LLVector3 &right) { - mHeavenlyBodyUpdated = TRUE ; + mHeavenlyBodyUpdated = true ; LLStrider verticesp; LLStrider normalsp; @@ -1138,7 +1138,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const v_clipped[2] = draw_pos + scaled_right + scaled_up; v_clipped[3] = draw_pos + scaled_right - scaled_up; - hb.setVisible(TRUE); + hb.setVisible(true); facep = mFace[f]; @@ -1163,7 +1163,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const if (-1 == index_offset) { - return TRUE; + return true; } for (S32 vtx = 0; vtx < 4; ++vtx) @@ -1187,7 +1187,7 @@ bool LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, F32 scale, const facep->getVertexBuffer()->unmapBuffer(); - return TRUE; + return true; } F32 dtReflection(const LLVector3& p, F32 cos_dir_from_top, F32 sin_dir_from_top, F32 diff_angl_dir) diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 509ad97786..b4e9993537 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -60,7 +60,7 @@ private: static S32 sCurrent; public: - void bindTexture(BOOL curr = TRUE); + void bindTexture(bool curr = true); protected: LLSkyTex(); @@ -75,7 +75,7 @@ protected: static S32 getCurrent(); static S32 stepCurrent(); static S32 getNext(); - static S32 getWhich(const BOOL curr); + static S32 getWhich(const bool curr); void initEmpty(const S32 tex); @@ -117,8 +117,8 @@ protected: return col; } - LLImageRaw* getImageRaw(BOOL curr=TRUE); - void createGLImage(BOOL curr=TRUE); + LLImageRaw* getImageRaw(bool curr=true); + void createGLImage(S32 which); bool mIsShiny; }; @@ -137,7 +137,7 @@ protected: LLVector3 mAngularVelocity; // velocity of the local heavenly body F32 mDiskRadius; - bool mDraw; // FALSE - do not draw. + bool mDraw; // false - do not draw. F32 mHorizonVisibility; // number [0, 1] due to how horizon F32 mVisibility; // same but due to other objects being in throng. bool mVisible; @@ -231,7 +231,7 @@ public: // later? /*virtual*/ void updateTextures(); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); - /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); + /*virtual*/ bool updateGeometry(LLDrawable *drawable); const LLHeavenBody& getSun() const { return mSun; } const LLHeavenBody& getMoon() const { return mMoon; } diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 475a5964e4..522e923a25 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -47,19 +47,19 @@ F32 LLVOSurfacePatch::sLODFactor = 1.f; LLVOSurfacePatch::LLVOSurfacePatch(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) : LLStaticViewerObject(id, LL_VO_SURFACE_PATCH, regionp), - mDirtiedPatch(FALSE), + mDirtiedPatch(false), mPool(NULL), mBaseComp(0), mPatchp(NULL), - mDirtyTexture(FALSE), - mDirtyTerrain(FALSE), + mDirtyTexture(false), + mDirtyTerrain(false), mLastNorthStride(0), mLastEastStride(0), mLastStride(0), mLastLength(0) { // Terrain must draw during selection passes so it can block objects behind it. - mbCanSelect = TRUE; + mbCanSelect = true; setScale(LLVector3(16.f, 16.f, 16.f)); // Hack for setting scale for bounding boxes/visibility. } @@ -81,9 +81,9 @@ void LLVOSurfacePatch::markDead() } -BOOL LLVOSurfacePatch::isActive() const +bool LLVOSurfacePatch::isActive() const { - return FALSE; + return false; } @@ -146,7 +146,7 @@ void LLVOSurfacePatch::updateGL() } } -BOOL LLVOSurfacePatch::updateGeometry(LLDrawable *drawable) +bool LLVOSurfacePatch::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED; @@ -208,7 +208,7 @@ BOOL LLVOSurfacePatch::updateGeometry(LLDrawable *drawable) mLastNorthStride = north_stride; mLastEastStride = east_stride; - return TRUE; + return true; } void LLVOSurfacePatch::updateFaceSize(S32 idx) @@ -762,9 +762,9 @@ void LLVOSurfacePatch::setPatch(LLSurfacePatch *patchp) void LLVOSurfacePatch::dirtyPatch() { - mDirtiedPatch = TRUE; + mDirtiedPatch = true; dirtyGeom(); - mDirtyTerrain = TRUE; + mDirtyTerrain = true; LLVector3 center = mPatchp->getCenterRegion(); LLSurface *surfacep = mPatchp->getSurface(); @@ -853,14 +853,14 @@ void LLVOSurfacePatch::getGeomSizesEast(const S32 stride, const S32 east_stride, } } -BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32 *face_hitp, +bool LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { if (!lineSegmentBoundingBox(start, end)) { - return FALSE; + return false; } LLVector4a da; @@ -881,7 +881,7 @@ BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVec if (mRegionp->getLandHeightRegion(origin) > origin.mV[2]) { //origin is under ground, treat as no intersection - return FALSE; + return false; } //step one meter at a time until intersection point found @@ -939,7 +939,7 @@ BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVec normal->load3((mRegionp->getLand().resolveNormalGlobal(mRegionp->getPosGlobalFromRegion(sample))).mV); } - return TRUE; + return true; } } @@ -951,7 +951,7 @@ BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector4a& start, const LLVec } - return FALSE; + return false; } void LLVOSurfacePatch::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax) @@ -974,10 +974,10 @@ U32 LLVOSurfacePatch::getPartitionType() const } LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, FALSE, regionp) +: LLSpatialPartition(LLDrawPoolTerrain::VERTEX_DATA_MASK, false, regionp) { - mOcclusionEnabled = FALSE; - mInfiniteFarClip = TRUE; + mOcclusionEnabled = false; + mInfiniteFarClip = true; mDrawableType = LLPipeline::RENDER_TYPE_TERRAIN; mPartitionType = LLViewerRegion::PARTITION_TERRAIN; } diff --git a/indra/newview/llvosurfacepatch.h b/indra/newview/llvosurfacepatch.h index c5f7f103f4..c6a0664612 100644 --- a/indra/newview/llvosurfacepatch.h +++ b/indra/newview/llvosurfacepatch.h @@ -60,7 +60,7 @@ public: /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ void updateGL(); - /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); + /*virtual*/ bool updateGeometry(LLDrawable *drawable); /*virtual*/ bool updateLOD(); /*virtual*/ void updateFaceSize(S32 idx); void getGeometry(LLStrider &verticesp, @@ -73,7 +73,7 @@ public: /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); // generate accurate apparent angle and area /*virtual*/ void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax); - /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. + /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate. void setPatch(LLSurfacePatch *patchp); LLSurfacePatch *getPatch() const { return mPatchp; } @@ -81,11 +81,11 @@ public: void dirtyPatch(); void dirtyGeom(); - /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, + /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = TRUE, + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = true, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -93,7 +93,7 @@ public: LLVector4a* tangent = NULL // return the surface tangent at the intersection point ); - BOOL mDirtiedPatch; + bool mDirtiedPatch; protected: ~LLVOSurfacePatch(); @@ -101,8 +101,8 @@ protected: LLFacePool *getPool(); S32 mBaseComp; LLSurfacePatch *mPatchp; - BOOL mDirtyTexture; - BOOL mDirtyTerrain; + bool mDirtyTexture; + bool mDirtyTerrain; S32 mLastNorthStride; S32 mLastEastStride; diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 15a82df3a2..4f79d3290c 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -330,7 +330,7 @@ U32 LLVOTree::processUpdateMessage(LLMessageSystem *mesgsys, // Load Species-Specific data // static const S32 MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 32 ; //frames. - mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mTreeImagep = LLViewerTextureManager::getFetchedTexture(sSpeciesTable[mSpecies]->mTextureID, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); mTreeImagep->setMaxVirtualSizeResetInterval(MAX_TREE_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); //allow to wait for at most 16 frames to reset virtual size. mBranchLength = sSpeciesTable[mSpecies]->mBranchLength; @@ -481,7 +481,7 @@ void LLVOTree::updateTextures() LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline) { pipeline->allocDrawable(this); - mDrawable->setLit(FALSE); + mDrawable->setLit(false); mDrawable->setRenderType(LLPipeline::RENDER_TYPE_TREE); @@ -501,7 +501,7 @@ LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline) const S32 LEAF_INDICES = 24; const S32 LEAF_VERTICES = 16; -BOOL LLVOTree::updateGeometry(LLDrawable *drawable) +bool LLVOTree::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED; @@ -513,7 +513,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) { facep->setVertexBuffer(NULL); } - return TRUE ; + return true ; } if (mDrawable->getFace(0) && @@ -530,7 +530,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) S32 lod; LLFace *face = drawable->getFace(0); - if (!face) return TRUE; + if (!face) return true; face->mCenterAgent = getPositionAgent(); face->mCenterLocal = face->mCenterAgent; @@ -553,7 +553,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) << max_vertices << " vertices and " << max_indices << " indices" << LL_ENDL; mReferenceBuffer = NULL; //unref - return TRUE; + return true; } LLStrider vertices; @@ -882,7 +882,7 @@ BOOL LLVOTree::updateGeometry(LLDrawable *drawable) //generate tree mesh updateMesh(); - return TRUE; + return true; } void LLVOTree::updateMesh() @@ -1182,13 +1182,13 @@ void LLVOTree::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) mDrawable->setPositionGroup(pos); } -BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32 *face_hitp, +bool LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { if (!lineSegmentBoundingBox(start, end)) { - return FALSE; + return false; } const LLVector4a* exta = mDrawable->getSpatialExtents(); @@ -1225,10 +1225,10 @@ BOOL LLVOTree::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& e { normal->load3(norm.mV); } - return TRUE; + return true; } - return FALSE; + return false; } U32 LLVOTree::getPartitionType() const @@ -1237,7 +1237,7 @@ U32 LLVOTree::getPartitionType() const } LLTreePartition::LLTreePartition(LLViewerRegion* regionp) -: LLSpatialPartition(0, FALSE, regionp) +: LLSpatialPartition(0, false, regionp) { mDrawableType = LLPipeline::RENDER_TYPE_TREE; mPartitionType = LLViewerRegion::PARTITION_TREE; diff --git a/indra/newview/llvotree.h b/indra/newview/llvotree.h index 8b1ae5c8de..f3d45cf8b7 100644 --- a/indra/newview/llvotree.h +++ b/indra/newview/llvotree.h @@ -66,7 +66,7 @@ public: /*virtual*/ void updateTextures(); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); - /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); + /*virtual*/ bool updateGeometry(LLDrawable *drawable); /*virtual*/ void updateSpatialExtents(LLVector4a &min, LLVector4a &max); virtual U32 getPartitionType() const; @@ -109,11 +109,11 @@ public: F32 branches, F32 alpha); - /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, + /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = TRUE, + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = true, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 45f019579c..3699608357 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -99,7 +99,7 @@ const F32 FORCE_SIMPLE_RENDER_AREA = 512.f; const F32 FORCE_CULL_AREA = 8.f; U32 JOINT_COUNT_REQUIRED_FOR_FULLRIG = 1; -BOOL gAnimateTextures = TRUE; +bool gAnimateTextures = true; F32 LLVOVolume::sLODFactor = 1.f; F32 LLVOVolume::sLODSlopDistanceFactor = 0.5f; //Changing this to zero, effectively disables the LOD transition slop @@ -110,7 +110,7 @@ S32 LLVOVolume::mRenderComplexity_current = 0; LLPointer LLVOVolume::sObjectMediaClient = NULL; LLPointer LLVOVolume::sObjectMediaNavigateClient = NULL; -extern BOOL gCubeSnapshot; +extern bool gCubeSnapshot; // NaCl - Graphics crasher protection static bool enableVolumeSAPProtection() @@ -232,18 +232,18 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re mRelativeXform.setIdentity(); mRelativeXformInvTrans.setIdentity(); - mFaceMappingChanged = FALSE; + mFaceMappingChanged = false; mLOD = MIN_LOD; mLODDistance = 0.0f; mLODAdjustedDistance = 0.0f; mLODRadius = 0.0f; mTextureAnimp = NULL; - mVolumeChanged = FALSE; + mVolumeChanged = false; mVObjRadius = LLVector3(1,1,0.5f).length(); mNumFaces = 0; - mLODChanged = FALSE; - mSculptChanged = FALSE; - mColorChanged = FALSE; + mLODChanged = false; + mSculptChanged = false; + mColorChanged = false; mSpotLightPriority = 0.f; mSkinInfoUnavaliable = false; @@ -430,7 +430,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, } gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; mTexAnimMode = 0; } } @@ -439,7 +439,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, LLVolumeParams volume_params; // Extend the bogus volume error handling to the other code path //LLVolumeMessage::unpackVolumeParams(&volume_params, mesgsys, _PREHASH_ObjectData, block_num); - BOOL res = LLVolumeMessage::unpackVolumeParams(&volume_params, mesgsys, _PREHASH_ObjectData, block_num); + bool res = LLVolumeMessage::unpackVolumeParams(&volume_params, mesgsys, _PREHASH_ObjectData, block_num); if (!res) { // Improved bad object handling courtesy of Drake. @@ -513,7 +513,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if (update_type != OUT_TERSE_IMPROVED) { LLVolumeParams volume_params; - BOOL res = LLVolumeMessage::unpackVolumeParams(&volume_params, *dp); + bool res = LLVolumeMessage::unpackVolumeParams(&volume_params, *dp); if (!res) { // Improved bad object handling courtesy of Drake. @@ -629,7 +629,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, } gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; mTexAnimMode = 0; } @@ -723,7 +723,7 @@ void LLVOVolume::animateTextures() { if (!mTexAnimMode) { - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; gPipeline.markTextured(mDrawable); } mTexAnimMode = result | mTextureAnimp->mMode; @@ -819,7 +819,7 @@ void LLVOVolume::animateTextures() } gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; mTexAnimMode = 0; } } @@ -832,11 +832,11 @@ void LLVOVolume::updateTextures() updateTextureVirtualSize(); } -BOOL LLVOVolume::isVisible() const +bool LLVOVolume::isVisible() const { if(mDrawable.notNull() && mDrawable->isVisible()) { - return TRUE ; + return true ; } if(isAttachment()) @@ -850,7 +850,7 @@ BOOL LLVOVolume::isVisible() const return objp && objp->mDrawable.notNull() && objp->mDrawable->isVisible() ; } - return FALSE ; + return false ; } void LLVOVolume::updateTextureVirtualSize(bool forced) @@ -982,7 +982,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) S32 lod = llmin(mLOD, 3); F32 lodf = ((F32)(lod + 1.0f)/4.f); F32 tex_size = lodf * LLViewerTexture::sMaxSculptRez ; - mSculptTexture->addTextureStats(2.f * tex_size * tex_size, FALSE); + mSculptTexture->addTextureStats(2.f * tex_size * tex_size, false); } S32 texture_discard = mSculptTexture->getCachedRawImageLevel(); //try to match the texture @@ -993,7 +993,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) current_discard < 0)) //no previous rebuild { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); - mSculptChanged = TRUE; + mSculptChanged = true; } if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SCULPTED)) @@ -1010,7 +1010,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) { LLLightImageParams* params = (LLLightImageParams*) getParameterEntry(LLNetworkData::PARAMS_LIGHT_IMAGE); LLUUID id = params->getLightTexture(); - mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE); + mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE); if (mLightTexture.notNull()) { F32 rad = getLightRadius(); @@ -1066,7 +1066,7 @@ void LLVOVolume::updateTextureVirtualSize(bool forced) } } -BOOL LLVOVolume::isActive() const +bool LLVOVolume::isActive() const { return !mStatic; } @@ -1084,7 +1084,7 @@ void LLVOVolume::setTexture(const S32 face) gGL.getTexUnit(0)->bind(getTEImage(face)); } -void LLVOVolume::setScale(const LLVector3 &scale, BOOL damped) +void LLVOVolume::setScale(const LLVector3 &scale, bool damped) { if (scale != getScale()) { @@ -1143,7 +1143,7 @@ LLDrawable *LLVOVolume::createDrawable(LLPipeline *pipeline) if (getIsLight()) { // Add it to the pipeline mLightSet - gPipeline.setLight(mDrawable, TRUE); + gPipeline.setLight(mDrawable, true); } if (isReflectionProbe()) @@ -1189,7 +1189,7 @@ bool LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo bool is_flexible = (volume_params.getPathParams().getCurveType() == LL_PCODE_PATH_FLEXIBLE); if (is_flexible) { - setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, TRUE, false); + setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, true, false); if (!mVolumeImpl) { LLFlexibleObjectData* data = (LLFlexibleObjectData*)getParameterEntry(LLNetworkData::PARAMS_FLEXIBLE); @@ -1199,7 +1199,7 @@ bool LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo else { // Mark the parameter not in use - setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, FALSE, false); + setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, false, false); if (mVolumeImpl) { delete mVolumeImpl; @@ -1207,14 +1207,14 @@ bool LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo if (mDrawable.notNull()) { // Undo the damage we did to this matrix - mDrawable->updateXform(FALSE); + mDrawable->updateXform(false); } } } if (is404) { - setIcon(LLViewerTextureManager::getFetchedTextureFromFile("icons/Inv_Mesh.png", FTT_LOCAL_FILE, TRUE, LLGLTexture::BOOST_UI)); + setIcon(LLViewerTextureManager::getFetchedTextureFromFile("icons/Inv_Mesh.png", FTT_LOCAL_FILE, true, LLGLTexture::BOOST_UI)); //render prim proxy when mesh loading attempts give up volume_params.setSculptID(LLUUID::null, LL_SCULPT_TYPE_NONE); @@ -1222,7 +1222,7 @@ bool LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo if ((LLPrimitive::setVolume(volume_params, lod, (mVolumeImpl && mVolumeImpl->isVolumeUnique()))) || mSculptChanged) { - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; if (mVolumeImpl) { @@ -1305,7 +1305,7 @@ void LLVOVolume::updateSculptTexture() LLUUID id = sculpt_params->getSculptTexture(); if (id.notNull()) { - mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + mSculptTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); } mSkinInfoUnavaliable = false; @@ -1346,7 +1346,7 @@ void LLVOVolume::updateVisualComplexity() void LLVOVolume::notifyMeshLoaded() { - mSculptChanged = TRUE; + mSculptChanged = true; gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY); if (!mSkinInfo && !mSkinInfoUnavaliable) @@ -1552,11 +1552,11 @@ std::string get_debug_object_lod_text(LLVOVolume *rootp) return result; } -BOOL LLVOVolume::calcLOD() +bool LLVOVolume::calcLOD() { if (mDrawable.isNull()) { - return FALSE; + return false; } S32 cur_detail = 0; @@ -1572,7 +1572,7 @@ BOOL LLVOVolume::calcLOD() // Not sure how this can really happen, but alas it does. Better exit here than crashing. if( !avatar || !avatar->mDrawable ) { - return FALSE; + return false; } distance = avatar->mDrawable->mDistanceWRTCamera; @@ -1600,7 +1600,7 @@ BOOL LLVOVolume::calcLOD() if (distance <= 0.f || radius <= 0.f) { LL_DEBUGS("DynamicBox","CalcLOD") << "avatar distance/radius uninitialized, skipping" << LL_ENDL; - return FALSE; + return false; } } else @@ -1610,7 +1610,7 @@ BOOL LLVOVolume::calcLOD() if (distance <= 0.f || radius <= 0.f) { LL_DEBUGS("DynamicBox","CalcLOD") << "non-avatar distance/radius uninitialized, skipping" << LL_ENDL; - return FALSE; + return false; } } @@ -1707,10 +1707,10 @@ BOOL LLVOVolume::calcLOD() mAppAngle = ll_round((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f); mLOD = cur_detail; - return TRUE; + return true; } - return FALSE; + return false; } // FIRE-21445 @@ -1762,12 +1762,12 @@ bool LLVOVolume::updateLOD() return lod_changed; } -BOOL LLVOVolume::setDrawableParent(LLDrawable* parentp) +bool LLVOVolume::setDrawableParent(LLDrawable* parentp) { if (!LLViewerObject::setDrawableParent(parentp)) { // no change in drawable parent - return FALSE; + return false; } if (!mDrawable->isRoot()) @@ -1785,7 +1785,7 @@ BOOL LLVOVolume::setDrawableParent(LLDrawable* parentp) } } - return TRUE; + return true; } void LLVOVolume::updateFaceFlags() @@ -1801,7 +1801,7 @@ void LLVOVolume::updateFaceFlags() LLFace *face = mDrawable->getFace(i); if (face) { - BOOL fullbright = getTEref(i).getFullbright(); + bool fullbright = getTEref(i).getFullbright(); face->clearState(LLFace::FULLBRIGHT | LLFace::HUD_RENDER | LLFace::LIGHT); if (fullbright || (mMaterial == LL_MCODE_LIGHT)) @@ -1820,9 +1820,9 @@ void LLVOVolume::updateFaceFlags() } } -BOOL LLVOVolume::setParent(LLViewerObject* parent) +bool LLVOVolume::setParent(LLViewerObject* parent) { - BOOL ret = FALSE ; + bool ret = false ; LLViewerObject *old_parent = (LLViewerObject*) getParent(); if (parent != old_parent) { @@ -1843,7 +1843,7 @@ void LLVOVolume::regenFaces() { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; // remove existing faces - BOOL count_changed = mNumFaces != getNumTEs(); + bool count_changed = mNumFaces != getNumTEs(); if (count_changed) { @@ -1887,17 +1887,17 @@ void LLVOVolume::regenFaces() } } -BOOL LLVOVolume::genBBoxes(BOOL force_global, BOOL should_update_octree_bounds) +bool LLVOVolume::genBBoxes(bool force_global, bool should_update_octree_bounds) { LL_PROFILE_ZONE_SCOPED; - BOOL res = TRUE; + bool res = true; LLVector4a min, max; min.clear(); max.clear(); - BOOL rebuild = mDrawable->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED); + bool rebuild = mDrawable->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED); if (getRiggedVolume()) { @@ -1938,7 +1938,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global, BOOL should_update_octree_bounds) continue; } - BOOL face_res = face->genVolumeBBoxes(*volume, i, + bool face_res = face->genVolumeBBoxes(*volume, i, mRelativeXform, (mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global); res &= face_res; // note that this result is never used @@ -2132,7 +2132,7 @@ void LLVOVolume::updateRelativeXform(bool force_identity) } } -bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL &should_update_octree_bounds) +bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, bool &compiled, bool &should_update_octree_bounds) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; bool regen_faces = false; @@ -2163,7 +2163,7 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL & updateVisualComplexity(); } - compiled = TRUE; + compiled = true; // new_lod > old_lod breaks a feedback loop between LOD updates and // bounding box updates. should_update_octree_bounds = should_update_octree_bounds || mSculptChanged || new_lod > old_lod; @@ -2199,20 +2199,20 @@ bool LLVOVolume::lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL & return regen_faces; } -BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) +bool LLVOVolume::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; if (mDrawable->isState(LLDrawable::REBUILD_RIGGED)) { updateRiggedVolume(false); - genBBoxes(FALSE); + genBBoxes(false); mDrawable->clearState(LLDrawable::REBUILD_RIGGED); } if (mVolumeImpl != NULL) { - BOOL res; + bool res; { res = mVolumeImpl->doUpdateGeometry(drawable); } @@ -2236,13 +2236,13 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) if (mDrawable.isNull()) // Not sure why this is happening, but it is... { - return TRUE; // No update to complete + return true; // No update to complete } - BOOL compiled = FALSE; + bool compiled = false; // This should be true in most cases, unless we're sure no octree update is // needed. - BOOL should_update_octree_bounds = bool(getRiggedVolume()) || mDrawable->isState(LLDrawable::REBUILD_POSITION) || !mDrawable->getSpatialExtents()->isFinite3(); + bool should_update_octree_bounds = bool(getRiggedVolume()) || mDrawable->isState(LLDrawable::REBUILD_POSITION) || !mDrawable->getSpatialExtents()->isFinite3(); if (mVolumeChanged || mFaceMappingChanged) { @@ -2258,7 +2258,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) } else if (mSculptChanged || mLODChanged || mColorChanged) { - compiled = TRUE; + compiled = true; was_regen_faces = lodOrSculptChanged(drawable, compiled, should_update_octree_bounds); } @@ -2269,7 +2269,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) else if (mLODChanged || mSculptChanged || mColorChanged) { dirtySpatialGroup(); - compiled = TRUE; + compiled = true; lodOrSculptChanged(drawable, compiled, should_update_octree_bounds); if(drawable->isState(LLDrawable::REBUILD_RIGGED | LLDrawable::RIGGED)) @@ -2280,7 +2280,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) // it has its own drawable (it's moved) or it has changed UVs or it has changed xforms from global<->local else { - compiled = TRUE; + compiled = true; // All it did was move or we changed the texture coordinate offset } @@ -2293,7 +2293,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) // Generate bounding boxes if needed, and update the object's size in the // octree - genBBoxes(FALSE, should_update_octree_bounds); + genBBoxes(false, should_update_octree_bounds); // Update face flags updateFaceFlags(); @@ -2303,11 +2303,11 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) LLPipeline::sCompiles++; } - mVolumeChanged = FALSE; - mLODChanged = FALSE; - mSculptChanged = FALSE; - mFaceMappingChanged = FALSE; - mColorChanged = FALSE; + mVolumeChanged = false; + mLODChanged = false; + mSculptChanged = false; + mFaceMappingChanged = false; + mColorChanged = false; return LLViewerObject::updateGeometry(drawable); } @@ -2363,7 +2363,7 @@ void LLVOVolume::setNumTEs(const U8 num_tes) setTE(i, te) ; mMediaImplList[i] = mMediaImplList[old_num_tes -1] ; } - mMediaImplList[old_num_tes -1]->setUpdated(TRUE) ; + mMediaImplList[old_num_tes -1]->setUpdated(true) ; } } else if(old_num_tes > num_tes && mMediaImplList.size() > num_tes) //old faces removed @@ -2389,23 +2389,23 @@ void LLVOVolume::setNumTEs(const U8 num_tes) //virtual void LLVOVolume::changeTEImage(S32 index, LLViewerTexture* imagep) { - BOOL changed = (mTEImages[index] != imagep); + bool changed = (mTEImages[index] != imagep); LLViewerObject::changeTEImage(index, imagep); if (changed) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } } void LLVOVolume::setTEImage(const U8 te, LLViewerTexture *imagep) { - BOOL changed = (mTEImages[te] != imagep); + bool changed = (mTEImages[te] != imagep); LLViewerObject::setTEImage(te, imagep); if (changed) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } } @@ -2420,7 +2420,7 @@ S32 LLVOVolume::setTETexture(const U8 te, const LLUUID &uuid) shrinkWrap(); gPipeline.markTextured(mDrawable); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2445,14 +2445,14 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color) { gPipeline.markTextured(mDrawable); //treat this alpha change as an LoD update since render batches may need to get rebuilt - mLODChanged = TRUE; + mLODChanged = true; gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME); } retval = LLPrimitive::setTEColor(te, color); if (mDrawable.notNull() && retval) { // These should only happen on updates which are not the initial update. - mColorChanged = TRUE; + mColorChanged = true; mDrawable->setState(LLDrawable::REBUILD_COLOR); shrinkWrap(); dirtyMesh(); @@ -2468,7 +2468,7 @@ S32 LLVOVolume::setTEBumpmap(const U8 te, const U8 bumpmap) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2479,7 +2479,7 @@ S32 LLVOVolume::setTETexGen(const U8 te, const U8 texgen) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2490,7 +2490,7 @@ S32 LLVOVolume::setTEMediaTexGen(const U8 te, const U8 media) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2501,7 +2501,7 @@ S32 LLVOVolume::setTEShiny(const U8 te, const U8 shiny) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2512,7 +2512,7 @@ S32 LLVOVolume::setTEFullbright(const U8 te, const U8 fullbright) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2523,7 +2523,7 @@ S32 LLVOVolume::setTEBumpShinyFullbright(const U8 te, const U8 bump) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2534,7 +2534,7 @@ S32 LLVOVolume::setTEMediaFlags(const U8 te, const U8 media_flags) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2549,7 +2549,7 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow) gPipeline.markTextured(mDrawable); shrinkWrap(); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2589,7 +2589,7 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) gPipeline.markTextured(mDrawable); gPipeline.markRebuild(mDrawable,LLDrawable::REBUILD_ALL); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2607,7 +2607,7 @@ S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialPa gPipeline.markTextured(mDrawable); gPipeline.markRebuild(mDrawable,LLDrawable::REBUILD_ALL); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; return TEM_CHANGE_TEXTURE; } @@ -2622,7 +2622,7 @@ S32 LLVOVolume::setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* mat) gPipeline.markTextured(mDrawable); gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return retval; @@ -2635,7 +2635,7 @@ S32 LLVOVolume::setTEScale(const U8 te, const F32 s, const F32 t) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2646,7 +2646,7 @@ S32 LLVOVolume::setTEScaleS(const U8 te, const F32 s) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -2657,7 +2657,7 @@ S32 LLVOVolume::setTEScaleT(const U8 te, const F32 t) if (res) { gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } return res; } @@ -3116,7 +3116,7 @@ void LLVOVolume::addMediaImpl(LLViewerMediaImpl* media_impl, S32 texture_index) } else //the face is not available now, start media on this face later. { - media_impl->setUpdated(TRUE) ; + media_impl->setUpdated(true) ; } } return ; @@ -3181,7 +3181,7 @@ void LLVOVolume::setLightTextureID(LLUUID id) { if (!hasLightTexture()) { - setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, TRUE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, true, true); } else if (old_texturep) { @@ -3209,7 +3209,7 @@ void LLVOVolume::setLightTextureID(LLUUID id) { old_texturep->removeVolume(LLRender::LIGHT_TEX, this); } - setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, FALSE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE, false, true); parameterChanged(LLNetworkData::PARAMS_LIGHT_IMAGE, true); mLightTexture = NULL; } @@ -3225,29 +3225,29 @@ void LLVOVolume::setSpotLightParams(LLVector3 params) } } -void LLVOVolume::setIsLight(BOOL is_light) +void LLVOVolume::setIsLight(bool is_light) { - BOOL was_light = getIsLight(); + bool was_light = getIsLight(); if (is_light != was_light) { if (is_light) { - setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, TRUE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, true, true); } else { - setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, FALSE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_LIGHT, false, true); } if (is_light) { // Add it to the pipeline mLightSet - gPipeline.setLight(mDrawable, TRUE); + gPipeline.setLight(mDrawable, true); } else { // Not a light. Remove it from the pipeline's light set. - gPipeline.setLight(mDrawable, FALSE); + gPipeline.setLight(mDrawable, false); } } } @@ -3267,7 +3267,7 @@ void LLVOVolume::setLightLinearColor(const LLColor3& color) param_block->setLinearColor(LLColor4(color, param_block->getLinearColor().mV[3])); parameterChanged(LLNetworkData::PARAMS_LIGHT, true); gPipeline.markTextured(mDrawable); - mFaceMappingChanged = TRUE; + mFaceMappingChanged = true; } } } @@ -3326,7 +3326,7 @@ void LLVOVolume::setLightCutoff(F32 cutoff) //---------------------------------------------------------------------------- -BOOL LLVOVolume::getIsLight() const +bool LLVOVolume::getIsLight() const { mIsLight = getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT); return mIsLight; @@ -3454,7 +3454,7 @@ LLViewerTexture* LLVOVolume::getLightTexture() { if (mLightTexture.isNull() || id != mLightTexture->getID()) { - mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE); + mLightTexture = LLViewerTextureManager::getFetchedTexture(id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE); } } else @@ -3517,23 +3517,23 @@ F32 LLVOVolume::getLightCutoff() const } } -BOOL LLVOVolume::isReflectionProbe() const +bool LLVOVolume::isReflectionProbe() const { return getParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE); } -bool LLVOVolume::setIsReflectionProbe(BOOL is_probe) +bool LLVOVolume::setIsReflectionProbe(bool is_probe) { - BOOL was_probe = isReflectionProbe(); + bool was_probe = isReflectionProbe(); if (is_probe != was_probe) { if (is_probe) { - setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, TRUE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, true, true); } else { - setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, FALSE, true); + setParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE, false, true); } } @@ -3664,7 +3664,7 @@ U32 LLVOVolume::getVolumeInterfaceID() const return 0; } -BOOL LLVOVolume::isFlexible() const +bool LLVOVolume::isFlexible() const { if (getParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE)) { @@ -3675,25 +3675,25 @@ BOOL LLVOVolume::isFlexible() const U8 profile_and_hole = volume_params.getProfileParams().getCurveType(); volume_params.setType(profile_and_hole, LL_PCODE_PATH_FLEXIBLE); } - return TRUE; + return true; } else { - return FALSE; + return false; } } -BOOL LLVOVolume::isSculpted() const +bool LLVOVolume::isSculpted() const { if (getParameterEntryInUse(LLNetworkData::PARAMS_SCULPT)) { - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLVOVolume::isMesh() const +bool LLVOVolume::isMesh() const { if (isSculpted()) { @@ -3703,21 +3703,21 @@ BOOL LLVOVolume::isMesh() const if ((sculpt_type & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH) // mesh is a mesh { - return TRUE; + return true; } } - return FALSE; + return false; } -BOOL LLVOVolume::hasLightTexture() const +bool LLVOVolume::hasLightTexture() const { if (getParameterEntryInUse(LLNetworkData::PARAMS_LIGHT_IMAGE)) { - return TRUE; + return true; } - return FALSE; + return false; } bool LLVOVolume::isFlexibleFast() const @@ -3745,30 +3745,30 @@ bool LLVOVolume::isAnimatedObjectFast() const return mIsAnimatedObject; } -BOOL LLVOVolume::isVolumeGlobal() const +bool LLVOVolume::isVolumeGlobal() const { if (mVolumeImpl) { - return mVolumeImpl->isVolumeGlobal() ? TRUE : FALSE; + return mVolumeImpl->isVolumeGlobal() ? true : false; } else if (mRiggedVolume.notNull()) { - return TRUE; + return true; } - return FALSE; + return false; } -BOOL LLVOVolume::canBeFlexible() const +bool LLVOVolume::canBeFlexible() const { U8 path = getVolume()->getParams().getPathParams().getCurveType(); return (path == LL_PCODE_PATH_FLEXIBLE || path == LL_PCODE_PATH_LINE); } -BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) +bool LLVOVolume::setIsFlexible(bool is_flexible) { - BOOL res = FALSE; - BOOL was_flexible = isFlexible(); + bool res = false; + bool was_flexible = isFlexible(); LLVolumeParams volume_params; if (is_flexible) { @@ -3777,10 +3777,10 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) volume_params = getVolume()->getParams(); U8 profile_and_hole = volume_params.getProfileParams().getCurveType(); volume_params.setType(profile_and_hole, LL_PCODE_PATH_FLEXIBLE); - res = TRUE; - setFlags(FLAGS_USE_PHYSICS, FALSE); - setFlags(FLAGS_PHANTOM, TRUE); - setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, TRUE, true); + res = true; + setFlags(FLAGS_USE_PHYSICS, false); + setFlags(FLAGS_PHANTOM, true); + setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, true, true); if (mDrawable) { mDrawable->makeActive(); @@ -3794,9 +3794,9 @@ BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) volume_params = getVolume()->getParams(); U8 profile_and_hole = volume_params.getProfileParams().getCurveType(); volume_params.setType(profile_and_hole, LL_PCODE_PATH_LINE); - res = TRUE; - setFlags(FLAGS_PHANTOM, FALSE); - setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, FALSE, true); + res = true; + setFlags(FLAGS_PHANTOM, false); + setParameterEntryInUse(LLNetworkData::PARAMS_FLEXIBLE, false, true); } } if (res) @@ -3823,7 +3823,7 @@ const LLMeshSkinInfo* LLVOVolume::getSkinInfo() const } // virtual -BOOL LLVOVolume::isRiggedMesh() const +bool LLVOVolume::isRiggedMesh() const { return isMesh() && getSkinInfo(); } @@ -4042,7 +4042,7 @@ void LLVOVolume::generateSilhouette(LLSelectNode* nodep, const LLVector3& view_p volume->generateSilhouetteVertices(nodep->mSilhouetteVertices, nodep->mSilhouetteNormals, view_vector, trans_mat, mRelativeXformInvTrans, nodep->getTESelectMask()); - nodep->mSilhouetteExists = TRUE; + nodep->mSilhouetteExists = true; } } @@ -4069,12 +4069,12 @@ void LLVOVolume::updateRadius() } -BOOL LLVOVolume::isAttachment() const +bool LLVOVolume::isAttachment() const { return mAttachmentState != 0 ; } -BOOL LLVOVolume::isHUDAttachment() const +bool LLVOVolume::isHUDAttachment() const { // *NOTE: we assume hud attachment points are in defined range // since this range is constant for backwards compatibility @@ -4575,7 +4575,7 @@ void LLVOVolume::parameterChanged(U16 param_type, bool local_origin) LLViewerObject::parameterChanged(param_type, local_origin); } -void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin) +void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin) { LLViewerObject::parameterChanged(param_type, data, in_use, local_origin); if (mVolumeImpl) @@ -4599,7 +4599,7 @@ void LLVOVolume::parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_u } if (mDrawable.notNull()) { - BOOL is_light = getIsLight(); + bool is_light = getIsLight(); if (is_light != mDrawable->isState(LLDrawable::LIGHT)) { gPipeline.setLight(mDrawable, is_light); @@ -4624,7 +4624,7 @@ void LLVOVolume::updateReflectionProbePtr() } } -void LLVOVolume::setSelected(BOOL sel) +void LLVOVolume::setSelected(bool sel) { LLViewerObject::setSelected(sel); if (isAnimatedObject()) @@ -4660,7 +4660,7 @@ F32 LLVOVolume::getBinRadius() //const LLVector4a* ext = mDrawable->getSpatialExtents(); bool shrink_wrap = mShouldShrinkWrap || mDrawable->isAnimating(); - bool alpha_wrap = FALSE; + bool alpha_wrap = false; if (!isHUDAttachment() && mDrawable->mDistanceWRTCamera < alpha_distance_factor[2]) { @@ -4671,14 +4671,14 @@ F32 LLVOVolume::getBinRadius() if (face->isInAlphaPool() && !face->canRenderAsMask()) { - alpha_wrap = TRUE; + alpha_wrap = true; break; } } } else { - shrink_wrap = FALSE; + shrink_wrap = false; } if (alpha_wrap) @@ -4740,7 +4740,7 @@ void LLVOVolume::markForUpdate() } LLViewerObject::markForUpdate(); - mVolumeChanged = TRUE; + mVolumeChanged = true; } LLVector3 LLVOVolume::agentPositionToVolume(const LLVector3& pos) const @@ -4794,25 +4794,25 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const } -BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, BOOL pick_rigged, BOOL pick_unselectable, S32 *face_hitp, +bool LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, bool pick_transparent, bool pick_rigged, bool pick_unselectable, S32 *face_hitp, LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent) { if (!mbCanSelect || mDrawable->isDead() || !gPipeline.hasRenderType(mDrawable->getRenderType())) { - return FALSE; + return false; } if (!pick_unselectable) { - if (!LLSelectMgr::instance().canSelectObject(this, TRUE)) + if (!LLSelectMgr::instance().canSelectObject(this, true)) { - return FALSE; + return false; } } - BOOL ret = FALSE; + bool ret = false; LLVolume* volume = getVolume(); @@ -4828,7 +4828,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& } else { //cannot pick rigged attachments on other avatars or when not in build mode - return FALSE; + return false; } } @@ -4931,8 +4931,8 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& } } - BOOL no_texture = !face->getTexture() || !face->getTexture()->hasGLTexture(); - BOOL mask = no_texture ? FALSE : face->getTexture()->getMask(face->surfaceToTexture(tc, p, n)); + bool no_texture = !face->getTexture() || !face->getTexture()->hasGLTexture(); + bool mask = no_texture ? false : face->getTexture()->getMask(face->surfaceToTexture(tc, p, n)); if (face && (ignore_alpha || pick_transparent || no_texture || mask)) { @@ -4997,7 +4997,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& *tex_coord = tc; } - ret = TRUE; + ret = true; } } } @@ -5270,21 +5270,21 @@ U32 LLVOVolume::getPartitionType() const } LLVolumePartition::LLVolumePartition(LLViewerRegion* regionp) -: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, TRUE, regionp), +: LLSpatialPartition(LLVOVolume::VERTEX_DATA_MASK, true, regionp), LLVolumeGeometryManager() { mLODPeriod = 32; - mDepthMask = FALSE; + mDepthMask = false; mDrawableType = LLPipeline::RENDER_TYPE_VOLUME; mPartitionType = LLViewerRegion::PARTITION_VOLUME; mSlopRatio = 0.25f; } LLVolumeBridge::LLVolumeBridge(LLDrawable* drawablep, LLViewerRegion* regionp) -: LLSpatialBridge(drawablep, TRUE, LLVOVolume::VERTEX_DATA_MASK, regionp), +: LLSpatialBridge(drawablep, true, LLVOVolume::VERTEX_DATA_MASK, regionp), LLVolumeGeometryManager() { - mDepthMask = FALSE; + mDepthMask = false; mLODPeriod = 32; mDrawableType = LLPipeline::RENDER_TYPE_VOLUME; mPartitionType = LLViewerRegion::PARTITION_BRIDGE; @@ -5556,7 +5556,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, if (mat) { - BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (facep->getTextureEntry()->getColor().mV[3] < 0.999f) ? TRUE : FALSE; + bool is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (facep->getTextureEntry()->getColor().mV[3] < 0.999f) ? true : false; if (type == LLRenderPass::PASS_ALPHA) { shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha); @@ -6051,7 +6051,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } } - BOOL force_simple = (facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA); + bool force_simple = (facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA); U32 type = gPipeline.getPoolTypeFromTE(te, tex); if (is_pbr && gltf_mat && gltf_mat->mAlphaMode != LLGLTFMaterial::ALPHA_MODE_BLEND) { @@ -6245,7 +6245,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) pbr_mask = pbr_mask | LLVertexBuffer::MAP_EMISSIVE; } - BOOL batch_textures = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 1; + bool batch_textures = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT) > 1; // add extra vertex data for deferred rendering (not necessarily for batching textures) if (batch_textures) @@ -6262,22 +6262,22 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) // generate render batches for static geometry U32 extra_mask = LLVertexBuffer::MAP_TEXTURE_INDEX; - BOOL alpha_sort = TRUE; - BOOL rigged = FALSE; + bool alpha_sort = true; + bool rigged = false; for (int i = 0; i < 2; ++i) //two sets, static and rigged) { - geometryBytes += genDrawInfo(group, simple_mask | extra_mask, sSimpleFaces[i], simple_count[i], FALSE, batch_textures, rigged); - geometryBytes += genDrawInfo(group, fullbright_mask | extra_mask, sFullbrightFaces[i], fullbright_count[i], FALSE, batch_textures, rigged); + geometryBytes += genDrawInfo(group, simple_mask | extra_mask, sSimpleFaces[i], simple_count[i], false, batch_textures, rigged); + geometryBytes += genDrawInfo(group, fullbright_mask | extra_mask, sFullbrightFaces[i], fullbright_count[i], false, batch_textures, rigged); geometryBytes += genDrawInfo(group, alpha_mask | extra_mask, sAlphaFaces[i], alpha_count[i], alpha_sort, batch_textures, rigged); - geometryBytes += genDrawInfo(group, bump_mask | extra_mask, sBumpFaces[i], bump_count[i], FALSE, FALSE, rigged); - geometryBytes += genDrawInfo(group, norm_mask | extra_mask, sNormFaces[i], norm_count[i], FALSE, FALSE, rigged); - geometryBytes += genDrawInfo(group, spec_mask | extra_mask, sSpecFaces[i], spec_count[i], FALSE, FALSE, rigged); - geometryBytes += genDrawInfo(group, normspec_mask | extra_mask, sNormSpecFaces[i], normspec_count[i], FALSE, FALSE, rigged); - geometryBytes += genDrawInfo(group, pbr_mask | extra_mask, sPbrFaces[i], pbr_count[i], FALSE, FALSE, rigged); + geometryBytes += genDrawInfo(group, bump_mask | extra_mask, sBumpFaces[i], bump_count[i], false, false, rigged); + geometryBytes += genDrawInfo(group, norm_mask | extra_mask, sNormFaces[i], norm_count[i], false, false, rigged); + geometryBytes += genDrawInfo(group, spec_mask | extra_mask, sSpecFaces[i], spec_count[i], false, false, rigged); + geometryBytes += genDrawInfo(group, normspec_mask | extra_mask, sNormSpecFaces[i], normspec_count[i], false, false, rigged); + geometryBytes += genDrawInfo(group, pbr_mask | extra_mask, sPbrFaces[i], pbr_count[i], false, false, rigged); // for rigged set, add weights and disable alpha sorting (rigged items use depth buffer) extra_mask |= LLVertexBuffer::MAP_WEIGHT4; - rigged = TRUE; + rigged = true; } group->mGeometryBytes = geometryBytes; @@ -6448,7 +6448,7 @@ struct CompareBatchBreakerRigged } }; -U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, BOOL distance_sort, BOOL batch_textures, BOOL rigged) +U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace** faces, U32 face_count, bool distance_sort, bool batch_textures, bool rigged) { LL_PROFILE_ZONE_SCOPED_CATEGORY_VOLUME; @@ -6744,11 +6744,11 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace //append face to appropriate render batch - BOOL force_simple = facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA; - BOOL fullbright = facep->isState(LLFace::FULLBRIGHT); + bool force_simple = facep->getPixelArea() < FORCE_SIMPLE_RENDER_AREA; + bool fullbright = facep->isState(LLFace::FULLBRIGHT); if ((mask & LLVertexBuffer::MAP_NORMAL) == 0) { //paranoia check to make sure GL doesn't try to read non-existant normals - fullbright = TRUE; + fullbright = true; } const LLTextureEntry* te = facep->getTextureEntry(); @@ -6756,12 +6756,12 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace if (hud_group && gltf_mat == nullptr) { //all hud attachments are fullbright - fullbright = TRUE; + fullbright = true; } tex = facep->getTexture(); - BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? TRUE : FALSE; + bool is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? true : false; LLMaterial* mat = nullptr; bool can_be_shiny = false; @@ -6787,7 +6787,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace if (!gltf_mat) { - is_alpha = (is_alpha || blinn_phong_transparent) ? TRUE : FALSE; + is_alpha = (is_alpha || blinn_phong_transparent) ? true : false; } if (gltf_mat || (mat && !hud_group)) diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 368f7d11c0..ed26cfdbfb 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -87,11 +87,11 @@ public: virtual ~LLVolumeInterface() { } virtual LLVolumeInterfaceType getInterfaceType() const = 0; virtual void doIdleUpdate() = 0; - virtual BOOL doUpdateGeometry(LLDrawable *drawable) = 0; + virtual bool doUpdateGeometry(LLDrawable *drawable) = 0; virtual LLVector3 getPivotPosition() const = 0; virtual void onSetVolume(const LLVolumeParams &volume_params, const S32 detail) = 0; - virtual void onSetScale(const LLVector3 &scale, BOOL damped) = 0; - virtual void onParameterChanged(U16 param_type, LLNetworkData *data, BOOL in_use, bool local_origin) = 0; + virtual void onSetScale(const LLVector3 &scale, bool damped) = 0; + virtual void onParameterChanged(U16 param_type, LLNetworkData *data, bool in_use, bool local_origin) = 0; virtual void onShift(const LLVector4a &shift_vector) = 0; virtual bool isVolumeUnique() const = 0; // Do we need a unique LLVolume instance? virtual bool isVolumeGlobal() const = 0; // Are we in global space? @@ -133,16 +133,16 @@ public: void animateTextures(); - BOOL isVisible() const ; - BOOL isActive() const override; - BOOL isAttachment() const override; + 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 isHUDAttachment() const override; + bool isHUDAttachment() const override; void generateSilhouette(LLSelectNode* nodep, const LLVector3& view_point); - /*virtual*/ BOOL setParent(LLViewerObject* parent) override; + /*virtual*/ bool setParent(LLViewerObject* parent) override; S32 getLOD() const override { return mLOD; } - void setNoLOD() { mLOD = NO_LOD; mLODChanged = TRUE; } + void setNoLOD() { mLOD = NO_LOD; mLODChanged = true; } bool isNoLOD() const { return NO_LOD == mLOD; } const LLVector3 getPivotPositionAgent() const override; const LLMatrix4& getRelativeXform() const { return mRelativeXform; } @@ -161,11 +161,11 @@ public: // Mesh Info in object panel /*virtual*/ U32 getLODTriangleCount(S32 lod); // - /*virtual*/ BOOL lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, + /*virtual*/ bool lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face = -1, // which face to check, -1 = ALL_SIDES - BOOL pick_transparent = FALSE, - BOOL pick_rigged = FALSE, - BOOL pick_unselectable = TRUE, + bool pick_transparent = false, + bool pick_rigged = false, + bool pick_unselectable = true, S32* face_hit = NULL, // which face was hit LLVector4a* intersection = NULL, // return the intersection point LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point @@ -179,18 +179,18 @@ public: LLVector3 volumeDirectionToAgent(const LLVector3& dir) const; - BOOL getVolumeChanged() const { return mVolumeChanged; } + bool getVolumeChanged() const { return mVolumeChanged; } F32 getVObjRadius() const override { return mVObjRadius; }; const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const override; void markForUpdate() override; - void faceMappingChanged() override { mFaceMappingChanged=TRUE; } + void faceMappingChanged() override { mFaceMappingChanged=true; } /*virtual*/ void onShift(const LLVector4a &shift_vector) override; // Called when the drawable shifts /*virtual*/ void parameterChanged(U16 param_type, bool local_origin) override; - /*virtual*/ void parameterChanged(U16 param_type, LLNetworkData* data, BOOL in_use, bool local_origin) override; + /*virtual*/ void parameterChanged(U16 param_type, LLNetworkData* data, bool in_use, bool local_origin) override; // update mReflectionProbe based on isReflectionProbe() void updateReflectionProbePtr(); @@ -200,10 +200,10 @@ public: U32 block_num, const EObjectUpdateType update_type, LLDataPacker *dp) override; - /*virtual*/ void setSelected(BOOL sel) override; - /*virtual*/ BOOL setDrawableParent(LLDrawable* parentp) override; + /*virtual*/ void setSelected(bool sel) override; + /*virtual*/ bool setDrawableParent(LLDrawable* parentp) override; - /*virtual*/ void setScale(const LLVector3 &scale, BOOL damped) override; + /*virtual*/ void setScale(const LLVector3 &scale, bool damped) override; /*virtual*/ void changeTEImage(S32 index, LLViewerTexture* new_image) override; /*virtual*/ void setNumTEs(const U8 num_tes) override; @@ -241,7 +241,7 @@ public: void* user_data, S32 status, LLExtStat ext_status); void updateRelativeXform(bool force_identity = false); - /*virtual*/ BOOL updateGeometry(LLDrawable *drawable) override; + /*virtual*/ bool updateGeometry(LLDrawable *drawable) override; /*virtual*/ void updateFaceSize(S32 idx) override; /*virtual*/ bool updateLOD() override; void updateRadius() override; @@ -250,7 +250,7 @@ public: void updateFaceFlags(); void regenFaces(); - BOOL genBBoxes(BOOL force_global, BOOL should_update_octree_bounds = TRUE); + bool genBBoxes(bool force_global, bool should_update_octree_bounds = true); void preRebuild(); virtual void updateSpatialExtents(LLVector4a& min, LLVector4a& max) override; virtual F32 getBinRadius() override; @@ -258,7 +258,7 @@ public: virtual U32 getPartitionType() const override; // For Lights - void setIsLight(BOOL is_light); + void setIsLight(bool is_light); //set the gamma-corrected (sRGB) color of this light void setLightSRGBColor(const LLColor3& color); //set the linear color of this light @@ -271,7 +271,7 @@ public: void setLightTextureID(LLUUID id); void setSpotLightParams(LLVector3 params); - BOOL getIsLight() const; + bool getIsLight() const; bool getIsLightFast() const; @@ -301,13 +301,13 @@ public: F32 getLightCutoff() const; // Reflection Probes - bool setIsReflectionProbe(BOOL is_probe); + bool setIsReflectionProbe(bool is_probe); bool setReflectionProbeAmbiance(F32 ambiance); bool setReflectionProbeNearClip(F32 near_clip); bool setReflectionProbeIsBox(bool is_box); bool setReflectionProbeIsDynamic(bool is_dynamic); - BOOL isReflectionProbe() const override; + bool isReflectionProbe() const override; F32 getReflectionProbeAmbiance() const; F32 getReflectionProbeNearClip() const; bool getReflectionProbeIsBox() const; @@ -315,11 +315,11 @@ public: // Flexible Objects U32 getVolumeInterfaceID() const; - virtual BOOL isFlexible() const override; - virtual BOOL isSculpted() const override; - virtual BOOL isMesh() const override; - virtual BOOL isRiggedMesh() const override; - virtual BOOL hasLightTexture() const override; + virtual bool isFlexible() const override; + virtual bool isSculpted() const override; + virtual bool isMesh() const override; + virtual bool isRiggedMesh() const override; + virtual bool hasLightTexture() const override; // fast variants above that use state that is filled in later // not reliable early in the life of an object, but should be used after @@ -330,9 +330,9 @@ public: bool isRiggedMeshFast() const; bool isAnimatedObjectFast() const; - BOOL isVolumeGlobal() const; - BOOL canBeFlexible() const; - BOOL setIsFlexible(BOOL is_flexible); + bool isVolumeGlobal() const; + bool canBeFlexible() const; + bool setIsFlexible(bool is_flexible); const LLMeshSkinInfo* getSkinInfo() const; const bool isSkinInfoUnavaliable() const { return mSkinInfoUnavaliable; } @@ -427,7 +427,7 @@ public: protected: S32 computeLODDetail(F32 distance, F32 radius, F32 lod_factor); - BOOL calcLOD(); + bool calcLOD(); LLFace* addFace(S32 face_index); // stats tracking for render complexity @@ -441,7 +441,7 @@ protected: void removeMediaImpl(S32 texture_index) ; private: - bool lodOrSculptChanged(LLDrawable *drawable, BOOL &compiled, BOOL &shouldUpdateOctreeBounds); + bool lodOrSculptChanged(LLDrawable *drawable, bool &compiled, bool &shouldUpdateOctreeBounds); public: @@ -462,16 +462,16 @@ private: friend class LLDrawable; friend class LLFace; - BOOL mFaceMappingChanged; + bool mFaceMappingChanged; LLFrameTimer mTextureUpdateTimer; S32 mLOD; - BOOL mLODChanged; - BOOL mSculptChanged; - BOOL mColorChanged; + bool mLODChanged; + bool mSculptChanged; + bool mColorChanged; F32 mSpotLightPriority; LLMatrix4 mRelativeXform; LLMatrix3 mRelativeXformInvTrans; - BOOL mVolumeChanged; + bool mVolumeChanged; F32 mVObjRadius; LLVolumeInterface *mVolumeImpl; LLPointer mSculptTexture; diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index c268cce69c..6ef14b838a 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -56,14 +56,14 @@ LLVOWater::LLVOWater(const LLUUID &id, mRenderType(LLPipeline::RENDER_TYPE_WATER) { // Terrain must draw during selection passes so it can block objects behind it. - mbCanSelect = FALSE; + mbCanSelect = false; // Aurora Sim //setScale(LLVector3(256.f, 256.f, 0.f)); // Hack for setting scale for bounding boxes/visibility. setScale(LLVector3(mRegionp->getWidth(), mRegionp->getWidth(), 0.f)); // Aurora Sim - mUseTexture = TRUE; - mIsEdgePatch = FALSE; + mUseTexture = true; + mIsEdgePatch = false; } @@ -73,9 +73,9 @@ void LLVOWater::markDead() } -BOOL LLVOWater::isActive() const +bool LLVOWater::isActive() const { - return FALSE; + return false; } @@ -99,7 +99,7 @@ void LLVOWater::idleUpdate(LLAgent &agent, const F64 &time) LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) { pipeline->allocDrawable(this); - mDrawable->setLit(FALSE); + mDrawable->setLit(false); mDrawable->setRenderType(mRenderType); LLDrawPoolWater *pool = (LLDrawPoolWater*) gPipeline.getPool(LLDrawPool::POOL_WATER); @@ -116,7 +116,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) return mDrawable; } -BOOL LLVOWater::updateGeometry(LLDrawable *drawable) +bool LLVOWater::updateGeometry(LLDrawable *drawable) { LL_PROFILE_ZONE_SCOPED; LLFace *face; @@ -129,7 +129,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable) face = drawable->getFace(0); if (!face) { - return TRUE; + return true; } // LLVector2 uvs[4]; @@ -234,7 +234,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable) mDrawable->movePartition(); LLPipeline::sCompiles++; - return TRUE; + return true; } void LLVOWater::initClass() @@ -252,12 +252,12 @@ void setVecZ(LLVector3& v) v.mV[VZ] = 1; } -void LLVOWater::setUseTexture(const BOOL use_texture) +void LLVOWater::setUseTexture(const bool use_texture) { mUseTexture = use_texture; } -void LLVOWater::setIsEdgePatch(const BOOL edge_patch) +void LLVOWater::setIsEdgePatch(const bool edge_patch) { mIsEdgePatch = edge_patch; } @@ -295,16 +295,16 @@ U32 LLVOVoidWater::getPartitionType() const } LLWaterPartition::LLWaterPartition(LLViewerRegion* regionp) -: LLSpatialPartition(0, FALSE, regionp) +: LLSpatialPartition(0, false, regionp) { - mInfiniteFarClip = TRUE; + mInfiniteFarClip = true; mDrawableType = LLPipeline::RENDER_TYPE_WATER; mPartitionType = LLViewerRegion::PARTITION_WATER; } LLVoidWaterPartition::LLVoidWaterPartition(LLViewerRegion* regionp) : LLWaterPartition(regionp) { - mOcclusionEnabled = FALSE; + mOcclusionEnabled = false; mDrawableType = LLPipeline::RENDER_TYPE_VOIDWATER; mPartitionType = LLViewerRegion::PARTITION_VOIDWATER; } diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h index 7a8d819215..798290ee17 100644 --- a/indra/newview/llvowater.h +++ b/indra/newview/llvowater.h @@ -60,7 +60,7 @@ public: /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); - /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); + /*virtual*/ bool updateGeometry(LLDrawable *drawable); /*virtual*/ void updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax); /*virtual*/ void updateTextures(); @@ -68,16 +68,16 @@ public: virtual U32 getPartitionType() const; - /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate. + /*virtual*/ bool isActive() const; // Whether this object needs to do an idleUpdate. - void setUseTexture(const BOOL use_texture); - void setIsEdgePatch(const BOOL edge_patch); - BOOL getUseTexture() const { return mUseTexture; } - BOOL getIsEdgePatch() const { return mIsEdgePatch; } + void setUseTexture(const bool use_texture); + void setIsEdgePatch(const bool edge_patch); + bool getUseTexture() const { return mUseTexture; } + bool getIsEdgePatch() const { return mIsEdgePatch; } protected: - BOOL mUseTexture; - BOOL mIsEdgePatch; + bool mUseTexture; + bool mIsEdgePatch; S32 mRenderType; }; diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 98329ae894..7ea6ad8df3 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -70,7 +70,7 @@ inline U32 LLVOWLSky::getStarsNumIndices(void) } LLVOWLSky::LLVOWLSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) - : LLStaticViewerObject(id, pcode, regionp, TRUE) + : LLStaticViewerObject(id, pcode, regionp, true) { initStars(); } @@ -80,9 +80,9 @@ void LLVOWLSky::idleUpdate(LLAgent &agent, const F64 &time) } -BOOL LLVOWLSky::isActive(void) const +bool LLVOWLSky::isActive(void) const { - return FALSE; + return false; } LLDrawable * LLVOWLSky::createDrawable(LLPipeline * pipeline) @@ -142,7 +142,7 @@ void LLVOWLSky::restoreGL() gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL); } -BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) +bool LLVOWLSky::updateGeometry(LLDrawable * drawable) { LL_PROFILE_ZONE_SCOPED; LLStrider vertices; @@ -158,7 +158,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) LL_WARNS() << "Failed to allocate Vertex Buffer on full screen sky update" << LL_ENDL; } - BOOL success = mFsSkyVerts->getVertexStrider(vertices) + bool success = mFsSkyVerts->getVertexStrider(vertices) && mFsSkyVerts->getTexCoord0Strider(texCoords) && mFsSkyVerts->getIndexStrider(indices); @@ -250,7 +250,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) #endif // lock the buffer - BOOL success = segment->getVertexStrider(vertices) + bool success = segment->getVertexStrider(vertices) && segment->getTexCoord0Strider(texCoords) && segment->getIndexStrider(indices); @@ -280,7 +280,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) LLPipeline::sCompiles++; - return TRUE; + return true; } void LLVOWLSky::drawStars(void) @@ -510,7 +510,7 @@ void LLVOWLSky::updateStarColors() } } -BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) +bool LLVOWLSky::updateStarGeometry(LLDrawable *drawable) { LLStrider verticesp; LLStrider colorsp; @@ -525,7 +525,7 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) } } - BOOL success = mStarsVerts->getVertexStrider(verticesp) + bool success = mStarsVerts->getVertexStrider(verticesp) && mStarsVerts->getColorStrider(colorsp) && mStarsVerts->getTexCoord0Strider(texcoordsp); @@ -590,5 +590,5 @@ BOOL LLVOWLSky::updateStarGeometry(LLDrawable *drawable) } mStarsVerts->unmapBuffer(); - return TRUE; + return true; } diff --git a/indra/newview/llvowlsky.h b/indra/newview/llvowlsky.h index 3853dd2c70..8701328695 100644 --- a/indra/newview/llvowlsky.h +++ b/indra/newview/llvowlsky.h @@ -42,9 +42,9 @@ public: LLVOWLSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); /*virtual*/ void idleUpdate(LLAgent &agent, const F64 &time); - /*virtual*/ BOOL isActive(void) const; + /*virtual*/ bool isActive(void) const; /*virtual*/ LLDrawable * createDrawable(LLPipeline *pipeline); - /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); + /*virtual*/ bool updateGeometry(LLDrawable *drawable); void drawStars(void); void drawDome(void); @@ -75,7 +75,7 @@ private: void updateStarColors(); // helper function for updating the stars geometry. - BOOL updateStarGeometry(LLDrawable *drawable); + bool updateStarGeometry(LLDrawable *drawable); private: LLPointer mFsSkyVerts; diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index fedc2064e3..2ae0b4d3ad 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -66,10 +66,10 @@ bool LLFindOutfitItems::operator()(LLInventoryCategory* cat, || (item->getType() == LLAssetType::AT_OBJECT) || (item->getType() == LLAssetType::AT_GESTURE)) { - return TRUE; + return true; } } - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////////// @@ -647,7 +647,7 @@ bool LLPanelDummyClothingListItem::postBuild() { addWidgetToRightSide("btn_add_panel"); - setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE)); + setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, false)); updateItem(wearableTypeToString(mWearableType)); // Make it look loke clothing item - reserve space for 'delete' button @@ -1344,8 +1344,8 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu // [/RLVa:KB] setMenuItemVisible(menu, "object_profile", !standalone); setMenuItemEnabled(menu, "object_profile", n_items == 1); - setMenuItemVisible(menu, "--no options--", FALSE); - setMenuItemEnabled(menu, "--no options--", FALSE); + setMenuItemVisible(menu, "--no options--", false); + setMenuItemEnabled(menu, "--no options--", false); // Populate or hide the "Attach to..." / "Attach to HUD..." submenus. if (mask == MASK_ATTACHMENT && n_worn == 0) @@ -1374,7 +1374,7 @@ void LLWearableItemsList::ContextMenu::updateItemsVisibility(LLContextMenu* menu } if (num_visible_items == 0) { - setMenuItemVisible(menu, "--no options--", TRUE); + setMenuItemVisible(menu, "--no options--", true); } } @@ -1394,8 +1394,8 @@ void LLWearableItemsList::ContextMenu::updateItemsLabels(LLContextMenu* menu) menu_item->setLabel(new_label); } -// We need this method to convert non-zero BOOL values to exactly 1 (TRUE). -// Otherwise code relying on a BOOL value being TRUE may fail +// We need this method to convert non-zero bool values to exactly 1 (true). +// Otherwise code relying on a bool value being true may fail // (I experienced a weird assert in LLView::drawChildren() because of that. // static void LLWearableItemsList::ContextMenu::setMenuItemVisible(LLContextMenu* menu, const std::string& name, bool val) diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 2a6c0ef6ba..d29fe4ae7b 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -90,14 +90,14 @@ void LLWearableList::getAsset(const LLAssetID& assetID, const std::string& weara asset_type, LLWearableList::processGetAssetReply, (void*)new LLWearableArrivedData( asset_type, wearable_name, avatarp, asset_arrived_callback, userdata ), - TRUE); + true); } } // static void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status, LLExtStat ext_status ) { - BOOL isNewWearable = FALSE; + bool isNewWearable = false; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; // LLViewerWearable* wearable = NULL; // NULL indicates failure // [SL:KB] - Patch: Appearance-Misc | Checked: 2010-08-13 (Catznip-2.1) @@ -143,7 +143,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID { if (wearable->getType() == LLWearableType::WT_COUNT) { - isNewWearable = TRUE; + isNewWearable = true; } delete wearable; wearable = NULL; diff --git a/indra/newview/llwind.cpp b/indra/newview/llwind.cpp index eb0ca23c7b..775e7ff033 100644 --- a/indra/newview/llwind.cpp +++ b/indra/newview/llwind.cpp @@ -106,7 +106,7 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp) // X component // Aurora Sim //decode_patch_header(bitpack, &patch_header); - decode_patch_header(bitpack, &patch_header, FALSE); + decode_patch_header(bitpack, &patch_header, false); // Aurora Sim decode_patch(bitpack, buffer); decompress_patch(mVelX, buffer, &patch_header); @@ -114,7 +114,7 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp) // Y component // Aurora Sim //decode_patch_header(bitpack, &patch_header); - decode_patch_header(bitpack, &patch_header, FALSE); + decode_patch_header(bitpack, &patch_header, false); // Aurora Sim decode_patch(bitpack, buffer); decompress_patch(mVelY, buffer, &patch_header); diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp index 92c80ce534..e298ff42bb 100644 --- a/indra/newview/llwindebug.cpp +++ b/indra/newview/llwindebug.cpp @@ -30,7 +30,7 @@ // based on dbghelp.h -typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, +typedef bool (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 9b43d1bb19..f8aa19a358 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -122,7 +122,7 @@ LLWorld::LLWorld() : *(default_texture++) = MAX_WATER_COLOR.mV[2]; *(default_texture++) = MAX_WATER_COLOR.mV[3]; - mDefaultWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); + mDefaultWaterTexturep = LLViewerTextureManager::getLocalTexture(raw.get(), false); gGL.getTexUnit(0)->bind(mDefaultWaterTexturep); mDefaultWaterTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); LLViewerRegion::sVOCacheCullingEnabled = gSavedSettings.getBOOL("RequestFullRegionCache") && gSavedSettings.getBOOL("ObjectCacheEnabled"); @@ -178,9 +178,9 @@ void LLWorld::refreshLimits() mMaxPhysLinkedPrims = 10000; mMaxInventoryItemsTransfer = 42; mAllowRenderName = 2; - mAllowMinimap = TRUE; - mAllowPhysicalPrims = TRUE; - mAllowRenderWater = TRUE; + mAllowMinimap = true; + mAllowPhysicalPrims = true; + mAllowRenderWater = true; mMaxPrimXPos = F32_MAX; mMaxPrimYPos = F32_MAX; @@ -189,10 +189,10 @@ void LLWorld::refreshLimits() mMinPrimYPos = 0.f; mMinPrimZPos = OS_MIN_OBJECT_Z; mMaxDragDistance = 10000.f; - mAllowParcelWindLight = TRUE; - mEnableTeenMode = FALSE; //get saved settings? - mEnforceMaxBuild = FALSE; - mLockedDrawDistance = FALSE; + mAllowParcelWindLight = true; + mEnableTeenMode = false; //get saved settings? + mEnforceMaxBuild = false; + mLockedDrawDistance = false; mDrawDistance = -1.f; mTerrainDetailScale = -1.f; @@ -217,9 +217,9 @@ void LLWorld::refreshLimits() mMaxPhysLinkedPrims = MAX_CHILDREN_PER_PHYSICAL_TASK; mMaxInventoryItemsTransfer = 42; mAllowRenderName = 2; - mAllowMinimap = TRUE; - mAllowPhysicalPrims = TRUE; - mAllowRenderWater = TRUE; + mAllowMinimap = true; + mAllowPhysicalPrims = true; + mAllowRenderWater = true; mMaxPrimXPos = 256.f; mMaxPrimYPos = 256.f; @@ -228,10 +228,10 @@ void LLWorld::refreshLimits() mMinPrimYPos = 0.f; mMinPrimZPos = SL_MIN_OBJECT_Z; mMaxDragDistance = 10000.f; - mAllowParcelWindLight = FALSE; - mEnableTeenMode = FALSE; //get saved settings? - mEnforceMaxBuild = FALSE; - mLockedDrawDistance = FALSE; + mAllowParcelWindLight = false; + mEnableTeenMode = false; //get saved settings? + mEnforceMaxBuild = false; + mLockedDrawDistance = false; mDrawDistance = -1.f; mTerrainDetailScale = -1.f; @@ -411,13 +411,13 @@ void LLWorld::setTerrainDetailScale(F32 val) mTerrainDetailScale = val; } -void LLWorld::setAllowMinimap(BOOL val) { mAllowMinimap = val; } -void LLWorld::setAllowPhysicalPrims(BOOL val) { mAllowPhysicalPrims = val; } -void LLWorld::setAllowRenderWater(BOOL val) { mAllowRenderWater = val; } -void LLWorld::setAllowParcelWindLight(BOOL val) { mAllowParcelWindLight = val; } -void LLWorld::setEnableTeenMode(BOOL val) { mEnableTeenMode = val; } -void LLWorld::setEnforceMaxBuild(BOOL val) { mEnforceMaxBuild = val; } -void LLWorld::setLockedDrawDistance(BOOL val) { mLockedDrawDistance = val; } +void LLWorld::setAllowMinimap(bool val) { mAllowMinimap = val; } +void LLWorld::setAllowPhysicalPrims(bool val) { mAllowPhysicalPrims = val; } +void LLWorld::setAllowRenderWater(bool val) { mAllowRenderWater = val; } +void LLWorld::setAllowParcelWindLight(bool val) { mAllowParcelWindLight = val; } +void LLWorld::setEnableTeenMode(bool val) { mEnableTeenMode = val; } +void LLWorld::setEnforceMaxBuild(bool val) { mEnforceMaxBuild = val; } +void LLWorld::setLockedDrawDistance(bool val) { mLockedDrawDistance = val; } void LLWorld::setAllowRenderName(S32 val) { mAllowRenderName = val; } void LLWorld::updateLimits() @@ -889,7 +889,7 @@ void LLWorld::updateAgentOffset(const LLVector3d &offset_global) } -BOOL LLWorld::positionRegionValidGlobal(const LLVector3d &pos_global) +bool LLWorld::positionRegionValidGlobal(const LLVector3d &pos_global) { for (region_list_t::iterator iter = mRegionList.begin(); iter != mRegionList.end(); ++iter) @@ -897,10 +897,10 @@ BOOL LLWorld::positionRegionValidGlobal(const LLVector3d &pos_global) LLViewerRegion* regionp = *iter; if (regionp->pointInRegionGlobal(pos_global)) { - return TRUE; + return true; } } - return FALSE; + return false; } @@ -1416,7 +1416,7 @@ void LLWorld::updateWaterObjects() if (!getRegionFromHandle(region_handle)) { // No region at that area, so make water LLVOWater* waterp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, gAgent.getRegion()); - waterp->setUseTexture(FALSE); + waterp->setUseTexture(false); // Fix water height on regions larger than 2048x2048 //waterp->setPositionGlobal(LLVector3d(x + rwidth/2, // y + rwidth/2, @@ -1484,8 +1484,8 @@ void LLWorld::updateWaterObjects() mEdgeWaterObjects[dir] = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_VOID_WATER, gAgent.getRegion()); waterp = mEdgeWaterObjects[dir]; - waterp->setUseTexture(FALSE); - waterp->setIsEdgePatch(TRUE); + waterp->setUseTexture(false); + waterp->setIsEdgePatch(true); gPipeline.createObject(waterp); } @@ -1616,7 +1616,7 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data) #endif // Aurora Sim // Viewer trusts the simulator. - msg->enableCircuit(sim, TRUE); + msg->enableCircuit(sim, true); // Aurora Sim //LLWorld::getInstance()->addRegion(handle, sim); LLWorld::getInstance()->addRegion(handle, sim, region_size_x, region_size_y); @@ -1749,7 +1749,7 @@ void send_agent_pause() gMessageSystem->sendReliable(regionp->getHost()); } - gObjectList.mWasPaused = TRUE; + gObjectList.mWasPaused = true; LLViewerStats::instance().getRecording().stop(); } diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index b42ab2f1fe..c58f02fec2 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -86,7 +86,7 @@ public: LLViewerRegion* getRegionFromPosAgent(const LLVector3 &pos); LLViewerRegion* getRegionFromHandle(const U64 &handle); LLViewerRegion* getRegionFromID(const LLUUID& region_id); - BOOL positionRegionValidGlobal(const LLVector3d& pos); // true if position is in valid region + bool positionRegionValidGlobal(const LLVector3d& pos); // true if position is in valid region LLVector3d clipToVisibleRegions(const LLVector3d &start_pos, const LLVector3d &end_pos); void updateAgentOffset(const LLVector3d &offset); @@ -148,10 +148,10 @@ public: F32 getMinPrimZPos() const { return mMinPrimZPos; } F32 getMaxDragDistance() const { return mMaxDragDistance; } F32 getMaxPhysPrimScale() const { return mMaxPhysPrimScale; } - BOOL getAllowParcelWindLight() const{ return mAllowParcelWindLight; } - BOOL getEnableTeenMode() const { return mEnableTeenMode; } - BOOL getEnforceMaxBuild() const { return mEnforceMaxBuild; } - BOOL getLockedDrawDistance() const { return mLockedDrawDistance; } + bool getAllowParcelWindLight() const{ return mAllowParcelWindLight; } + bool getEnableTeenMode() const { return mEnableTeenMode; } + bool getEnforceMaxBuild() const { return mEnforceMaxBuild; } + bool getLockedDrawDistance() const { return mLockedDrawDistance; } F32 getDrawDistance() const { return mDrawDistance; } F32 getTerrainDetailScale() const { return mTerrainDetailScale; } @@ -168,9 +168,9 @@ public: void setMaxPhysLinkedPrims(S32 val); void setMaxInventoryItemsTransfer(S32 val); void setAllowRenderName(S32 val); - void setAllowMinimap(BOOL val); - void setAllowPhysicalPrims(BOOL val); - void setAllowRenderWater(BOOL val); + void setAllowMinimap(bool val); + void setAllowPhysicalPrims(bool val); + void setAllowRenderWater(bool val); void setMaxPrimXPos(F32 val); void setMaxPrimYPos(F32 val); @@ -180,10 +180,10 @@ public: void setMinPrimZPos(F32 val); void setMaxDragDistance(F32 val); void setMaxPhysPrimScale(F32 val); - void setAllowParcelWindLight(BOOL val); - void setEnableTeenMode(BOOL val); - void setEnforceMaxBuild(BOOL val); - void setLockedDrawDistance(BOOL val); + void setAllowParcelWindLight(bool val); + void setEnableTeenMode(bool val); + void setEnforceMaxBuild(bool val); + void setLockedDrawDistance(bool val); void setDrawDistance(F32 val); void setTerrainDetailScale(F32 val); @@ -282,9 +282,9 @@ private: S32 mMaxPhysLinkedPrims; S32 mMaxInventoryItemsTransfer; S32 mAllowRenderName; - BOOL mAllowMinimap; - BOOL mAllowPhysicalPrims; - BOOL mAllowRenderWater; + bool mAllowMinimap; + bool mAllowPhysicalPrims; + bool mAllowRenderWater; F32 mMaxPrimXPos; F32 mMaxPrimYPos; @@ -294,10 +294,10 @@ private: F32 mMinPrimZPos; F32 mMaxDragDistance; F32 mMaxPhysPrimScale; - BOOL mAllowParcelWindLight; - BOOL mEnableTeenMode; - BOOL mEnforceMaxBuild; - BOOL mLockedDrawDistance; + bool mAllowParcelWindLight; + bool mEnableTeenMode; + bool mEnforceMaxBuild; + bool mLockedDrawDistance; F32 mDrawDistance; F32 mTerrainDetailScale; diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp index ace4f61667..2693c8cdaf 100644 --- a/indra/newview/llworldmapmessage.cpp +++ b/indra/newview/llworldmapmessage.cpp @@ -67,7 +67,7 @@ void LLWorldMapMessage::sendItemRequest(U32 type, U64 handle) msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->addU32Fast(_PREHASH_Flags, LAYER_FLAG); msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim - msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim + msg->addBOOLFast(_PREHASH_Godlike, false); // Filled in on sim msg->nextBlockFast(_PREHASH_RequestData); msg->addU32Fast(_PREHASH_ItemType, type); @@ -88,7 +88,7 @@ void LLWorldMapMessage::sendNamedRegionRequest(std::string region_name) msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); msg->addU32Fast(_PREHASH_Flags, LAYER_FLAG); msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim - msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim + msg->addBOOLFast(_PREHASH_Godlike, false); // Filled in on sim msg->nextBlockFast(_PREHASH_NameData); msg->addStringFast(_PREHASH_Name, region_name); gAgent.sendReliableMessage(); @@ -142,7 +142,7 @@ void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 flags |= (return_nonexistent ? 0x10000 : 0); msg->addU32Fast(_PREHASH_Flags, flags); msg->addU32Fast(_PREHASH_EstateID, 0); // Filled in on sim - msg->addBOOLFast(_PREHASH_Godlike, FALSE); // Filled in on sim + msg->addBOOLFast(_PREHASH_Godlike, false); // Filled in on sim msg->nextBlockFast(_PREHASH_PositionData); msg->addU16Fast(_PREHASH_MinX, min_x); msg->addU16Fast(_PREHASH_MinY, min_y); diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index d56697a572..0cf86f640c 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -85,7 +85,7 @@ constexpr F32 OCEAN_BLUE = (F32)(0x5F)/255.f; constexpr F32 GODLY_TELEPORT_HEIGHT = 200.f; constexpr F32 BIG_DOT_RADIUS = 5.f; -BOOL LLWorldMapView::sHandledLastClick = FALSE; +bool LLWorldMapView::sHandledLastClick = false; LLUIImagePtr LLWorldMapView::sAvatarSmallImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarYouImage = NULL; @@ -189,12 +189,12 @@ void LLWorldMapView::cleanupClass() LLWorldMapView::LLWorldMapView() : LLPanel(), mBackgroundColor(LLColor4(OCEAN_RED, OCEAN_GREEN, OCEAN_BLUE, 1.f)), - mItemPicked(FALSE), + mItemPicked(false), mPanX(0.f), mPanY(0.f), mTargetPanX(0.f), mTargetPanY(0.f), - mPanning(FALSE), + mPanning(false), mMouseDownPanX(0), mMouseDownPanY(0), mMouseDownX(0), @@ -340,7 +340,7 @@ void LLWorldMapView::translatePan(S32 delta_x, S32 delta_y) // static -void LLWorldMapView::setPan(S32 x, S32 y, BOOL snap) +void LLWorldMapView::setPan(S32 x, S32 y, bool snap) { mMapIterpTime = MAP_ITERP_TIME_CONSTANT; mTargetPanX = (F32) x; @@ -354,7 +354,7 @@ void LLWorldMapView::setPan(S32 x, S32 y, BOOL snap) } // static -void LLWorldMapView::setPanWithInterpTime(S32 x, S32 y, BOOL snap, F32 interp_time) +void LLWorldMapView::setPanWithInterpTime(S32 x, S32 y, bool snap, F32 interp_time) { setPan(x, y, snap); mMapIterpTime = interp_time; @@ -365,7 +365,7 @@ bool LLWorldMapView::showRegionInfo() { return (LLWorldMipmap::scaleToLevel(mMap /////////////////////////////////////////////////////////////////////////////////// // HELPERS -BOOL is_agent_in_region(LLViewerRegion* region, LLSimInfo* info) +bool is_agent_in_region(LLViewerRegion* region, LLSimInfo* info) { return (region && info && info->isName(region->getName())); } @@ -608,7 +608,7 @@ void LLWorldMapView::draw() S32_MAX, //max_chars mMapScale, //max_pixels NULL, - TRUE); //use ellipses + true); //use ellipses if (drawAdvancedRegionInfo) { @@ -639,7 +639,7 @@ void LLWorldMapView::draw() S32_MAX, //max_chars mMapScale, //max_pixels NULL, - TRUE); //use ellipses + true); //use ellipses } } // Show the grid coordinates (in units of regions) @@ -682,7 +682,7 @@ void LLWorldMapView::draw() { drawTracking(pos_global, lerp(LLColor4::yellow, LLColor4::orange, 0.4f), - TRUE, + true, sStringsMap["agent_position"].c_str(), "", LLFontGL::getFontSansSerifSmall()->getLineHeight()); // offset vertically by one line, to avoid overlap with target tracking @@ -702,7 +702,7 @@ void LLWorldMapView::draw() LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); if ( LLTracker::TRACKING_AVATAR == tracking_status ) { - drawTracking( LLAvatarTracker::instance().getGlobalPos(), map_track_color, TRUE, LLTracker::getLabel(), "" ); + drawTracking( LLAvatarTracker::instance().getGlobalPos(), map_track_color, true, LLTracker::getLabel(), "" ); } else if ( LLTracker::TRACKING_LANDMARK == tracking_status || LLTracker::TRACKING_LOCATION == tracking_status ) @@ -712,7 +712,7 @@ void LLWorldMapView::draw() LLVector3d pos_global = LLTracker::getTrackedPositionGlobal(); if (!pos_global.isExactlyZero()) { - drawTracking( pos_global, map_track_color, TRUE, LLTracker::getLabel(), LLTracker::getToolTip() ); + drawTracking( pos_global, map_track_color, true, LLTracker::getLabel(), LLTracker::getToolTip() ); } } else if (LLWorldMap::getInstance()->isTracking()) @@ -721,7 +721,7 @@ void LLWorldMapView::draw() { // We know this location to be invalid, draw a blue circle LLColor4 loading_color(0.0, 0.5, 1.0, 1.0); - drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("InvalidLocation"), ""); + drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, true, getString("InvalidLocation"), ""); } else { @@ -729,7 +729,7 @@ void LLWorldMapView::draw() double value = fmod(current_time, 2); value = 0.5 + 0.5*cos(value * F_PI); LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0); - drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("Loading"), ""); + drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, true, getString("Loading"), ""); } } @@ -1162,7 +1162,7 @@ LLVector3 LLWorldMapView::globalPosToView( const LLVector3d& global_pos ) } -void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& color, BOOL draw_arrow, +void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& color, bool draw_arrow, const std::string& label, const std::string& tooltip, S32 vert_offset ) { LLVector3 pos_local = globalPosToView( pos_global ); @@ -1727,7 +1727,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, false)) { *hit_type = MAP_ITEM_PG_EVENT; - mItemPicked = TRUE; + mItemPicked = true; gFloaterWorldMap->trackEvent(event); return; } @@ -1743,7 +1743,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, false)) { *hit_type = MAP_ITEM_MATURE_EVENT; - mItemPicked = TRUE; + mItemPicked = true; gFloaterWorldMap->trackEvent(event); return; } @@ -1759,7 +1759,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, false)) { *hit_type = MAP_ITEM_ADULT_EVENT; - mItemPicked = TRUE; + mItemPicked = true; gFloaterWorldMap->trackEvent(event); return; } @@ -1775,7 +1775,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, true)) { *hit_type = MAP_ITEM_LAND_FOR_SALE; - mItemPicked = TRUE; + mItemPicked = true; return; } ++it; @@ -1792,7 +1792,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, true)) { *hit_type = MAP_ITEM_LAND_FOR_SALE_ADULT; - mItemPicked = TRUE; + mItemPicked = true; return; } ++it; @@ -1805,7 +1805,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, // If we get here, we haven't clicked on anything gFloaterWorldMap->trackLocation(pos_global); - mItemPicked = FALSE; + mItemPicked = false; *id = LLUUID::null; return; } @@ -1819,7 +1819,7 @@ bool LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask ) mMouseDownPanY = ll_round(mPanY); mMouseDownX = x; mMouseDownY = y; - sHandledLastClick = TRUE; + sHandledLastClick = true; return true; } @@ -1839,7 +1839,7 @@ bool LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask ) LLUI::getInstance()->setMousePositionLocal(this, local_x, local_y); // finish the pan - mPanning = FALSE; + mPanning = false; mMouseDownX = 0; mMouseDownY = 0; @@ -1898,7 +1898,7 @@ bool LLWorldMapView::handleHover( S32 x, S32 y, MASK mask ) // just started panning, so hide cursor if (!mPanning) { - mPanning = TRUE; + mPanning = true; gViewerWindow->hideCursor(); } diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h index 3d982097fc..14458ec5a3 100644 --- a/indra/newview/llworldmapview.h +++ b/indra/newview/llworldmapview.h @@ -79,8 +79,8 @@ public: static F32 getScaleSetting(); // Pan is in pixels relative to the center of the map. void translatePan( S32 delta_x, S32 delta_y ); - void setPan( S32 x, S32 y, BOOL snap = TRUE ); - void setPanWithInterpTime(S32 x, S32 y, BOOL snap, F32 interp_time); + void setPan( S32 x, S32 y, bool snap = true ); + void setPanWithInterpTime(S32 x, S32 y, bool snap, F32 interp_time); // Return true if the current scale level is above the threshold for accessing region info bool showRegionInfo(); @@ -102,7 +102,7 @@ public: // Draw the tracking indicator, doing the right thing if it's outside // the view area. - void drawTracking( const LLVector3d& pos_global, const LLColor4& color, BOOL draw_arrow = TRUE, + void drawTracking( const LLVector3d& pos_global, const LLColor4& color, bool draw_arrow = true, const std::string& label = std::string(), const std::string& tooltip = std::string(), S32 vert_offset = 0); static void drawTrackingArrow(const LLRect& view_rect, S32 x, S32 y, @@ -131,7 +131,7 @@ public: const std::string& second_line); // Prevents accidental double clicks - static void clearLastClick() { sHandledLastClick = FALSE; } + static void clearLastClick() { sHandledLastClick = false; } // if the view changes, download additional sim info as needed void updateVisibleBlocks(); @@ -163,7 +163,7 @@ public: static LLUIImagePtr sForSaleImage; static LLUIImagePtr sForSaleAdultImage; - BOOL mItemPicked; + bool mItemPicked; F32 mPanX; // in pixels F32 mPanY; // in pixels @@ -174,7 +174,7 @@ public: static bool sVisibleTilesLoaded; // Are we mid-pan from a user drag? - BOOL mPanning; + bool mPanning; S32 mMouseDownPanX; // value at start of drag S32 mMouseDownPanY; // value at start of drag S32 mMouseDownX; @@ -191,7 +191,7 @@ public: LLTextBox* mTextBoxSouthWest; LLTextBox* mTextBoxScrollHint; - static BOOL sHandledLastClick; + static bool sHandledLastClick; S32 mSelectIDStart; // Keep the list of regions that are displayed on screen. Avoids iterating through the whole region map after draw(). diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp index c283c65999..87431b3e8d 100644 --- a/indra/newview/llworldmipmap.cpp +++ b/indra/newview/llworldmipmap.cpp @@ -200,7 +200,7 @@ LLPointer LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 // END DEBUG //LL_INFOS("WorldMap") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL; - LLPointer img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, FTT_MAP_TILE, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + LLPointer img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, FTT_MAP_TILE, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); //LL_INFOS("MAPURL") << "fetching map tile from " << imageurl << LL_ENDL; img->setBoostLevel(LLGLTexture::BOOST_MAP); diff --git a/indra/newview/particleeditor.cpp b/indra/newview/particleeditor.cpp index 6d0f72c77c..2a021f2c2c 100644 --- a/indra/newview/particleeditor.cpp +++ b/indra/newview/particleeditor.cpp @@ -206,9 +206,9 @@ bool ParticleEditor::postBuild() mStartColorSelector->setCommitCallback(boost::bind(&ParticleEditor::onParameterChange, this)); mEndColorSelector->setCommitCallback(boost::bind(&ParticleEditor::onParameterChange, this)); - mStartColorSelector->setCanApplyImmediately(TRUE); - mEndColorSelector->setCanApplyImmediately(TRUE); - mTexturePicker->setCanApplyImmediately(TRUE); + mStartColorSelector->setCanApplyImmediately(true); + mEndColorSelector->setCanApplyImmediately(true); + mTexturePicker->setCanApplyImmediately(true); mBlendFuncSrcCombo->setValue("blend_src_alpha"); mBlendFuncDestCombo->setValue("blend_one_minus_src_alpha"); @@ -320,14 +320,14 @@ void ParticleEditor::onParameterChange() void ParticleEditor::updateUI() { U8 pattern = mPatternMap[mPatternTypeCombo->getValue()]; - BOOL dropPattern = (pattern == LLPartSysData::LL_PART_SRC_PATTERN_DROP); - BOOL explodePattern = (pattern == LLPartSysData::LL_PART_SRC_PATTERN_EXPLODE); - BOOL targetLinear = mTargetLinearCheckBox->getValue(); - BOOL interpolateColor = mInterpolateColorCheckBox->getValue(); - BOOL interpolateScale = mInterpolateScaleCheckBox->getValue(); - BOOL targetEnabled = targetLinear | (mTargetPositionCheckBox->getValue().asBoolean() ? TRUE : FALSE); + bool dropPattern = (pattern == LLPartSysData::LL_PART_SRC_PATTERN_DROP); + bool explodePattern = (pattern == LLPartSysData::LL_PART_SRC_PATTERN_EXPLODE); + bool targetLinear = mTargetLinearCheckBox->getValue(); + bool interpolateColor = mInterpolateColorCheckBox->getValue(); + bool interpolateScale = mInterpolateScaleCheckBox->getValue(); + bool targetEnabled = targetLinear | (mTargetPositionCheckBox->getValue().asBoolean() ? true : false); - mBurstRadiusSpinner->setEnabled(!(targetLinear | (mFollowSourceCheckBox->getValue().asBoolean() ? TRUE : FALSE) | dropPattern)); + mBurstRadiusSpinner->setEnabled(!(targetLinear | (mFollowSourceCheckBox->getValue().asBoolean() ? true : false) | dropPattern)); mBurstSpeedMinSpinner->setEnabled(!(targetLinear | dropPattern)); mBurstSpeedMaxSpinner->setEnabled(!(targetLinear | dropPattern)); @@ -367,8 +367,8 @@ void ParticleEditor::onClearTargetButtonClicked() void ParticleEditor::onTargetPickerButtonClicked() { - mPickTargetButton->setToggleState(TRUE); - mPickTargetButton->setEnabled(FALSE); + mPickTargetButton->setToggleState(true); + mPickTargetButton->setEnabled(false); startPicking(this); } @@ -390,8 +390,8 @@ void ParticleEditor::onTargetPicked(void* userdata) LLToolMgr::getInstance()->clearTransientTool(); - self->mPickTargetButton->setEnabled(TRUE); - self->mPickTargetButton->setToggleState(FALSE); + self->mPickTargetButton->setEnabled(true); + self->mPickTargetButton->setToggleState(false); if (picked.notNull()) { @@ -585,12 +585,12 @@ void ParticleEditor::createScriptInventoryItem(LLUUID categoryID) perm.getMaskNextOwner(), callback); - setCanClose(FALSE); + setCanClose(false); } void ParticleEditor::callbackReturned(const LLUUID& inventoryItemID) { - setCanClose(TRUE); + setCanClose(true); if (inventoryItemID.isNull()) { @@ -620,8 +620,8 @@ void ParticleEditor::callbackReturned(const LLUUID& inventoryItemID) }, nullptr)); LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); - mMainPanel->setEnabled(FALSE); - setCanClose(FALSE); + mMainPanel->setEnabled(false); + setCanClose(false); } else { @@ -632,18 +632,18 @@ void ParticleEditor::callbackReturned(const LLUUID& inventoryItemID) void ParticleEditor::scriptInjectReturned() { - setCanClose(TRUE); + setCanClose(true); // play it safe, because some time may have passed LLViewerObject* object = gObjectList.findObject(mObject->getID()); if (!object || mObject->isDead()) { LL_WARNS() << "Can't inject script - object is dead or went away!" << LL_ENDL; - mMainPanel->setEnabled(TRUE); + mMainPanel->setEnabled(true); return; } - mObject->saveScript(mParticleScriptInventoryItem, TRUE, FALSE); + mObject->saveScript(mParticleScriptInventoryItem, true, false); LLNotificationsUtil::add("ParticleScriptInjected"); delete this; diff --git a/indra/newview/piemenu.cpp b/indra/newview/piemenu.cpp index 2c2888f180..65389a77af 100644 --- a/indra/newview/piemenu.cpp +++ b/indra/newview/piemenu.cpp @@ -162,7 +162,7 @@ void PieMenu::show(S32 x, S32 y, LLView* spawning_view) LL_DEBUGS("Pie") << "PieMenu::show(): " << x << " " << y << LL_ENDL; // make sure the menu is always the correct size - reshape(PIE_OUTER_SIZE * 2, PIE_OUTER_SIZE * 2, FALSE); + reshape(PIE_OUTER_SIZE * 2, PIE_OUTER_SIZE * 2, false); // get the 3D view rectangle LLRect screen = LLMenuGL::sMenuContainer->getMenuRect(); @@ -265,7 +265,7 @@ void PieMenu::draw() #if PIE_DRAW_BOUNDING_BOX // draw a bounding box around the menu for debugging purposes - gl_rect_2d(0, r.getHeight(), r.getWidth(), 0, LLColor4::white, FALSE); + gl_rect_2d(0, r.getHeight(), r.getWidth(), 0, LLColor4::white, false); #endif LLUIColorTable& colortable = LLUIColorTable::instance(); @@ -342,7 +342,7 @@ void PieMenu::draw() label = currentSlice->getLabel(); currentSlice->updateVisible(); // disable it if it's not visible, pie slices never really disappear - BOOL slice_visible = currentSlice->getVisible(); + bool slice_visible = currentSlice->getVisible(); currentSlice->setEnabled(slice_visible); if (!slice_visible) { diff --git a/indra/newview/piemenu.h b/indra/newview/piemenu.h index 5bd98588e1..eda6ed6223 100644 --- a/indra/newview/piemenu.h +++ b/indra/newview/piemenu.h @@ -105,7 +105,7 @@ protected: // timer for visual popup effect LLFrameTimer mPopupTimer; - // this is TRUE when the first mouseclick came to display the menu, used for borderless menu + // this is true when the first mouseclick came to display the menu, used for borderless menu bool mFirstClick; F32 getScaleFactor(); diff --git a/indra/newview/pieslice.h b/indra/newview/pieslice.h index 82fbe0f44f..7f1d271259 100644 --- a/indra/newview/pieslice.h +++ b/indra/newview/pieslice.h @@ -45,7 +45,7 @@ public: // register an on_visible callback which does the same as on_enable Optional on_visible; - // autohide feature to hide a disabled pie slice (NOTE: is not ) + // autohide feature to hide a disabled pie slice Optional start_autohide; // next item in an autohide chain Optional autohide; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b9fe0abd9d..2e0712af61 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -123,7 +123,7 @@ #include "llenvironment.h" #include "llsettingsvo.h" -extern BOOL gSnapshot; +extern bool gSnapshot; bool gShiftFrame = false; //cached settings @@ -222,11 +222,11 @@ const F32 DEFERRED_LIGHT_FALLOFF = 0.5f; const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1; extern S32 gBoxFrame; -//extern BOOL gHideSelectedObjects; -extern BOOL gDisplaySwapBuffers; +//extern bool gHideSelectedObjects; +extern bool gDisplaySwapBuffers; extern bool gDebugGL; -extern BOOL gCubeSnapshot; -extern BOOL gSnapshotNoPost; +extern bool gCubeSnapshot; +extern bool gSnapshotNoPost; bool gAvatarBacklight = false; @@ -709,12 +709,12 @@ void LLPipeline::destroyGL() void LLPipeline::requestResizeScreenTexture() { - gResizeScreenTexture = TRUE; + gResizeScreenTexture = true; } void LLPipeline::requestResizeShadowTexture() { - gResizeShadowTexture = TRUE; + gResizeShadowTexture = true; } void LLPipeline::resizeShadowTexture() @@ -722,7 +722,7 @@ void LLPipeline::resizeShadowTexture() releaseSunShadowTargets(); releaseSpotShadowTargets(); allocateShadowBuffer(mRT->width, mRT->height); - gResizeShadowTexture = FALSE; + gResizeShadowTexture = false; } void LLPipeline::resizeScreenTexture() @@ -756,7 +756,7 @@ void LLPipeline::resizeScreenTexture() releaseSunShadowTargets(); releaseSpotShadowTargets(); allocateScreenBuffer(resX,resY); - gResizeScreenTexture = FALSE; + gResizeScreenTexture = false; } } } @@ -832,13 +832,13 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; if (mRT == &mMainRT && sReflectionProbesEnabled) { // hacky -- allocate auxillary buffer - gCubeSnapshot = TRUE; + gCubeSnapshot = true; mReflectionMapManager.initReflectionMaps(); mRT = &mAuxillaryRT; U32 res = mReflectionMapManager.mProbeResolution * 4; //multiply by 4 because probes will be 16x super sampled allocateScreenBuffer(res, res, samples); mRT = &mMainRT; - gCubeSnapshot = FALSE; + gCubeSnapshot = false; } // remember these dimensions @@ -1003,7 +1003,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY) LLRenderTarget* shadow_target = getSunShadowTarget(i); if (shadow_target) { - gGL.getTexUnit(0)->bind(getSunShadowTarget(i), TRUE); + gGL.getTexUnit(0)->bind(getSunShadowTarget(i), true); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); @@ -1020,7 +1020,7 @@ bool LLPipeline::allocateShadowBuffer(U32 resX, U32 resY) LLRenderTarget* shadow_target = getSpotShadowTarget(i); if (shadow_target) { - gGL.getTexUnit(0)->bind(shadow_target, TRUE); + gGL.getTexUnit(0)->bind(shadow_target, true); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_ANISOTROPIC); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); @@ -1059,8 +1059,8 @@ void LLPipeline::refreshCachedSettings() && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion") && gSavedSettings.getBOOL("UseOcclusion")) ? 2 : 0; - WindLightUseAtmosShaders = TRUE; // DEPRECATED -- gSavedSettings.getBOOL("WindLightUseAtmosShaders"); - RenderDeferred = TRUE; // DEPRECATED -- gSavedSettings.getBOOL("RenderDeferred"); + WindLightUseAtmosShaders = true; // DEPRECATED -- gSavedSettings.getBOOL("WindLightUseAtmosShaders"); + RenderDeferred = true; // DEPRECATED -- gSavedSettings.getBOOL("RenderDeferred"); RenderDeferredSunWash = gSavedSettings.getF32("RenderDeferredSunWash"); RenderFSAASamples = LLFeatureManager::getInstance()->isFeatureAvailable("RenderFSAASamples") ? gSavedSettings.getU32("RenderFSAASamples") : 0; RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor"); @@ -1707,7 +1707,7 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj) { drawable->setState(LLDrawable::FORCE_INVISIBLE); } - drawable->updateXform(TRUE); + drawable->updateXform(true); } @@ -1853,7 +1853,7 @@ void LLPipeline::createObject(LLViewerObject* vobj) //if (drawablep->getVOVolume() && RenderAnimateRes) //{ // // fun animated res - // drawablep->updateXform(TRUE); + // drawablep->updateXform(true); // drawablep->clearState(LLDrawable::MOVE_UNDAMPED); // drawablep->setScale(LLVector3(0,0,0)); // drawablep->makeActive(); @@ -2567,7 +2567,7 @@ void LLPipeline::updateGL() { LLGLUpdate* glu = LLGLUpdate::sGLQ.front(); glu->updateGL(); - glu->mInQ = FALSE; + glu->mInQ = false; LLGLUpdate::sGLQ.pop_front(); } } @@ -2884,7 +2884,7 @@ void LLPipeline::markGLRebuild(LLGLUpdate* glu) if (glu && !glu->mInQ) { LLGLUpdate::sGLQ.push_back(glu); - glu->mInQ = TRUE; + glu->mInQ = true; } } @@ -3014,7 +3014,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) { LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("WorldCamera"); LLSpatialGroup* last_group = NULL; - BOOL fov_changed = LLViewerCamera::getInstance()->isDefaultFOVChanged(); + bool fov_changed = LLViewerCamera::getInstance()->isDefaultFOVChanged(); for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) { LLCullResult::bridge_iterator cur_iter = i; @@ -3104,7 +3104,7 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera) } } -void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera, BOOL fov_changed) +void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera, bool fov_changed) { LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; if (bridge->getSpatialGroup()->changeLOD() || fov_changed) @@ -3169,7 +3169,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) { if (!drawablep->isState(LLDrawable::INVISIBLE|LLDrawable::FORCE_INVISIBLE)) { - drawablep->setVisible(camera, NULL, FALSE); + drawablep->setVisible(camera, NULL, false); } } @@ -3679,7 +3679,7 @@ void LLPipeline::postSort(LLCamera &camera) } } - // LLSpatialGroup::sNoDelete = FALSE; + // LLSpatialGroup::sNoDelete = false; LL_PUSH_CALLSTACKS(); } @@ -3702,7 +3702,7 @@ void render_hud_elements() if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { - gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d() + gViewerWindow->renderSelections(false, false, false); // For HUD version in render_ui_3d() // Draw the tracking overlays LLTracker::render3D(); @@ -4697,7 +4697,7 @@ void LLPipeline::renderDebug() LLVertexBuffer::unbind(); LLGLEnable blend(GL_BLEND); - LLGLDepthTest depth(TRUE, FALSE); + LLGLDepthTest depth(true, false); LLGLDisable cull(GL_CULL_FACE); gGL.color4f(1,1,1,1); @@ -5832,7 +5832,7 @@ void LLPipeline::enableLightsDynamic() void LLPipeline::enableLightsAvatar() { U32 mask = 0xff; // All lights - setupAvatarLights(FALSE); + setupAvatarLights(false); enableLights(mask); } @@ -5896,7 +5896,7 @@ void LLPipeline::enableLightsPreview() void LLPipeline::enableLightsAvatarEdit(const LLColor4& color) { U32 mask = 0x2002; // Avatar backlight only, set ambient - setupAvatarLights(TRUE); + setupAvatarLights(true); enableLights(mask); gGL.setAmbientLightColor(color); @@ -6352,7 +6352,7 @@ LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_PARTICLE); if (part && hasRenderType(part->mDrawableType)) { - LLDrawable* hit = part->lineSegmentIntersect(start, local_end, TRUE, FALSE, TRUE, FALSE, face_hit, &position, NULL, NULL, NULL); + LLDrawable* hit = part->lineSegmentIntersect(start, local_end, true, false, true, false, face_hit, &position, NULL, NULL, NULL); if (hit) { drawable = hit; @@ -6560,7 +6560,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInHUD(const LLVector4a& start, c LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_HUD); if (part) { - LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, FALSE, TRUE, FALSE, face_hit, intersection, tex_coord, normal, tangent); + LLDrawable* hit = part->lineSegmentIntersect(start, end, pick_transparent, false, true, false, face_hit, intersection, tex_coord, normal, tangent); if (hit) { drawable = hit; @@ -7351,7 +7351,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) LLVector4a result; result.clear(); - gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE, FALSE, TRUE, TRUE, NULL, &result); + gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, false, false, true, true, NULL, &result); focus_point.set(result.getF32ptr()); } @@ -7654,7 +7654,7 @@ void LLPipeline::bindShadowMaps(LLGLSLShader& shader) S32 channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0 + i, LLTexUnit::TT_TEXTURE); if (channel > -1) { - gGL.getTexUnit(channel)->bind(getSunShadowTarget(i), TRUE); + gGL.getTexUnit(channel)->bind(getSunShadowTarget(i), true); } } } @@ -7667,7 +7667,7 @@ void LLPipeline::bindShadowMaps(LLGLSLShader& shader) LLRenderTarget* shadow_target = getSpotShadowTarget(i - 4); if (shadow_target) { - gGL.getTexUnit(channel)->bind(shadow_target, TRUE); + gGL.getTexUnit(channel)->bind(shadow_target, true); } } } @@ -7730,11 +7730,11 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ { if (depth_target) { - gGL.getTexUnit(channel)->bind(depth_target, TRUE); + gGL.getTexUnit(channel)->bind(depth_target, true); } else { - gGL.getTexUnit(channel)->bind(deferred_target, TRUE); + gGL.getTexUnit(channel)->bind(deferred_target, true); } stop_glerror(); } @@ -7755,7 +7755,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ if (sReflectionRender && !shader.getUniformLocation(LLShaderMgr::MODELVIEW_MATRIX)) { - shader.uniformMatrix4fv(LLShaderMgr::MODELVIEW_MATRIX, 1, FALSE, mReflectionModelView.m); + shader.uniformMatrix4fv(LLShaderMgr::MODELVIEW_MATRIX, 1, false, mReflectionModelView.m); } channel = shader.enableTexture(LLShaderMgr::DEFERRED_NOISE); @@ -7800,7 +7800,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ mat[i+80] = mSunShadowMatrix[5].m[i]; } - shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_SHADOW_MATRIX, 6, FALSE, mat); + shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_SHADOW_MATRIX, 6, false, mat); stop_glerror(); @@ -7822,7 +7822,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ m[4], m[5], m[6], m[8], m[9], m[10] }; - shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, TRUE, mat); + shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, true, mat); } } @@ -7911,7 +7911,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ if (shader.getUniformLocation(LLShaderMgr::DEFERRED_NORM_MATRIX) >= 0) { glh::matrix4f norm_mat = get_current_modelview().inverse().transpose(); - shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_NORM_MATRIX, 1, FALSE, norm_mat.m); + shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_NORM_MATRIX, 1, false, norm_mat.m); } // auto adjust legacy sun color if needed @@ -8655,7 +8655,7 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep) F32 proj_range = far_clip - near_clip; glh::matrix4f light_proj = gl_perspective(fovy, aspect, near_clip, far_clip); screen_to_light = trans * light_proj * screen_to_light; - shader.uniformMatrix4fv(LLShaderMgr::PROJECTOR_MATRIX, 1, FALSE, screen_to_light.m); + shader.uniformMatrix4fv(LLShaderMgr::PROJECTOR_MATRIX, 1, false, screen_to_light.m); shader.uniform1f(LLShaderMgr::PROJECTOR_NEAR, near_clip); shader.uniform3fv(LLShaderMgr::PROJECTOR_P, 1, p1.v); shader.uniform3fv(LLShaderMgr::PROJECTOR_N, 1, n.v); @@ -8803,7 +8803,7 @@ void LLPipeline::setEnvMat(LLGLSLShader& shader) m[4], m[5], m[6], m[8], m[9], m[10] }; - shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, TRUE, mat); + shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_ENV_MAT, 1, true, mat); } void LLPipeline::bindReflectionProbes(LLGLSLShader& shader) @@ -9659,7 +9659,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) shadow_cam = camera; shadow_cam.setFar(16.f); - LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE); + LLViewerCamera::updateFrustumPlanes(shadow_cam, false, false, true); LLVector3* frust = shadow_cam.mAgentFrustum; @@ -9966,7 +9966,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) set_current_modelview(view[j]); set_current_projection(proj[j]); - LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE); + LLViewerCamera::updateFrustumPlanes(shadow_cam, false, false, true); //shadow_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR); shadow_cam.getAgentPlane(LLCamera::AGENT_PLANE_NEAR).set(shadow_near_clip); @@ -10140,7 +10140,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera) shadow_cam.setFar(far_clip); shadow_cam.setOrigin(origin); - LLViewerCamera::updateFrustumPlanes(shadow_cam, FALSE, FALSE, TRUE); + LLViewerCamera::updateFrustumPlanes(shadow_cam, false, false, true); // @@ -10674,7 +10674,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool if (!preview_avatar && !for_profile) { - avatar->mNeedsImpostorUpdate = FALSE; + avatar->mNeedsImpostorUpdate = false; avatar->cacheImpostorValues(); avatar->mLastImpostorUpdateFrameTime = gFrameTimeSeconds; } diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 2d58da8fb5..133c37a0c9 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -272,7 +272,7 @@ public: void stateSort(LLCamera& camera, LLCullResult& result); void stateSort(LLSpatialGroup* group, LLCamera& camera); - void stateSort(LLSpatialBridge* bridge, LLCamera& camera, BOOL fov_changed = FALSE); + void stateSort(LLSpatialBridge* bridge, LLCamera& camera, bool fov_changed = false); void stateSort(LLDrawable* drawablep, LLCamera& camera); void postSort(LLCamera& camera); diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp index 2d68ef2675..a7b42bf9d7 100644 --- a/indra/newview/quickprefs.cpp +++ b/indra/newview/quickprefs.cpp @@ -162,7 +162,7 @@ void FloaterQuickPrefs::onOpen(const LLSD& key) LLAvatarComplexityControls::setIndirectMaxArc(); LLAvatarComplexityControls::setText(gSavedSettings.getU32("RenderAvatarMaxComplexity"), mMaxComplexityLabel); - gSavedSettings.setBOOL("QuickPrefsEditMode", FALSE); + gSavedSettings.setBOOL("QuickPrefsEditMode", false); // Scan widgets and reapply control variables because some control types // (LLSliderCtrl for example) don't update their GUI when hidden @@ -278,8 +278,8 @@ void FloaterQuickPrefs::initCallbacks() void FloaterQuickPrefs::loadDayCyclePresets(const std::multimap& daycycle_map) { mDayCyclePresetsCombo->operateOnAll(LLComboBox::OP_DELETE); - mDayCyclePresetsCombo->add(LLTrans::getString("QP_WL_Region_Default"), LLSD(PRESET_NAME_REGION_DEFAULT), EAddPosition::ADD_BOTTOM, FALSE); - mDayCyclePresetsCombo->add(LLTrans::getString("QP_WL_None"), LLSD(PRESET_NAME_NONE), EAddPosition::ADD_BOTTOM, FALSE); + mDayCyclePresetsCombo->add(LLTrans::getString("QP_WL_Region_Default"), LLSD(PRESET_NAME_REGION_DEFAULT), EAddPosition::ADD_BOTTOM, false); + mDayCyclePresetsCombo->add(LLTrans::getString("QP_WL_None"), LLSD(PRESET_NAME_NONE), EAddPosition::ADD_BOTTOM, false); mDayCyclePresetsCombo->addSeparator(); // Add setting presets. @@ -319,8 +319,8 @@ void FloaterQuickPrefs::loadDayCyclePresets(const std::multimap& sky_map) { mWLPresetsCombo->operateOnAll(LLComboBox::OP_DELETE); - mWLPresetsCombo->add(LLTrans::getString("QP_WL_Region_Default"), LLSD(PRESET_NAME_REGION_DEFAULT), EAddPosition::ADD_BOTTOM, FALSE); - mWLPresetsCombo->add(LLTrans::getString("QP_WL_Day_Cycle_Based"), LLSD(PRESET_NAME_DAY_CYCLE), EAddPosition::ADD_BOTTOM, FALSE); + mWLPresetsCombo->add(LLTrans::getString("QP_WL_Region_Default"), LLSD(PRESET_NAME_REGION_DEFAULT), EAddPosition::ADD_BOTTOM, false); + mWLPresetsCombo->add(LLTrans::getString("QP_WL_Day_Cycle_Based"), LLSD(PRESET_NAME_DAY_CYCLE), EAddPosition::ADD_BOTTOM, false); mWLPresetsCombo->addSeparator(); // Add setting presets. @@ -361,8 +361,8 @@ void FloaterQuickPrefs::loadSkyPresets(const std::multimap& void FloaterQuickPrefs::loadWaterPresets(const std::multimap& water_map) { mWaterPresetsCombo->operateOnAll(LLComboBox::OP_DELETE); - mWaterPresetsCombo->add(LLTrans::getString("QP_WL_Region_Default"), LLSD(PRESET_NAME_REGION_DEFAULT), EAddPosition::ADD_BOTTOM, FALSE); - mWaterPresetsCombo->add(LLTrans::getString("QP_WL_Day_Cycle_Based"), LLSD(PRESET_NAME_DAY_CYCLE), EAddPosition::ADD_BOTTOM, FALSE); + mWaterPresetsCombo->add(LLTrans::getString("QP_WL_Region_Default"), LLSD(PRESET_NAME_REGION_DEFAULT), EAddPosition::ADD_BOTTOM, false); + mWaterPresetsCombo->add(LLTrans::getString("QP_WL_Day_Cycle_Based"), LLSD(PRESET_NAME_DAY_CYCLE), EAddPosition::ADD_BOTTOM, false); mWaterPresetsCombo->addSeparator(); // Add setting presets. @@ -1048,12 +1048,12 @@ void FloaterQuickPrefs::refreshSettings() LLSpinCtrl* sky_spinner = getChild("S_Sky_Detail"); LLButton* sky_default_button = getChild("Reset_Sky_Detail"); - sky_label->setEnabled(TRUE); - sky_slider->setEnabled(TRUE); - sky_spinner->setEnabled(TRUE); - sky_default_button->setEnabled(TRUE); + sky_label->setEnabled(true); + sky_slider->setEnabled(true); + sky_spinner->setEnabled(true); + sky_default_button->setEnabled(true); - BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO"); + bool enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO"); mCtrlUseSSAO->setEnabled(enabled); mCtrlUseDoF->setEnabled(enabled); @@ -1065,14 +1065,14 @@ void FloaterQuickPrefs::refreshSettings() // disabled deferred SSAO if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO")) { - mCtrlUseSSAO->setEnabled(FALSE); - mCtrlUseSSAO->setValue(FALSE); + mCtrlUseSSAO->setEnabled(false); + mCtrlUseSSAO->setValue(false); } // disabled deferred shadows if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail")) { - mCtrlShadowDetail->setEnabled(FALSE); + mCtrlShadowDetail->setEnabled(false); mCtrlShadowDetail->setValue(0); } @@ -1186,8 +1186,8 @@ void FloaterQuickPrefs::updateControl(const std::string& controlName, ControlEnt { // dummy to disable old control widget->setControlName("QuickPrefsEditMode"); - widget->setVisible(FALSE); - widget->setEnabled(FALSE); + widget->setVisible(false); + widget->setEnabled(false); } } } @@ -1203,8 +1203,8 @@ void FloaterQuickPrefs::updateControl(const std::string& controlName, ControlEnt // add the settings control to the widget and enable/show it widget->setControlName(controlName); - widget->setVisible(TRUE); - widget->setEnabled(TRUE); + widget->setVisible(true); + widget->setEnabled(true); // if no increment is given, try to guess a good number if (entry.increment == 0.0f) @@ -1240,7 +1240,7 @@ void FloaterQuickPrefs::updateControl(const std::string& controlName, ControlEnt // set up values for special case control widget types LLUICtrl* alpha_widget = entry.panel->getChild("option_color_alpha_control"); - alpha_widget->setVisible(FALSE); + alpha_widget->setVisible(false); // sadly, using LLF32UICtrl does not work properly, so we have to use a branch // for each floating point type @@ -1263,7 +1263,7 @@ void FloaterQuickPrefs::updateControl(const std::string& controlName, ControlEnt else if (entry.type == ControlTypeColor4) { LLColorSwatchCtrl* color_widget = (LLColorSwatchCtrl*)widget; - alpha_widget->setVisible(TRUE); + alpha_widget->setVisible(true); alpha_widget->setValue(color_widget->get().mV[VALPHA]); } @@ -1310,7 +1310,7 @@ void FloaterQuickPrefs::updateControl(const std::string& controlName, ControlEnt } } -LLUICtrl* FloaterQuickPrefs::addControl(const std::string& controlName, const std::string& controlLabel, LLView* slot, ControlType type, BOOL integer, F32 min_value, F32 max_value, F32 increment) +LLUICtrl* FloaterQuickPrefs::addControl(const std::string& controlName, const std::string& controlLabel, LLView* slot, ControlType type, bool integer, F32 min_value, F32 max_value, F32 increment) { // create a new controls panel LLLayoutPanel* panel = LLUICtrlFactory::createFromFile("panel_quickprefs_item.xml", NULL, LLLayoutStack::child_registry_t::instance()); @@ -1372,11 +1372,11 @@ LLUICtrl* FloaterQuickPrefs::addControl(const std::string& controlName, const st // make the floater fit the newly added control panel reshape(getRect().getWidth(), getRect().getHeight() + panel->getRect().getHeight()); // show the panel - panel->setVisible(TRUE); + panel->setVisible(true); } // hide the border - newControl.panel->setBorderVisible(FALSE); + newControl.panel->setBorderVisible(false); return newControl.widget; } @@ -1424,7 +1424,7 @@ void FloaterQuickPrefs::selectControl(std::string controlName) // remove previously selected marker, if any if (!mSelectedControl.empty() && hasControl(mSelectedControl)) { - mControlsList[mSelectedControl].panel->setBorderVisible(FALSE); + mControlsList[mSelectedControl].panel->setBorderVisible(false); } // save the currently selected name in a volatile settings control to @@ -1448,13 +1448,13 @@ void FloaterQuickPrefs::selectControl(std::string controlName) mControlNameCombo->selectNthItem(0); // assume we don't need the min/max/increment/integer widgets by default - BOOL enable_floating_point = FALSE; + bool enable_floating_point = false; // if actually a selection is present, set up the editor widgets if (!mSelectedControl.empty()) { // draw the new selection border - mControlsList[mSelectedControl].panel->setBorderVisible(TRUE); + mControlsList[mSelectedControl].panel->setBorderVisible(true); // set up editor values mControlLabelEdit->setValue(LLSD(mControlsList[mSelectedControl].label)); @@ -1472,7 +1472,7 @@ void FloaterQuickPrefs::selectControl(std::string controlName) case ControlTypeSpinner: // fall through case ControlTypeSlider: // fall through { - enable_floating_point = TRUE; + enable_floating_point = true; // assume we have floating point widgets mControlIncrementSpinner->setIncrement(0.1f); @@ -1519,7 +1519,7 @@ void FloaterQuickPrefs::onClickLabel(LLUICtrl* ctrl, LLPanel* panel) void FloaterQuickPrefs::onDoubleClickLabel(LLUICtrl* ctrl, LLPanel* panel) { // toggle edit mode - BOOL edit_mode = !gSavedSettings.getBOOL("QuickPrefsEditMode"); + bool edit_mode = !gSavedSettings.getBOOL("QuickPrefsEditMode"); gSavedSettings.setBOOL("QuickPrefsEditMode", edit_mode); // select the double clicked control if we toggled edit on @@ -1774,7 +1774,7 @@ void FloaterQuickPrefs::onRemoveClicked(LLUICtrl* ctrl, LLPanel* panel) // then remove it from the internal list and from memory removeControl(panel->getName()); // reinstate focus in case we lost it - setFocus(TRUE); + setFocus(true); } void FloaterQuickPrefs::onAlphaChanged(LLUICtrl* ctrl, LLColorSwatchCtrl* color_swatch) @@ -1871,7 +1871,7 @@ void FloaterQuickPrefs::onClose(bool app_quitting) } // close edit mode and save settings - gSavedSettings.setBOOL("QuickPrefsEditMode", FALSE); + gSavedSettings.setBOOL("QuickPrefsEditMode", false); } // @@ -2062,7 +2062,7 @@ void FloaterQuickPrefs::callbackRestoreDefaults(const LLSD& notification, const std::string settings_file = LLAppViewer::instance()->getSettingsFilename("Default", "QuickPreferences"); LLFile::remove(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, settings_file)); loadSavedSettingsFromFile(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, settings_file)); - gSavedSettings.setBOOL("QuickPrefsEditMode", FALSE); + gSavedSettings.setBOOL("QuickPrefsEditMode", false); } else { @@ -2181,7 +2181,7 @@ void FloaterQuickPrefs::onSimulatorFeaturesReceived(const LLUUID ®ion_id) void FloaterQuickPrefs::syncAvatarZOffsetFromPreferenceSetting() { F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ"); - mAvatarZOffsetSlider->setValue(value, FALSE); + mAvatarZOffsetSlider->setValue(value, false); } void FloaterQuickPrefs::updateMaxNonImpostors(const LLSD& newvalue) diff --git a/indra/newview/quickprefs.h b/indra/newview/quickprefs.h index e1416c704e..8c15492326 100644 --- a/indra/newview/quickprefs.h +++ b/indra/newview/quickprefs.h @@ -217,7 +217,7 @@ protected: LLTextBox* label_textbox; std::string label; ControlType type; - BOOL integer; + bool integer; F32 min_value; F32 max_value; F32 increment; @@ -231,7 +231,7 @@ protected: Mandatory label; Optional translation_id; Mandatory control_type; - Mandatory integer; + Mandatory integer; Mandatory min_value; // "min" is frowned upon by a braindead windows include Mandatory max_value; // "max" see "min" Mandatory increment; @@ -277,7 +277,7 @@ protected: std::string getSettingsPath(bool save_mode); // adds a new control and returns a pointer to the chosen widget - LLUICtrl* addControl(const std::string& controlName, const std::string& controlLabel, LLView* slot = NULL, ControlType type = ControlTypeRadio, BOOL integer = FALSE, F32 min_value = -1000000.0f, F32 max_value = 1000000.0f, F32 increment = 0.0f); + LLUICtrl* addControl(const std::string& controlName, const std::string& controlLabel, LLView* slot = NULL, ControlType type = ControlTypeRadio, bool integer = false, F32 min_value = -1000000.0f, F32 max_value = 1000000.0f, F32 increment = 0.0f); // removes a control void removeControl(const std::string& controlName, bool remove_slot = true); // updates a single control diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index f7fc62d28b..bc64ee280a 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -651,7 +651,7 @@ bool RlvActions::canTouch(const LLViewerObject* pObj, const LLVector3& posOffset bool RlvActions::canStand() { - // NOTE: return FALSE only if we're @unsit=n restricted and the avie is currently sitting on something and TRUE for everything else + // NOTE: return false only if we're @unsit=n restricted and the avie is currently sitting on something and true for everything else return (!gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting())); } diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 9b33285368..1df94ddfd4 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -70,7 +70,7 @@ void RlvNotifications::warnGiveToRLV() /* void RlvNotifications::onGiveToRLVConfirmation(const LLSD& notification, const LLSD& response) { - gSavedSettings.setWarning(RLV_SETTING_FIRSTUSE_GIVETORLV, FALSE); + gSavedSettings.setWarning(RLV_SETTING_FIRSTUSE_GIVETORLV, false); S32 idxOption = LLNotification::getSelectedOption(notification, response); if ( (0 == idxOption) || (1 == idxOption) ) @@ -144,7 +144,7 @@ void RlvSettings::updateLoginLastLocation() if (gSavedPerAccountSettings.get(RlvSettingNames::LoginLastLocation) != fValue) { gSavedPerAccountSettings.set(RlvSettingNames::LoginLastLocation, fValue); - gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE); + gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), true); } } } @@ -638,7 +638,7 @@ void RlvUtil::sendBusyMessage(const LLUUID& idTo, const std::string& strMsg, con std::string strFullName; LLAgentUI::buildFullname(strFullName); - pack_instant_message(gMessageSystem, gAgent.getID(), FALSE, gAgent.getSessionID(), idTo, strFullName, + pack_instant_message(gMessageSystem, gAgent.getID(), false, gAgent.getSessionID(), idTo, strFullName, strMsg, IM_ONLINE, IM_DO_NOT_DISTURB_AUTO_RESPONSE, idSession); gAgent.sendReliableMessage(); } @@ -729,9 +729,9 @@ void rlvMenuToggleVisible() bool fTopLevel = rlvGetSetting(RlvSettingNames::TopLevelMenu, true); bool fRlvEnabled = rlv_handler_t::isEnabled(); - LLMenuGL* pRLVaMenuMain = gMenuBarView->findChildMenuByName("RLVa Main", FALSE); - LLMenuGL* pAdvancedMenu = gMenuBarView->findChildMenuByName("Advanced", FALSE); - LLMenuGL* pRLVaMenuEmbed = pAdvancedMenu->findChildMenuByName("RLVa Embedded", FALSE); + LLMenuGL* pRLVaMenuMain = gMenuBarView->findChildMenuByName("RLVa Main", false); + LLMenuGL* pAdvancedMenu = gMenuBarView->findChildMenuByName("Advanced", false); + LLMenuGL* pRLVaMenuEmbed = pAdvancedMenu->findChildMenuByName("RLVa Embedded", false); gMenuBarView->setItemVisible("RLVa Main", (fRlvEnabled) && (fTopLevel)); pAdvancedMenu->setItemVisible("RLVa Embedded", (fRlvEnabled) && (!fTopLevel)); @@ -924,7 +924,7 @@ bool RlvPredIsEqualOrLinkedItem::operator()(const LLViewerInventoryItem* pItem) // Checked: 2009-11-15 (RLVa-1.1.0c) | Added: RLVa-1.1.0c /* -BOOL rlvEnableSharedWearEnabler(void* pParam) +bool rlvEnableSharedWearEnabler(void* pParam) { return false; // Visually disable the "Enable Shared Wear" option when at least one attachment is non-detachable diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h index a9fb8d6ce7..51fdbb160f 100644 --- a/indra/newview/rlvcommon.h +++ b/indra/newview/rlvcommon.h @@ -97,7 +97,7 @@ public: static bool getDebugHideUnsetDup() { return rlvGetSetting(RlvSettingNames::DebugHideUnsetDup, false); } #ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS - static BOOL getEnableComposites() { return s_fCompositeFolders; } + static bool getEnableComposites() { return s_fCompositeFolders; } #endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS static bool getEnableIMQuery() { return rlvGetSetting(RlvSettingNames::EnableIMQuery, true); } static bool getEnableLegacyNaming() { return s_fLegacyNaming; } @@ -124,7 +124,7 @@ protected: static bool onChangedSettingBOOL(const LLSD& sdValue, bool* pfSetting); #ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS - static BOOL s_fCompositeFolders; + static bool s_fCompositeFolders; #endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS /* diff --git a/indra/newview/rlveffects.cpp b/indra/newview/rlveffects.cpp index fccdce439b..355e34ce28 100644 --- a/indra/newview/rlveffects.cpp +++ b/indra/newview/rlveffects.cpp @@ -357,7 +357,7 @@ void RlvSphereEffect::renderPass(LLGLSLShader* pShader, const LLShaderEffectPara S32 nDepthChannel = pShader->enableTexture(LLShaderMgr::DEFERRED_DEPTH, gPipeline.mRT->deferredScreen.getUsage()); if (nDepthChannel > -1) { - gGL.getTexUnit(nDepthChannel)->bind(&gPipeline.mRT->deferredScreen, TRUE); + gGL.getTexUnit(nDepthChannel)->bind(&gPipeline.mRT->deferredScreen, true); } gPipeline.mScreenTriangleVB->setBuffer(); diff --git a/indra/newview/rlvfloaters.cpp b/indra/newview/rlvfloaters.cpp index 7b9e92a1aa..28ca5a5827 100644 --- a/indra/newview/rlvfloaters.cpp +++ b/indra/newview/rlvfloaters.cpp @@ -250,7 +250,7 @@ std::string RlvFloaterBehaviours::getFormattedBehaviourString(ERlvBehaviourFilte } std::string strOption; LLUUID idOption; - if ( (rlvCmd.hasOption()) && (idOption.set(rlvCmd.getOption(), FALSE)) && (idOption.notNull()) ) + if ( (rlvCmd.hasOption()) && (idOption.set(rlvCmd.getOption(), false)) && (idOption.notNull()) ) { LLAvatarName avName; if (gObjectList.findObject(idOption)) @@ -333,7 +333,7 @@ void RlvFloaterBehaviours::refreshAll() for (const RlvCommand& rlvCmd : rlvObjectEntry.second.getCommandList()) { std::string strOption; LLUUID idOption; - if ( (rlvCmd.hasOption()) && (idOption.set(rlvCmd.getOption(), FALSE)) && (idOption.notNull()) ) + if ( (rlvCmd.hasOption()) && (idOption.set(rlvCmd.getOption(), false)) && (idOption.notNull()) ) { LLAvatarName avName; if (gObjectList.findObject(idOption)) @@ -556,7 +556,7 @@ void RlvFloaterLocks::refreshAll() LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items; LLFindWearablesEx f(true, true); - gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(), folders, items, FALSE, f); + gInventory.collectDescendentsIf(LLAppearanceMgr::instance().getCOF(), folders, items, false, f); for (LLInventoryModel::item_array_t::const_iterator itItem = items.begin(); itItem != items.end(); ++itItem) { @@ -837,7 +837,7 @@ void RlvFloaterConsole::onInput(LLUICtrl* pCtrl, const LLSD& sdParam) void RlvFloaterConsole::reshapeLayoutPanel() { - m_pInputPanel->reshape(m_pInputPanel->getRect().getWidth(), m_pInputEdit->getRect().getHeight() + m_nInputEditPad, FALSE); + m_pInputPanel->reshape(m_pInputPanel->getRect().getWidth(), m_pInputEdit->getRect().getHeight() + m_nInputEditPad, false); } // ============================================================================ diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index cdd6a9a7c5..0557408287 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -79,7 +79,7 @@ #include // llappviewer.cpp -extern BOOL gDoDisconnect; +extern bool gDoDisconnect; // ============================================================================ // Static variable initialization @@ -274,7 +274,7 @@ void RlvHandler::addException(const LLUUID& idObj, ERlvBehaviour eBhvr, const Rl bool RlvHandler::isException(ERlvBehaviour eBhvr, const RlvExceptionOption& varOption, ERlvExceptionCheck eCheckType) const { - // We need to "strict check" exceptions only if: the restriction is actually in place *and* (isPermissive(eBhvr) == FALSE) + // We need to "strict check" exceptions only if: the restriction is actually in place *and* (isPermissive(eBhvr) == false) if (ERlvExceptionCheck::Default == eCheckType) eCheckType = ( (hasBehaviour(eBhvr)) && (!isPermissive(eBhvr)) ) ? ERlvExceptionCheck::Strict : ERlvExceptionCheck::Permissive; @@ -511,7 +511,7 @@ ERlvCmdRet RlvHandler::processCommand(std::reference_wrapper r RLV_DEBUGS << "\t- " << ( (fAdded) ? "adding behaviour" : "skipping duplicate" ) << RLV_ENDL; - if (fAdded) { // If FALSE then this was a duplicate, there's no need to handle those + if (fAdded) { // If false then this was a duplicate, there's no need to handle those if (!m_pGCTimer) m_pGCTimer = new RlvGCTimer(); eRet = processAddRemCommand(rlvCmd); @@ -915,7 +915,7 @@ void RlvHandler::onSitOrStand(bool fSitting) // NOTE: we need to do this due to the way @standtp triggers a forced teleport: // - when standing we're called from LLVOAvatar::sitDown() which is called from LLVOAvatar::getOffObject() // -> at the time sitDown() is called the avatar's parent is still the linkset it was sitting on so "isRoot()" on the avatar will - // return FALSE and we will crash in LLVOAvatar::getRenderPosition() when trying to teleport + // return false and we will crash in LLVOAvatar::getRenderPosition() when trying to teleport // -> postponing the teleport until the next idle tick will ensure that everything has all been properly cleaned up doOnIdleOneTime(boost::bind(RlvUtil::forceTp, m_posSitSource)); m_posSitSource.setZero(); @@ -923,7 +923,7 @@ void RlvHandler::onSitOrStand(bool fSitting) else if ( (!fSitting) && (m_fPendingGroundSit) ) { gAgent.setControlFlags(AGENT_CONTROL_SIT_ON_GROUND); - send_agent_update(TRUE, TRUE); + send_agent_update(true, true); m_fPendingGroundSit = false; m_idPendingSitActor = m_idPendingUnsitActor; @@ -1432,7 +1432,7 @@ bool RlvHandler::redirectChatOrEmote(const std::string& strUTF8Text) const LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items; RlvWearableItemCollector functor(pFolder->getUUID(), true, false); - gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, FALSE, functor); + gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, false, functor); for (S32 idxItem = 0, cntItem = items.count(); idxItem < cntItem; idxItem++) { @@ -1477,7 +1477,7 @@ bool RlvHandler::redirectChatOrEmote(const std::string& strUTF8Text) const LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items; RlvWearableItemCollector functor(pFolder->getUUID(), true, false); - gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, FALSE, functor); + gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, false, functor); for (S32 idxItem = 0, cntItem = items.count(); idxItem < cntItem; idxItem++) { @@ -1567,7 +1567,7 @@ bool RlvHandler::setEnabled(bool fEnable) // Reset to show assertions if the viewer version changed if (gSavedSettings.getString("LastRunVersion") != gLastRunVersion) - gSavedSettings.set(RlvSettingNames::ShowAssertionFail, TRUE); + gSavedSettings.set(RlvSettingNames::ShowAssertionFail, true); } return m_fEnabled; @@ -2057,7 +2057,7 @@ void RlvBehaviourToggleHandler::onCommandToggle(ERlvBehaviour eBh if (fHasBhvr) { // Turn off "View / Highlight Transparent" - LLDrawPoolAlpha::sShowDebugAlpha = FALSE; + LLDrawPoolAlpha::sShowDebugAlpha = false; // Hide the beacons floater if it's currently visible if (LLFloaterReg::instanceVisible("beacons")) @@ -2843,7 +2843,7 @@ ERlvCmdRet RlvHandler::processForceCommand(const RlvCommand& rlvCmd) const if ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) && (!hasBehaviourExcept(RLV_BHVR_UNSIT, rlvCmd.getObjectID())) ) { gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); - send_agent_update(TRUE, TRUE); // See behaviour notes on why we have to force an agent update here + send_agent_update(true, true); // See behaviour notes on why we have to force an agent update here gRlvHandler.m_idPendingSitActor.setNull(); gRlvHandler.m_idPendingUnsitActor = gRlvHandler.getCurrentObject(); @@ -3123,7 +3123,7 @@ ERlvCmdRet RlvForceHandler::onCommand(const RlvCommand& r camDirection.normVec(); // Move the camera in place - gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(false, ANIMATE); gAgentCamera.setCameraPosAndFocusGlobal(posGlobal + LLVector3d(camDirection * llmax(F_APPROXIMATELY_ZERO, camDistance)), posGlobal, idObject); return RLV_RET_SUCCESS; @@ -3312,7 +3312,7 @@ ERlvCmdRet RlvForceHandler::onCommand(const RlvCommand& rlvC gRlvHandler.m_idPendingSitActor.setNull(); gRlvHandler.m_idPendingUnsitActor = gRlvHandler.getCurrentObject(); } - send_agent_update(TRUE, TRUE); + send_agent_update(true, true); return RLV_RET_SUCCESS; } @@ -3849,7 +3849,7 @@ ERlvCmdRet RlvHandler::onGetInvWorn(const RlvCommand& rlvCmd, std::string& strRe // Collect everything @attachall would be attaching LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items; RlvWearableItemCollector f(pFolder, RlvForceWear::ACTION_WEAR_REPLACE, RlvForceWear::FLAG_MATCHALL); - gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, FALSE, f, true); + gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, false, f, true); rlv_wear_info wi = {0}; diff --git a/indra/newview/rlvhandler.h b/indra/newview/rlvhandler.h index e5a6b0895e..c6971db893 100644 --- a/indra/newview/rlvhandler.h +++ b/indra/newview/rlvhandler.h @@ -54,54 +54,54 @@ public: bool findBehaviour(ERlvBehaviour eBhvr, std::list& lObjects) const; // Returns a pointer to an RLV object instance (DO NOT STORE THIS!) RlvObject* getObject(const LLUUID& idRlvObj) const; - // Returns TRUE is at least one object contains the specified behaviour (and optional option) + // Returns true is at least one object contains the specified behaviour (and optional option) bool hasBehaviour(ERlvBehaviour eBhvr) const { return (eBhvr < RLV_BHVR_COUNT) ? (0 != m_Behaviours[eBhvr]) : false; } bool hasBehaviour(ERlvBehaviour eBhvr, const std::string& strOption) const; - // Returns TRUE if the specified object has at least one active behaviour + // Returns true if the specified object has at least one active behaviour bool hasBehaviour(const LLUUID& idObj) { return m_Objects.end() != m_Objects.find(idObj); } - // Returns TRUE if the specified object contains the specified behaviour (and optional option) + // Returns true if the specified object contains the specified behaviour (and optional option) bool hasBehaviour(const LLUUID& idObj, ERlvBehaviour eBhvr, const std::string& strOption = LLStringUtil::null) const; - // Returns TRUE if at least one object (except the specified one) contains the specified behaviour (and optional option) + // Returns true if at least one object (except the specified one) contains the specified behaviour (and optional option) bool hasBehaviourExcept(ERlvBehaviour eBhvr, const LLUUID& idObj) const; bool hasBehaviourExcept(ERlvBehaviour eBhvr, const std::string& strOption, const LLUUID& idObj) const; - // Returns TRUE if at least one object in the linkset with specified root ID contains the specified behaviour (and optional option) + // Returns true if at least one object in the linkset with specified root ID contains the specified behaviour (and optional option) bool hasBehaviourRoot(const LLUUID& idObjRoot, ERlvBehaviour eBhvr, const std::string& strOption = LLStringUtil::null) const; - // Returns TRUE if the specified object is the only object containing the specified behaviour + // Returns true if the specified object is the only object containing the specified behaviour bool ownsBehaviour(const LLUUID& idObj, ERlvBehaviour eBhvr) const; // Adds or removes an exception for the specified behaviour void addException(const LLUUID& idObj, ERlvBehaviour eBhvr, const RlvExceptionOption& varOption); void removeException(const LLUUID& idObj, ERlvBehaviour eBhvr, const RlvExceptionOption& varOption); - // Returns TRUE if the specified behaviour has an added exception + // Returns true if the specified behaviour has an added exception bool hasException(ERlvBehaviour eBhvr) const; - // Returns TRUE if the specified option was added as an exception for the specified behaviour + // Returns true if the specified option was added as an exception for the specified behaviour bool isException(ERlvBehaviour eBhvr, const RlvExceptionOption& varOption, ERlvExceptionCheck eCheckType = ERlvExceptionCheck::Default) const; - // Returns TRUE if the specified behaviour should behave "permissive" (rather than "strict"/"secure") + // Returns true if the specified behaviour should behave "permissive" (rather than "strict"/"secure") bool isPermissive(ERlvBehaviour eBhvr) const; #ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS - // Returns TRUE if the composite folder doesn't contain any "locked" items + // Returns true if the composite folder doesn't contain any "locked" items bool canTakeOffComposite(const LLInventoryCategory* pFolder) const; - // Returns TRUE if the composite folder doesn't replace any "locked" items + // Returns true if the composite folder doesn't replace any "locked" items bool canWearComposite(const LLInventoryCategory* pFolder) const; - // Returns TRUE if the folder is a composite folder and optionally returns the name + // Returns true if the folder is a composite folder and optionally returns the name bool getCompositeInfo(const LLInventoryCategory* pFolder, std::string* pstrName) const; - // Returns TRUE if the inventory item belongs to a composite folder and optionally returns the name and composite folder + // Returns true if the inventory item belongs to a composite folder and optionally returns the name and composite folder bool getCompositeInfo(const LLUUID& idItem, std::string* pstrName, LLViewerInventoryCategory** ppFolder) const; - // Returns TRUE if the folder is a composite folder + // Returns true if the folder is a composite folder bool isCompositeFolder(const LLInventoryCategory* pFolder) const { return getCompositeInfo(pFolder, NULL); } - // Returns TRUE if the inventory item belongs to a composite folder + // Returns true if the inventory item belongs to a composite folder bool isCompositeDescendent(const LLUUID& idItem) const { return getCompositeInfo(idItem, NULL, NULL); } - // Returns TRUE if the inventory item is part of a folded composite folder and should be hidden from @getoufit or @getattach + // Returns true if the inventory item is part of a folded composite folder and should be hidden from @getoufit or @getattach bool isHiddenCompositeItem(const LLUUID& idItem, const std::string& strItemType) const; #endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS public: // Adds a blocked object (= object that is blocked from issuing commands) by UUID (can be null) and/or name void addBlockedObject(const LLUUID& idObj, const std::string& strObjName); - // Returns TRUE if there's an unresolved blocked object (known name but unknown UUID) + // Returns true if there's an unresolved blocked object (known name but unknown UUID) bool hasUnresolvedBlockedObject() const; - // Returns TRUE if the object with the specified UUID is blocked from issuing commands + // Returns true if the object with the specified UUID is blocked from issuing commands bool isBlockedObject(const LLUUID& idObj) const; // Removes a blocked object void removeBlockedObject(const LLUUID& idObj); diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index c591a37328..7d34a7a27c 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -1286,9 +1286,9 @@ void RlvForceWear::forceFolder(const LLViewerInventoryCategory* pFolder, EWearAc // Grab a list of all the items we'll be wearing/attaching LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items; RlvWearableItemCollector f(pFolder, eAction, eFlags); - gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, FALSE, f, true); + gInventory.collectDescendentsIf(pFolder->getUUID(), folders, items, false, f, true); - // TRUE if we've already encountered this LLWearableType::EType (used only on wear actions and only for AT_CLOTHING) + // true if we've already encountered this LLWearableType::EType (used only on wear actions and only for AT_CLOTHING) bool fSeenWType[LLWearableType::WT_COUNT] = { false }; EWearAction eCurAction = eAction; @@ -2092,7 +2092,7 @@ namespace Rlv if ( (LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders")) && (!LLPipeline::WindLightUseAtmosShaders) ) { // Triggers handleSetShaderChanged() which will do the actual work for us - gSavedSettings.setBOOL("WindLightUseAtmosShaders", TRUE); + gSavedSettings.setBOOL("WindLightUseAtmosShaders", true); } } diff --git a/indra/newview/rlvhelper.h b/indra/newview/rlvhelper.h index a4812f333d..f5ffb14e36 100644 --- a/indra/newview/rlvhelper.h +++ b/indra/newview/rlvhelper.h @@ -422,7 +422,7 @@ struct RlvCommandOptionGetPath : public RlvCommandOption static bool getItemIDs(LLWearableType::EType wtType, uuid_vec_t& idItems); protected: - bool m_fCallback; // TRUE if a callback is schedueled + bool m_fCallback; // true if a callback is schedueled uuid_vec_t m_idItems; }; @@ -482,7 +482,7 @@ protected: S32 m_idxAttachPt; // The object's attachment point (or 0 if it's not an attachment) LLUUID m_idObj; // The object's UUID LLUUID m_idRoot; // The UUID of the object's root (may or may not be different from m_idObj) - bool m_fLookup; // TRUE if the object existed in gObjectList at one point in time + bool m_fLookup; // true if the object existed in gObjectList at one point in time S16 m_nLookupMisses; // Count of unsuccessful lookups in gObjectList by the GC rlv_command_list_t m_Commands; // List of behaviours held by this object (in the order they were received) typedef std::map bhvr_modifier_map_t; diff --git a/indra/newview/rlvinventory.cpp b/indra/newview/rlvinventory.cpp index f8362411b9..e64b518fb5 100644 --- a/indra/newview/rlvinventory.cpp +++ b/indra/newview/rlvinventory.cpp @@ -96,7 +96,7 @@ void RlvInventory::fetchSharedInventory() // Grab all the folders under the shared root LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items; - gInventory.collectDescendents(pRlvRoot->getUUID(), folders, items, FALSE); + gInventory.collectDescendents(pRlvRoot->getUUID(), folders, items, false); // Add them to the "to fetch" list uuid_vec_t idFolders; @@ -127,7 +127,7 @@ void RlvInventory::fetchSharedLinks() // Grab all the inventory links under the shared root LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items; RlvIsLinkType f; - gInventory.collectDescendentsIf(pRlvRoot->getUUID(), folders, items, FALSE, f, false); + gInventory.collectDescendentsIf(pRlvRoot->getUUID(), folders, items, false, f, false); // Add them to the "to fetch" list based on link type uuid_vec_t idFolders, idItems; @@ -206,7 +206,7 @@ bool RlvInventory::findSharedFolders(const std::string& strCriteria, LLInventory folders.clear(); LLInventoryModel::item_array_t items; RlvCriteriaCategoryCollector f(strCriteria); - gInventory.collectDescendentsIf(pRlvRoot->getUUID(), folders, items, FALSE, f); + gInventory.collectDescendentsIf(pRlvRoot->getUUID(), folders, items, false, f); return (folders.size() != 0); } @@ -455,7 +455,7 @@ void RlvRenameOnWearObserver::doneIdle() strName += " (" + strAttachPt + ")"; pItem->rename(strName); - pItem->updateServer(FALSE); + pItem->updateServer(false); gInventory.addChangedMask(LLInventoryObserver::LABEL, pItem->getUUID()); } else @@ -472,7 +472,7 @@ void RlvRenameOnWearObserver::doneIdle() (1 == RlvInventory::getDirectDescendentsItemCount(pFolder, LLAssetType::AT_OBJECT)) ) { pFolder->rename(strFolderName); - pFolder->updateServer(FALSE); + pFolder->updateServer(false); gInventory.addChangedMask(LLInventoryObserver::LABEL, pFolder->getUUID()); } else @@ -592,7 +592,7 @@ void RlvGiveToRLVOffer::moveAndRename(const LLUUID& idFolder, const LLUUID& idDe LLPointer pNewFolder = new LLViewerInventoryCategory(pFolder); pNewFolder->setParent(idDestination); - pNewFolder->updateParentOnServer(FALSE); + pNewFolder->updateParentOnServer(false); gInventory.updateCategory(pNewFolder); gInventory.notifyObservers(); diff --git a/indra/newview/rlvinventory.h b/indra/newview/rlvinventory.h index 482a308392..4f20f20cda 100644 --- a/indra/newview/rlvinventory.h +++ b/indra/newview/rlvinventory.h @@ -63,9 +63,9 @@ public: // Returns the path of the supplied folder (relative to the shared root) std::string getSharedPath(const LLViewerInventoryCategory* pFolder) const; std::string getSharedPath(const LLUUID& idFolder) const; - // Returns TRUE if the supplied folder is a descendent of the #RLV folder + // Returns true if the supplied folder is a descendent of the #RLV folder bool isSharedFolder(const LLUUID& idFolder); - // Returns TRUE if the inventory offer is a "give to #RLV" offer + // Returns true if the inventory offer is a "give to #RLV" offer bool isGiveToRLVOffer(const LLOfferInfo& offerInfo); /* @@ -94,8 +94,8 @@ public: * Member variables */ protected: - bool m_fFetchStarted; // TRUE if we fired off an inventory fetch - bool m_fFetchComplete; // TRUE if everything was fetched + bool m_fFetchStarted; // true if we fired off an inventory fetch + bool m_fFetchComplete; // true if everything was fetched mutable LLUUID m_idRlvRoot; callback_signal_t m_OnSharedRootIDChanged; diff --git a/indra/newview/rlvlocks.cpp b/indra/newview/rlvlocks.cpp index 97b4d1afdc..a659c5d994 100644 --- a/indra/newview/rlvlocks.cpp +++ b/indra/newview/rlvlocks.cpp @@ -181,7 +181,7 @@ void RlvAttachmentLocks::addAttachmentLock(const LLUUID& idAttachObj, const LLUU /* // Sanity check - make sure it's an object we know about if ( (m_Objects.find(idRlvObj) == m_Objects.end()) || (!idxAttachPt) ) - return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) + return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == false) */ #ifndef RLV_RELEASE @@ -200,7 +200,7 @@ void RlvAttachmentLocks::addAttachmentPointLock(S32 idxAttachPt, const LLUUID& i /* // Sanity check - make sure it's an object we know about if ( (m_Objects.find(idRlvObj) == m_Objects.end()) || (!idxAttachPt) ) - return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) + return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == false) */ // NOTE: m_AttachPtXXX can contain duplicate pairs (ie @detach:spine=n,detach=n from an attachment on spine) @@ -321,7 +321,7 @@ void RlvAttachmentLocks::removeAttachmentLock(const LLUUID& idAttachObj, const L /* // Sanity check - make sure it's an object we know about if ( (m_Objects.find(idRlvObj) == m_Objects.end()) || (!idxAttachPt) ) - return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) + return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == false) */ #ifndef RLV_RELEASE @@ -351,7 +351,7 @@ void RlvAttachmentLocks::removeAttachmentPointLock(S32 idxAttachPt, const LLUUID /* // Sanity check - make sure it's an object we know about if ( (m_Objects.find(idRlvObj) == m_Objects.end()) || (!idxAttachPt) ) - return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) + return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == false) */ if (eLock & RLV_LOCK_REMOVE) @@ -716,7 +716,7 @@ void RlvAttachmentLockWatchdog::onSavedAssetIntoInventory(const LLUUID& idItem) } // Checked: 2010-03-05 (RLVa-1.2.0a) | Modified: RLVa-1.0.5b -BOOL RlvAttachmentLockWatchdog::onTimer() +bool RlvAttachmentLockWatchdog::onTimer() { // RELEASE-RLVa: [SL-2.0.0] This will need rewriting for "ENABLE_MULTIATTACHMENTS" F64 tsCurrent = LLFrameTimer::getElapsedSeconds(); @@ -822,7 +822,7 @@ void RlvWearableLocks::addWearableTypeLock(LLWearableType::EType eType, const LL /* // Sanity check - make sure it's an object we know about if ( (m_Objects.find(idRlvObj) == m_Objects.end()) || (!idxAttachPt) ) - return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) + return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == false) */ // NOTE: m_WearableTypeXXX can contain duplicate pairs (ie @remoutfit:shirt=n,remoutfit=n from the same object) @@ -835,7 +835,7 @@ void RlvWearableLocks::addWearableTypeLock(LLWearableType::EType eType, const LL // Checked: 2010-03-19 (RLVa-1.2.0c) | Added: RLVa-1.2.0a bool RlvWearableLocks::canRemove(LLWearableType::EType eType) const { - // NOTE: we return TRUE if the wearable type has at least one wearable that can be removed by the user + // NOTE: we return true if the wearable type has at least one wearable that can be removed by the user for (U32 idxWearable = 0, cntWearable = gAgentWearables.getWearableCount(eType); idxWearable < cntWearable; idxWearable++) if (!isLockedWearable(gAgentWearables.getViewerWearable(eType, idxWearable))) return true; @@ -845,7 +845,7 @@ bool RlvWearableLocks::canRemove(LLWearableType::EType eType) const // Checked: 2010-03-19 (RLVa-1.2.0c) | Added: RLVa-1.2.0a bool RlvWearableLocks::hasLockedWearable(LLWearableType::EType eType) const { - // NOTE: we return TRUE if there is at least 1 non-removable wearable currently worn on this wearable type + // NOTE: we return true if there is at least 1 non-removable wearable currently worn on this wearable type for (U32 idxWearable = 0, cntWearable = gAgentWearables.getWearableCount(eType); idxWearable < cntWearable; idxWearable++) if (isLockedWearable(gAgentWearables.getViewerWearable(eType, idxWearable))) return true; @@ -896,7 +896,7 @@ void RlvWearableLocks::removeWearableTypeLock(LLWearableType::EType eType, const /* // Sanity check - make sure it's an object we know about if ( (m_Objects.find(idRlvObj) == m_Objects.end()) || (!idxAttachPt) ) - return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) + return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == false) */ if (eLock & RLV_LOCK_REMOVE) @@ -1053,7 +1053,7 @@ bool RlvFolderLocks::getLockedItems(const LLUUID& idFolder, LLInventoryModel::it LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items; LLFindWearablesEx f(true, true); // Collect all worn items - gInventory.collectDescendentsIf(idFolder, folders, items, FALSE, f); + gInventory.collectDescendentsIf(idFolder, folders, items, false, f); // Generally several of the worn items will belong to the same folder so we'll cache the results of each lookup std::map folderLookups; std::map::const_iterator itLookup; @@ -1125,7 +1125,7 @@ bool RlvFolderLocks::hasLockedFolderDescendent(const LLUUID& idFolder, int eSour LLInventoryModel::cat_array_t folders; LLInventoryModel::item_array_t items; RlvLockedDescendentsCollector f(eSourceTypeMask, ePermMask, eLockTypeMask); - gInventory.collectDescendentsIf(idFolder, folders, items, FALSE, f, false); + gInventory.collectDescendentsIf(idFolder, folders, items, false, f, false); return !folders.empty(); } diff --git a/indra/newview/rlvlocks.h b/indra/newview/rlvlocks.h index 5248d6476d..941e693133 100644 --- a/indra/newview/rlvlocks.h +++ b/indra/newview/rlvlocks.h @@ -68,19 +68,19 @@ public: // Adds an eLock type lock (held by idRlvObj) for the attachment point void addAttachmentPointLock(S32 idxAttachPt, const LLUUID& idRlvObj, ERlvLockMask eLock); - // Returns TRUE if there is at least 1 non-detachable attachment currently attached to the attachment point + // Returns true if there is at least 1 non-detachable attachment currently attached to the attachment point bool hasLockedAttachment(const LLViewerJointAttachment* pAttachPt) const; - // Returns TRUE if there is at least 1 eLock type locked attachment point (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) + // Returns true if there is at least 1 eLock type locked attachment point (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) // - RLV_LOCK_REMOVE: specific attachment locked *or* any attachment point locked (regardless of whether it currently has attachments) bool hasLockedAttachmentPoint(ERlvLockMask eLock) const; - // Returns TRUE if there is at least 1 non-detachable HUD attachment + // Returns true if there is at least 1 non-detachable HUD attachment bool hasLockedHUD() const { return m_fHasLockedHUD; } - // Returns TRUE if the attachment is RLV_LOCK_REMOVE locked + // Returns true if the attachment is RLV_LOCK_REMOVE locked bool isLockedAttachment(const LLViewerObject* pAttachObj) const; - // Returns TRUE if the attachment point is RLV_LOCK_REMOVE locked by anything other than idRlvObj + // Returns true if the attachment point is RLV_LOCK_REMOVE locked by anything other than idRlvObj bool isLockedAttachmentExcept(const LLViewerObject* pObj, const LLUUID& idRlvObj) const; - // Returns TRUE if the attachment point is eLock type locked (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) + // Returns true if the attachment point is eLock type locked (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) bool isLockedAttachmentPoint(S32 idxAttachPt, ERlvLockMask eLock) const; bool isLockedAttachmentPoint(const LLViewerJointAttachment* pAttachPt, ERlvLockMask eLock) const; @@ -91,27 +91,27 @@ public: // Refreshes locked HUD attachment state void updateLockedHUD(); - // Iterates over all current attachment and attachment point locks and verifies their status (returns TRUE if verification succeeded) + // Iterates over all current attachment and attachment point locks and verifies their status (returns true if verification succeeded) bool verifyAttachmentLocks(); protected: - // Returns TRUE if the attachment point is eLock type locked by anything other than idRlvObj + // Returns true if the attachment point is eLock type locked by anything other than idRlvObj bool isLockedAttachmentPointExcept(S32 idxAttachPt, ERlvLockMask eLock, const LLUUID& idRlvObj) const; /* * canAttach/canDetach trivial helper functions (note that a more approriate name might be userCanAttach/userCanDetach) */ public: - // Returns TRUE if there is at least one attachment point that can be attached to + // Returns true if there is at least one attachment point that can be attached to bool canAttach() const; - // Returns TRUE if the inventory item can be attached by the user (and optionally provides the attachment point - which may be NULL) + // Returns true if the inventory item can be attached by the user (and optionally provides the attachment point - which may be NULL) ERlvWearMask canAttach(const LLInventoryItem* pItem, LLViewerJointAttachment** ppAttachPtOut = NULL) const; - // Returns TRUE if the attachment point can be attached to by the user + // Returns true if the attachment point can be attached to by the user ERlvWearMask canAttach(const LLViewerJointAttachment* pAttachPt) const; - // Returns TRUE if the inventory item can be detached by the user + // Returns true if the inventory item can be detached by the user bool canDetach(const LLInventoryItem* pItem) const; - // Returns TRUE if the attachment point has at least one attachment that can be detached by the user + // Returns true if the attachment point has at least one attachment that can be detached by the user bool canDetach(const LLViewerJointAttachment* pAttachPt, bool fDetachAll = false) const; /* @@ -162,7 +162,7 @@ public: void onAttach(const LLViewerObject* pAttachObj, const LLViewerJointAttachment* pAttachPt); void onDetach(const LLViewerObject* pAttachObj, const LLViewerJointAttachment* pAttachPt); void onSavedAssetIntoInventory(const LLUUID& idItem); - BOOL onTimer(); + bool onTimer(); void onWearAttachment(const LLInventoryItem* pItem, ERlvWearMask eWearAction); void onWearAttachment(const LLUUID& idItem, ERlvWearMask eWearAction); @@ -226,25 +226,25 @@ public: // Adds an eLock type lock (held by idRlvObj) for the wearable type void addWearableTypeLock(LLWearableType::EType eType, const LLUUID& idRlvObj, ERlvLockMask eLock); - // Returns TRUE if there is at least 1 non-removable wearable currently worn on this wearable type + // Returns true if there is at least 1 non-removable wearable currently worn on this wearable type bool hasLockedWearable(LLWearableType::EType eType) const; - // Returns TRUE if there is at least 1 eLock type locked wearable type (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) + // Returns true if there is at least 1 eLock type locked wearable type (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) // - RLV_LOCK_REMOVE: specific wearable locked *or* any wearable type locked (regardless of whether it currently has wearables) bool hasLockedWearableType(ERlvLockMask eLock) const; // Removes an eLock type lock (held by idRlvObj) for the wearable type void removeWearableTypeLock(LLWearableType::EType eType, const LLUUID& idRlvObj, ERlvLockMask eLock); - // Returns TRUE if the wearable is RLV_LOCK_REMOVE locked + // Returns true if the wearable is RLV_LOCK_REMOVE locked bool isLockedWearable(const LLViewerWearable* pWearable) const; - // Returns TRUE if the wearable is RLV_LOCK_REMOVE locked by anything other than idRlvObj + // Returns true if the wearable is RLV_LOCK_REMOVE locked by anything other than idRlvObj bool isLockedWearableExcept(const LLViewerWearable* pWearable, const LLUUID& idRlvObj) const; // NOTE: isLockedWearableType doesn't check if a worn wearable is a specific wearable lock so don't let these be called by the outside protected: - // Returns TRUE if the wearable type is eLock type locked + // Returns true if the wearable type is eLock type locked bool isLockedWearableType(LLWearableType::EType eType, ERlvLockMask eLock) const; - // Returns TRUE if the wearable type is eLock type locked by anything other than idRlvObj + // Returns true if the wearable type is eLock type locked by anything other than idRlvObj bool isLockedWearableTypeExcept(LLWearableType::EType eType, ERlvLockMask eLock, const LLUUID& idRlvObj) const; /* @@ -256,9 +256,9 @@ public: // Returns whether the wearable type can be worn to by the user ERlvWearMask canWear(LLWearableType::EType eType) const; - // Returns TRUE if the inventory item can be removed by the user + // Returns true if the inventory item can be removed by the user bool canRemove(const LLInventoryItem* pItem) const; - // Returns TRUE if the wearable type has at least one wearable that can be removed by the user + // Returns true if the wearable type has at least one wearable that can be removed by the user bool canRemove(LLWearableType::EType eType) const; /* @@ -312,27 +312,27 @@ public: // Adds an eLock type lock (held by idRlvObj) for the specified folder source (with ePerm and eScope lock options) void addFolderLock(const folderlock_source_t& lockSource, ELockPermission ePerm, ELockScope eScope, const LLUUID& idRlvObj, ERlvLockMask eLockType); - // Returns TRUE if there is at least 1 non-detachable attachment as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock + // Returns true if there is at least 1 non-detachable attachment as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock bool hasLockedAttachment() const; - // Returns TRUE if there is at least 1 eLock type PERM_DENY locked folder (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) + // Returns true if there is at least 1 eLock type PERM_DENY locked folder (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) bool hasLockedFolder(ERlvLockMask eLockTypeMask) const; - // Returns TRUE if the folder has a descendent folder lock with the specified charateristics + // Returns true if the folder has a descendent folder lock with the specified charateristics bool hasLockedFolderDescendent(const LLUUID& idFolder, int eSourceTypeMask, ELockPermission ePermMask, ERlvLockMask eLockTypeMask, bool fCheckSelf) const; - // Returns TRUE if there is at least 1 non-removable wearable as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock + // Returns true if there is at least 1 non-removable wearable as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock bool hasLockedWearable() const; - // Returns TRUE if the attachment (specified by item UUID) is non-detachable as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock + // Returns true if the attachment (specified by item UUID) is non-detachable as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock bool isLockedAttachment(const LLUUID& idItem) const; - // Returns TRUE if the folder is locked as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock + // Returns true if the folder is locked as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock bool isLockedFolder(LLUUID idFolder, ERlvLockMask eLock, int eSourceTypeMask = ST_MASK_ANY, std::list* pLockSourceList = nullptr) const; - // Returns TRUE if the wearable (specified by item UUID) is non-removable as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock + // Returns true if the wearable (specified by item UUID) is non-removable as a result of a RLV_LOCK_REMOVE folder PERM_DENY lock bool isLockedWearable(const LLUUID& idItem) const; // Removes an eLock type lock (held by idRlvObj) for the specified folder source (with ePerm and eScope lock options) void removeFolderLock(const folderlock_source_t& lockSource, ELockPermission ePerm, ELockScope eScope, const LLUUID& idRlvObj, ERlvLockMask eLockType); protected: - // Returns TRUE if the folder has an explicit folder lock entry with the specified charateristics + // Returns true if the folder has an explicit folder lock entry with the specified charateristics bool isLockedFolderEntry(const LLUUID& idFolder, int eSourceTypeMask, ELockPermission ePermMask, ERlvLockMask eLockTypeMask) const; /* diff --git a/indra/newview/rlvui.cpp b/indra/newview/rlvui.cpp index a8290b4942..51bda1b1ce 100644 --- a/indra/newview/rlvui.cpp +++ b/indra/newview/rlvui.cpp @@ -98,7 +98,7 @@ void RlvUIEnabler::onRefreshHoverText() void RlvUIEnabler::onToggleMovement() { if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FLY)) && (gAgent.getFlying()) ) - gAgent.setFlying(FALSE); + gAgent.setFlying(false); if ( (gRlvHandler.hasBehaviour(RLV_BHVR_ALWAYSRUN)) && (gAgent.getAlwaysRun()) ) gAgent.clearAlwaysRun(); if ( (gRlvHandler.hasBehaviour(RLV_BHVR_TEMPRUN)) && (gAgent.getTempRun()) ) @@ -201,7 +201,7 @@ void RlvUIEnabler::onToggleShowMinimap() // Break/reestablish the visibility connection for the nearby people panel embedded minimap instance LLPanel* pPeoplePanel = LLFloaterSidePanelContainer::getPanel("people", "panel_people"); - LLPanel* pNetMapPanel = (pPeoplePanel) ? pPeoplePanel->getChild("minimaplayout", TRUE) : NULL; //AO: firestorm specific + LLPanel* pNetMapPanel = (pPeoplePanel) ? pPeoplePanel->getChild("minimaplayout", true) : NULL; //AO: firestorm specific RLV_ASSERT( (pPeoplePanel) && (pNetMapPanel) ); if (pNetMapPanel) { @@ -213,7 +213,7 @@ void RlvUIEnabler::onToggleShowMinimap() // Break/reestablish the visibility connection for the radar panel embedded minimap instance LLFloater* pRadarFloater = LLFloaterReg::getInstance("fs_radar"); - LLPanel* pRadarNetMapPanel = (pRadarFloater) ? pRadarFloater->getChild("minimaplayout", TRUE) : NULL; //AO: firestorm specific + LLPanel* pRadarNetMapPanel = (pRadarFloater) ? pRadarFloater->getChild("minimaplayout", true) : NULL; //AO: firestorm specific RLV_ASSERT( (pRadarFloater) && (pRadarNetMapPanel) ); if (pRadarNetMapPanel) { diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp index 45ce1ba62f..7d1071e98a 100644 --- a/indra/newview/tests/llagentaccess_test.cpp +++ b/indra/newview/tests/llagentaccess_test.cpp @@ -55,12 +55,12 @@ LLControlVariable* LLControlGroup::declareU32(const std::string& name, U32 initi return NULL; } -void LLControlGroup::setU32(const std::string& name, U32 val) +void LLControlGroup::setU32(std::string_view name, U32 val) { test_preferred_maturity = val; } -U32 LLControlGroup::getU32(const std::string& name) +U32 LLControlGroup::getU32(std::string_view name) { return test_preferred_maturity; } diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 95d75a0a0e..4c6ad35032 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -74,7 +74,7 @@ static LLSD gLoginCreds; static bool gDisconnectCalled = false; #include "../llviewerwindow.h" -void LLViewerWindow::setShowProgress(BOOL show) {} +void LLViewerWindow::setShowProgress(bool show) {} LLProgressView * LLViewerWindow::getProgressView(void) const { return 0; } LLViewerWindow* gViewerWindow; @@ -220,12 +220,12 @@ LLControlGroup gSavedSettings("Global"); LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker(name){} LLControlGroup::~LLControlGroup() {} -void LLControlGroup::setBOOL(const std::string& name, bool val) {} -bool LLControlGroup::getBOOL(const std::string& name) { return false; } -F32 LLControlGroup::getF32(const std::string& name) { return 0.0f; } +void LLControlGroup::setBOOL(std::string_view name, bool val) {} +bool LLControlGroup::getBOOL(std::string_view name) { return false; } +F32 LLControlGroup::getF32(std::string_view name) { return 0.0f; } U32 LLControlGroup::saveToFile(const std::string& filename, bool nondefault_only) { return 1; } -void LLControlGroup::setString(const std::string& name, const std::string& val) {} -std::string LLControlGroup::getString(const std::string& name) { return "test_string"; } +void LLControlGroup::setString(std::string_view name, const std::string& val) {} +std::string LLControlGroup::getString(std::string_view name) { return "test_string"; } LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, bool initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; } LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; } diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp index 7d2a9a436f..169a3ab1a2 100644 --- a/indra/newview/tests/llsecapi_test.cpp +++ b/indra/newview/tests/llsecapi_test.cpp @@ -43,8 +43,8 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, LLControlVariable::ePersist persist) {return NULL;} -void LLControlGroup::setString(const std::string& name, const std::string& val){} -std::string LLControlGroup::getString(const std::string& name) +void LLControlGroup::setString(std::string_view name, const std::string& val){} +std::string LLControlGroup::getString(std::string_view name) { return ""; } @@ -109,10 +109,10 @@ namespace tut { // retrieve an unknown handler - ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown")); + ensure("'Unknown' handler should be NULL", getSecHandler("unknown") == nullptr); LLPointer test1_handler = new LLSecAPIBasicHandler(); registerSecHandler("sectest1", test1_handler); - ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown")); + ensure("'Unknown' handler should be NULL", getSecHandler("unknown") == nullptr); LLPointer retrieved_test1_handler = getSecHandler("sectest1"); ensure("Retrieved sectest1 handler should be the same", retrieved_test1_handler == test1_handler); @@ -120,7 +120,7 @@ namespace tut // insert a second handler LLPointer test2_handler = new LLSecAPIBasicHandler(); registerSecHandler("sectest2", test2_handler); - ensure("'Unknown' handler should be NULL", !(BOOL)getSecHandler("unknown")); + ensure("'Unknown' handler should be NULL", getSecHandler("unknown") == nullptr); retrieved_test1_handler = getSecHandler("sectest1"); ensure("Retrieved sectest1 handler should be the same", retrieved_test1_handler == test1_handler); diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index b720e60d21..18b424c95b 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -78,8 +78,8 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, LLControlVariable::ePersist persist) {return NULL;} -void LLControlGroup::setString(const std::string& name, const std::string& val){} -std::string LLControlGroup::getString(const std::string& name) +void LLControlGroup::setString(std::string_view name, const std::string& val){} +std::string LLControlGroup::getString(std::string_view name) { if (name == "FirstName") @@ -90,7 +90,7 @@ std::string LLControlGroup::getString(const std::string& name) } // Stub for --no-verify-ssl-cert -bool LLControlGroup::getBOOL(const std::string& name) { return false; } +bool LLControlGroup::getBOOL(std::string_view name) { return false; } LLSD LLCredential::getLoginParams() { diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index 5fd61c5a89..87859fab7d 100644 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -92,14 +92,14 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, LLControlVariable::ePersist persist) {return NULL;} -void LLControlGroup::setString(const std::string& name, const std::string& val){} +void LLControlGroup::setString(std::string_view name, const std::string& val){} std::string gCmdLineLoginURI; std::string gCmdLineGridChoice; std::string gCmdLineHelperURI; std::string gLoginPage; std::string gCurrentGrid; -std::string LLControlGroup::getString(const std::string& name) +std::string LLControlGroup::getString(std::string_view name) { if (name == "CmdLineGridChoice") return gCmdLineGridChoice; @@ -112,7 +112,7 @@ std::string LLControlGroup::getString(const std::string& name) return ""; } -LLSD LLControlGroup::getLLSD(const std::string& name) +LLSD LLControlGroup::getLLSD(std::string_view name) { if (name == "CmdLineLoginURI") { @@ -124,9 +124,9 @@ LLSD LLControlGroup::getLLSD(const std::string& name) return LLSD(); } -LLPointer LLControlGroup::getControl(const std::string& name) +LLPointer LLControlGroup::getControl(std::string_view name) { - ctrl_name_table_t::iterator iter = mNameTable.find(name); + ctrl_name_table_t::iterator iter = mNameTable.find(name.data()); return iter == mNameTable.end() ? LLPointer() : iter->second; } diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index f6456a2839..ddcc4d8f7a 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -53,8 +53,8 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, LLControlVariable::ePersist persist) {return NULL;} -void LLControlGroup::setString(const std::string& name, const std::string& val){} -std::string LLControlGroup::getString(const std::string& name) +void LLControlGroup::setString(std::string_view name, const std::string& val){} +std::string LLControlGroup::getString(std::string_view name) { if (name == "HelpURLFormat") return gHelpURL; diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index fe81fd63ea..4e5caf2ffe 100644 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -73,14 +73,14 @@ LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, LLControlVariable::ePersist persist) {return NULL;} -void LLControlGroup::setString(const std::string& name, const std::string& val){} +void LLControlGroup::setString(std::string_view name, const std::string& val){} std::string gCmdLineLoginURI; std::string gCmdLineGridChoice; std::string gCmdLineHelperURI; std::string gLoginPage; std::string gCurrentGrid; -std::string LLControlGroup::getString(const std::string& name) +std::string LLControlGroup::getString(std::string_view name) { if (name == "CmdLineGridChoice") return gCmdLineGridChoice; @@ -93,7 +93,7 @@ std::string LLControlGroup::getString(const std::string& name) return ""; } -LLSD LLControlGroup::getLLSD(const std::string& name) +LLSD LLControlGroup::getLLSD(std::string_view name) { if (name == "CmdLineLoginURI") { @@ -105,9 +105,9 @@ LLSD LLControlGroup::getLLSD(const std::string& name) return LLSD(); } -LLPointer LLControlGroup::getControl(const std::string& name) +LLPointer LLControlGroup::getControl(std::string_view name) { - ctrl_name_table_t::iterator iter = mNameTable.find(name); + ctrl_name_table_t::iterator iter = mNameTable.find(name.data()); return iter == mNameTable.end() ? LLPointer() : iter->second; } diff --git a/indra/newview/tests/llworldmap_test.cpp b/indra/newview/tests/llworldmap_test.cpp index f1dd8acccf..1f5a838e2a 100644 --- a/indra/newview/tests/llworldmap_test.cpp +++ b/indra/newview/tests/llworldmap_test.cpp @@ -49,7 +49,7 @@ // Stub image calls void LLGLTexture::setBoostLevel(S32 ) { } void LLGLTexture::setAddressMode(LLTexUnit::eTextureAddressMode ) { } -LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(const LLUUID&, FTType, BOOL, LLGLTexture::EBoostLevel, S8, +LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture(const LLUUID&, FTType, bool, LLGLTexture::EBoostLevel, S8, LLGLint, LLGLenum, LLHost ) { return NULL; } // Stub related map calls diff --git a/indra/newview/tests/llworldmipmap_test.cpp b/indra/newview/tests/llworldmipmap_test.cpp index 142d75bcfd..5f86968463 100644 --- a/indra/newview/tests/llworldmipmap_test.cpp +++ b/indra/newview/tests/llworldmipmap_test.cpp @@ -43,12 +43,12 @@ // * A simulator for a class can be implemented here. Please comment and document thoroughly. void LLGLTexture::setBoostLevel(S32 ) { } -LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string&, FTType, BOOL, LLGLTexture::EBoostLevel, S8, +LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string&, FTType, bool, LLGLTexture::EBoostLevel, S8, LLGLint, LLGLenum, const LLUUID& ) { return NULL; } LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker(name) { } LLControlGroup::~LLControlGroup() { } -std::string LLControlGroup::getString(const std::string& ) { return std::string("test_url"); } +std::string LLControlGroup::getString(std::string_view) { return std::string("test_url"); } LLControlGroup gSavedSettings("test_settings"); // End Stubbing diff --git a/indra/newview/utilitybar.cpp b/indra/newview/utilitybar.cpp index 129db6095c..f593b40016 100644 --- a/indra/newview/utilitybar.cpp +++ b/indra/newview/utilitybar.cpp @@ -114,7 +114,7 @@ bool UtilityBar::tick() // initialize parcel media classes too early if (LLStartUp::getStartupState() != STATE_STARTED) { - return FALSE; + return false; } // NOTE: copied from llstatusbar.cpp @@ -156,7 +156,7 @@ bool UtilityBar::tick() mPTTButton->setEnabled(LLAgent::isActionAllowed(LLSD("speak"))); } - return FALSE; + return false; } void UtilityBar::setAOInterfaceButtonExpanded(bool expanded) diff --git a/indra/newview/vjfloaterlocalmesh.cpp b/indra/newview/vjfloaterlocalmesh.cpp index c0f8ca2d33..5f48aa268d 100644 --- a/indra/newview/vjfloaterlocalmesh.cpp +++ b/indra/newview/vjfloaterlocalmesh.cpp @@ -366,7 +366,7 @@ bool LLFloaterLocalMesh::processPrimCreated(LLViewerObject* object) } // Select the new object - LLSelectMgr::getInstance()->selectObjectAndFamily(object, TRUE); + LLSelectMgr::getInstance()->selectObjectAndFamily(object, true); // LLUUID local_id{"aee92334-90e9-110b-7c03-0ff3bc19de63"}; @@ -378,7 +378,7 @@ bool LLFloaterLocalMesh::processPrimCreated(LLViewerObject* object) } auto volume_params{volp->getParams()}; - object->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, TRUE, TRUE); + object->setParameterEntryInUse(LLNetworkData::PARAMS_SCULPT, true, true); auto *sculpt_params = (LLSculptParams *)object->getParameterEntry(LLNetworkData::PARAMS_SCULPT); if (sculpt_params) @@ -701,7 +701,7 @@ void LLFloaterLocalMesh::toggleSelectTool(bool toggle) if (toggle) { - LLSelectMgr::getInstance()->setForceSelection(TRUE); + LLSelectMgr::getInstance()->setForceSelection(true); LLToolMgr::getInstance()->setTransientTool(LLToolCompInspect::getInstance()); // this one's necessary for the tool to actually be active, go figure. diff --git a/indra/newview/vjlocalmesh.cpp b/indra/newview/vjlocalmesh.cpp index c0217bb9cd..7f54d3e3e5 100644 --- a/indra/newview/vjlocalmesh.cpp +++ b/indra/newview/vjlocalmesh.cpp @@ -381,7 +381,7 @@ void LLLocalMeshObject::fillVolume(LLLocalMeshFileLOD lod) if (current_volume) { current_volume->copyFacesFrom(new_faces); - current_volume->setMeshAssetLoaded(TRUE); + current_volume->setMeshAssetLoaded(true); LLPrimitive::getVolumeManager()->unrefVolume(current_volume); } } diff --git a/indra/test/llbuffer_tut.cpp b/indra/test/llbuffer_tut.cpp index 9b8aae6a73..52dc909a2c 100644 --- a/indra/test/llbuffer_tut.cpp +++ b/indra/test/llbuffer_tut.cpp @@ -62,7 +62,7 @@ namespace tut ensure("LLSegment get functions failed", (0 == segment.getChannel() && NULL == segment.data() && 0 == segment.size())); segment.setChannel(50); ensure_equals("LLSegment setChannel() function failed", segment.getChannel(), 50); - ensure("LLSegment isOnChannel() function failed", (TRUE == segment.isOnChannel(50))); + ensure("LLSegment isOnChannel() function failed", (true == segment.isOnChannel(50))); } template<> template<> @@ -74,7 +74,7 @@ namespace tut LLSegment segment(channel, (U8*)str, len); ensure("LLSegment get functions failed", (30 == segment.getChannel() && len == segment.size() && (U8*)str == segment.data())); ensure_memory_matches("LLSegment::data() failed", segment.data(), segment.size(), (U8*)str, len); - ensure("LLSegment isOnChannel() function failed", (TRUE == segment.isOnChannel(channel))); + ensure("LLSegment isOnChannel() function failed", (true == segment.isOnChannel(channel))); } template<> template<> @@ -91,27 +91,27 @@ namespace tut S32 requestSize; requestSize = 16384-1; - ensure("1. LLHeapBuffer createSegment failed", (TRUE == buf.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); + ensure("1. LLHeapBuffer createSegment failed", (true == buf.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); // second request for remainign 1 byte requestSize = 1; - ensure("2. LLHeapBuffer createSegment failed", (TRUE == buf.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); + ensure("2. LLHeapBuffer createSegment failed", (true == buf.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); // it should fail now. requestSize = 1; - ensure("3. LLHeapBuffer createSegment failed", (FALSE == buf.createSegment(channel, requestSize, segment))); + ensure("3. LLHeapBuffer createSegment failed", (false == buf.createSegment(channel, requestSize, segment))); LLHeapBuffer buf1(bigSize); // requst for more than default size but less than total sizeit should fail now. requestSize = 16384 + 1; - ensure("4. LLHeapBuffer createSegment failed", (TRUE == buf1.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); + ensure("4. LLHeapBuffer createSegment failed", (true == buf1.createSegment(channel, requestSize, segment)) && segment.size() == requestSize); LLHeapBuffer buf2((U8*) str, smallSize); requestSize = smallSize; - ensure("5. LLHeapBuffer createSegment failed", (TRUE == buf2.createSegment(channel, requestSize, segment)) && segment.size() == requestSize && memcmp(segment.data(), (U8*) str, requestSize) == 0); + ensure("5. LLHeapBuffer createSegment failed", (true == buf2.createSegment(channel, requestSize, segment)) && segment.size() == requestSize && memcmp(segment.data(), (U8*) str, requestSize) == 0); requestSize = smallSize+1; - ensure("6. LLHeapBuffer createSegment failed", (FALSE == buf2.createSegment(channel, requestSize, segment))); + ensure("6. LLHeapBuffer createSegment failed", (false == buf2.createSegment(channel, requestSize, segment))); } //makeChannelConsumer()