aboutsummaryrefslogtreecommitdiff
path: root/devel/ice/files/patch-cpp-src-IceGrid-FileCache.cpp
blob: d8288711642c5b153916e904825376762c31892b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- cpp.orig/src/IceGrid/FileCache.cpp	2011-06-15 21:43:58.000000000 +0200
+++ cpp/src/IceGrid/FileCache.cpp	2012-09-10 11:43:58.000000000 +0200
@@ -195,15 +195,12 @@ 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)
-        if(is.eof())
+        
+        if(is.eof() || is.fail())
         {
             newOffset += line.size();
         }
         else
-#else
-        if(!is.fail())
-#endif
         {
             newOffset = is.tellg();
         }