mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
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)
This commit is contained in:
@@ -21,8 +21,8 @@ namespace YAML
|
|||||||
#define YAML_MAKE_STREAM_CONVERT(type) \
|
#define YAML_MAKE_STREAM_CONVERT(type) \
|
||||||
inline bool Convert(const std::string& input, type& output) { \
|
inline bool Convert(const std::string& input, type& output) { \
|
||||||
std::stringstream stream(input); \
|
std::stringstream stream(input); \
|
||||||
stream >> output; \
|
stream.unsetf(std::ios::dec); \
|
||||||
return !stream.fail(); \
|
return stream >> output; \
|
||||||
}
|
}
|
||||||
|
|
||||||
YAML_MAKE_STREAM_CONVERT(char)
|
YAML_MAKE_STREAM_CONVERT(char)
|
||||||
|
Reference in New Issue
Block a user