From 6c12f45f3b7d7eab32ed29860d2261fc8a512f0e Mon Sep 17 00:00:00 2001 From: Mikhail Redko Date: Tue, 11 May 2021 10:55:57 +0300 Subject: Core/Console: Improve ReadWinConsole logic and cosmetic changes (#26402) * Core/Console: Improve ReadWinConsole logic and cosmetic changes * Core/Console: Fixed possible appearance of weird characters in the console when printing the output of child processes * Fix codestyle * Removed auto * Core/Misc: Explicit casting Difficulty values to uint8 before outputting to console * Core/Misc: Cast Difficulty to uint32 for output to console Co-authored-by: jackpoz --- src/common/Utilities/Util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common/Utilities/Util.h') diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 5b90f0cf86e..87dd45d3cbc 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -297,6 +297,8 @@ TC_COMMON_API bool ReadWinConsole(std::string& str, size_t size = 256); TC_COMMON_API bool WriteWinConsole(std::string_view str, bool error = false); #endif +TC_COMMON_API Optional RemoveCRLF(std::string& str); + TC_COMMON_API bool IsIPAddress(char const* ipaddress); TC_COMMON_API uint32 CreatePIDFile(std::string const& filename); -- cgit v1.2.3