Browse Source

shader_recompiler: Remove unnecessary [[nodiscard]] instances

[[nodiscard]] doesn't do anything on functions with a void return type
and causes superfluous warnings.
nce_cpp
Lioncash 4 years ago
parent
commit
05201f4f88
  1. 2
      src/shader_recompiler/frontend/ir/ir_emitter.h
  2. 4
      src/shader_recompiler/frontend/ir/value.h

2
src/shader_recompiler/frontend/ir/ir_emitter.h

@ -327,7 +327,7 @@ public:
const Value& derivates, const Value& offset,
const F32& lod_clamp, TextureInstInfo info);
[[nodiscard]] Value ImageRead(const Value& handle, const Value& coords, TextureInstInfo info);
[[nodiscard]] void ImageWrite(const Value& handle, const Value& coords, const Value& color,
void ImageWrite(const Value& handle, const Value& coords, const Value& color,
TextureInstInfo info);
[[nodiscard]] Value ImageAtomicIAdd(const Value& handle, const Value& coords,

4
src/shader_recompiler/frontend/ir/value.h

@ -197,8 +197,8 @@ public:
}
template <typename FlagsType>
requires(sizeof(FlagsType) <= sizeof(u32) && std::is_trivially_copyable_v<FlagsType>)
[[nodiscard]] 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));
}

Loading…
Cancel
Save