Mercurial > hg > orthanc
changeset 2722:a191bbd55a2b jobs
fix for older versions of boost
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 12 Jul 2018 14:32:03 +0200 |
parents | 062776ab4a21 |
children | c1e351b6abec |
files | Core/EnumerationDictionary.h |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/EnumerationDictionary.h Thu Jul 12 12:55:48 2018 +0200 +++ b/Core/EnumerationDictionary.h Thu Jul 12 14:32:03 2018 +0200 @@ -84,10 +84,12 @@ Enumeration Translate(const std::string& str) const { - int value; - if (boost::conversion::try_lexical_convert<int>(str, value)) + try { - return static_cast<Enumeration>(value); + return static_cast<Enumeration>(boost::lexical_cast<int>(str)); + } + catch (boost::bad_lexical_cast&) + { } typename StringToEnumeration::const_iterator