summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-23 09:29:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-23 09:29:48 +0100
commit0acd074861eedf1d5c8bda9bec3311e9e7890c70 (patch)
treed06b93a5ddbde2ca869060b20406cbb1402d0f75 /hwpfilter
parent782c88326fda80ec5559cc858b17b9afd7c3d4cb (diff)
std::istream::get() returns std::istream::traits_type::eof()
Change-Id: I0461e8184e4ad2a9d2dff89879e141bd66555bf5
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hwpeq.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx
index 170a68c81ed1..9120bc9573ca 100644
--- a/hwpfilter/source/hwpeq.cxx
+++ b/hwpfilter/source/hwpeq.cxx
@@ -491,7 +491,7 @@ static int next_token(MzString &white, MzString &token, istream *strm)
token = nullptr;
white = nullptr;
- if( !strm->good() || (ch = strm->get()) == EOF )
+ if( !strm->good() || (ch = strm->get()) == std::istream::traits_type::eof() )
return 0;
// read preceding ws
@@ -508,7 +508,8 @@ static int next_token(MzString &white, MzString &token, istream *strm)
do {
token << (char) ch;
ch = strm->get();
- } while( ch != EOF && (ch & 0x80 || isalpha(ch)) ) ;
+ } while( ch != std::istream::traits_type::eof()
+ && (ch & 0x80 || isalpha(ch)) ) ;
strm->putback(sal::static_int_cast<char>(ch));
/* special treatment of sub, sub, over, atop
The reason for this is that affect next_state().
@@ -722,7 +723,8 @@ static char eq2ltxconv(MzString& sstr, istream *strm, const char *sentinel)
sstr.replace(pos, ' ');
}
sstr << token;
- while( (ch = strm->get()) != EOF && IS_WS(ch) )
+ while( (ch = strm->get()) != std::istream::traits_type::eof()
+ && IS_WS(ch) )
sstr << (char)ch;
if( ch != '{' )
sstr << "{}";