diff --git a/apps/mwiniimporter/importer.cpp b/apps/mwiniimporter/importer.cpp index bc322649e7..7b3bcc3f1c 100644 --- a/apps/mwiniimporter/importer.cpp +++ b/apps/mwiniimporter/importer.cpp @@ -434,15 +434,12 @@ void MwIniImporter::insertMultistrmap(multistrmap& cfg, const std::string& key, void MwIniImporter::importArchives(multistrmap& cfg, const multistrmap& ini) const { std::vector 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()) diff --git a/components/fontloader/fontloader.cpp b/components/fontloader/fontloader.cpp index e69712cca5..fcee1bcd28 100644 --- a/components/fontloader/fontloader.cpp +++ b/components/fontloader/fontloader.cpp @@ -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);