diff --git a/include/yaml-cpp/node/impl.h b/include/yaml-cpp/node/impl.h index ae49dd1..c89171c 100644 --- a/include/yaml-cpp/node/impl.h +++ b/include/yaml-cpp/node/impl.h @@ -100,7 +100,7 @@ struct as_if { try { return convert::decode(node); - } catch (conversion::DecodeException& e) { + } catch (const conversion::DecodeException& e) { return fallback; } catch (...) { std::rethrow_exception(std::current_exception()); @@ -122,7 +122,7 @@ struct as_if { Node n; n.reset(node); return node; - } catch (conversion::DecodeException& e) { + } catch (const conversion::DecodeException& e) { return fallback; } catch (...) { std::rethrow_exception(std::current_exception());