Просмотр исходного кода

control_flow: Silence truncation warnings

This can be trivially fixed by making the input size a size_t.
CFGRebuildState's constructor parameter is already a std::size_t, so
this just makes the size type fully conform with it.
Lioncash 6 лет назад
Родитель
Сommit
77b4916b33
2 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      src/video_core/shader/control_flow.cpp
  2. 2 2
      src/video_core/shader/control_flow.h

+ 2 - 2
src/video_core/shader/control_flow.cpp

@@ -473,8 +473,8 @@ void DecompileShader(CFGRebuildState& state) {
     state.manager->Decompile();
 }
 
-std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, u32 program_size,
-                                                u32 start_address,
+std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code,
+                                                std::size_t program_size, u32 start_address,
                                                 const CompilerSettings& settings) {
     auto result_out = std::make_unique<ShaderCharacteristics>();
     if (settings.depth == CompileDepth::BruteForce) {

+ 2 - 2
src/video_core/shader/control_flow.h

@@ -76,8 +76,8 @@ struct ShaderCharacteristics {
     CompilerSettings settings{};
 };
 
-std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code, u32 program_size,
-                                                u32 start_address,
+std::unique_ptr<ShaderCharacteristics> ScanFlow(const ProgramCode& program_code,
+                                                std::size_t program_size, u32 start_address,
                                                 const CompilerSettings& settings);
 
 } // namespace VideoCommon::Shader