Make skip length size_t.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 3 Sep 2011 12:45:52 +0000 (13:45 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 3 Sep 2011 12:45:52 +0000 (13:45 +0100)
trace_file.cpp
trace_file.hpp
trace_snappyfile.cpp
trace_snappyfile.hpp

index 2d00286..91114b3 100644 (file)
@@ -150,7 +150,7 @@ bool ZLibFile::supportsOffsets() const
     return false;
 }
 
-bool ZLibFile::rawSkip(unsigned)
+bool ZLibFile::rawSkip(size_t)
 {
     return false;
 }
index c096ef9..6fdb9c3 100644 (file)
@@ -67,7 +67,7 @@ public:
     void close();
     void flush(void);
     int getc();
-    bool skip(unsigned length);
+    bool skip(size_t length);
 
     virtual bool supportsOffsets() const = 0;
     virtual File::Offset currentOffset();
@@ -79,7 +79,7 @@ protected:
     virtual int rawGetc() = 0;
     virtual void rawClose() = 0;
     virtual void rawFlush() = 0;
-    virtual bool rawSkip(unsigned length) = 0;
+    virtual bool rawSkip(size_t length) = 0;
 
 protected:
     std::string m_filename;
@@ -152,7 +152,7 @@ inline int File::getc()
     return rawGetc();
 }
 
-inline bool File::skip(unsigned length)
+inline bool File::skip(size_t length)
 {
     if (!m_isOpened || m_mode != File::Read) {
         return false;
@@ -175,7 +175,7 @@ protected:
     virtual int rawGetc();
     virtual void rawClose();
     virtual void rawFlush();
-    virtual bool rawSkip(unsigned length);
+    virtual bool rawSkip(size_t length);
 private:
     void *m_gzFile;
 };
index db20abb..ad3dc72 100644 (file)
@@ -300,7 +300,7 @@ void SnappyFile::setCurrentOffset(const File::Offset &offset)
 
 }
 
-bool SnappyFile::rawSkip(unsigned length)
+bool SnappyFile::rawSkip(size_t length)
 {
     if (endOfData()) {
         return false;
index f1623b9..bfb3dff 100644 (file)
@@ -62,7 +62,7 @@ protected:
     virtual int rawGetc();
     virtual void rawClose();
     virtual void rawFlush();
-    virtual bool rawSkip(unsigned length);
+    virtual bool rawSkip(size_t length);
 
 private:
     inline size_t usedCacheSize() const