From 5124ff7b20d03c910aada3bc32064e37e8bb4286 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 8 Dec 2018 08:08:08 -0500 Subject: Use OS X 10.1 image for Travis testing --- validate.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'validate.h') diff --git a/validate.h b/validate.h index fbdd7796..f41b0a00 100644 --- a/validate.h +++ b/validate.h @@ -223,7 +223,7 @@ inline T StringToValue(const std::string& str) iss >> std::noskipws >> value; // Use fail(), not bad() - if (iss.fail() || !iss.eof()) + if (iss.fail()) throw InvalidArgument(str + "' is not a value"); if (NON_NEGATIVE && value < 0) @@ -254,6 +254,8 @@ inline std::string AddSeparator(std::string str) return str; } +// Ideally we would cache the directory and just add the prefix +// to subsequent calls, but ... Static Initialization Order Fiasco inline std::string DataDir(const std::string& filename) { std::string name; -- cgit v1.2.1