Merge pull request #14 from lioncash/athena

General: Be explicit about athena's SeekOrigin type
This commit is contained in:
Phillip Stephens 2019-09-08 17:51:25 -07:00 committed by GitHub
commit ba0c2b7843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -49,10 +49,11 @@ public:
AthenaPartReadStream(std::unique_ptr<IPartReadStream>&& rs) : m_rs(std::move(rs)) {}
void seek(atInt64 off, athena::SeekOrigin origin) override {
if (origin == athena::Begin)
if (origin == athena::SeekOrigin::Begin) {
m_rs->seek(off, SEEK_SET);
else if (origin == athena::Current)
} else if (origin == athena::SeekOrigin::Current) {
m_rs->seek(off, SEEK_CUR);
}
}
atUint64 position() const override { return m_rs->position(); }
atUint64 length() const override { return 0; }