1
0
Fork 0
mirror of https://git.suyu.dev/suyu/sirit.git synced 2024-12-22 04:02:03 +00:00

Enable -Wshadow and silence warnings

This commit is contained in:
ReinUsesLisp 2019-11-27 05:46:03 -03:00
parent 22cc6f6c1b
commit e1a6729df7
7 changed files with 10 additions and 9 deletions

View file

@ -73,6 +73,7 @@ else()
-Wno-missing-braces
-Wconversion
-Wsign-conversion
-Wshadow
-Werror)
endif()

View file

@ -9,8 +9,8 @@
namespace Sirit {
LiteralNumber::LiteralNumber(u64 raw, bool is_32)
: Operand{OperandType::Number}, raw{raw}, is_32{is_32} {}
LiteralNumber::LiteralNumber(u64 raw_, bool is_32_)
: Operand{OperandType::Number}, raw{raw_}, is_32{is_32_} {}
LiteralNumber::~LiteralNumber() = default;

View file

@ -10,8 +10,8 @@
namespace Sirit {
LiteralString::LiteralString(std::string string)
: Operand{OperandType::String}, string{std::move(string)} {}
LiteralString::LiteralString(std::string string_)
: Operand{OperandType::String}, string{std::move(string_)} {}
LiteralString::~LiteralString() = default;

View file

@ -16,8 +16,8 @@
namespace Sirit {
Op::Op(spv::Op opcode, std::optional<u32> id, Id result_type)
: Operand{OperandType::Op}, opcode(opcode), result_type(result_type), id(id) {}
Op::Op(spv::Op opcode_, std::optional<u32> id_, Id result_type_)
: Operand{OperandType::Op}, opcode{opcode_}, result_type{result_type_}, id{id_} {}
Op::~Op() = default;

View file

@ -9,7 +9,7 @@
namespace Sirit {
Operand::Operand(OperandType operand_type) : operand_type{operand_type} {}
Operand::Operand(OperandType operand_type_) : operand_type{operand_type_} {}
Operand::~Operand() = default;

View file

@ -20,7 +20,7 @@ static void WriteSet(Stream& stream, const T& set) {
}
}
Module::Module(u32 version) : version(version) {}
Module::Module(u32 version_) : version{version_} {}
Module::~Module() = default;

View file

@ -8,7 +8,7 @@
namespace Sirit {
Stream::Stream(std::vector<u32>& words) : words(words) {}
Stream::Stream(std::vector<u32>& words_) : words{words_} {}
Stream::~Stream() = default;