mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-16 07:43:59 +02:00
Update to v106r30 release.
byuu says: Changelog: - nall/GNUmakefile: fixed findstring parameter arguments [Screwtape] - nall/Windows: always include -mthreads -lpthread for all applications - nall/memory: code restructuring I really wanted to work on the new PPU today, but I thought I'd spend a few minutes making some minor improvements to nall::memory, that was five and a half hours ago. Now I have a 67KiB diff of changes. Sigh.
This commit is contained in:
@@ -70,7 +70,7 @@ auto string::operator=(string&& source) -> string& {
|
||||
}
|
||||
|
||||
auto string::_allocate() -> char* {
|
||||
auto _temp = (char*)memory::allocate(_capacity + 1 + sizeof(uint));
|
||||
auto _temp = memory::allocate<char>(_capacity + 1 + sizeof(uint));
|
||||
*_temp = 0;
|
||||
_refs = (uint*)(_temp + _capacity + 1); //this will always be aligned by 32 via reserve()
|
||||
*_refs = 1;
|
||||
@@ -78,7 +78,7 @@ auto string::_allocate() -> char* {
|
||||
}
|
||||
|
||||
auto string::_copy() -> char* {
|
||||
auto _temp = (char*)memory::allocate(_capacity + 1 + sizeof(uint));
|
||||
auto _temp = memory::allocate<char>(_capacity + 1 + sizeof(uint));
|
||||
memory::copy(_temp, _data, _size = min(_capacity, _size));
|
||||
_temp[_size] = 0;
|
||||
--*_refs;
|
||||
|
Reference in New Issue
Block a user