From 2e0413336e85cd1b7ccc6e23656caa8998802bbc Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sat, 4 Jul 2020 10:21:41 -0400 Subject: [PATCH] Smol bugfixes and cleanup --- indra/llxml/llcontrol.cpp | 11 +++++++---- indra/newview/llviewermenu.cpp | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index a8d6425a89f..2202aeb10f5 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -68,6 +68,7 @@ template <> eControlType get_control_type<std::string>(); template <> eControlType get_control_type<LLVector3>(); template <> eControlType get_control_type<LLVector3d>(); template <> eControlType get_control_type<LLVector4>(); +template <> eControlType get_control_type<LLQuaternion>(); template <> eControlType get_control_type<LLRect>(); template <> eControlType get_control_type<LLColor4>(); template <> eControlType get_control_type<LLColor3>(); @@ -79,6 +80,7 @@ template <> LLSD convert_to_llsd<U32>(const U32& in); template <> LLSD convert_to_llsd<LLVector3>(const LLVector3& in); template <> LLSD convert_to_llsd<LLVector3d>(const LLVector3d& in); template <> LLSD convert_to_llsd<LLVector4>(const LLVector4& in); +template <> LLSD convert_to_llsd<LLQuaternion>(const LLQuaternion& in); template <> LLSD convert_to_llsd<LLRect>(const LLRect& in); template <> LLSD convert_to_llsd<LLColor4>(const LLColor4& in); template <> LLSD convert_to_llsd<LLColor3>(const LLColor3& in); @@ -93,6 +95,7 @@ template <> LLWString convert_from_llsd<LLWString>(const LLSD& sd, eControlType template <> LLVector3 convert_from_llsd<LLVector3>(const LLSD& sd, eControlType type, const std::string& control_name); template <> LLVector3d convert_from_llsd<LLVector3d>(const LLSD& sd, eControlType type, const std::string& control_name); template <> LLVector4 convert_from_llsd<LLVector4>(const LLSD& sd, eControlType type, const std::string& control_name); +template <> LLQuaternion convert_from_llsd<LLQuaternion>(const LLSD& sd, eControlType type, const std::string& control_name); template <> LLRect convert_from_llsd<LLRect>(const LLSD& sd, eControlType type, const std::string& control_name); template <> LLColor4 convert_from_llsd<LLColor4>(const LLSD& sd, eControlType type, const std::string& control_name); template <> LLColor4U convert_from_llsd<LLColor4U>(const LLSD& sd, eControlType type, const std::string& control_name); @@ -1000,10 +1003,10 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require break; case TYPE_UUID: { - LLUUID color; + LLUUID uuid; - child_nodep->getAttributeUUID("value", color); - control->set(color); + child_nodep->getAttributeUUID("value", uuid); + control->set(uuid); validitems++; } break; @@ -1517,7 +1520,7 @@ LLVector4 convert_from_llsd<LLVector4>(const LLSD& sd, eControlType type, const return (LLVector4)sd; else { - CONTROL_ERRS << "Invalid LLVector3d value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; + CONTROL_ERRS << "Invalid LLVector4 value for " << control_name << ": " << LLControlGroup::typeEnumToString(type) << " " << sd << LL_ENDL; return LLVector4::zero; } } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b44d1431294..91e3591de45 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2625,7 +2625,7 @@ void cleanup_menus() gMenuAttachmentSelf = NULL; delete gMenuAttachmentOther; - gMenuAttachmentSelf = NULL; + gMenuAttachmentOther = NULL; delete gMenuLand; gMenuLand = NULL; -- GitLab