diff options
Diffstat (limited to 'indra/llxml/llcontrol.h')
| -rw-r--r-- | indra/llxml/llcontrol.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index da7268bf45..7f28c71232 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -33,8 +33,10 @@ #include "llrect.h" #include "llrefcount.h" #include "llinstancetracker.h" +#include "llstl.h" #include <functional> +#include <unordered_map> #include <vector> #include <boost/signals2.hpp> @@ -125,6 +127,7 @@ public: void setPersist(ePersist); void setHiddenFromSettingsEditor(bool hide); void setComment(const std::string& comment); + bool setValueFromNotation(const std::string& notation, bool saved_value = true); private: void firePropertyChanged(const LLSD &pPreviousValue) @@ -165,7 +168,7 @@ class LLControlGroup : public LLInstanceTracker<LLControlGroup, std::string> LOG_CLASS(LLControlGroup); protected: - typedef std::map<std::string, LLControlVariablePtr, std::less<> > ctrl_name_table_t; + using ctrl_name_table_t = std::unordered_map<std::string, LLControlVariablePtr, ll::string_hash, std::equal_to<>>; ctrl_name_table_t mNameTable; static const std::string mTypeString[TYPE_COUNT]; @@ -278,7 +281,7 @@ public: // as the given type. U32 loadFromFileLegacy(const std::string& filename, bool require_declaration = true, eControlType declare_as = TYPE_STRING); U32 saveToFile(const std::string& filename, bool nondefault_only); - U32 loadFromFile(const std::string& filename, bool default_values = false, bool save_values = true); + U32 loadFromFile(const std::string& filename, bool default_values = false, bool save_values = true, bool error_when_no_comment = true); void resetToDefaults(); void incrCount(std::string_view name); @@ -319,7 +322,7 @@ public: { if(!group.controlExists(name)) { - LL_ERRS() << "Control named " << name << "not found." << LL_ENDL; + LL_ERRS() << "Control named " << name << " not found." << LL_ENDL; } bindToControl(group, name); |
