Skip to content

Commit

Permalink
add missing const
Browse files Browse the repository at this point in the history
Found with cppcheck

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Jan 27, 2023
1 parent 04048c8 commit ee01f00
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/futils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ size_t base64decode(const char* in, char* out, size_t out_size) {

Protocol fileProtocol(const std::string& path) {
Protocol result = pFile;
struct {
const struct {
std::string name;
Protocol prot;
bool isUrl; // path.size() > name.size()
Expand Down
4 changes: 2 additions & 2 deletions src/olympusmn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ std::ostream& OlympusMakerNote::print0x0201(std::ostream& os, const Value& value

// 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.
// Only the Make, Model and Sub-model are used to determine the lens model
static struct {
static const struct {
byte val[3];
const char* label;
} lensTypes[] = {
Expand Down Expand Up @@ -1397,7 +1397,7 @@ std::ostream& OlympusMakerNote::print0x0209(std::ostream& os, const Value& value
std::ostream& OlympusMakerNote::printEq0x0301(std::ostream& os, const Value& value, const ExifData*) {
// 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.
// Only the Make and Model are used to determine the extender model
static struct {
static const struct {
byte val[2];
const char* label;
} extenderModels[] = {
Expand Down
2 changes: 1 addition & 1 deletion src/sonymn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,7 @@ std::ostream& SonyMakerNote::printSony2FpFocusPosition2(std::ostream& os, const
}

// Ranges of models that do not support this tag
for (auto& m : {"DSC-", "Stellar"}) {
for (const auto& m : {"DSC-", "Stellar"}) {
if (startsWith(model, m)) {
os << N_("n/a");
return os;
Expand Down

0 comments on commit ee01f00

Please sign in to comment.