summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-05-29 11:21:38 +0200
committerGitHub <noreply@github.com>2021-05-29 11:21:38 +0200
commitca9a7df7522a614b839a83e1ba9b6a7b08642b8a (patch)
tree172dedad1d930ef7699838272e779c9d7218319b /src/os
parent4d74e519074bec9a07c2997715ab635ac0e8f084 (diff)
downloadopenttd-ca9a7df7522a614b839a83e1ba9b6a7b08642b8a.tar.xz
Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not returns yes/no.
Diffstat (limited to 'src/os')
-rw-r--r--src/os/os2/os2.cpp2
-rw-r--r--src/os/unix/unix.cpp2
-rw-r--r--src/os/windows/win32.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/os/os2/os2.cpp b/src/os/os2/os2.cpp
index 009a3e0ed..d3de2631b 100644
--- a/src/os/os2/os2.cpp
+++ b/src/os/os2/os2.cpp
@@ -174,7 +174,7 @@ int CDECL main(int argc, char *argv[])
SetRandomSeed(time(nullptr));
/* Make sure our arguments contain only valid UTF-8 characters. */
- for (int i = 0; i < argc; i++) ValidateString(argv[i]);
+ for (int i = 0; i < argc; i++) StrMakeValidInPlace(argv[i]);
return openttd_main(argc, argv);
}
diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp
index 57edf1d38..8bb947e85 100644
--- a/src/os/unix/unix.cpp
+++ b/src/os/unix/unix.cpp
@@ -243,7 +243,7 @@ void CocoaReleaseAutoreleasePool();
int CDECL main(int argc, char *argv[])
{
/* Make sure our arguments contain only valid UTF-8 characters. */
- for (int i = 0; i < argc; i++) ValidateString(argv[i]);
+ for (int i = 0; i < argc; i++) StrMakeValidInPlace(argv[i]);
#ifdef WITH_COCOA
CocoaSetupAutoreleasePool();
diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp
index eee81be40..3ed0cdb2a 100644
--- a/src/os/windows/win32.cpp
+++ b/src/os/windows/win32.cpp
@@ -429,7 +429,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
argc = ParseCommandLine(cmdline, argv, lengthof(argv));
/* Make sure our arguments contain only valid UTF-8 characters. */
- for (int i = 0; i < argc; i++) ValidateString(argv[i]);
+ for (int i = 0; i < argc; i++) StrMakeValidInPlace(argv[i]);
openttd_main(argc, argv);