oopsie fixes
This commit is contained in:
@@ -29,6 +29,7 @@ namespace spider {
|
||||
_block_index = copy._block_index;
|
||||
_blocks = copy._blocks;
|
||||
if (_block_index < _blocks.size()) selectBlock(_block_index);
|
||||
return *this;
|
||||
}
|
||||
|
||||
InstrReelDyn& InstrReelDyn::operator=(InstrReelDyn&& move) noexcept {
|
||||
@@ -43,6 +44,7 @@ namespace spider {
|
||||
move._offset = 0;
|
||||
move._size = 0;
|
||||
move._total_size = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void InstrReelDyn::growToFit(isize index) {
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <cstdlib>
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace spider {
|
||||
|
||||
/*
|
||||
@@ -148,7 +150,7 @@ namespace spider {
|
||||
#if SPIDER_LITTLE_ENDIAN
|
||||
T tmp;
|
||||
std::memcpy(&tmp, bytes, sizeof(T));
|
||||
*n = bswap(tmp);
|
||||
*n = byteswap(tmp);
|
||||
#endif
|
||||
#if !SPIDER_BIG_ENDIAN && !SPIDER_LITTLE_ENDIAN
|
||||
using U = std::make_unsigned_t<T>;
|
||||
@@ -213,12 +215,12 @@ namespace spider {
|
||||
inline void loadLE(T* n, const u8* bytes) {
|
||||
static_assert(std::is_trivially_copyable<T>::value);
|
||||
#if SPIDER_BIG_ENDIAN
|
||||
std::memcpy(n, bytes, sizeof(T));
|
||||
#endif
|
||||
#if SPIDER_LITTLE_ENDIAN
|
||||
T tmp;
|
||||
std::memcpy(&tmp, bytes, sizeof(T));
|
||||
*n = bswap(tmp);
|
||||
*n = byteswap(tmp);
|
||||
#endif
|
||||
#if SPIDER_LITTLE_ENDIAN
|
||||
std::memcpy(n, bytes, sizeof(T));
|
||||
#endif
|
||||
#if !SPIDER_BIG_ENDIAN && !SPIDER_LITTLE_ENDIAN
|
||||
using U = std::make_unsigned_t<T>;
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace spider {
|
||||
std::string s = oss.str();
|
||||
|
||||
// then print
|
||||
if (s.length() >= size(width)) {
|
||||
if (s.length() >= isize(width)) {
|
||||
std::cout << s;
|
||||
} else {
|
||||
i32 total_padding = width - s.length();
|
||||
|
||||
Reference in New Issue
Block a user