Store offsets and sizes in PackSource as 64-bit ints
authorMikko Rasa <tdb@tdb.fi>
Mon, 7 Dec 2015 19:01:13 +0000 (21:01 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 7 Dec 2015 19:01:13 +0000 (21:01 +0200)
source/packsource.h

index 6912a40..35ec8b8 100644 (file)
@@ -25,7 +25,7 @@ public:
        struct FileInfo
        {
                std::string name;
        struct FileInfo
        {
                std::string name;
-               unsigned size;
+               IO::SeekOffset size;
        };
 
 private:
        };
 
 private:
@@ -49,7 +49,7 @@ private:
        private:
                std::string filename;
                IO::Seekable *io;
        private:
                std::string filename;
                IO::Seekable *io;
-               unsigned base_offset;
+               IO::SeekOffset base_offset;
                std::list<File> files;
 
        public:
                std::list<File> files;
 
        public:
@@ -57,7 +57,7 @@ private:
 
                const std::string &get_filename() const { return filename; }
                IO::Seekable *get_io() const { return io; }
 
                const std::string &get_filename() const { return filename; }
                IO::Seekable *get_io() const { return io; }
-               unsigned get_base_offset() const { return base_offset; }
+               IO::SeekOffset get_base_offset() const { return base_offset; }
 
                void collect_files(FileMap &, const std::string &) const;
        };
 
                void collect_files(FileMap &, const std::string &) const;
        };
@@ -77,8 +77,8 @@ private:
        private:
                const Pack &pack;
                std::string filename;
        private:
                const Pack &pack;
                std::string filename;
-               unsigned offset;
-               unsigned length;
+               IO::SeekOffset offset;
+               IO::SeekOffset length;
                bool collection;
                std::list<Object> objects;
 
                bool collection;
                std::list<Object> objects;