From 709d7fd92c948dcf44897362d353d540abb38a1f Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 28 Apr 2022 13:22:34 -0400 Subject: GCC 12 fixes --- externals/sirit | 2 +- src/common/settings.cpp | 2 +- src/shader_recompiler/ir_opt/verification_pass.cpp | 2 +- src/video_core/shader_environment.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/externals/sirit b/externals/sirit index a39596358..b8f133bf6 160000 --- a/externals/sirit +++ b/externals/sirit @@ -1 +1 @@ -Subproject commit a39596358a3a5488c06554c0c15184a6af71e433 +Subproject commit b8f133bf631ace5a613bbd7e8329300358cacbd2 diff --git a/src/common/settings.cpp b/src/common/settings.cpp index fdc012355..9a9c74a70 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -10,7 +10,7 @@ namespace Settings { -Values values = {}; +Values values; static bool configuring_global = true; std::string GetTimeZoneString() { diff --git a/src/shader_recompiler/ir_opt/verification_pass.cpp b/src/shader_recompiler/ir_opt/verification_pass.cpp index e2ef2b0b3..f89f4ac28 100644 --- a/src/shader_recompiler/ir_opt/verification_pass.cpp +++ b/src/shader_recompiler/ir_opt/verification_pass.cpp @@ -43,7 +43,7 @@ static void ValidateUses(const IR::Program& program) { } } } - for (const auto [inst, uses] : actual_uses) { + for (const auto& [inst, uses] : actual_uses) { if (inst->UseCount() != uses) { throw LogicError("Invalid uses in block: {}", IR::DumpProgram(program)); } diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cpp index a558f8deb..d469964f6 100644 --- a/src/video_core/shader_environment.cpp +++ b/src/video_core/shader_environment.cpp @@ -188,11 +188,11 @@ void GenericEnvironment::Serialize(std::ofstream& file) const { .write(reinterpret_cast(&cached_highest), sizeof(cached_highest)) .write(reinterpret_cast(&stage), sizeof(stage)) .write(reinterpret_cast(code.data()), code_size); - for (const auto [key, type] : texture_types) { + for (const auto& [key, type] : texture_types) { file.write(reinterpret_cast(&key), sizeof(key)) .write(reinterpret_cast(&type), sizeof(type)); } - for (const auto [key, type] : cbuf_values) { + for (const auto& [key, type] : cbuf_values) { file.write(reinterpret_cast(&key), sizeof(key)) .write(reinterpret_cast(&type), sizeof(type)); } -- cgit v1.2.3