summaryrefslogtreecommitdiff
path: root/indra/newview/llsyntaxid.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2026-04-29 15:36:21 -0700
committerGitHub <noreply@github.com>2026-04-29 15:36:21 -0700
commite932b04e87cefd922800c9ca24382f9a9c461b2d (patch)
tree9ae0c13515b2e6e13e9b90944b33bcaf1254a9c9 /indra/newview/llsyntaxid.cpp
parent0f8be801753ade9db2c0dad66d124d71f7314b2d (diff)
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Diffstat (limited to 'indra/newview/llsyntaxid.cpp')
-rw-r--r--indra/newview/llsyntaxid.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp
index ad10cee3dd..6670809c85 100644
--- a/indra/newview/llsyntaxid.cpp
+++ b/indra/newview/llsyntaxid.cpp
@@ -167,19 +167,19 @@ void LLSyntaxDefCache::fetchKeywords()
}
if (mUseDefsCap)
{
- LLCoros::instance().launch("LLSyntaxIdLSL::fetchKeywordsDefsCoro",
+ LLCoros::instance().launch("LLSyntaxDefCache::fetchKeywordsDefsCoro",
boost::bind(&LLSyntaxDefCache::fetchKeywordsDefsCoro, this, mCapabilityURL, mSyntaxId));
}
else
{
- LLCoros::instance().launch("LLSyntaxIdLSL::fetchKeywordsFileCoro",
+ LLCoros::instance().launch("LLSyntaxDefCache::fetchKeywordsFileCoro",
boost::bind(&LLSyntaxDefCache::fetchKeywordsFileCoro, this, mCapabilityURL, mSyntaxId));
}
}
//-----------------------------------------------------------------------------
// fetchKeywordsFileCoro
-// This uses the legacy languge cap which only sends the LSL keywords file.
+// This uses the legacy language cap which only sends the LSL keywords file.
void LLSyntaxDefCache::fetchKeywordsFileCoro(std::string url, LLUUID syntax_id)
{
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
@@ -324,7 +324,7 @@ void LLSyntaxDefCache::fetchKeywordsDefsCoro(std::string url, LLUUID syntax_id)
result.erase(LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS);
- setKeywords(memcached_keywords["lsl_keywords.xml"], memcached_keywords["lua_keywords.xml"]);
+ setKeywords(memcached_keywords[FILENAME_INTERNAL_LSL], memcached_keywords[FILENAME_INTERNAL_LUA]);
LLAppViewer::instance()->postToMainCoro(
[this]()
{
@@ -363,8 +363,10 @@ void LLSyntaxDefCache::buildCachePaths(const LLUUID &syntax_id)
bool LLSyntaxDefCache::writeCacheFile(const std::string &fileSpec, const LLSD& content_ref)
{
- bool binary(content_ref.isBinary());
- std::ofstream file(fileSpec.c_str(), (binary)? std::ios_base::binary : 0);
+ bool binary(content_ref.isBinary());
+ std::ios_base::openmode mode(binary ? (std::ios_base::out | std::ios_base::binary)
+ : std::ios_base::out);
+ std::ofstream file(fileSpec.c_str(), mode);
if (!file.is_open())
{