mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-29 11:00:17 +02:00
Update to v106r65 release.
byuu says: This synchronizes bsnes/higan with many recent internal nall changes. This will be the last WIP until I am situated in Japan. Apologies for the bugfixes that didn't get applied yet, I ran out of time.
This commit is contained in:
@@ -234,6 +234,20 @@ template<> struct stringify<const string_view&> {
|
||||
const string_view& _view;
|
||||
};
|
||||
|
||||
template<> struct stringify<array_view<uint8_t>> {
|
||||
stringify(const array_view<uint8_t>& source) : _view(source) {}
|
||||
auto data() const -> const char* { return _view.data<const char>(); }
|
||||
auto size() const -> uint { return _view.size(); }
|
||||
const array_view<uint8_t>& _view;
|
||||
};
|
||||
|
||||
template<> struct stringify<const array_view<uint8_t>&> {
|
||||
stringify(const array_view<uint8_t>& source) : _view(source) {}
|
||||
auto data() const -> const char* { return _view.data<const char>(); }
|
||||
auto size() const -> uint { return _view.size(); }
|
||||
const array_view<uint8_t>& _view;
|
||||
};
|
||||
|
||||
template<> struct stringify<string_pascal> {
|
||||
stringify(const string_pascal& source) : _text(source) {}
|
||||
auto data() const -> const char* { return _text.data(); }
|
||||
@@ -250,6 +264,7 @@ template<> struct stringify<const string_pascal&> {
|
||||
|
||||
//pointers
|
||||
|
||||
//note: T = char* is matched by stringify<string_view>
|
||||
template<typename T> struct stringify<T*> {
|
||||
stringify(const T* source) {
|
||||
if(!source) {
|
||||
|
@@ -18,7 +18,7 @@ auto string::read(string_view filename) -> string {
|
||||
|
||||
rewind(fp);
|
||||
result.resize(filesize);
|
||||
auto unused = fread(result.get(), 1, filesize, fp);
|
||||
(void)fread(result.get(), 1, filesize, fp);
|
||||
return fclose(fp), result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user