fixed several clang-tidy warnings
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2324a561f3
commit
6d3760c96e
|
@ -46,7 +46,7 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
OutputContext(const ImageFormat &image) : image(image) {
|
||||
explicit OutputContext(const ImageFormat &image) : image(image) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ Instruction::Calc::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(getEndAddress(), getAddress(), JumpKind::Continue);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Instruction::Calc::toBytes() const {
|
||||
|
|
|
@ -179,7 +179,7 @@ Instruction::CalcImm::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(getEndAddress(), getAddress(), JumpKind::Continue);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Instruction::CalcImm::toBytes() const {
|
||||
|
|
|
@ -91,7 +91,7 @@ Instruction::Copy::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(getEndAddress(), getAddress(), JumpKind::Continue);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,14 +52,14 @@ std::vector<Instruction::OutputFormat> Instruction::End::toOutputFormat(const Ou
|
|||
}
|
||||
|
||||
std::vector<uint32_t> Instruction::End::getPossibleBranches() const {
|
||||
return std::vector<uint32_t>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>
|
||||
Instruction::End::execute(AnalysisState &state) const {
|
||||
state.current = 0;
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Instruction::End::toBytes() const {
|
||||
|
|
|
@ -97,7 +97,7 @@ Instruction::Init::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(getEndAddress(), getAddress(), JumpKind::Continue);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Instruction::Init::toBytes() const {
|
||||
|
|
|
@ -70,7 +70,7 @@ Instruction::Jump::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(jumpAddress, getAddress(), JumpKind::Absolute);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Instruction::Jump::toBytes() const {
|
||||
|
|
|
@ -220,7 +220,7 @@ Instruction::Load::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(getEndAddress(), getAddress(), JumpKind::Continue);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Instruction::Load::toBytes() const {
|
||||
|
|
|
@ -63,7 +63,7 @@ std::vector<Instruction::OutputFormat> Instruction::Return::toOutputFormat(const
|
|||
}
|
||||
|
||||
std::vector<uint32_t> Instruction::Return::getPossibleBranches() const {
|
||||
return std::vector<uint32_t>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>
|
||||
|
@ -73,7 +73,7 @@ Instruction::Return::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(jumpAddress, getAddress(), JumpKind::Return);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ Instruction::Set::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(getEndAddress(), getAddress(), JumpKind::Continue);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Instruction::Set::toBytes() const {
|
||||
|
|
|
@ -70,7 +70,7 @@ Instruction::Wait::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(getEndAddress(), getAddress(), JumpKind::Continue);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Instruction::Wait::toBytes() const {
|
||||
|
|
|
@ -108,7 +108,7 @@ Instruction::Write::execute(AnalysisState &state) const {
|
|||
|
||||
state.addKnownJump(getEndAddress(), getAddress(), JumpKind::Continue);
|
||||
|
||||
return std::vector<std::pair<uint32_t, std::unordered_map<uint32_t, uint32_t>>>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::vector<uint8_t> Instruction::Write::toBytes() const {
|
||||
|
|
|
@ -47,7 +47,7 @@ void decodeImage(const std::string &fileName) {
|
|||
auto imageObject = ImageFormat::fromBytes(bytes);
|
||||
|
||||
|
||||
printf("SPEED: 0x%02x MODE: 0x%02x BOOT: 0x%08x\n", imageObject.getHeader().speed, imageObject.getHeader().mode,
|
||||
printf("SPEED: 0x%02x MODE: 0x%02x BOOT: 0x%08x\n", static_cast<uint32_t>(imageObject.getHeader().speed), static_cast<uint32_t>(imageObject.getHeader().mode),
|
||||
imageObject.getHeader().baseAddress);
|
||||
|
||||
std::cout << "SIGNATURE: " << imageObject.imageSignature << "\n";
|
||||
|
|
Loading…
Reference in a new issue