Update to v106r36 release.

byuu says:

Changelog:

  - nall: renamed array to adaptive_array; marked it as deprecated
  - nall: created new array class; which is properly static (ala
    std::array) with optional bounds-checking
  - sfc/ppu-fast: converted unmanaged arrays to use nall/array (no speed
    penalty)
  - bsnes: rewrote the cheat code editor to a new design
  - nall: string class can stringify pointer types directly now, so
    pointer() was removed
  - nall: added array_view and pointer types (still unsure if/how I'll
    use pointer)
This commit is contained in:
Tim Allen
2018-06-04 12:44:57 +10:00
parent 77ac5f9e88
commit ec9729a9e1
26 changed files with 573 additions and 286 deletions

View File

@@ -234,6 +234,22 @@ template<> struct stringify<const string_view&> {
const string_view& _view;
};
//pointers
template<typename T> struct stringify<T*> {
stringify(const T* source) {
if(!source) {
memory::copy(_data, "(nullptr)", 10);
} else {
memory::copy(_data, "0x", 2);
fromNatural(_data + 2, (uintptr)source);
}
}
auto data() const -> const char* { return _data; }
auto size() const -> uint { return strlen(_data); }
char _data[256];
};
//
template<typename T> auto make_string(T value) -> stringify<T> {