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