summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceGrid/FileCache.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/FileCache.cpp b/cpp/src/IceGrid/FileCache.cpp
index 1dbc6da5a7a..576a57f842e 100644
--- a/cpp/src/IceGrid/FileCache.cpp
+++ b/cpp/src/IceGrid/FileCache.cpp
@@ -195,15 +195,15 @@ FileCache::read(const string& file, Ice::Long offset, int size, Ice::Long& newOf
totalSize += lineSize;
lines.push_back(line);
-#if defined(_MSC_VER) && (_MSC_VER < 1300)
+ //
+ // Some eofbit cases will also set failbit. So first
+ // check eof.
+ //
if(is.eof())
{
newOffset += line.size();
}
- else
-#else
- if(!is.fail())
-#endif
+ else if(!is.fail())
{
newOffset = is.tellg();
}