Simplify strings construction

macos_ci_fix
Andrei Kortunov 1 year ago
parent 5160fbc2a0
commit b3a981e0fc

@ -434,15 +434,12 @@ void MwIniImporter::insertMultistrmap(multistrmap& cfg, const std::string& key,
void MwIniImporter::importArchives(multistrmap& cfg, const multistrmap& ini) const
{
std::vector<std::string> archives;
std::string baseArchive("Archives:Archive ");
std::string archive;
// Search archives listed in ini file
auto it = ini.begin();
for (int i = 0; it != ini.end(); i++)
{
archive = baseArchive;
archive.append(std::to_string(i));
std::string archive("Archives:Archive " + std::to_string(i));
it = ini.find(archive);
if (it == ini.end())
@ -537,8 +534,7 @@ void MwIniImporter::importGameFiles(
auto it = ini.begin();
for (int i = 0; it != ini.end(); i++)
{
std::string gameFile("Game Files:GameFile");
gameFile.append(std::to_string(i));
std::string gameFile("Game Files:GameFile" + std::to_string(i));
it = ini.find(gameFile);
if (it == ini.end())

@ -398,7 +398,6 @@ namespace Gui
file->read(name_, sizeof(name_));
if (!file->good())
fail(*file, fileName, "File too small to be a valid font");
std::string name(name_);
GlyphInfo data[256];
file->read((char*)data, sizeof(data));
@ -408,7 +407,7 @@ namespace Gui
file.reset();
// Create the font texture
std::string bitmapFilename = "fonts/" + std::move(name) + ".tex";
std::string bitmapFilename = "fonts/" + std::string(name_) + ".tex";
Files::IStreamPtr bitmapFile = mVFS->get(bitmapFilename);

Loading…
Cancel
Save