Skip to content

Commit f17394e

Browse files
committed
address const safety
1 parent 0e508f1 commit f17394e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/py3exiv2bind/core/glue/Image.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Image::Image(const std::string &filename) : filename(filename) {
3131
error_log.str("");
3232
try {
3333
Exiv2::LogMsg::setHandler([](int level, const char *msg) {
34-
switch((Exiv2::LogMsg::Level)level){
34+
switch(static_cast<Exiv2::LogMsg::Level>(level)){
3535

3636
case Exiv2::LogMsg::debug:
3737
case Exiv2::LogMsg::info:
@@ -53,8 +53,8 @@ Image::Image(const std::string &filename) : filename(filename) {
5353
std::cerr << e.what() << std::endl;
5454
throw std::runtime_error(e.what());
5555
}
56-
std::string warning_msg = warning_log.str();
57-
std::string error_msg = error_log.str();
56+
const std::string warning_msg = warning_log.str();
57+
const std::string error_msg = error_log.str();
5858

5959
if(!warning_msg.empty()){
6060
warning_logs.push_back(warning_msg);

0 commit comments

Comments
 (0)