mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-01 09:23:13 +02:00
Update to v098r10 release.
byuu says: Changelog: - synchronized tomoko, loki, icarus with extensive changes to nall (118KiB diff)
This commit is contained in:
@@ -22,15 +22,17 @@ namespace nall {
|
||||
string::string() : _data(nullptr), _capacity(SSO - 1), _size(0) {
|
||||
}
|
||||
|
||||
auto string::get() -> char* {
|
||||
if(_capacity < SSO) return _text;
|
||||
template<typename T>
|
||||
auto string::get() -> T* {
|
||||
if(_capacity < SSO) return (T*)_text;
|
||||
if(*_refs > 1) _copy();
|
||||
return _data;
|
||||
return (T*)_data;
|
||||
}
|
||||
|
||||
auto string::data() const -> const char* {
|
||||
if(_capacity < SSO) return _text;
|
||||
return _data;
|
||||
template<typename T>
|
||||
auto string::data() const -> const T* {
|
||||
if(_capacity < SSO) return (const T*)_text;
|
||||
return (const T*)_data;
|
||||
}
|
||||
|
||||
auto string::reset() -> type& {
|
||||
|
Reference in New Issue
Block a user