diff options
author | Dave Houlton <euclid@lindenlab.com> | 2022-04-13 12:32:58 -0600 |
---|---|---|
committer | Dave Houlton <euclid@lindenlab.com> | 2022-06-08 13:33:59 -0600 |
commit | 8c0163bcb48df56112a625550d411741c20c5846 (patch) | |
tree | 3039fe3694a08ed8ada130ba9f6eead0688198aa /indra/llprimitive/llmodelloader.cpp | |
parent | d385c73b6e6df968a19a2bb7f0ec1e72bd01e8dc (diff) |
SL-17214 initial loader class skeleton
Diffstat (limited to 'indra/llprimitive/llmodelloader.cpp')
-rw-r--r-- | indra/llprimitive/llmodelloader.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp index 5171621007..554ed54de1 100644 --- a/indra/llprimitive/llmodelloader.cpp +++ b/indra/llprimitive/llmodelloader.cpp @@ -160,7 +160,8 @@ bool LLModelLoader::getSLMFilename(const std::string& model_filename, std::strin std::string::size_type i = model_filename.rfind("."); if (i != std::string::npos) { - slm_filename.replace(i, model_filename.size()-1, ".slm"); + slm_filename.resize(i, '\0'); + slm_filename.append(".slm"); return true; } else @@ -172,7 +173,7 @@ bool LLModelLoader::getSLMFilename(const std::string& model_filename, std::strin bool LLModelLoader::doLoadModel() { //first, look for a .slm file of the same name that was modified later - //than the .dae + //than the specified model file if (mTrySLM) { @@ -182,13 +183,13 @@ bool LLModelLoader::doLoadModel() llstat slm_status; if (LLFile::stat(slm_filename, &slm_status) == 0) { //slm file exists - llstat dae_status; - if (LLFile::stat(mFilename, &dae_status) != 0 || - dae_status.st_mtime < slm_status.st_mtime) + llstat model_file_status; + if (LLFile::stat(mFilename, &model_file_status) != 0 || + model_file_status.st_mtime < slm_status.st_mtime) { if (loadFromSLM(slm_filename)) { //slm successfully loaded, if this fails, fall through and - //try loading from dae + //try loading from model file mLod = -1; //successfully loading from an slm implicitly sets all //LoDs |