mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-26 21:44:25 +02:00
Update to v094r38 release.
byuu says: I'll post more detailed changes later, but basically: - fixed Baldur's Gate bug - guess if no flash ROM ID present (fixes Magical Vacation, many many others) - nall cleanups - sfc/cartridge major cleanups - bsxcartridge/"bsx" renamed to mcc/"mcc" after the logic chip it uses (consistency with SGB/ICD2) - ... and more!
This commit is contained in:
@@ -22,7 +22,7 @@ namespace nall {
|
||||
string::string() : _data(nullptr), _capacity(SSO - 1), _size(0) {
|
||||
}
|
||||
|
||||
auto string::pointer() -> char* {
|
||||
auto string::get() -> char* {
|
||||
if(_capacity < SSO) return _text;
|
||||
if(*_refs > 1) _copy();
|
||||
return _data;
|
||||
@@ -59,7 +59,7 @@ auto string::reserve(unsigned capacity) -> type& {
|
||||
|
||||
auto string::resize(unsigned size) -> type& {
|
||||
reserve(size);
|
||||
pointer()[_size = size] = 0;
|
||||
get()[_size = size] = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@ namespace nall {
|
||||
string::string() : _data(nullptr), _refs(nullptr), _capacity(0), _size(0) {
|
||||
}
|
||||
|
||||
auto string::pointer() -> char* {
|
||||
auto string::get() -> char* {
|
||||
static char _null[] = "";
|
||||
if(!_data) return _null;
|
||||
if(*_refs > 1) _data = _copy(); //make unique for write operations
|
||||
@@ -38,7 +38,7 @@ auto string::reserve(unsigned capacity) -> type& {
|
||||
|
||||
auto string::resize(unsigned size) -> type& {
|
||||
reserve(size);
|
||||
pointer()[_size = size] = 0;
|
||||
get()[_size = size] = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ string::string() {
|
||||
_size = 0;
|
||||
}
|
||||
|
||||
auto string::pointer() -> char* {
|
||||
auto string::get() -> char* {
|
||||
if(_capacity < SSO) return _text;
|
||||
return _data;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ auto string::reserve(unsigned capacity) -> type& {
|
||||
|
||||
auto string::resize(unsigned size) -> type& {
|
||||
reserve(size);
|
||||
pointer()[_size = size] = 0;
|
||||
get()[_size = size] = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,7 @@ cons:
|
||||
|
||||
namespace nall {
|
||||
|
||||
auto string::pointer() -> char* {
|
||||
auto string::get() -> char* {
|
||||
if(_capacity == 0) reserve(1);
|
||||
return _data;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ auto string::reserve(unsigned capacity) -> type& {
|
||||
|
||||
auto string::resize(unsigned size) -> type& {
|
||||
reserve(size);
|
||||
pointer()[_size = size] = 0;
|
||||
get()[_size = size] = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user