summaryrefslogtreecommitdiff
path: root/bin/render.cpp
diff options
context:
space:
mode:
authorZsolt Bölöny <bolony.zsolt@gmail.com>2018-06-24 14:34:26 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2018-06-25 10:07:04 -0700
commitbc6094eb5539971a7cf7e48c90996a52c89c5815 (patch)
tree6b90d7445981844591d2580dd25d9f7f656a33fa /bin/render.cpp
parent279dd93f7cbd57adce60a97bdb760905e30f4580 (diff)
downloadqtlocation-mapboxgl-bc6094eb5539971a7cf7e48c90996a52c89c5815.tar.gz
[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.
Diffstat (limited to 'bin/render.cpp')
-rw-r--r--bin/render.cpp6
1 files changed, 3 insertions, 3 deletions
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);