From bc6094eb5539971a7cf7e48c90996a52c89c5815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zsolt=20B=C3=B6l=C3=B6ny?= Date: Sun, 24 Jun 2018 14:34:26 +0200 Subject: [core] Fix GCC8's new -Wcatch-value warnings Polymorphic types shouldn't be caught by value, as the warning message says. Catch them by constant reference instead. --- bin/render.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/render.cpp') diff --git a/bin/render.cpp b/bin/render.cpp index 6ceb32eb00..1e7b210a4c 100644 --- a/bin/render.cpp +++ b/bin/render.cpp @@ -39,14 +39,14 @@ int main(int argc, char *argv[]) { try { argumentParser.ParseCLI(argc, argv); - } catch (args::Help) { + } catch (const args::Help&) { std::cout << argumentParser; exit(0); - } catch (args::ParseError e) { + } catch (const args::ParseError& e) { std::cerr << e.what() << std::endl; std::cerr << argumentParser; exit(1); - } catch (args::ValidationError e) { + } catch (const args::ValidationError& e) { std::cerr << e.what() << std::endl; std::cerr << argumentParser; exit(2); -- cgit v1.2.1