Remove extraneous conversion from string -> c_str -> string (#739)

This commit is contained in:
Andy Maloney
2019-09-14 20:24:17 -04:00
committed by Jesse Beder
parent db0bda7087
commit b218787b98

View File

@@ -160,7 +160,7 @@ class YAML_CPP_API Exception : public std::runtime_error {
static const std::string build_what(const Mark& mark, static const std::string build_what(const Mark& mark,
const std::string& msg) { const std::string& msg) {
if (mark.is_null()) { if (mark.is_null()) {
return msg.c_str(); return msg;
} }
std::stringstream output; std::stringstream output;