From 472bb80c9c0ad11fc21fee6c74c09f83907e4d0e Mon Sep 17 00:00:00 2001 From: jbeder Date: Fri, 6 Nov 2009 03:13:54 +0000 Subject: [PATCH] Fixed the return value of the integral conversion functions, and also unset the dec flag so it reads other bases (just a temporary fix, since we're officially supposed to read binary too) --- include/conversion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/conversion.h b/include/conversion.h index dfaf9f2..a1aadce 100644 --- a/include/conversion.h +++ b/include/conversion.h @@ -21,8 +21,8 @@ namespace YAML #define YAML_MAKE_STREAM_CONVERT(type) \ inline bool Convert(const std::string& input, type& output) { \ std::stringstream stream(input); \ - stream >> output; \ - return !stream.fail(); \ + stream.unsetf(std::ios::dec); \ + return stream >> output; \ } YAML_MAKE_STREAM_CONVERT(char)