Fix the '-Wcatch-value' warning under gcc 7.3.0
tiv.cpp:464:45: warning: catching polymorphic type ‘struct cimg_library::CImgIOException’ by value [-Wcatch-value=]
This commit is contained in:
parent
949f72ffa9
commit
287fde3341
1 changed files with 2 additions and 2 deletions
|
@ -459,7 +459,7 @@ int main(int argc, char* argv[]) {
|
|||
image.resize((int) (image.width() * scale), (int) (image.height() * scale), -100, -100, 5);
|
||||
}
|
||||
emit_image(image, flags);
|
||||
} catch(cimg_library::CImgIOException e) {
|
||||
} catch(cimg_library::CImgIOException & e) {
|
||||
error = 1;
|
||||
std::cerr << "File format is not recognized for '" << file_names[i] << "'" << std::endl;
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ int main(int argc, char* argv[]) {
|
|||
unsigned int sl = count * (cw + 2);
|
||||
sb.resize(sl - 2, ' ');
|
||||
sb += " ";
|
||||
} catch (std::exception e) {
|
||||
} catch (std::exception & e) {
|
||||
// Probably no image; ignore.
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue