diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-01-30 01:52:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 01:52:38 +0100 |
commit | 5f4647df7da58aa22be21dd26cfa6de7c5f106c9 (patch) | |
tree | 4bbcaee76bde35ddc6eff9a1c639866cf278b353 /src/shader_recompiler/frontend/ir | |
parent | Merge pull request #9699 from ameerj/texture-pass-desc (diff) | |
parent | Move to Clang Format 15 (diff) | |
download | yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.gz yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.bz2 yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.lz yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.xz yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.zst yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/shader_recompiler/frontend/ir/ir_emitter.h | 3 | ||||
-rw-r--r-- | src/shader_recompiler/frontend/ir/value.h | 13 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h index df158c928..f3c81dbe1 100644 --- a/src/shader_recompiler/frontend/ir/ir_emitter.h +++ b/src/shader_recompiler/frontend/ir/ir_emitter.h @@ -409,7 +409,8 @@ private: } template <typename T> - requires(sizeof(T) <= sizeof(u32) && std::is_trivially_copyable_v<T>) struct Flags { + requires(sizeof(T) <= sizeof(u32) && std::is_trivially_copyable_v<T>) + struct Flags { Flags() = default; Flags(T proxy_) : proxy{proxy_} {} diff --git a/src/shader_recompiler/frontend/ir/value.h b/src/shader_recompiler/frontend/ir/value.h index 883dfa24e..22e89dd1b 100644 --- a/src/shader_recompiler/frontend/ir/value.h +++ b/src/shader_recompiler/frontend/ir/value.h @@ -101,9 +101,8 @@ public: TypedValue() = default; template <IR::Type other_type> - requires((other_type & type_) != IR::Type::Void) explicit(false) - TypedValue(const TypedValue<other_type>& value) - : Value(value) {} + requires((other_type & type_) != IR::Type::Void) + explicit(false) TypedValue(const TypedValue<other_type>& value) : Value(value) {} explicit TypedValue(const Value& value) : Value(value) { if ((value.Type() & type_) == IR::Type::Void) { @@ -194,16 +193,16 @@ public: void ReplaceOpcode(IR::Opcode opcode); template <typename FlagsType> - requires(sizeof(FlagsType) <= sizeof(u32) && std::is_trivially_copyable_v<FlagsType>) - [[nodiscard]] FlagsType Flags() const noexcept { + requires(sizeof(FlagsType) <= sizeof(u32) && std::is_trivially_copyable_v<FlagsType>) + [[nodiscard]] FlagsType Flags() const noexcept { FlagsType ret; std::memcpy(reinterpret_cast<char*>(&ret), &flags, sizeof(ret)); return ret; } template <typename FlagsType> - requires(sizeof(FlagsType) <= sizeof(u32) && - std::is_trivially_copyable_v<FlagsType>) void SetFlags(FlagsType value) noexcept { + requires(sizeof(FlagsType) <= sizeof(u32) && std::is_trivially_copyable_v<FlagsType>) + void SetFlags(FlagsType value) noexcept { std::memcpy(&flags, &value, sizeof(value)); } |