]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/stream.cpp
Use floating point arithmetic in wxDC::GradientFillConcentric().
[wxWidgets.git] / src / common / stream.cpp
index a3142a2843e2a600da70f9b8c4e37e4f19e3e483..1a03caa34604cedf54b1fe45d8e7125af2a9c9fe 100644 (file)
@@ -635,7 +635,7 @@ wxFileOffset wxStreamBuffer::Seek(wxFileOffset pos, wxSeekMode mode)
                 size_t int_diff = wx_truncate_cast(size_t, diff);
                 wxCHECK_MSG( (wxFileOffset)int_diff == diff, wxInvalidOffset, wxT("huge file not supported") );
                 SetIntPosition(int_diff);
                 size_t int_diff = wx_truncate_cast(size_t, diff);
                 wxCHECK_MSG( (wxFileOffset)int_diff == diff, wxInvalidOffset, wxT("huge file not supported") );
                 SetIntPosition(int_diff);
-                return pos;
+                return diff;
             }
 
         case wxFromEnd:
             }
 
         case wxFromEnd:
@@ -943,17 +943,17 @@ wxFileOffset wxInputStream::SeekI(wxFileOffset pos, wxSeekMode mode)
             bytes_read = Read(buf, WXSIZEOF(buf)).LastRead();
             if ( m_lasterror != wxSTREAM_NO_ERROR )
                 return wxInvalidOffset;
             bytes_read = Read(buf, WXSIZEOF(buf)).LastRead();
             if ( m_lasterror != wxSTREAM_NO_ERROR )
                 return wxInvalidOffset;
-            
+
             wxASSERT(bytes_read == WXSIZEOF(buf));
         }
             wxASSERT(bytes_read == WXSIZEOF(buf));
         }
-        
+
         // read the last 'pos' bytes
         bytes_read = Read(buf, (size_t)pos).LastRead();
         if ( m_lasterror != wxSTREAM_NO_ERROR )
             return wxInvalidOffset;
         // read the last 'pos' bytes
         bytes_read = Read(buf, (size_t)pos).LastRead();
         if ( m_lasterror != wxSTREAM_NO_ERROR )
             return wxInvalidOffset;
-        
+
         wxASSERT(bytes_read == (size_t)pos);
         wxASSERT(bytes_read == (size_t)pos);
-        
+
         // we should now have seeked to the right position...
         return TellI();
     }
         // we should now have seeked to the right position...
         return TellI();
     }