Skip to content

Commit 0d2d731

Browse files
committed
constexpr for struct
Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent 4184b3f commit 0d2d731

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
@@ -206,7 +206,7 @@ size_t base64decode(const char* in, char* out, size_t out_size) {
206206

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

src/olympusmn_int.cpp

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

13611361
// 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.
13621362
// Only the Make, Model and Sub-model are used to determine the lens model
1363-
static const struct {
1363+
static constexpr struct {
13641364
byte val[3];
13651365
const char* label;
13661366
} lensTypes[] = {
@@ -1514,7 +1514,7 @@ std::ostream& OlympusMakerNote::print0x0209(std::ostream& os, const Value& value
15141514
std::ostream& OlympusMakerNote::printEq0x0301(std::ostream& os, const Value& value, const ExifData*) {
15151515
// 6 numbers: 0. Make, 1. Unknown, 2. Model, 3. Sub-model, 4-5. Unknown.
15161516
// Only the Make and Model are used to determine the extender model
1517-
static const struct {
1517+
static constexpr struct {
15181518
byte val[2];
15191519
const char* label;
15201520
} extenderModels[] = {

0 commit comments

Comments
 (0)