Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Common/StdInStream.cpp')
-rwxr-xr-xCommon/StdInStream.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Common/StdInStream.cpp b/Common/StdInStream.cpp
index 8da30738..923f366e 100755
--- a/Common/StdInStream.cpp
+++ b/Common/StdInStream.cpp
@@ -5,6 +5,11 @@
#include <tchar.h>
#include "StdInStream.h"
+#ifdef _MSC_VER
+// "was declared deprecated" disabling
+#pragma warning(disable : 4996 )
+#endif
+
static const char kIllegalChar = '\0';
static const char kNewLineChar = '\n';
@@ -40,7 +45,7 @@ CStdInStream::~CStdInStream()
AString CStdInStream::ScanStringUntilNewLine()
{
AString s;
- while(true)
+ for (;;)
{
int intChar = GetChar();
if(intChar == EOF)
@@ -49,9 +54,10 @@ AString CStdInStream::ScanStringUntilNewLine()
if (c == kIllegalChar)
throw kIllegalCharMessage;
if(c == kNewLineChar)
- return s;
+ break;
s += c;
}
+ return s;
}
void CStdInStream::ReadToString(AString &resultString)