diff options
| author | Dave Parks <davep@lindenlab.com> | 2012-03-09 15:50:51 -0600 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2012-03-09 15:50:51 -0600 |
| commit | 8e60cdb3335ec198c71b29d37ab08c4aff9f8223 (patch) | |
| tree | 2e043ee721d725dcc8d654a8f51eaafaaeb423de /indra/llxml | |
| parent | 1d200c56e151eb8fc384693175d1b9318ff0f919 (diff) | |
| parent | 4b20d72a991cfebaf5765fe7756190f4a9645a3b (diff) | |
merge
Diffstat (limited to 'indra/llxml')
| -rw-r--r-- | indra/llxml/CMakeLists.txt | 28 | ||||
| -rw-r--r-- | indra/llxml/llcontrol.h | 6 | ||||
| -rw-r--r-- | indra/llxml/llxmlnode.cpp | 10 |
3 files changed, 23 insertions, 21 deletions
diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 21cdf5f926..beefcda361 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -48,22 +48,22 @@ target_link_libraries( llxml # tests if (LL_TESTS) - # unit tests + # unit tests - SET(llxml_TEST_SOURCE_FILES - # none yet! - ) - LL_ADD_PROJECT_UNIT_TESTS(llxml "${llxml_TEST_SOURCE_FILES}") + SET(llxml_TEST_SOURCE_FILES + # none yet! + ) + LL_ADD_PROJECT_UNIT_TESTS(llxml "${llxml_TEST_SOURCE_FILES}") - # integration tests + # integration tests - # set(TEST_DEBUG on) - set(test_libs - ${LLXML_LIBRARIES} - ${WINDOWS_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ) + # set(TEST_DEBUG on) + set(test_libs + ${LLXML_LIBRARIES} + ${WINDOWS_LIBRARIES} + ${LLMATH_LIBRARIES} + ${LLCOMMON_LIBRARIES} + ) - LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}") + LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}") endif (LL_TESTS) diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index e402061e1f..bf38a8b062 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -185,9 +185,10 @@ protected: ctrl_name_table_t mNameTable; std::string mTypeString[TYPE_COUNT]; +public: eControlType typeStringToEnum(const std::string& typestr); std::string typeEnumToString(eControlType typeenum); -public: + LLControlGroup(const std::string& name); ~LLControlGroup(); void cleanup(); @@ -385,7 +386,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") { diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp index 9f1e249ddd..2b4a0fc2a1 100644 --- a/indra/llxml/llxmlnode.cpp +++ b/indra/llxml/llxmlnode.cpp @@ -693,7 +693,7 @@ bool LLXMLNode::parseFile(const std::string& filename, LLXMLNodePtr& node, LLXML LLFILE* fp = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */ if (fp == NULL) { - node = new LLXMLNode(); + node = NULL ; return false; } fseek(fp, 0, SEEK_END); @@ -746,7 +746,7 @@ bool LLXMLNode::parseBuffer( { llwarns << "Parse failure - wrong number of top-level nodes xml." << llendl; - node = new LLXMLNode(); + node = NULL ; return false; } @@ -805,7 +805,7 @@ bool LLXMLNode::parseStream( { llwarns << "Parse failure - wrong number of top-level nodes xml." << llendl; - node = new LLXMLNode(); + node = NULL; return false; } @@ -1206,7 +1206,7 @@ bool LLXMLNode::getChild(const LLStringTableEntry* name, LLXMLNodePtr& node, BOO { return mDefault->getChild(name, node, FALSE); } - node = new LLXMLNode(); + node = NULL; return false; } @@ -1277,7 +1277,7 @@ bool LLXMLNode::getAttribute(const LLStringTableEntry* name, LLXMLNodePtr& node, { return mDefault->getAttribute(name, node, FALSE); } - node = new LLXMLNode(); + return false; } |
