summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-12-16 17:47:52 +0100
committerGitHub <noreply@github.com>2023-12-16 17:47:52 +0100
commita093f3d47a418e1eeb7ea091f4950bfd0e1ee028 (patch)
tree308fc4abe7b7e0a858690775deaef8551be3c282 /src/common
parentMerge pull request #12237 from liamwhite/nce-sigtrap (diff)
parentMake system settings persistent across boots (diff)
downloadyuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar
yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.gz
yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.bz2
yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.lz
yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.xz
yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.tar.zst
yuzu-a093f3d47a418e1eeb7ea091f4950bfd0e1ee028.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/common_funcs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index 47d028d48..ba3081efb 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -123,6 +123,12 @@ namespace Common {
return u32(a) | u32(b) << 8 | u32(c) << 16 | u32(d) << 24;
}
+[[nodiscard]] constexpr u64 MakeMagic(char a, char b, char c, char d, char e, char f, char g,
+ char h) {
+ return u64(a) << 0 | u64(b) << 8 | u64(c) << 16 | u64(d) << 24 | u64(e) << 32 | u64(f) << 40 |
+ u64(g) << 48 | u64(h) << 56;
+}
+
// std::size() does not support zero-size C arrays. We're fixing that.
template <class C>
constexpr auto Size(const C& c) -> decltype(c.size()) {