From fc662341e6f85da78ada0e443f6116b978f79f22 Mon Sep 17 00:00:00 2001 From: Igor Pavlov <87184205+ip7z@users.noreply.github.com> Date: Tue, 14 May 2024 00:00:00 +0000 Subject: 24.05 --- CPP/Common/StdInStream.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'CPP/Common/StdInStream.cpp') diff --git a/CPP/Common/StdInStream.cpp b/CPP/Common/StdInStream.cpp index 7b209f1..944be34 100644 --- a/CPP/Common/StdInStream.cpp +++ b/CPP/Common/StdInStream.cpp @@ -48,15 +48,15 @@ bool CStdInStream::ScanAStringUntilNewLine(AString &s) s.Empty(); for (;;) { - int intChar = GetChar(); + const int intChar = GetChar(); if (intChar == EOF) return true; - char c = (char)intChar; + const char c = (char)intChar; if (c == 0) return false; if (c == '\n') return true; - s += c; + s.Add_Char(c); } } @@ -64,14 +64,14 @@ bool CStdInStream::ScanUStringUntilNewLine(UString &dest) { dest.Empty(); AString s; - bool res = ScanAStringUntilNewLine(s); + const bool res = ScanAStringUntilNewLine(s); int codePage = CodePage; if (codePage == -1) codePage = CP_OEMCP; - if (codePage == CP_UTF8) + if ((unsigned)codePage == CP_UTF8) ConvertUTF8ToUnicode(s, dest); else - MultiByteToUnicodeString2(dest, s, (UINT)codePage); + MultiByteToUnicodeString2(dest, s, (UINT)(unsigned)codePage); return res; } -- cgit v1.2.3-55-g6feb