mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Replace MwIniImporter::numberToString with std::to_string
This commit is contained in:
parent
9126e844bf
commit
3b86f73ae7
2 changed files with 2 additions and 9 deletions
|
@ -654,12 +654,6 @@ void MwIniImporter::setVerbose(bool verbose) {
|
|||
mVerbose = verbose;
|
||||
}
|
||||
|
||||
std::string MwIniImporter::numberToString(int n) {
|
||||
std::stringstream str;
|
||||
str << n;
|
||||
return str.str();
|
||||
}
|
||||
|
||||
MwIniImporter::multistrmap MwIniImporter::loadIniFile(const boost::filesystem::path& filename) const {
|
||||
std::cout << "load ini file: " << filename << std::endl;
|
||||
|
||||
|
@ -801,7 +795,7 @@ void MwIniImporter::importArchives(multistrmap &cfg, const multistrmap &ini) con
|
|||
multistrmap::const_iterator it = ini.begin();
|
||||
for(int i=0; it != ini.end(); i++) {
|
||||
archive = baseArchive;
|
||||
archive.append(this->numberToString(i));
|
||||
archive.append(std::to_string(i));
|
||||
|
||||
it = ini.find(archive);
|
||||
if(it == ini.end()) {
|
||||
|
@ -892,7 +886,7 @@ void MwIniImporter::importGameFiles(multistrmap &cfg, const multistrmap &ini, co
|
|||
for (int i=0; it != ini.end(); i++)
|
||||
{
|
||||
gameFile = baseGameFile;
|
||||
gameFile.append(this->numberToString(i));
|
||||
gameFile.append(std::to_string(i));
|
||||
|
||||
it = ini.find(gameFile);
|
||||
if(it == ini.end())
|
||||
|
|
|
@ -35,7 +35,6 @@ class MwIniImporter {
|
|||
static std::vector<std::string>::iterator findString(std::vector<std::string>& source, const std::string& string);
|
||||
|
||||
static void insertMultistrmap(multistrmap &cfg, const std::string& key, const std::string& value);
|
||||
static std::string numberToString(int n);
|
||||
|
||||
/// \return file's "last modified time", used in original MW to determine plug-in load order
|
||||
static std::time_t lastWriteTime(const boost::filesystem::path& filename, std::time_t defaultTime);
|
||||
|
|
Loading…
Reference in a new issue