diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 8be2b2c8a44253224bc4fa7a1cb3161aceea2f53..3d9db3dc538d5791fc673a978f354d9f581dbe72 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -419,13 +419,14 @@ std::string make_dump_name(std::string_view prefix, S32 num) void dump_llsd_to_file(const LLSD& content, std::string filename); LLSD llsd_from_file(std::string filename); -const std::string header_lod[] = +const std::array<std::string, 4> header_lod = { "lowest_lod", "low_lod", "medium_lod", "high_lod" }; + const char * const LOG_MESH = "Mesh"; // Static data and functions to measure mesh load @@ -1322,7 +1323,7 @@ LLCore::HttpHandle LLMeshRepoThread::getByteRange(const std::string & url, int l return handle; } -bool LLMeshRepoThread::getMeshHeaderInfo(const LLUUID& mesh_id, const char* block_name, MeshHeaderInfo& info) +bool LLMeshRepoThread::getMeshHeaderInfo(const LLUUID& mesh_id, std::string_view block_name, MeshHeaderInfo& info) { //protected by mMutex if (!mHeaderMutex) { @@ -1634,7 +1635,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod, const LLUUID& mesh_id = mesh_params.getSculptID(); MeshHeaderInfo info; - if (!getMeshHeaderInfo(mesh_id, header_lod[lod].c_str(), info)) + if (!getMeshHeaderInfo(mesh_id, header_lod[lod], info)) { return false; } diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index 62890c68f9786eca966a399b1e5091c7304c56f4..9e40fbe1b14700c76f89e15b2b958f02ff54520d 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -373,7 +373,7 @@ class LLMeshRepoThread final : public LLThread EMeshProcessingResult physicsShapeReceived(const LLUUID& mesh_id, U8* data, S32 data_size); bool hasPhysicsShapeInHeader(const LLUUID& mesh_id); - bool getMeshHeaderInfo(const LLUUID& mesh_id, const char* block_name, MeshHeaderInfo& info); + bool getMeshHeaderInfo(const LLUUID& mesh_id, std::string_view block_name, MeshHeaderInfo& info); bool loadInfoFromFilesystem(const LLUUID& mesh_id, MeshHeaderInfo& info, boost::function<bool(const LLUUID&, U8*, S32)> fn); void notifyLoadedMeshes(); // Only call from main thread.