diff options
| author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2024-05-14 00:00:00 +0000 |
|---|---|---|
| committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2024-05-15 23:55:04 +0500 |
| commit | fc662341e6f85da78ada0e443f6116b978f79f22 (patch) | |
| tree | 1be1cc402a7a9cbc18d4eeea6b141354c2d559e3 /CPP/Common/StdInStream.cpp | |
| parent | 5b39dc76f1bc82f941d5c800ab9f34407a06b53a (diff) | |
| download | 7zip-fc662341e6f85da78ada0e443f6116b978f79f22.tar.gz 7zip-fc662341e6f85da78ada0e443f6116b978f79f22.tar.bz2 7zip-fc662341e6f85da78ada0e443f6116b978f79f22.zip | |
24.0524.05
Diffstat (limited to 'CPP/Common/StdInStream.cpp')
| -rw-r--r-- | CPP/Common/StdInStream.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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) | |||
| 48 | s.Empty(); | 48 | s.Empty(); |
| 49 | for (;;) | 49 | for (;;) |
| 50 | { | 50 | { |
| 51 | int intChar = GetChar(); | 51 | const int intChar = GetChar(); |
| 52 | if (intChar == EOF) | 52 | if (intChar == EOF) |
| 53 | return true; | 53 | return true; |
| 54 | char c = (char)intChar; | 54 | const char c = (char)intChar; |
| 55 | if (c == 0) | 55 | if (c == 0) |
| 56 | return false; | 56 | return false; |
| 57 | if (c == '\n') | 57 | if (c == '\n') |
| 58 | return true; | 58 | return true; |
| 59 | s += c; | 59 | s.Add_Char(c); |
| 60 | } | 60 | } |
| 61 | } | 61 | } |
| 62 | 62 | ||
| @@ -64,14 +64,14 @@ bool CStdInStream::ScanUStringUntilNewLine(UString &dest) | |||
| 64 | { | 64 | { |
| 65 | dest.Empty(); | 65 | dest.Empty(); |
| 66 | AString s; | 66 | AString s; |
| 67 | bool res = ScanAStringUntilNewLine(s); | 67 | const bool res = ScanAStringUntilNewLine(s); |
| 68 | int codePage = CodePage; | 68 | int codePage = CodePage; |
| 69 | if (codePage == -1) | 69 | if (codePage == -1) |
| 70 | codePage = CP_OEMCP; | 70 | codePage = CP_OEMCP; |
| 71 | if (codePage == CP_UTF8) | 71 | if ((unsigned)codePage == CP_UTF8) |
| 72 | ConvertUTF8ToUnicode(s, dest); | 72 | ConvertUTF8ToUnicode(s, dest); |
| 73 | else | 73 | else |
| 74 | MultiByteToUnicodeString2(dest, s, (UINT)codePage); | 74 | MultiByteToUnicodeString2(dest, s, (UINT)(unsigned)codePage); |
| 75 | return res; | 75 | return res; |
| 76 | } | 76 | } |
| 77 | 77 | ||
