Update to v106r59 release.

byuu says:

Changelog:

  - fixed bug in Emulator::Game::Memory::operator bool()
  - nall: renamed view<string> back to `string_view`
  - nall:: implemented `array_view`
  - Game Boy: split cartridge-specific input mappings (rumble,
    accelerometer) to their own separate ports
  - Game Boy: fixed MBC7 accelerometer x-axis
  - icarus: Game Boy, Super Famicom, Mega Drive cores output internal
    header game titles to heuristics manifests
  - higan, icarus, hiro/gtk: improve viewport geometry configuration;
    fixed higan crashing bug with XShm driver
  - higan: connect Video::poll(),update() functionality
  - hiro, ruby: several compilation / bugfixes, should get the macOS
    port compiling again, hopefully [Sintendo]
  - ruby/video/xshm: fix crashing bug on window resize
      - a bit hacky; it's throwing BadAccess Xlib warnings, but they're
        not fatal, so I am catching and ignoring them
  - bsnes: removed Application::Windows::onModalChange hook that's no
    longer needed [Screwtape]
This commit is contained in:
Tim Allen
2018-08-26 16:49:54 +10:00
parent f9adb4d2c6
commit bd814f0358
89 changed files with 1079 additions and 2241 deletions

View File

@@ -40,7 +40,7 @@ protected:
p += length;
}
auto parseData(const char*& p, view<string> spacing) -> void {
auto parseData(const char*& p, string_view spacing) -> void {
if(*p == '=' && *(p + 1) == '\"') {
uint length = 2;
while(p[length] && p[length] != '\n' && p[length] != '\"') length++;
@@ -62,7 +62,7 @@ protected:
}
//read all attributes for a node
auto parseAttributes(const char*& p, view<string> spacing) -> void {
auto parseAttributes(const char*& p, string_view spacing) -> void {
while(*p && *p != '\n') {
if(*p != ' ') throw "Invalid node name";
while(*p == ' ') p++; //skip excess spaces
@@ -80,7 +80,7 @@ protected:
}
//read a node and all of its child nodes
auto parseNode(const vector<string>& text, uint& y, view<string> spacing) -> void {
auto parseNode(const vector<string>& text, uint& y, string_view spacing) -> void {
const char* p = text[y++];
_metadata = parseDepth(p);
parseName(p);
@@ -105,7 +105,7 @@ protected:
}
//read top-level nodes
auto parse(string document, view<string> spacing) -> void {
auto parse(string document, string_view spacing) -> void {
//in order to simplify the parsing logic; we do an initial pass to normalize the data
//the below code will turn '\r\n' into '\n'; skip empty lines; and skip comment lines
char* p = document.get(), *output = p;
@@ -140,10 +140,10 @@ protected:
}
}
friend auto unserialize(const string&, view<string>) -> Markup::Node;
friend auto unserialize(const string&, string_view) -> Markup::Node;
};
inline auto unserialize(const string& markup, view<string> spacing = {}) -> Markup::Node {
inline auto unserialize(const string& markup, string_view spacing = {}) -> Markup::Node {
SharedNode node(new ManagedNode);
try {
node->parse(markup, spacing);
@@ -153,7 +153,7 @@ inline auto unserialize(const string& markup, view<string> spacing = {}) -> Mark
return (Markup::SharedNode&)node;
}
inline auto serialize(const Markup::Node& node, view<string> spacing = {}, uint depth = 0) -> string {
inline auto serialize(const Markup::Node& node, string_view spacing = {}, uint depth = 0) -> string {
if(!node.name()) {
string result;
for(auto leaf : node) {