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/logging | |
parent | e72f0cbbac6ffcbfbf0c52f14a2a3cb7c18ba8fc (diff) | |
download | NorthstarLauncher-7f84bdf8fd5c93286f000bc5f9314eab81128cee.tar.gz NorthstarLauncher-7f84bdf8fd5c93286f000bc5f9314eab81128cee.zip |
Address C4267 compiler warnings (#647)v1.22.2-rc1
Implicit conversion from `size_t` to a smaller type
Diffstat (limited to 'primedev/logging')
-rw-r--r-- | primedev/logging/logging.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/primedev/logging/logging.cpp b/primedev/logging/logging.cpp index 3416bb8c..ef9a6737 100644 --- a/primedev/logging/logging.cpp +++ b/primedev/logging/logging.cpp @@ -95,18 +95,18 @@ void ExternalConsoleSink::custom_sink_it_(const custom_log_msg& msg) std::string name {msg.logger_name.begin(), msg.logger_name.end()}; std::string name_str = "[NAME]"; - int name_pos = str.find(name_str); + size_t name_pos = str.find(name_str); str.replace(name_pos, name_str.length(), msg.origin->ANSIColor + "[" + name + "]" + default_color); std::string level_str = "[LVL]"; - int level_pos = str.find(level_str); + size_t level_pos = str.find(level_str); str.replace(level_pos, level_str.length(), levelColor + "[" + std::string(level_names[msg.level]) + "]" + default_color); out += str; } // print the string to the console - this is definitely bad i think HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); - auto ignored = WriteConsoleA(handle, out.c_str(), std::strlen(out.c_str()), nullptr, nullptr); + auto ignored = WriteConsoleA(handle, out.c_str(), (DWORD)std::strlen(out.c_str()), nullptr, nullptr); (void)ignored; } |