General tidying, addressing issues found by static analysis tool.

This commit is contained in:
Nav
2021-06-22 23:52:31 +01:00
parent 69cee4d579
commit d365f6348b
151 changed files with 386 additions and 420 deletions

View File

@@ -12,7 +12,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
std::vector<unsigned char> data;
public:
unsigned char getCommandId() const {
[[nodiscard]] unsigned char getCommandId() const {
return this->commandId;
}
@@ -20,7 +20,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
this->commandId = commandId;
}
virtual std::vector<unsigned char> getData() const {
[[nodiscard]] virtual std::vector<unsigned char> getData() const {
return this->data;
}
@@ -33,7 +33,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
return (int) (1 + this->getData().size());
}
std::uint16_t getDataSize() const {
[[nodiscard]] std::uint16_t getDataSize() const {
return (std::uint16_t) this->getData().size();
}
@@ -46,7 +46,5 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
explicit virtual operator std::vector<unsigned char>() const;
virtual ~Command() = default;
};
}