diff options
Diffstat (limited to 'indra/newview/tests')
-rw-r--r-- | indra/newview/tests/llagentaccess_test.cpp | 4 | ||||
-rw-r--r-- | indra/newview/tests/lllogininstance_test.cpp | 28 | ||||
-rw-r--r-- | indra/newview/tests/llsecapi_test.cpp | 10 | ||||
-rw-r--r-- | indra/newview/tests/llsechandler_basic_test.cpp | 8 | ||||
-rw-r--r-- | indra/newview/tests/llslurl_test.cpp | 10 | ||||
-rw-r--r-- | indra/newview/tests/llviewerassetstats_test.cpp | 2 | ||||
-rw-r--r-- | indra/newview/tests/llviewercontrollistener_test.cpp | 4 | ||||
-rw-r--r-- | indra/newview/tests/llviewerhelputil_test.cpp | 6 | ||||
-rw-r--r-- | indra/newview/tests/llviewernetwork_test.cpp | 10 | ||||
-rw-r--r-- | indra/newview/tests/llworldmap_test.cpp | 2 | ||||
-rw-r--r-- | indra/newview/tests/llworldmipmap_test.cpp | 4 |
11 files changed, 44 insertions, 44 deletions
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 696fe3536c..70a73b9ca8 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; @@ -198,13 +198,13 @@ LLControlGroup gSavedSettings("Global"); LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLControlGroup, std::string>(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; } -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"; } -LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; } +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(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; } #include "lluicolortable.h" @@ -235,7 +235,7 @@ static LLEventPump * gTOSReplyPump = NULL; LLPointer<LLSecAPIHandler> gSecAPIHandler; //static -LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus) +LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, bool focus) { gTOSType = name; gTOSReplyPump = &LLEventPumps::instance().obtain(key["reply_pump"]); @@ -345,13 +345,13 @@ namespace tut gTOSReplyPump = 0; // clear the callback. - gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("NoInventoryLibrary", false, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("ConnectAsGod", false, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("UseDebugMenus", false, "", LLControlVariable::PERSIST_NO); gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO); gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("CmdLineSkipUpdater", TRUE, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("LoginLastLocation", false, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("CmdLineSkipUpdater", true, "", LLControlVariable::PERSIST_NO); LLSD authenticator = LLSD::emptyMap(); LLSD identifier = LLSD::emptyMap(); diff --git a/indra/newview/tests/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<LLSecAPIHandler> 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<LLSecAPIHandler> 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<LLSecAPIHandler> 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 da742370fc..c04d8cdc35 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() { @@ -964,7 +964,7 @@ namespace tut // test creation of credentials my_cred = handler->createCredential("mysavedgrid", my_id, my_authenticator); // test save without saving authenticator. - handler->saveCredential(my_cred, FALSE); + handler->saveCredential(my_cred, false); my_new_cred = handler->loadCredential("mysavedgrid"); ensure_equals("saved credential without auth", (const std::string)my_new_cred->getIdentifier()["type"], "test_type"); diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index 8d21b6ed69..1da419d058 100644 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -64,14 +64,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; @@ -84,7 +84,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") { @@ -96,9 +96,9 @@ LLSD LLControlGroup::getLLSD(const std::string& name) return LLSD(); } -LLPointer<LLControlVariable> LLControlGroup::getControl(const std::string& name) +LLPointer<LLControlVariable> 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<LLControlVariable>() : iter->second; } diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp index e2e7f09c3b..bdf91d0f07 100644 --- a/indra/newview/tests/llviewerassetstats_test.cpp +++ b/indra/newview/tests/llviewerassetstats_test.cpp @@ -43,7 +43,7 @@ namespace LLStatViewer LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample"); } -void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts) +void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_time, S32& cloud_avatars) { counts.resize(3); counts[0] = 0; diff --git a/indra/newview/tests/llviewercontrollistener_test.cpp b/indra/newview/tests/llviewercontrollistener_test.cpp index 8aed2a8043..175c442dc5 100644 --- a/indra/newview/tests/llviewercontrollistener_test.cpp +++ b/indra/newview/tests/llviewercontrollistener_test.cpp @@ -40,7 +40,7 @@ namespace tut { Global.declareString("strvar", "woof", "string variable"); // together we will stroll the boolvar, ma cherie - Global.declareBOOL("boolvar", TRUE, "bool variable"); + Global.declareBOOL("boolvar", true, "bool variable"); } }; typedef test_group<llviewercontrollistener_data> llviewercontrollistener_group; @@ -167,7 +167,7 @@ namespace tut "boolvar", llsd::map("name", "boolvar", "type", "Boolean", - "value", TRUE, + "value", true, "comment", "bool variable"))); } } // namespace tut diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index f6456a2839..828c0da96c 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; @@ -75,7 +75,7 @@ static void substitute_string(std::string &input, const std::string &search, con #include "../llagent.h" LLAgent::LLAgent() : mAgentAccess(NULL) { } LLAgent::~LLAgent() { } -bool LLAgent::isGodlike() const { return FALSE; } +bool LLAgent::isGodlike() const { return false; } LLAgent gAgent; diff --git a/indra/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<LLControlVariable> LLControlGroup::getControl(const std::string& name) +LLPointer<LLControlVariable> 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<LLControlVariable>() : 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<LLControlGroup, std::string>(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 |