mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-03 06:32:37 +02:00
Update to v106r81 release.
byuu says: First 32 instructions implemented in the TLCS900H disassembler. Only 992 to go! I removed the use of anonymous namespaces in nall. It was something I rarely used, because it rarely did what I wanted. I updated all nested namespaces to use C++17-style namespace Foo::Bar {} syntax instead of classic C++-style namespace Foo { namespace Bar {}}. I updated ruby::Video::acquire() to return a struct, so we can use C++17 structured bindings. Long term, I want to get away from all functions that take references for output only. Even though C++ botched structured bindings by not allowing you to bind to existing variables, it's even worse to have function calls that take arguments by reference and then write to them. From the caller side, you can't tell the value is being written, nor that the value passed in doesn't matter, which is terrible.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <nall/beat/archive/node.hpp>
|
||||
|
||||
namespace nall { namespace Beat { namespace Archive {
|
||||
namespace nall::Beat::Archive {
|
||||
|
||||
struct Container {
|
||||
Container(array_view<uint8_t> = {});
|
||||
@@ -197,4 +197,4 @@ auto Container::sort() -> void {
|
||||
nodes.sort([&](auto& lhs, auto& rhs) { return string::icompare(lhs->name, rhs->name) < 0; });
|
||||
}
|
||||
|
||||
}}}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include <nall/beat/archive/node.hpp>
|
||||
#include <nall/beat/archive/container.hpp>
|
||||
|
||||
namespace nall { namespace Beat { namespace Archive {
|
||||
namespace nall::Beat::Archive {
|
||||
|
||||
auto create(Container& container, string name) -> vector<uint8_t> {
|
||||
auto& metadata = container.metadata;
|
||||
@@ -83,4 +83,4 @@ auto create(Container& container, string name) -> vector<uint8_t> {
|
||||
return memory;
|
||||
}
|
||||
|
||||
}}}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include <nall/beat/archive/node.hpp>
|
||||
#include <nall/beat/archive/container.hpp>
|
||||
|
||||
namespace nall { namespace Beat { namespace Archive {
|
||||
namespace nall::Beat::Archive {
|
||||
|
||||
auto extract(Container& container) -> bool {
|
||||
function<void (Markup::Node)> extract = [&](auto metadata) {
|
||||
@@ -24,4 +24,4 @@ auto extract(Container& container) -> bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
}}}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include <nall/decode/lzsa.hpp>
|
||||
#include <nall/encode/lzsa.hpp>
|
||||
|
||||
namespace nall { namespace Beat { namespace Archive {
|
||||
namespace nall::Beat::Archive {
|
||||
|
||||
struct Node {
|
||||
static auto create(string name, string location) -> shared_pointer<Node>;
|
||||
@@ -329,4 +329,4 @@ auto Node::getGroup() const -> string {
|
||||
return permission.group.name;
|
||||
}
|
||||
|
||||
}}}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
namespace nall { namespace Beat { namespace Single {
|
||||
namespace nall::Beat::Single {
|
||||
|
||||
inline auto apply(array_view<uint8_t> source, array_view<uint8_t> beat, maybe<string&> manifest = {}, maybe<string&> result = {}) -> maybe<vector<uint8_t>> {
|
||||
#define error(text) { if(result) *result = {"error: ", text}; return {}; }
|
||||
@@ -85,4 +85,4 @@ inline auto apply(array_view<uint8_t> source, array_view<uint8_t> beat, maybe<st
|
||||
#undef success
|
||||
}
|
||||
|
||||
}}}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <nall/suffix-array.hpp>
|
||||
|
||||
namespace nall { namespace Beat { namespace Single {
|
||||
namespace nall::Beat::Single {
|
||||
|
||||
inline auto create(array_view<uint8_t> source, array_view<uint8_t> target, string_view manifest = {}) -> vector<uint8_t> {
|
||||
vector<uint8_t> beat;
|
||||
@@ -93,4 +93,4 @@ inline auto create(array_view<uint8_t> source, array_view<uint8_t> target, strin
|
||||
return beat;
|
||||
}
|
||||
|
||||
}}}
|
||||
}
|
||||
|
Reference in New Issue
Block a user