Unverified Commit ad1f6137 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

file position is unsigned

parent 082f4bbb
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ protected:
    FileType type_;
    std::string path_;
    std::array<bool, static_cast<int>(OpenFile_flags::flag_count)> flags_ = {false};
    off64_t pos_;
    unsigned long pos_;
    std::mutex pos_mutex_;
    std::mutex flag_mutex_;

@@ -61,9 +61,9 @@ public:

    void path(const std::string& path_);

    off64_t pos();
    unsigned long pos();

    void pos(off64_t pos_);
    void pos(unsigned long pos_);

    bool get_flag(OpenFile_flags flag);

+2 −2
Original line number Diff line number Diff line
@@ -58,12 +58,12 @@ void OpenFile::path(const string& path_) {
    OpenFile::path_ = path_;
}

off64_t OpenFile::pos() {
unsigned long OpenFile::pos() {
    lock_guard<mutex> lock(pos_mutex_);
    return pos_;
}

void OpenFile::pos(off64_t pos_) {
void OpenFile::pos(unsigned long pos_) {
    lock_guard<mutex> lock(pos_mutex_);
    OpenFile::pos_ = pos_;
}