Compatibility with 32bit systems

This commit is contained in:
Sebastian Messmer 2015-11-25 16:36:57 +01:00
parent 140ac78b6b
commit 38d24bd689
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ public:
::testing::Action<int(int, void*, size_t, off_t)> ReturnSuccessfulReadRegardingSize(size_t filesize) {
return ::testing::Invoke([filesize](int, void *, size_t count, off_t offset) {
size_t ableToReadCount = std::min(count, filesize - offset);
size_t ableToReadCount = std::min(count, (size_t)(filesize - offset));
return ableToReadCount;
});
}

View File

@ -9,7 +9,7 @@ InMemoryFile::~InMemoryFile() {
}
int InMemoryFile::read(void *buf, size_t count, off_t offset) const {
size_t realCount = std::min(count, _data.size() - offset);
size_t realCount = std::min(count, (size_t)(_data.size() - offset));
std::memcpy(buf, (uint8_t*)_data.data() + offset, realCount);
return realCount;
}