diff options
author | Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> | 2024-01-21 19:34:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-21 20:34:19 +0100 |
commit | 7f84bdf8fd5c93286f000bc5f9314eab81128cee (patch) | |
tree | d97974691eb50b7cd8a2bf8a7cbc342fdc7bdd44 /primedev/util | |
parent | e72f0cbbac6ffcbfbf0c52f14a2a3cb7c18ba8fc (diff) | |
download | NorthstarLauncher-1.22.2-rc1.tar.gz NorthstarLauncher-1.22.2-rc1.zip |
Address C4267 compiler warnings (#647)v1.22.2-rc1
Implicit conversion from `size_t` to a smaller type
Diffstat (limited to 'primedev/util')
-rw-r--r-- | primedev/util/printcommands.cpp | 4 | ||||
-rw-r--r-- | primedev/util/printmaps.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/primedev/util/printcommands.cpp b/primedev/util/printcommands.cpp index 34d56666..20ebfffc 100644 --- a/primedev/util/printcommands.cpp +++ b/primedev/util/printcommands.cpp @@ -52,12 +52,12 @@ void PrintCommandHelpDialogue(const ConCommandBase* command, const char* name) void TryPrintCvarHelpForCommand(const char* pCommand) { // try to display help text for an inputted command string from the console - int pCommandLen = strlen(pCommand); + size_t pCommandLen = strlen(pCommand); char* pCvarStr = new char[pCommandLen]; strcpy(pCvarStr, pCommand); // trim whitespace from right - for (int i = pCommandLen - 1; i; i--) + for (size_t i = pCommandLen - 1; i; i--) { if (isspace(pCvarStr[i])) pCvarStr[i] = '\0'; diff --git a/primedev/util/printmaps.cpp b/primedev/util/printmaps.cpp index d3253605..906bed06 100644 --- a/primedev/util/printmaps.cpp +++ b/primedev/util/printmaps.cpp @@ -136,9 +136,9 @@ int, __fastcall, (const char *const cmdname, const char *const partial, char com RefreshMapList(); // use a custom autocomplete func for all map loading commands - const int cmdLength = strlen(cmdname); + const size_t cmdLength = strlen(cmdname); const char* query = partial + cmdLength; - const int queryLength = strlen(query); + const size_t queryLength = strlen(query); int numMaps = 0; for (int i = 0; i < vMapList.size() && numMaps < COMMAND_COMPLETION_MAXITEMS; i++) |