Compatibility with 32bit systems
This commit is contained in:
parent
140ac78b6b
commit
38d24bd689
@ -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;
|
||||
});
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user