From 99485687df258cffb8c6d5869f35357265f44985 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 2 Mar 2023 16:31:19 -0500 Subject: [PATCH] Trivial changes --- autobuild.xml | 64 ------------------- indra/llcommon/llpointer.h | 5 -- indra/llcommon/lluuid.h | 13 ++-- indra/llmath/llmatrix3a.h | 2 +- indra/llmath/llmatrix4a.h | 16 ++--- indra/llmath/llvector4a.h | 2 +- indra/llmath/llvector4a.inl | 2 +- indra/llrender/llfontfreetype.cpp | 3 + indra/llui/llview.h | 2 +- indra/newview/llfloatersidepanelcontainer.cpp | 2 + 10 files changed, 23 insertions(+), 88 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index fd86b6abc4e..383abfe5a50 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -975,68 +975,6 @@ <key>version</key> <string>8.0.6</string> </map> - <key>libepoxy</key> - <map> - <key>canonical_repo</key> - <string>https://git.alchemyviewer.org/alchemy/thirdparty/3p-libepoxy</string> - <key>copyright</key> - <string>Copyright © 2013-2014 Intel Corporation</string> - <key>description</key> - <string>Epoxy is a library for handling OpenGL function pointer management for you.</string> - <key>license</key> - <string>MIT</string> - <key>license_file</key> - <string>LICENSES/libepoxy.txt</string> - <key>name</key> - <string>libepoxy</string> - <key>platforms</key> - <map> - <key>darwin64</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>33d3e32095370c8613d7188b33b181c7cfb7b9090fab51fdbf10d27587ee47441a1abe90b23a61f944d843e611880af26b25279e95ebbdbbf0fb396c27de000d</string> - <key>hash_algorithm</key> - <string>blake2b</string> - <key>url</key> - <string>https://git.alchemyviewer.org/api/v4/projects/101/packages/generic/libepoxy/1.5.9.1311/libepoxy-1.5.9-darwin64-1311.tar.zst</string> - </map> - <key>name</key> - <string>darwin64</string> - </map> - <key>linux64</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>58383c84fb5ebe8e86ced17fa2da3d9825072e025cd6aa922c96bf9d3a4b49b30c196b4c8d6f373f68b474c03c10cd73c24da71a71fe4933ee4daa829554fdba</string> - <key>hash_algorithm</key> - <string>blake2b</string> - <key>url</key> - <string>https://git.alchemyviewer.org/api/v4/projects/101/packages/generic/libepoxy/1.5.9.1311/libepoxy-1.5.9-linux64-1311.tar.zst</string> - </map> - <key>name</key> - <string>linux64</string> - </map> - <key>windows64</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>8ca7b60108758a29d63e3c794c38adccf3a464cfcac6465e581bb8f9374b05cc541e18915d731e30e3dca3ed2f41092a6e5b111eae3ac7056a1c3a4f89bb9402</string> - <key>hash_algorithm</key> - <string>blake2b</string> - <key>url</key> - <string>https://git.alchemyviewer.org/api/v4/projects/101/packages/generic/libepoxy/1.5.9.1311/libepoxy-1.5.9-windows64-1311.tar.zst</string> - </map> - <key>name</key> - <string>windows64</string> - </map> - </map> - <key>version</key> - <string>1.5.9</string> - </map> <key>libhunspell</key> <map> <key>copyright</key> @@ -1509,8 +1447,6 @@ <string>windows64</string> </map> </map> - <key>source_type</key> - <string>hg</string> <key>version</key> <string>1.0.577418</string> </map> diff --git a/indra/llcommon/llpointer.h b/indra/llcommon/llpointer.h index b00bb2777fe..b0ce8f67dbf 100644 --- a/indra/llcommon/llpointer.h +++ b/indra/llcommon/llpointer.h @@ -140,7 +140,6 @@ template <class Type> class LLPointer return *this; } - // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. template<typename Subclass> LLPointer<Type>& operator =(LLPointer<Subclass>&& ptr) noexcept { @@ -151,7 +150,6 @@ template <class Type> class LLPointer return *this; } - // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. inline void swap(LLPointer<Type>& ptr) noexcept { Type* temp = mPointer; @@ -159,7 +157,6 @@ template <class Type> class LLPointer ptr.mPointer = temp; } - // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. template<typename Subclass> inline void swap(LLPointer<Subclass>& ptr) noexcept { @@ -330,7 +327,6 @@ template <class Type> class LLConstPointer return *this; } - // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. template<typename Subclass> LLConstPointer<Type>& operator =(LLConstPointer<Subclass>&& ptr) noexcept { @@ -348,7 +344,6 @@ template <class Type> class LLConstPointer ptr.mPointer = temp; } - // support assignment up the type hierarchy. See Item 45 in Effective C++, 3rd Ed. template<typename Subclass> inline void swap(LLConstPointer<Subclass>& ptr) noexcept { diff --git a/indra/llcommon/lluuid.h b/indra/llcommon/lluuid.h index 18b944a85a0..4eceb82ea79 100644 --- a/indra/llcommon/lluuid.h +++ b/indra/llcommon/lluuid.h @@ -67,7 +67,7 @@ class LL_COMMON_API LLUUID //static versions of above for use in initializer expressions such as constructor params, etc. static LLUUID generateNewID(); - static LLUUID generateNewID(const std::string& stream); //static version of above for use in initializer expressions such as constructor params, etc. + static LLUUID generateNewID(const std::string& stream); private: BOOL parseInternalScalar(const char* in_string, bool broken_format, bool emit); @@ -171,12 +171,6 @@ class LL_COMMON_API LLUUID } // END BOOST - - friend std::size_t hash_value(LLUUID const& id) - { - return boost::hash_value(id.mData); - } - // xor functions. Useful since any two random uuids xored together // will yield a determinate third random unique id that can be // used as a key in a single uuid that represents 2. @@ -221,6 +215,11 @@ class LL_COMMON_API LLUUID U16 getCRC16() const; U32 getCRC32() const; + friend std::size_t hash_value(LLUUID const& id) + { + return boost::hash_value(id.mData); + } + static BOOL validate(const std::string_view in_string); // Validate that the UUID string is legal. static const LLUUID null; diff --git a/indra/llmath/llmatrix3a.h b/indra/llmath/llmatrix3a.h index 29df2381c6f..4d19c29472c 100644 --- a/indra/llmath/llmatrix3a.h +++ b/indra/llmath/llmatrix3a.h @@ -54,7 +54,7 @@ class LLMatrix3a ////////////////////////// // Ctors ////////////////////////// - + // Ctor LLMatrix3a() = default; diff --git a/indra/llmath/llmatrix4a.h b/indra/llmath/llmatrix4a.h index 2e07a31ee70..b226c936d4f 100644 --- a/indra/llmath/llmatrix4a.h +++ b/indra/llmath/llmatrix4a.h @@ -126,14 +126,6 @@ class alignas(16) LLMatrix4a mMatrix[3].loadua(src.mMatrix[3]); } - inline void loadu(const LLMatrix3& src) - { - mMatrix[0].load3(src.mMatrix[0]); - mMatrix[1].load3(src.mMatrix[1]); - mMatrix[2].load3(src.mMatrix[2]); - mMatrix[3].set(0,0,0,1.f); - } - inline void loadu(const F32* src) { mMatrix[0].loadua(src+0); @@ -142,6 +134,14 @@ class alignas(16) LLMatrix4a mMatrix[3].loadua(src+12); } + inline void loadu(const LLMatrix3& src) + { + mMatrix[0].load3(src.mMatrix[0]); + mMatrix[1].load3(src.mMatrix[1]); + mMatrix[2].load3(src.mMatrix[2]); + mMatrix[3].set(0,0,0,1.f); + } + inline void store4a(F32* dst) const { mMatrix[0].store4a(dst+0); diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h index 162a5372da6..624988d91bc 100644 --- a/indra/llmath/llvector4a.h +++ b/indra/llmath/llvector4a.h @@ -357,7 +357,7 @@ class alignas(16) LLVector4a inline const LLVector4a& operator= ( const LLQuad& rhs ); inline operator LLQuad() const; - + private: LLQuad mQ; }; diff --git a/indra/llmath/llvector4a.inl b/indra/llmath/llvector4a.inl index 6afb23d1357..808cdb73b67 100644 --- a/indra/llmath/llvector4a.inl +++ b/indra/llmath/llvector4a.inl @@ -351,7 +351,7 @@ inline LLSimdScalar LLVector4a::dot3(const LLVector4a& b) const const LLQuad splatY = _mm_castsi128_ps( _mm_shuffle_epi32( _mm_castps_si128(ab), _MM_SHUFFLE(1, 1, 1, 1) ) ); const LLQuad splatZ = _mm_castsi128_ps( _mm_shuffle_epi32( _mm_castps_si128(ab), _MM_SHUFFLE(2, 2, 2, 2) ) ); const LLQuad xPlusY = _mm_add_ps( ab, splatY ); - return _mm_add_ps( xPlusY, splatZ ); + return _mm_add_ps( xPlusY, splatZ ); #endif } diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index ddf6214be7f..2284eab4e90 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -359,6 +359,9 @@ F32 LLFontFreetype::getXAdvance(const LLFontGlyphInfo* glyph) const F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const { + if (mFTFace == NULL) + return 0.f; + LLFontGlyphInfo* left_glyph_info = getGlyphInfo(char_left);; LLFontGlyphInfo* right_glyph_info = getGlyphInfo(char_right); return getXKerning(left_glyph_info, right_glyph_info); diff --git a/indra/llui/llview.h b/indra/llui/llview.h index a41fd371c25..3a05d262fe1 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -292,7 +292,7 @@ class LLView void setAllChildrenEnabled(BOOL b); virtual void setVisible(BOOL visible); - void setVisibleDirect(BOOL visible) {mVisible = visible;} + void setVisibleDirect(BOOL visible) { mVisible = visible; } const BOOL& getVisible() const { return mVisible; } virtual void setEnabled(BOOL enabled); BOOL getEnabled() const { return mEnabled; } diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp index 9e92e5b82be..d7c8a7359d8 100644 --- a/indra/newview/llfloatersidepanelcontainer.cpp +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -165,6 +165,7 @@ void LLFloaterSidePanelContainer::showPanel(std::string_view floater_name, std:: LLPanel* LLFloaterSidePanelContainer::getPanel(std::string_view floater_name, std::string_view panel_name) { LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name); + if (floaterp) { if (panel_name == sMainPanelName) @@ -183,6 +184,7 @@ LLPanel* LLFloaterSidePanelContainer::getPanel(std::string_view floater_name, st LLPanel* LLFloaterSidePanelContainer::findPanel(std::string_view floater_name, std::string_view panel_name) { LLFloaterSidePanelContainer* floaterp = LLFloaterReg::findTypedInstance<LLFloaterSidePanelContainer>(floater_name); + if (floaterp) { if (panel_name == sMainPanelName) -- GitLab