diff options
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; } |