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 -Wno-missing-braces
-Wconversion -Wconversion
-Wsign-conversion -Wsign-conversion
-Wshadow
-Werror) -Werror)
endif() endif()

View file

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

View file

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

View file

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

View file

@ -9,7 +9,7 @@
namespace Sirit { namespace Sirit {
Operand::Operand(OperandType operand_type) : operand_type{operand_type} {} Operand::Operand(OperandType operand_type_) : operand_type{operand_type_} {}
Operand::~Operand() = default; 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; Module::~Module() = default;

View file

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