From b66d6679b268069b155e7a0f5b843095a200a29f Mon Sep 17 00:00:00 2001 From: Rye Date: Thu, 23 Oct 2025 20:19:06 -0400 Subject: Run tests using ctest after all targets are built to reduce build contention Reuse test runner compilation unit to reduce extra source files compiled by 189 Only build macOS tests for build host architecture that will be running them to reduce wasted CI time Signed-off-by: Rye --- indra/integration_tests/llimage_libtest/CMakeLists.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/integration_tests/llimage_libtest') diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index e6ff142626..40837c8abb 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -9,7 +9,6 @@ include(00-Common) include(LLCommon) include(LLImage) include(LLMath) -include(LLKDU) set(llimage_libtest_SOURCE_FILES llimage_libtest.cpp @@ -26,6 +25,18 @@ add_executable(llimage_libtest ${llimage_libtest_SOURCE_FILES} ) +set_target_properties(llimage_libtest + PROPERTIES + FOLDER "Tests" + ) + +if(DARWIN) + set_target_properties(llimage_libtest + PROPERTIES + OSX_ARCHITECTURES ${LL_MACOS_TEST_ARCHITECTURE} + ) +endif() + # Libraries on which this application depends on # Sort by high-level to low-level target_link_libraries(llimage_libtest -- cgit v1.3 From 7429ee1f84161103affefa97a7d4f40803445364 Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 28 Oct 2025 09:28:55 -0400 Subject: Fix multiple unicode file io handling issues with llofstream and llifstream Signed-off-by: Rye --- indra/integration_tests/llimage_libtest/llimage_libtest.cpp | 2 +- indra/llcommon/llprocessor.cpp | 2 +- indra/llcommon/tests/llprocess_test.cpp | 8 ++++---- indra/llcommon/tests/llsdserialize_test.cpp | 2 +- indra/llfilesystem/lldir_win32.cpp | 4 ++-- indra/llui/llviewereventrecorder.h | 2 +- indra/newview/gltf/accessor.cpp | 2 +- indra/newview/gltf/asset.cpp | 4 ++-- indra/newview/gltf/llgltfloader.cpp | 2 +- indra/newview/llsettingsvo.cpp | 4 ++-- indra/newview/llviewerdisplay.cpp | 2 +- indra/newview/tests/llsechandler_basic_test.cpp | 4 ++-- indra/test/test.cpp | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) (limited to 'indra/integration_tests/llimage_libtest') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index c45bd6fd01..1bd1bb2d2b 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -329,7 +329,7 @@ public: void run() { - std::ofstream os(mFile.c_str()); + llofstream os(mFile.c_str()); while (!sAllDone) { diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 012b4ffb59..464578c2d9 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -841,7 +841,7 @@ private: // Nicky: We just look into cpu0. In theory we could iterate over all cores // "/sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq" // But those should not fluctuate that much? - std::ifstream fIn { "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" }; + llifstream fIn{ "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" }; if( !fIn.is_open() ) return 0.0; diff --git a/indra/llcommon/tests/llprocess_test.cpp b/indra/llcommon/tests/llprocess_test.cpp index 9eaf5bf3e3..4a88d69ded 100644 --- a/indra/llcommon/tests/llprocess_test.cpp +++ b/indra/llcommon/tests/llprocess_test.cpp @@ -95,7 +95,7 @@ static std::string readfile(const std::string& pathname, const std::string& desc { use_desc = "in " + pathname; } - std::ifstream inf(pathname.c_str()); + llifstream inf(pathname.c_str()); std::string output; if (!std::getline(inf, output)) { @@ -186,7 +186,7 @@ struct PythonProcessLauncher const char* APR_LOG = getenv("APR_LOG"); if (APR_LOG && *APR_LOG) { - std::ifstream inf(APR_LOG); + llifstream inf(APR_LOG); if (! inf.is_open()) { LL_WARNS() << "Couldn't open '" << APR_LOG << "'" << LL_ENDL; @@ -838,7 +838,7 @@ namespace tut // How do we know it's not terminated? By making it respond to // a specific stimulus in a specific way. { - std::ofstream outf(to.getName().c_str()); + llofstream outf(to.getName().c_str()); outf << "go"; } // flush and close. // now wait for the script to terminate... one way or another. @@ -901,7 +901,7 @@ namespace tut // How do we know it's not terminated? By making it respond to // a specific stimulus in a specific way. { - std::ofstream outf(to.getName().c_str()); + llofstream outf(to.getName().c_str()); outf << "go"; } // flush and close. // now wait for the script to terminate... one way or another. diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp index fae9f7023f..ee315051d8 100644 --- a/indra/llcommon/tests/llsdserialize_test.cpp +++ b/indra/llcommon/tests/llsdserialize_test.cpp @@ -2117,7 +2117,7 @@ namespace tut " f.write(lenformat.pack(len(serialized)))\n" " f.write(serialized)\n";}); - std::ifstream inf(file.getName().c_str()); + llifstream inf(file.getName().c_str()); LLSD item; try { diff --git a/indra/llfilesystem/lldir_win32.cpp b/indra/llfilesystem/lldir_win32.cpp index 58c080c982..9624b1197f 100644 --- a/indra/llfilesystem/lldir_win32.cpp +++ b/indra/llfilesystem/lldir_win32.cpp @@ -52,7 +52,7 @@ namespace // This is called so early that we can't count on static objects being // properly constructed yet, so declare a pointer instead of an instance. - std::ofstream* prelogf = nullptr; + llofstream* prelogf = nullptr; void prelog(const std::string& message) { @@ -208,7 +208,7 @@ LLDir_Win32::LLDir_Win32() { // successfully created logdir, plunk a log file there std::string logfilename(add(mOSUserDir, "lldir.log")); - std::ofstream logfile(logfilename.c_str()); + llofstream logfile(logfilename.c_str()); if (! logfile.is_open()) { report(std::cerr); diff --git a/indra/llui/llviewereventrecorder.h b/indra/llui/llviewereventrecorder.h index 5636c068d8..3bd8eb1f75 100644 --- a/indra/llui/llviewereventrecorder.h +++ b/indra/llui/llviewereventrecorder.h @@ -75,7 +75,7 @@ public: bool logEvents; std::string mLogFilename; - llofstream mLog; + llofstream mLog; private: diff --git a/indra/newview/gltf/accessor.cpp b/indra/newview/gltf/accessor.cpp index f0ad3fa594..900c1da170 100644 --- a/indra/newview/gltf/accessor.cpp +++ b/indra/newview/gltf/accessor.cpp @@ -213,7 +213,7 @@ bool Buffer::save(Asset& asset, const std::string& folder) bin_file += mUri; - std::ofstream file(bin_file, std::ios::binary); + llofstream file(bin_file, std::ios::binary); if (!file.is_open()) { LL_WARNS("GLTF") << "Failed to open file: " << bin_file << LL_ENDL; diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index 28f30ae1c9..daa992b269 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -928,7 +928,7 @@ bool Asset::save(const std::string& filename) object obj; serialize(obj); std::string buffer = boost::json::serialize(obj, {}); - std::ofstream file(filename, std::ios::binary); + llofstream file(filename, std::ios::binary); file.write(buffer.c_str(), buffer.size()); return true; @@ -1090,7 +1090,7 @@ bool Image::save(Asset& asset, const std::string& folder) // set URI to non-j2c file for now, but later we'll want to reference the j2c hash mUri = name + extension; - std::ofstream file(filename, std::ios::binary); + llofstream file(filename, std::ios::binary); file.write((const char*)buffer.mData.data() + bufferView.mByteOffset, bufferView.mByteLength); } else if (mTexture.notNull()) diff --git a/indra/newview/gltf/llgltfloader.cpp b/indra/newview/gltf/llgltfloader.cpp index 12bd5661d2..c7e598beb7 100644 --- a/indra/newview/gltf/llgltfloader.cpp +++ b/indra/newview/gltf/llgltfloader.cpp @@ -1762,7 +1762,7 @@ std::string LLGLTFLoader::extractTextureToTempFile(S32 textureIndex, const std:: "gltf_embedded_" + texture_type + "_" + std::to_string(sourceIndex) + extension; // Write the image data to the temporary file - std::ofstream temp_file(temp_filename, std::ios::binary); + llofstream temp_file(temp_filename, std::ios::binary); if (temp_file.is_open()) { temp_file.write(reinterpret_cast(data_ptr), data_size); diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 6023f6885d..8329ed86da 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -364,7 +364,7 @@ bool LLSettingsVOBase::exportFile(const LLSettingsBase::ptr_t &settings, const s { try { - std::ofstream file(filename, std::ios::out | std::ios::trunc); + llofstream file(filename, std::ios::out | std::ios::trunc); file.exceptions(std::ios_base::failbit | std::ios_base::badbit); if (!file) @@ -390,7 +390,7 @@ LLSettingsBase::ptr_t LLSettingsVOBase::importFile(const std::string &filename) try { - std::ifstream file(filename, std::ios::in); + llifstream file(filename, std::ios::in); file.exceptions(std::ios_base::failbit | std::ios_base::badbit); if (!file) diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index eaff660a78..61c5aa4da4 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1070,7 +1070,7 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot) LLGLSLShader::finishProfile(stats); auto report_name = getProfileStatsFilename(); - std::ofstream outf(report_name); + llofstream outf(report_name); if (! outf) { LL_WARNS() << "Couldn't write to " << std::quoted(report_name) << LL_ENDL; diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index f4ee15319e..acbadbc85a 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -773,7 +773,7 @@ namespace tut LLMachineID::getUniqueID(unique_id, sizeof(unique_id)); LLXORCipher cipher2(unique_id, sizeof(unique_id)); cipher2.encrypt(&binary_data[0], 16); - std::ofstream temp_file("sechandler_settings.tmp", std::ofstream::binary); + llofstream temp_file("sechandler_settings.tmp", std::ofstream::binary); temp_file.write((const char *)&binary_data[0], binary_data.size()); temp_file.close(); @@ -846,7 +846,7 @@ namespace tut // rewrite the initial file to verify reloads handler = NULL; - std::ofstream temp_file2("sechandler_settings.tmp", std::ofstream::binary); + llofstream temp_file2("sechandler_settings.tmp", std::ofstream::binary); temp_file2.write((const char *)&binary_data[0], binary_data.size()); temp_file2.close(); diff --git a/indra/test/test.cpp b/indra/test/test.cpp index 172b6e3542..b611e52835 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -108,7 +108,7 @@ public: void replay(std::ostream& out) { mFile.close(); - std::ifstream inf(mTempFile.getName().c_str()); + llifstream inf(mTempFile.getName().c_str()); std::string line; while (std::getline(inf, line)) { -- cgit v1.3 From 76837f96554a683462bb9a28457b7b0d9c078bff Mon Sep 17 00:00:00 2001 From: Rye Date: Sun, 2 Nov 2025 01:05:40 -0500 Subject: Fix support for setting thread names on linux and macos Signed-off-by: Rye --- .../llimage_libtest/llimage_libtest.cpp | 5 +++ indra/llappearanceutility/appearance_utility.cpp | 5 +++ indra/llcommon/llthread.cpp | 46 ++++++++++------------ indra/llcommon/llthread.h | 8 +--- indra/llcommon/threadpool.cpp | 1 + indra/llcorehttp/_httpservice.cpp | 3 +- indra/test/test.cpp | 5 +++ 7 files changed, 40 insertions(+), 33 deletions(-) (limited to 'indra/integration_tests/llimage_libtest') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index 1bd1bb2d2b..b82ced2f8d 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -345,6 +345,11 @@ public: int main(int argc, char** argv) { + // Call Tracy first thing to have it allocate memory + // https://github.com/wolfpld/tracy/issues/196 + LL_PROFILER_FRAME_END; + LL_PROFILER_SET_THREAD_NAME("App"); + // List of input and output files std::list input_filenames; std::list output_filenames; diff --git a/indra/llappearanceutility/appearance_utility.cpp b/indra/llappearanceutility/appearance_utility.cpp index 88034cd171..a9a310eb89 100644 --- a/indra/llappearanceutility/appearance_utility.cpp +++ b/indra/llappearanceutility/appearance_utility.cpp @@ -34,6 +34,11 @@ int main(int argc, char** argv) { + // Call Tracy first thing to have it allocate memory + // https://github.com/wolfpld/tracy/issues/196 + LL_PROFILER_FRAME_END; + LL_PROFILER_SET_THREAD_NAME("App"); + // Create an application instance. ll_init_apr(); LLAppAppearanceUtility* app = new LLAppAppearanceUtility(argc, argv); diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 692941a892..e1f0d531cf 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -42,6 +42,10 @@ #include #endif +#if LL_DARWIN || LL_LINUX +#include +#endif + #ifdef LL_WINDOWS @@ -56,25 +60,32 @@ typedef struct tagTHREADNAME_INFO DWORD dwFlags; // Reserved for future use, must be zero. } THREADNAME_INFO; #pragma pack(pop) +#endif -void set_thread_name( DWORD dwThreadID, const char* threadName) +void set_thread_name(const char* threadName) { +#if LL_WINDOWS THREADNAME_INFO info; - info.dwType = 0x1000; - info.szName = threadName; - info.dwThreadID = dwThreadID; - info.dwFlags = 0; + info.dwType = 0x1000; + info.szName = threadName; + info.dwThreadID = GetCurrentThreadId(); + info.dwFlags = 0; __try { - ::RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(DWORD), (ULONG_PTR*)&info ); + ::RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(DWORD), (ULONG_PTR*)&info); } - __except(EXCEPTION_CONTINUE_EXECUTION) + __except (EXCEPTION_CONTINUE_EXECUTION) { } -} +#elif LL_DARWIN + std::string truncated_name(std::string_view(threadName).substr(0, 15)); + pthread_setname_np(truncated_name.c_str()); +#elif LL_LINUX + std::string truncated_name(std::string_view(threadName).substr(0, 15)); + pthread_setname_np(pthread_self(), truncated_name.c_str()); #endif - +} //---------------------------------------------------------------------------- // Usage: @@ -148,27 +159,12 @@ LL_COMMON_API bool assert_main_thread() return false; } -// this function has become moot -void LLThread::registerThreadID() {} - // // Handed to the APR thread creation function // void LLThread::threadRun() { -#ifdef LL_WINDOWS - set_thread_name(-1, mName.c_str()); - -#if 0 // probably a bad idea, see usage of SetThreadIdealProcessor in LLWindowWin32) - HANDLE hThread = GetCurrentThread(); - if (hThread) - { - SetThreadAffinityMask(hThread, (DWORD_PTR) 0xFFFFFFFFFFFFFFFE); - } -#endif - -#endif - + set_thread_name(mName.c_str()); LL_PROFILER_SET_THREAD_NAME( mName.c_str() ); // this is the first point at which we're actually running in the new thread diff --git a/indra/llcommon/llthread.h b/indra/llcommon/llthread.h index 8794ac93aa..b97d479abc 100644 --- a/indra/llcommon/llthread.h +++ b/indra/llcommon/llthread.h @@ -28,10 +28,11 @@ #define LL_LLTHREAD_H #include "llapr.h" -#include "boost/intrusive_ptr.hpp" #include "llrefcount.h" #include +extern void set_thread_name(const char* threadName); + namespace LLTrace { class ThreadRecorder; @@ -86,11 +87,6 @@ public: id_t getID() const { return mID; } - // Called by threads *not* created via LLThread to register some - // internal state used by LLMutex. You must call this once early - // in the running thread to prevent collisions with the main thread. - static void registerThreadID(); - private: bool mPaused; std::thread::native_handle_type mNativeHandle; // for termination in case of issues diff --git a/indra/llcommon/threadpool.cpp b/indra/llcommon/threadpool.cpp index 451e60c083..6adbdffba8 100644 --- a/indra/llcommon/threadpool.cpp +++ b/indra/llcommon/threadpool.cpp @@ -78,6 +78,7 @@ void LL::ThreadPoolBase::start() std::string tname{ stringize(mName, ':', (i+1), '/', mThreadCount) }; mThreads.emplace_back(tname, [this, tname]() { + set_thread_name(tname.c_str()); LL_PROFILER_SET_THREAD_NAME(tname.c_str()); run(tname); }); diff --git a/indra/llcorehttp/_httpservice.cpp b/indra/llcorehttp/_httpservice.cpp index 5880fb7e87..03a2eab8e3 100644 --- a/indra/llcorehttp/_httpservice.cpp +++ b/indra/llcorehttp/_httpservice.cpp @@ -283,12 +283,11 @@ void HttpService::shutdown() // requested to stop. void HttpService::threadRun(LLCoreInt::HttpThread * thread) { + set_thread_name("HttpService"); LL_PROFILER_SET_THREAD_NAME("HttpService"); boost::this_thread::disable_interruption di; - LLThread::registerThreadID(); - ELoopSpeed loop(REQUEST_SLEEP); while (! mExitRequested) { diff --git a/indra/test/test.cpp b/indra/test/test.cpp index b611e52835..bf685ef20f 100644 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -505,6 +505,11 @@ static LLTrace::ThreadRecorder* sMasterThreadRecorder = NULL; int main(int argc, char **argv) { + // Call Tracy first thing to have it allocate memory + // https://github.com/wolfpld/tracy/issues/196 + LL_PROFILER_FRAME_END; + LL_PROFILER_SET_THREAD_NAME("App"); + ll_init_apr(); apr_getopt_t* os = NULL; if(APR_SUCCESS != apr_getopt_init(&os, gAPRPoolp, argc, argv)) -- cgit v1.3 From 59088a4824be5dc131b86ea355300a4c42b1670a Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Sat, 13 Dec 2025 01:16:26 +1000 Subject: Cleaned up unnecessary fake bool usage where appropriate Signed-off-by: Hecklezz --- indra/integration_tests/llimage_libtest/llimage_libtest.cpp | 2 +- indra/integration_tests/llui_libtest/llui_libtest.cpp | 2 +- indra/llcommon/StackWalker.cpp | 2 +- indra/llrender/llrendertarget.h | 2 +- indra/llui/tests/llurlentry_stub.cpp | 8 ++++---- indra/newview/llcallbacklist.cpp | 12 ++++++------ indra/newview/lleventnotifier.h | 2 +- indra/newview/llfloaterdirectory.h | 2 +- indra/newview/lllookshistorypanel.h | 2 +- indra/newview/llpaneldirland.cpp | 2 +- indra/newview/llpanelimcontrolpanel.h | 6 +++--- indra/newview/lltoolview.cpp | 6 +++--- indra/newview/llviewermedia.cpp | 8 ++++---- indra/newview/tests/lldir_stub.cpp | 2 +- indra/newview/tests/llxmlrpclistener_test.cpp | 4 ++-- 15 files changed, 31 insertions(+), 31 deletions(-) (limited to 'indra/integration_tests/llimage_libtest') diff --git a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp index b82ced2f8d..85c5a8cdd4 100644 --- a/indra/integration_tests/llimage_libtest/llimage_libtest.cpp +++ b/indra/integration_tests/llimage_libtest/llimage_libtest.cpp @@ -530,7 +530,7 @@ int main(int argc, char** argv) } else { - LLFastTimer::sMetricLog = TRUE; + LLFastTimer::sMetricLog = true; LLFastTimer::sLogName = test_name; arg += 1; // Skip that arg now we know it's a valid test name if ((arg + 1) == argc) // Break out of the loop if we reach the end of the arg list diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp index efb9c47a91..86783049cb 100644 --- a/indra/integration_tests/llui_libtest/llui_libtest.cpp +++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp @@ -187,7 +187,7 @@ void export_test_floaters() LLXMLNodePtr output_node = new LLXMLNode(); LLFloater* floater = new LLFloater(LLSD()); floater->buildFromFile( filename, - // FALSE, // don't open floater + // false, // don't open floater output_node); std::string out_filename = gDirUtilp->add(xui_dir, filename); std::string::size_type extension_pos = out_filename.rfind(".xml"); diff --git a/indra/llcommon/StackWalker.cpp b/indra/llcommon/StackWalker.cpp index 77ae4db4bd..a281fe83f6 100644 --- a/indra/llcommon/StackWalker.cpp +++ b/indra/llcommon/StackWalker.cpp @@ -904,7 +904,7 @@ bool StackWalker::LoadModules() SetLastError(ERROR_DLL_INIT_FAILED); return false; } - if (m_modulesLoaded != FALSE) + if (m_modulesLoaded) return true; // Build the sym-path: diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h index cd3290cf66..ea4c38d483 100644 --- a/indra/llrender/llrendertarget.h +++ b/indra/llrender/llrendertarget.h @@ -42,7 +42,7 @@ ... //allocate a 256x256 RGBA render target with depth buffer - target.allocate(256,256,GL_RGBA,TRUE); + target.allocate(256,256,GL_RGBA,true); //render to contents of offscreen buffer target.bindTarget(); diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp index 95d1586495..8277c23691 100755 --- a/indra/llui/tests/llurlentry_stub.cpp +++ b/indra/llui/tests/llurlentry_stub.cpp @@ -50,16 +50,16 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag // // Stub implementation for LLCacheName // -BOOL LLCacheName::getFullName(const LLUUID& id, std::string& fullname) +bool LLCacheName::getFullName(const LLUUID& id, std::string& fullname) { fullname = "Lynx Linden"; - return TRUE; + return true; } -BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group) +bool LLCacheName::getGroupName(const LLUUID& id, std::string& group) { group = "My Group"; - return TRUE; + return true; } boost::signals2::connection LLCacheName::get(const LLUUID& id, bool is_group, const LLCacheNameCallback& callback) diff --git a/indra/newview/llcallbacklist.cpp b/indra/newview/llcallbacklist.cpp index c474f2885b..1e596624b9 100644 --- a/indra/newview/llcallbacklist.cpp +++ b/indra/newview/llcallbacklist.cpp @@ -70,33 +70,33 @@ void LLCallbackList::addFunction( callback_t func, void *data) } -BOOL LLCallbackList::containsFunction( callback_t func, void *data) +bool LLCallbackList::containsFunction( callback_t func, void *data) { callback_pair_t t(func, data); callback_list_t::iterator iter = std::find(mCallbackList.begin(), mCallbackList.end(), t); if (iter != mCallbackList.end()) { - return TRUE; + return true; } else { - return FALSE; + return false; } } -BOOL LLCallbackList::deleteFunction( callback_t func, void *data) +bool LLCallbackList::deleteFunction( callback_t func, void *data) { callback_pair_t t(func, data); callback_list_t::iterator iter = std::find(mCallbackList.begin(), mCallbackList.end(), t); if (iter != mCallbackList.end()) { mCallbackList.erase(iter); - return TRUE; + return true; } else { - return FALSE; + return false; } } diff --git a/indra/newview/lleventnotifier.h b/indra/newview/lleventnotifier.h index 2a9295129d..be96b7680f 100644 --- a/indra/newview/lleventnotifier.h +++ b/indra/newview/lleventnotifier.h @@ -47,7 +47,7 @@ struct LLEventInfo std::string mSimName; LLVector3d mPosGlobal; F64 mUnixTime; // seconds from 1970 - BOOL mHasCover; + bool mHasCover; U32 mCover; U32 mEventFlags; }; diff --git a/indra/newview/llfloaterdirectory.h b/indra/newview/llfloaterdirectory.h index de788443be..fb3b9975ed 100644 --- a/indra/newview/llfloaterdirectory.h +++ b/indra/newview/llfloaterdirectory.h @@ -76,6 +76,6 @@ private: static LLFloaterDirectory *sInstance; }; -//extern BOOL gDisplayEventHack; +//extern bool gDisplayEventHack; #endif // LL_LLDIRECTORYFLOATER_H diff --git a/indra/newview/lllookshistorypanel.h b/indra/newview/lllookshistorypanel.h index 6293de7170..0bcf511e89 100644 --- a/indra/newview/lllookshistorypanel.h +++ b/indra/newview/lllookshistorypanel.h @@ -40,7 +40,7 @@ public: LLLooksHistoryPanel(); virtual ~LLLooksHistoryPanel(); - /*virtual*/ BOOL postBuild(); + /*virtual*/ bool postBuild(); /*virtual*/ void onSearchEdit(const std::string& string); /*virtual*/ void onShowOnMap(); /*virtual*/ void onLooks(); diff --git a/indra/newview/llpaneldirland.cpp b/indra/newview/llpaneldirland.cpp index 53c58d8fa9..e2ef44a604 100644 --- a/indra/newview/llpaneldirland.cpp +++ b/indra/newview/llpaneldirland.cpp @@ -197,7 +197,7 @@ void LLPanelDirLand::performQuery() if (list) { std::string sort_name = list->getSortColumnName(); - BOOL sort_asc = list->getSortAscending(); + bool sort_asc = list->getSortAscending(); if (sort_name == "name") { diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index c7f5263bec..2fdd409fdc 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -40,7 +40,7 @@ public: mSessionId(LLUUID()) {}; ~LLPanelChatControlPanel(); - virtual BOOL postBuild(); + virtual bool postBuild(); virtual void setSessionId(const LLUUID& session_id); const LLUUID& getSessionId() { return mSessionId; } @@ -58,7 +58,7 @@ public: LLPanelGroupControlPanel(const LLUUID& session_id); ~LLPanelGroupControlPanel(); - BOOL postBuild(); + bool postBuild(); void setSessionId(const LLUUID& session_id); /*virtual*/ void draw(); @@ -77,7 +77,7 @@ class LLPanelAdHocControlPanel : public LLPanelGroupControlPanel public: LLPanelAdHocControlPanel(const LLUUID& session_id); - BOOL postBuild(); + bool postBuild(); }; diff --git a/indra/newview/lltoolview.cpp b/indra/newview/lltoolview.cpp index 179aae1e02..cd1d90ea9e 100644 --- a/indra/newview/lltoolview.cpp +++ b/indra/newview/lltoolview.cpp @@ -109,8 +109,8 @@ LLToolView::~LLToolView() // // Can optionally ignore panel // if (contain->mPanel) // { -// contain->mPanel->setBackgroundVisible( FALSE ); -// contain->mPanel->setBorderVisible( FALSE ); +// contain->mPanel->setBackgroundVisible( false ); +// contain->mPanel->setBorderVisible( false ); // addChild(contain->mPanel); // } @@ -153,7 +153,7 @@ void LLToolView::draw() iter != mContainList.end(); ++iter) { LLToolContainer* contain = *iter; - BOOL state = (contain->mTool == selected); + bool state = (contain->mTool == selected); contain->mButton->setToggleState( state ); if (contain->mPanel) { diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 24560aa21d..071a66209b 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3623,7 +3623,7 @@ LLViewerMediaImpl::canUndo() const if (mMediaSource) return mMediaSource->canUndo(); else - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -3643,7 +3643,7 @@ LLViewerMediaImpl::canRedo() const if (mMediaSource) return mMediaSource->canRedo(); else - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -3723,7 +3723,7 @@ LLViewerMediaImpl::canDoDelete() const if (mMediaSource) return mMediaSource->canDoDelete(); else - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////// @@ -3743,7 +3743,7 @@ LLViewerMediaImpl::canSelectAll() const if (mMediaSource) return mMediaSource->canSelectAll(); else - return FALSE; + return false; } void LLViewerMediaImpl::setUpdated(bool updated) diff --git a/indra/newview/tests/lldir_stub.cpp b/indra/newview/tests/lldir_stub.cpp index 5d9c2f718b..ff4a4daf6d 100644 --- a/indra/newview/tests/lldir_stub.cpp +++ b/indra/newview/tests/lldir_stub.cpp @@ -28,7 +28,7 @@ LLDir::LLDir() {} LLDir::~LLDir() {} -BOOL LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask) { return true; } +S32 LLDir::deleteFilesInDir(const std::string &dirname, const std::string &mask) { return 1; } void LLDir::setChatLogsDir(const std::string &path) {} void LLDir::setPerAccountChatLogsDir(const std::string &) {} void LLDir::updatePerAccountChatLogsDir() {} diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp index ee6281fc24..c77ce367c5 100644 --- a/indra/newview/tests/llxmlrpclistener_test.cpp +++ b/indra/newview/tests/llxmlrpclistener_test.cpp @@ -62,8 +62,8 @@ namespace tut // These variables are required by machinery used by // LLXMLRPCTransaction. The values reflect reality for this test // executable; hopefully these values are correct. - gSavedSettings.declareBOOL("BrowserProxyEnabled", FALSE, "", LLControlVariable::PERSIST_NO); // don't persist - gSavedSettings.declareBOOL("NoVerifySSLCert", TRUE, "", LLControlVariable::PERSIST_NO); // don't persist + gSavedSettings.declareBOOL("BrowserProxyEnabled", false, "", LLControlVariable::PERSIST_NO); // don't persist + gSavedSettings.declareBOOL("NoVerifySSLCert", true, "", LLControlVariable::PERSIST_NO); // don't persist } // LLEventPump listener signature -- cgit v1.3