Skip to content

Commit 4ee6eb3

Browse files
committed
constexpr for struct
Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent eba067b commit 4ee6eb3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/futils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ size_t base64decode(const char* in, char* out, size_t out_size) {
207207

208208
Protocol fileProtocol(const std::string& path) {
209209
Protocol result = pFile;
210-
const struct {
210+
constexpr struct {
211211
std::string_view name;
212212
Protocol prot;
213213
bool isUrl; // path.size() > name.size()

src/olympusmn_int.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ std::ostream& OlympusMakerNote::print0x0201(std::ostream& os, const Value& value
13551355

13561356
// 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.
13571357
// Only the Make, Model and Sub-model are used to determine the lens model
1358-
static const struct {
1358+
static constexpr struct {
13591359
byte val[3];
13601360
const char* label;
13611361
} lensTypes[] = {
@@ -1509,7 +1509,7 @@ std::ostream& OlympusMakerNote::print0x0209(std::ostream& os, const Value& value
15091509
std::ostream& OlympusMakerNote::printEq0x0301(std::ostream& os, const Value& value, const ExifData*) {
15101510
// 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.
15111511
// Only the Make and Model are used to determine the extender model
1512-
static const struct {
1512+
static constexpr struct {
15131513
byte val[2];
15141514
const char* label;
15151515
} extenderModels[] = {

0 commit comments

Comments
 (0)