From 5ca7a53f49964992d1e351ae67f53014e1546b12 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Wed, 28 Dec 2022 09:49:30 -0500 Subject: [PATCH] Small cleanup --- indra/newview/llmeshrepository.cpp | 7 ++++--- indra/newview/llmeshrepository.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 8be2b2c8a44..3d9db3dc538 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 62890c68f97..9e40fbe1b14 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. -- GitLab