From 813bc232e7175ba3e20a70f16427d12c7681a996 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 9 Dec 2013 15:42:51 -0800 Subject: MAINT-3017 FIX Inventory filter for Recent tab does not persist between sessions as it used to. added names back to inventory filters, so they can be deserialized --- indra/llcommon/llinitparam.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h index 03ab0fb67f..4bad0062a7 100755 --- a/indra/llcommon/llinitparam.h +++ b/indra/llcommon/llinitparam.h @@ -497,25 +497,25 @@ namespace LLInitParam virtual ~Parser(); template bool readValue(T& param, typename boost::disable_if >::type* dummy = 0) - { + { parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); if (found_it != mParserReadFuncs->end()) - { + { return found_it->second(*this, (void*)¶m); - } - - return false; } - + + return false; + } + template bool readValue(T& param, typename boost::enable_if >::type* dummy = 0) - { + { parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T)); if (found_it != mParserReadFuncs->end()) - { + { return found_it->second(*this, (void*)¶m); - } + } else - { + { found_it = mParserReadFuncs->find(&typeid(S32)); if (found_it != mParserReadFuncs->end()) { @@ -523,20 +523,20 @@ namespace LLInitParam bool parsed = found_it->second(*this, (void*)&int_value); param = (T)int_value; return parsed; - } } - return false; } + return false; + } template bool writeValue(const T& param, name_stack_t& name_stack) - { + { parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T)); if (found_it != mParserWriteFuncs->end()) - { + { return found_it->second(*this, (const void*)¶m, name_stack); - } - return false; } + return false; + } // dispatch inspection to registered inspection functions, for each parameter in a param block template bool inspectValue(name_stack_t& name_stack, S32 min_count, S32 max_count, const possible_values_t* possible_values) -- cgit v1.2.3 From 1033c9d67f6bf3fd317bc2e6a6990e2b7e5d80c8 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 5 Feb 2014 20:45:09 +0200 Subject: MAINT-3555 crash in LLPanel::~LLPanel() on shutdown: - memory leaks fixing; --- indra/llcommon/llerror.cpp | 68 ++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 30 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 853f279c95..925fca1b4b 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -207,6 +207,10 @@ namespace { #endif } +namespace LLError +{ + void clean(); +} namespace { @@ -352,7 +356,11 @@ namespace Globals() : messageStreamInUse(false) { } - + + ~Globals() + { + LLError::clean(); + } }; void Globals::addCallSite(LLError::CallSite& site) @@ -380,8 +388,9 @@ namespace is. See C++ FAQ Lite, sections 10.12 through 10.14 */ - static Globals* globals = new Globals; - return *globals; + + static Globals globals; + return globals; } } @@ -415,6 +424,7 @@ namespace LLError static void reset(); static Settings* saveAndReset(); static void restore(Settings*); + static void clean(); private: Settings() @@ -446,6 +456,15 @@ namespace LLError } return *p; } + + void Settings::clean() + { + Globals::get().invalidateCallSites(); + + Settings*& p = getPtr(); + delete p; + p = NULL; + } void Settings::reset() { @@ -480,10 +499,7 @@ namespace LLError static Settings* currentSettings = NULL; return currentSettings; } -} -namespace LLError -{ CallSite::CallSite(ELevel level, const char* file, int line, @@ -721,11 +737,7 @@ namespace LLError setLevels(s.tagLevelMap, entry["tags"], level); } } -} - -namespace LLError -{ Recorder::~Recorder() { } @@ -756,18 +768,26 @@ namespace LLError std::remove(s.recorders.begin(), s.recorders.end(), recorder), s.recorders.end()); } -} -namespace LLError -{ + void deleteRecorder(LLError::Settings& settings) + { + removeRecorder(settings.fileRecorder); + delete settings.fileRecorder; + settings.fileRecorder = NULL; + settings.fileRecorderFileName.clear(); + } + + void clean() + { + deleteRecorder(LLError::Settings::get()); + LLError::Settings::clean(); + } + void logToFile(const std::string& file_name) { LLError::Settings& s = LLError::Settings::get(); - removeRecorder(s.fileRecorder); - delete s.fileRecorder; - s.fileRecorder = NULL; - s.fileRecorderFileName.clear(); + deleteRecorder(s); if (file_name.empty()) { @@ -839,8 +859,6 @@ namespace } } } -} - /* Recorder formats: @@ -870,7 +888,6 @@ You get: */ -namespace { bool checkLevelMap(const LevelMap& map, const std::string& key, LLError::ELevel& level) { @@ -1127,13 +1144,7 @@ namespace LLError s.crashFunction(message); } } -} - - - -namespace LLError -{ Settings* saveAndResetSettings() { return Settings::saveAndReset(); @@ -1226,10 +1237,7 @@ namespace LLError return chars ? time_str : "time error"; } -} - -namespace LLError -{ + char** LLCallStacks::sBuffer = NULL ; S32 LLCallStacks::sIndex = 0 ; -- cgit v1.2.3 From 5ce3207a6ffcbc1cb24b54fd42860696ab63147b Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Thu, 20 Feb 2014 19:45:47 +0200 Subject: Fix build problem --- indra/llcommon/llerror.cpp | 68 ++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 38 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 925fca1b4b..853f279c95 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -207,10 +207,6 @@ namespace { #endif } -namespace LLError -{ - void clean(); -} namespace { @@ -356,11 +352,7 @@ namespace Globals() : messageStreamInUse(false) { } - - ~Globals() - { - LLError::clean(); - } + }; void Globals::addCallSite(LLError::CallSite& site) @@ -388,9 +380,8 @@ namespace is. See C++ FAQ Lite, sections 10.12 through 10.14 */ - - static Globals globals; - return globals; + static Globals* globals = new Globals; + return *globals; } } @@ -424,7 +415,6 @@ namespace LLError static void reset(); static Settings* saveAndReset(); static void restore(Settings*); - static void clean(); private: Settings() @@ -456,15 +446,6 @@ namespace LLError } return *p; } - - void Settings::clean() - { - Globals::get().invalidateCallSites(); - - Settings*& p = getPtr(); - delete p; - p = NULL; - } void Settings::reset() { @@ -499,7 +480,10 @@ namespace LLError static Settings* currentSettings = NULL; return currentSettings; } +} +namespace LLError +{ CallSite::CallSite(ELevel level, const char* file, int line, @@ -737,7 +721,11 @@ namespace LLError setLevels(s.tagLevelMap, entry["tags"], level); } } +} + +namespace LLError +{ Recorder::~Recorder() { } @@ -768,26 +756,18 @@ namespace LLError std::remove(s.recorders.begin(), s.recorders.end(), recorder), s.recorders.end()); } +} - void deleteRecorder(LLError::Settings& settings) - { - removeRecorder(settings.fileRecorder); - delete settings.fileRecorder; - settings.fileRecorder = NULL; - settings.fileRecorderFileName.clear(); - } - - void clean() - { - deleteRecorder(LLError::Settings::get()); - LLError::Settings::clean(); - } - +namespace LLError +{ void logToFile(const std::string& file_name) { LLError::Settings& s = LLError::Settings::get(); - deleteRecorder(s); + removeRecorder(s.fileRecorder); + delete s.fileRecorder; + s.fileRecorder = NULL; + s.fileRecorderFileName.clear(); if (file_name.empty()) { @@ -859,6 +839,8 @@ namespace } } } +} + /* Recorder formats: @@ -888,6 +870,7 @@ You get: */ +namespace { bool checkLevelMap(const LevelMap& map, const std::string& key, LLError::ELevel& level) { @@ -1144,7 +1127,13 @@ namespace LLError s.crashFunction(message); } } +} + + + +namespace LLError +{ Settings* saveAndResetSettings() { return Settings::saveAndReset(); @@ -1237,7 +1226,10 @@ namespace LLError return chars ? time_str : "time error"; } - +} + +namespace LLError +{ char** LLCallStacks::sBuffer = NULL ; S32 LLCallStacks::sIndex = 0 ; -- cgit v1.2.3