diff options
Diffstat (limited to 'indra/llxml')
-rw-r--r-- | indra/llxml/CMakeLists.txt | 22 | ||||
-rw-r--r-- | indra/llxml/llcontrol.cpp | 6 | ||||
-rw-r--r-- | indra/llxml/llcontrol.h | 3 |
3 files changed, 14 insertions, 17 deletions
diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index eb5166ee71..beefcda361 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -45,27 +45,25 @@ target_link_libraries( llxml ${EXPAT_LIBRARIES} ) +# tests -if(LL_TESTS) - # tests +if (LL_TESTS) + # unit tests - # unit tests - - SET(llxml_TEST_SOURCE_FILES + SET(llxml_TEST_SOURCE_FILES # none yet! ) - LL_ADD_PROJECT_UNIT_TESTS(llxml "${llxml_TEST_SOURCE_FILES}") + LL_ADD_PROJECT_UNIT_TESTS(llxml "${llxml_TEST_SOURCE_FILES}") - # integration tests + # integration tests - # set(TEST_DEBUG on) - set(test_libs + # set(TEST_DEBUG on) + set(test_libs ${LLXML_LIBRARIES} ${WINDOWS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ) - LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}") - -endif(LL_TESTS) + LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}") +endif (LL_TESTS) diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 6e4364a20d..0809d95628 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -837,9 +837,7 @@ U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_values, bool save_values) { - std::string name; LLSD settings; - LLSD control_map; llifstream infile; infile.open(filename); if(!infile.is_open()) @@ -863,8 +861,8 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v for(LLSD::map_const_iterator itr = settings.beginMap(); itr != settings.endMap(); ++itr) { bool persist = true; - name = (*itr).first; - control_map = (*itr).second; + std::string const & name = itr->first; + LLSD const & control_map = itr->second; if(control_map.has("Persist")) { diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index e402061e1f..050d4b729f 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -385,7 +385,8 @@ class LLCachedControl { public: LLCachedControl(LLControlGroup& group, - const std::string& name, + const std::string& name, + const T& default_value, const std::string& comment = "Declared In Code") { |