mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-18 11:51:32 +02:00
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:
@@ -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> {
|
||||
|
Reference in New Issue
Block a user