Skip to content

Commit

Permalink
Fix various warnings and errors when building ReShade FX compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
crosire committed Nov 23, 2020
1 parent b01b491 commit bef683b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/effect_codegen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ namespace reshadefx
return align_up(size, alignment) * (elements - 1) + size;
}

module _module;
reshadefx::module _module;
std::vector<struct_info> _structs;
std::vector<std::unique_ptr<function_info>> _functions;
id _next_id = 1;
Expand Down
2 changes: 1 addition & 1 deletion source/effect_codegen_glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <cmath> // signbit, isinf, isnan
#include <cstdio> // snprintf
#include <cassert>
#include <algorithm> // std::max
#include <algorithm> // std::find_if, std::max
#include <unordered_set>

using namespace reshadefx;
Expand Down
2 changes: 1 addition & 1 deletion source/effect_codegen_hlsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <cstdio> // snprintf
#include <cassert>
#include <cstring> // stricmp
#include <algorithm> // std::max
#include <algorithm> // std::find_if, std::max

using namespace reshadefx;

Expand Down
2 changes: 1 addition & 1 deletion source/effect_parser_stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ bool reshadefx::parser::parse_function(type type, std::string name)
error(param.location, 3047, '\'' + param.name + "': function parameters cannot be declared 'uniform', consider placing in global scope instead");
if (param.type.has(type::q_groupshared))
parse_success = false,
error(param.location, 3010, '\'' + param.name + "': function parameters cannot be declared 'groupshared'"), false;
error(param.location, 3010, '\'' + param.name + "': function parameters cannot be declared 'groupshared'");

if (param.type.has(type::q_out) && param.type.has(type::q_const))
parse_success = false,
Expand Down
1 change: 1 addition & 0 deletions source/effect_preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "effect_lexer.hpp"
#include "effect_preprocessor.hpp"
#include <cassert>
#include <algorithm> // std::find_if

#ifndef _WIN32
// On Linux systems the native path encoding is UTF-8 already, so no conversion necessary
Expand Down

0 comments on commit bef683b

Please sign in to comment.