Fixed type conversion ambiguity

This commit is contained in:
Huw Pascoe
2017-09-27 00:26:09 +01:00
parent b07af7dda8
commit a13ab958cb
32 changed files with 97 additions and 91 deletions

View File

@@ -413,7 +413,8 @@ private:
*/
template <typename T>
void GetEntry(std::size_t index, T& data) const {
Memory::ReadBlock(GetField(T::TABLE_OFFSET_FIELD) + index * sizeof(T), &data, sizeof(T));
Memory::ReadBlock(GetField(T::TABLE_OFFSET_FIELD) + static_cast<u32>(index * sizeof(T)),
&data, sizeof(T));
}
/**
@@ -425,7 +426,8 @@ private:
*/
template <typename T>
void SetEntry(std::size_t index, const T& data) {
Memory::WriteBlock(GetField(T::TABLE_OFFSET_FIELD) + index * sizeof(T), &data, sizeof(T));
Memory::WriteBlock(GetField(T::TABLE_OFFSET_FIELD) + static_cast<u32>(index * sizeof(T)),
&data, sizeof(T));
}
/**