Browse Source

Fix a few remaining C-style format in Log calls

pull/1716/head
Jmgr 5 years ago committed by Gleb Mazovetskiy
parent
commit
17c85814bf
  1. 8
      Source/init.cpp
  2. 2
      Source/miniwin/misc_msg.cpp
  3. 2
      Source/mpqapi.cpp

8
Source/init.cpp

@ -60,16 +60,16 @@ HANDLE init_test_access(const std::vector<std::string> &paths, const char *mpq_n
for (const auto &path : paths) {
mpq_abspath = path + mpq_name;
if (SFileOpenArchive(mpq_abspath.c_str(), 0, MPQ_OPEN_READ_ONLY, &archive)) {
LogVerbose(" Found: %s in %s", mpq_name, path.c_str());
LogVerbose(" Found: {} in {}", mpq_name, path);
SFileSetBasePath(path.c_str());
return archive;
}
if (SErrGetLastError() != STORM_ERROR_FILE_NOT_FOUND) {
LogError("Open error %u: %s", SErrGetLastError(), mpq_abspath.c_str());
LogError("Open error {}: {}", SErrGetLastError(), mpq_abspath);
}
}
if (SErrGetLastError() == STORM_ERROR_FILE_NOT_FOUND) {
LogVerbose("Missing: %s", mpq_name);
LogVerbose("Missing: {}", mpq_name);
}
return nullptr;
@ -173,7 +173,7 @@ void init_archives()
message.append(paths[i]);
message += '\'';
}
LogVerbose("MPQ search paths%s", message.c_str());
LogVerbose("MPQ search paths:{}", message);
}
diabdat_mpq = init_test_access(paths, "DIABDAT.MPQ");

2
Source/miniwin/misc_msg.cpp

@ -266,7 +266,7 @@ WPARAM KeystateForMouse(WPARAM ret)
bool FalseAvail(const char *name, int value)
{
LogDebug("Unhandled SDL event: %s %d", name, value);
LogDebug("Unhandled SDL event: {} {}", name, value);
return true;
}

2
Source/mpqapi.cpp

@ -157,7 +157,7 @@ private:
{
if (s_->fail()) {
std::string fmt_with_error = fmt;
fmt_with_error.append(": failed with \"%s\"");
fmt_with_error.append(": failed with \"{}\"");
const char *error_message = std::strerror(errno);
if (error_message == nullptr)
error_message = "";

Loading…
Cancel
Save