commit da123945
Replace deprecated stdio.h
cstdio brings the std snprintf, so switch to that as well
Changed files
| M | sago/platform_folders.cpp before |
diff --git a/sago/platform_folders.cpp b/sago/platform_folders.cpp
index 004ceac..53f33be 100644
--- a/sago/platform_folders.cpp
+++ b/sago/platform_folders.cpp
@@ -30,7 +30,7 @@ SOFTWARE.
#include <iostream>
#include <stdexcept>
#include <string.h>
-#include <stdio.h>
+#include <cstdio>
#include <cstdlib>
#if defined(_WIN32)
@@ -106,7 +106,7 @@ static std::string GetMacFolder(OSType folderType, const char* errorMsg) {
static void throwOnRelative(const char* envName, const char* envValue) {
if (envValue[0] != '/') {
char buffer[200];
- snprintf(buffer, sizeof(buffer), "Environment \"%s\" does not start with an '/'. XDG specifies that the value must be absolute. The current value is: \"%s\"", envName, envValue);
+ std::snprintf(buffer, sizeof(buffer), "Environment \"%s\" does not start with an '/'. XDG specifies that the value must be absolute. The current value is: \"%s\"", envName, envValue);
throw std::runtime_error(buffer);
}
}