tests: Fixed unit test compiling

This commit is contained in:
WerWolv
2021-09-21 02:48:41 +02:00
parent 8631cb0c2a
commit 26a0352851
5 changed files with 66 additions and 11 deletions

View File

@@ -30,7 +30,7 @@ namespace hex {
~File();
bool isValid() { return this->m_file != nullptr; }
bool isValid() const { return this->m_file != nullptr; }
void seek(u64 offset);
@@ -42,7 +42,7 @@ namespace hex {
void write(const std::vector<u8> &bytes);
void write(const std::string &string);
size_t getSize();
size_t getSize() const;
void setSize(u64 size);
auto getHandle() { return this->m_file; }

View File

@@ -72,7 +72,7 @@ namespace hex {
fwrite(string.data(), string.size(), 1, this->m_file);
}
size_t File::getSize() {
size_t File::getSize() const {
if (!isValid()) return 0;
auto startPos = ftello64(this->m_file);