diff options
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/lldaeloader.cpp | 4 | ||||
-rw-r--r-- | indra/llprimitive/llgltfloader.cpp | 2 | ||||
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 1 | ||||
-rw-r--r-- | indra/llprimitive/llmodel.h | 16 | ||||
-rw-r--r-- | indra/llprimitive/tests/llmediaentry_test.cpp | 2 |
5 files changed, 18 insertions, 7 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index b38bc30ea8..3dcb0d7e97 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -53,8 +53,6 @@ #pragma warning (default : 4264) #endif -#include <boost/lexical_cast.hpp> - #include "lldaeloader.h" #include "llsdserialize.h" #include "lljoint.h" @@ -2393,7 +2391,7 @@ std::string LLDAELoader::getElementLabel(daeElement *element) if (ind > 0) { - index_string = "_" + boost::lexical_cast<std::string>(ind); + index_string = "_" + std::to_string(ind); } // if parent has a name or ID, use it diff --git a/indra/llprimitive/llgltfloader.cpp b/indra/llprimitive/llgltfloader.cpp index 7394f99794..8e498158d6 100644 --- a/indra/llprimitive/llgltfloader.cpp +++ b/indra/llprimitive/llgltfloader.cpp @@ -48,8 +48,6 @@ // TODO: includes inherited from dae loader. Validate / prune -#include <boost/lexical_cast.hpp> - #include "llsdserialize.h" #include "lljoint.h" diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index d56ffdc317..7b0d2632aa 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -68,6 +68,7 @@ LLModel::~LLModel() { LLConvexDecomposition::getInstance()->deleteDecomposition(mDecompID); } + mPhysics.mMesh.clear(); } //static diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index 6a4a4927b6..568254ae93 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -108,6 +108,8 @@ public: std::vector<LLVector3> mPositions; std::vector<LLVector3> mNormals; + ~PhysicsMesh() {} + void clear() { mPositions.clear(); @@ -133,6 +135,7 @@ public: public: Decomposition() { } Decomposition(LLSD& data); + ~Decomposition() { } void fromLLSD(LLSD& data); LLSD asLLSD() const; bool hasHullList() const; @@ -367,7 +370,7 @@ class LLModelInstanceBase { public: LLPointer<LLModel> mModel; - LLPointer<LLModel> mLOD[5]; + LLPointer<LLModel> mLOD[LLModel::NUM_LODS]; LLUUID mMeshID; LLMatrix4 mTransform; @@ -382,6 +385,15 @@ public: : mModel(NULL) { } + + virtual ~LLModelInstanceBase() + { + mModel = NULL; + for (int j = 0; j < LLModel::NUM_LODS; ++j) + { + mLOD[j] = NULL; + } + }; }; typedef std::vector<LLModelInstanceBase> model_instance_list; @@ -401,6 +413,8 @@ public: LLModelInstance(LLSD& data); + ~LLModelInstance() {} + LLSD asLLSD(); }; diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp index b072ce3964..c3e17d1267 100644 --- a/indra/llprimitive/tests/llmediaentry_test.cpp +++ b/indra/llprimitive/tests/llmediaentry_test.cpp @@ -211,7 +211,7 @@ namespace tut void whitelist_test(int num, bool enable, const char *whitelist, const char *candidate_url, bool expected_pass) { - std::string message = "Whitelist test " + boost::lexical_cast<std::string>(num); + std::string message = "Whitelist test " + std::to_string(num); LLMediaEntry entry; entry.setWhiteListEnable(enable); set_whitelist(entry, whitelist); |