catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I17001575bc409351f5187b1b269e66968d402c1c
diff --git a/src/Utils.cpp b/src/Utils.cpp
index e92897e..f859eb6 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -309,7 +309,7 @@
{
constant = std::stoi(*it);
}
- catch (std::invalid_argument&)
+ catch (const std::invalid_argument&)
{
std::cerr << "Parameter not supported for templates "
<< *it << "\n";
@@ -397,9 +397,9 @@
keyPair.value() = static_cast<uint64_t>(temp);
}
}
- catch (std::invalid_argument&)
+ catch (const std::invalid_argument&)
{}
- catch (std::out_of_range&)
+ catch (const std::out_of_range&)
{}
}
// non-hex numbers
@@ -410,7 +410,7 @@
uint64_t temp = boost::lexical_cast<uint64_t>(*strPtr);
keyPair.value() = temp;
}
- catch (boost::bad_lexical_cast&)
+ catch (const boost::bad_lexical_cast&)
{}
}
return ret;