From ccb2b4041217e107bd9eafa4cf5856dbff83cda9 Mon Sep 17 00:00:00 2001 From: Jon Burgess Date: Sun, 28 Oct 2018 19:27:56 +0000 Subject: Fix compile warning in icetime.cc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit icetime.cc: In function ‘std::__cxx11::string ecnetname_to_vlog(std::__cxx11::string)’: icetime.cc:1323:32: warning: catching polymorphic type ‘class std::invalid_argument’ by value [-Wcatch-value=] } catch(std::invalid_argument e) { // Not numeric and stoi throws exception --- icetime/icetime.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'icetime/icetime.cc') diff --git a/icetime/icetime.cc b/icetime/icetime.cc index 35ce99a..c49e2e2 100644 --- a/icetime/icetime.cc +++ b/icetime/icetime.cc @@ -1320,7 +1320,7 @@ std::string ecnetname_to_vlog(std::string ec_name) } else { return ec_name; } - } catch(std::invalid_argument e) { // Not numeric and stoi throws exception + } catch(std::invalid_argument &e) { // Not numeric and stoi throws exception return ec_name; } -- cgit v1.2.3