From c8726aba303bcf1207b730a344536e25491420bc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 10 Nov 2015 09:48:56 -0500 Subject: remove execute permission from many files that should not have it --- indra/llxml/CMakeLists.txt | 0 indra/llxml/llcontrol.cpp | 0 indra/llxml/llcontrol.h | 0 indra/llxml/llcontrolgroupreader.h | 0 indra/llxml/llxmlnode.cpp | 0 indra/llxml/llxmlnode.h | 0 indra/llxml/llxmlparser.cpp | 0 indra/llxml/llxmlparser.h | 0 indra/llxml/llxmltree.cpp | 0 indra/llxml/llxmltree.h | 0 indra/llxml/tests/llcontrol_test.cpp | 0 11 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 indra/llxml/CMakeLists.txt mode change 100755 => 100644 indra/llxml/llcontrol.cpp mode change 100755 => 100644 indra/llxml/llcontrol.h mode change 100755 => 100644 indra/llxml/llcontrolgroupreader.h mode change 100755 => 100644 indra/llxml/llxmlnode.cpp mode change 100755 => 100644 indra/llxml/llxmlnode.h mode change 100755 => 100644 indra/llxml/llxmlparser.cpp mode change 100755 => 100644 indra/llxml/llxmlparser.h mode change 100755 => 100644 indra/llxml/llxmltree.cpp mode change 100755 => 100644 indra/llxml/llxmltree.h mode change 100755 => 100644 indra/llxml/tests/llcontrol_test.cpp (limited to 'indra/llxml') diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp old mode 100755 new mode 100644 diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h old mode 100755 new mode 100644 diff --git a/indra/llxml/llcontrolgroupreader.h b/indra/llxml/llcontrolgroupreader.h old mode 100755 new mode 100644 diff --git a/indra/llxml/llxmlnode.cpp b/indra/llxml/llxmlnode.cpp old mode 100755 new mode 100644 diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h old mode 100755 new mode 100644 diff --git a/indra/llxml/llxmlparser.cpp b/indra/llxml/llxmlparser.cpp old mode 100755 new mode 100644 diff --git a/indra/llxml/llxmlparser.h b/indra/llxml/llxmlparser.h old mode 100755 new mode 100644 diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp old mode 100755 new mode 100644 diff --git a/indra/llxml/llxmltree.h b/indra/llxml/llxmltree.h old mode 100755 new mode 100644 diff --git a/indra/llxml/tests/llcontrol_test.cpp b/indra/llxml/tests/llcontrol_test.cpp old mode 100755 new mode 100644 -- cgit v1.2.3 From 518f92126f18d5f4b8ee8eb287500fe5a7e17c99 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 23 Mar 2016 11:50:39 -0400 Subject: improve settings error log, and make type conversion methods static --- indra/llxml/llcontrol.cpp | 43 +++++++++++++++++++++++-------------------- indra/llxml/llcontrol.h | 7 ++++--- 2 files changed, 27 insertions(+), 23 deletions(-) (limited to 'indra/llxml') diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index 4e3d0ab392..20ab1a7ad3 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -334,20 +334,23 @@ LLPointer LLControlGroup::getControl(const std::string& name) //////////////////////////////////////////////////////////////////////////// +// Must match the type definition in llcontrol.h +const std::string LLControlGroup::mTypeString[TYPE_COUNT] = { "U32" + ,"S32" + ,"F32" + ,"Boolean" + ,"String" + ,"Vector3" + ,"Vector3D" + ,"Rect" + ,"Color4" + ,"Color3" + ,"LLSD" + }; + LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker(name) { - mTypeString[TYPE_U32] = "U32"; - mTypeString[TYPE_S32] = "S32"; - mTypeString[TYPE_F32] = "F32"; - mTypeString[TYPE_BOOLEAN] = "Boolean"; - mTypeString[TYPE_STRING] = "String"; - mTypeString[TYPE_VEC3] = "Vector3"; - mTypeString[TYPE_VEC3D] = "Vector3D"; - mTypeString[TYPE_RECT] = "Rect"; - mTypeString[TYPE_COL4] = "Color4"; - mTypeString[TYPE_COL3] = "Color3"; - mTypeString[TYPE_LLSD] = "LLSD"; } LLControlGroup::~LLControlGroup() @@ -1170,7 +1173,7 @@ bool convert_from_llsd(const LLSD& sd, eControlType type, const std::strin return sd.asBoolean(); else { - CONTROL_ERRS << "Invalid BOOL value for " << control_name << ": " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid BOOL value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return FALSE; } } @@ -1182,7 +1185,7 @@ S32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& return sd.asInteger(); else { - CONTROL_ERRS << "Invalid S32 value for " << control_name << ": " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid S32 value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return 0; } } @@ -1194,7 +1197,7 @@ U32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& return sd.asInteger(); else { - CONTROL_ERRS << "Invalid U32 value for " << control_name << ": " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid U32 value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return 0; } } @@ -1206,7 +1209,7 @@ F32 convert_from_llsd(const LLSD& sd, eControlType type, const std::string& return (F32) sd.asReal(); else { - CONTROL_ERRS << "Invalid F32 value for " << control_name << ": " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid F32 value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return 0.0f; } } @@ -1218,7 +1221,7 @@ std::string convert_from_llsd(const LLSD& sd, eControlType type, co return sd.asString(); else { - CONTROL_ERRS << "Invalid string value for " << control_name << ": " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid string value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return LLStringUtil::null; } } @@ -1236,7 +1239,7 @@ LLVector3 convert_from_llsd(const LLSD& sd, eControlType type, const return (LLVector3)sd; else { - CONTROL_ERRS << "Invalid LLVector3 value for " << control_name << ": " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid LLVector3 value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return LLVector3::zero; } } @@ -1248,7 +1251,7 @@ LLVector3d convert_from_llsd(const LLSD& sd, eControlType type, cons return (LLVector3d)sd; else { - CONTROL_ERRS << "Invalid LLVector3d value for " << control_name << ": " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid LLVector3d value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return LLVector3d::zero; } } @@ -1260,7 +1263,7 @@ LLRect convert_from_llsd(const LLSD& sd, eControlType type, const std::s return LLRect(sd); else { - CONTROL_ERRS << "Invalid rect value for " << control_name << ": " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid rect value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return LLRect::null; } } @@ -1305,7 +1308,7 @@ LLColor3 convert_from_llsd(const LLSD& sd, eControlType type, const st return sd; else { - CONTROL_ERRS << "Invalid LLColor3 value for " << control_name << ": " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid LLColor3 value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return LLColor3::white; } } diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index 04575d81e0..77065dcf8d 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -70,6 +70,7 @@ class LLVector3d; class LLColor4; class LLColor3; +// if this is changed, also modify mTypeString in llcontrol.h typedef enum e_control_type { TYPE_U32 = 0, @@ -190,11 +191,11 @@ class LLControlGroup : public LLInstanceTracker protected: typedef std::map ctrl_name_table_t; ctrl_name_table_t mNameTable; - std::string mTypeString[TYPE_COUNT]; + static const std::string mTypeString[TYPE_COUNT]; public: - eControlType typeStringToEnum(const std::string& typestr); - std::string typeEnumToString(eControlType typeenum); + static eControlType typeStringToEnum(const std::string& typestr); + static std::string typeEnumToString(eControlType typeenum); LLControlGroup(const std::string& name); ~LLControlGroup(); -- cgit v1.2.3