1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

Fix some of the new warnings from sonarcloud

This commit is contained in:
Ivan Savenko
2024-10-10 20:31:11 +00:00
parent 1fc0267ad1
commit a8e84c55f6
27 changed files with 66 additions and 84 deletions

View File

@ -152,11 +152,9 @@ void TextLocalizationContainer::exportAllTexts(std::map<std::string, std::map<st
std::string textToWrite;
std::string modName = entry.second.baseStringModContext;
if (entry.second.baseStringModContext == entry.second.identifierModContext)
{
if (modName.find('.') != std::string::npos)
modName = modName.substr(0, modName.find('.'));
}
if (entry.second.baseStringModContext == entry.second.identifierModContext && modName.find('.') != std::string::npos)
modName = modName.substr(0, modName.find('.'));
boost::range::replace(modName, '.', '_');
textToWrite = entry.second.translatedText;