mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
fix macos build (#859)
* update macos.yml
* update macos.yml
* update macos.yml
* update macos.yml
* update macos.yml
* update macos.yml
* update workflows
* update test
* fix unused function warning
* update test
* fixes
* update test
* update test
* update macos.yml
* Revert "update workflows"
This reverts commit ae78ff3ca2.
This commit is contained in:
parent
51c0f99061
commit
a8ed3cb36f
3 changed files with 11 additions and 4 deletions
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
namespace util {
|
||||
template<typename T>
|
||||
inline T read_int_le(const uint8_t* src, ptrdiff_t offset=0) {
|
||||
inline T read_int_le(const uint8_t* src) {
|
||||
T tmp;
|
||||
std::memcpy(&tmp, src + offset * sizeof(T), sizeof(T));
|
||||
std::memcpy(&tmp, src, sizeof(T));
|
||||
return dataio::le2h(tmp);
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ namespace util {
|
|||
if (ptr == nullptr) {
|
||||
return 0;
|
||||
}
|
||||
return read_int_le<Tsize>(ptr, -1);
|
||||
return read_int_le<Tsize>(ptr - sizeof(Tsize));
|
||||
}
|
||||
|
||||
/// @return number of entries
|
||||
|
|
@ -177,7 +177,7 @@ namespace util {
|
|||
) : buffer(buffer), index(index), offset(offset) {}
|
||||
|
||||
Tsize size() const {
|
||||
return read_int_le<Tsize>(buffer.data() + offset, -1);
|
||||
return read_int_le<Tsize>(buffer.data() + offset - sizeof(Tsize));
|
||||
}
|
||||
|
||||
bool operator!=(const const_iterator& o) const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue