# HG changeset patch # User am@osimis.io # Date 1544091383 -3600 # Node ID e62e296a5714bff5cbf602af36345778eb529e41 # Parent 5f64ecbdfcb40bad0547120696aaa7d2404f2fbf use Toolbox::IsIntegeer instead of try_lexical_convert that is not available on some platform diff -r 5f64ecbdfcb4 -r e62e296a5714 Core/EnumerationDictionary.h --- a/Core/EnumerationDictionary.h Thu Dec 06 10:39:27 2018 +0100 +++ b/Core/EnumerationDictionary.h Thu Dec 06 11:16:23 2018 +0100 @@ -37,7 +37,6 @@ #include "Toolbox.h" #include -#include #include #include @@ -85,10 +84,9 @@ Enumeration Translate(const std::string& str) const { - int numericalValue; // at this stage, we don't know if str is an alias or a numerical value - if (boost::conversion::try_lexical_convert(str, numericalValue)) + if (Toolbox::IsInteger(str)) { - return static_cast(numericalValue); + return static_cast(boost::lexical_cast(str)); } typename StringToEnumeration::const_iterator diff -r 5f64ecbdfcb4 -r e62e296a5714 Resources/CMake/OrthancFrameworkConfiguration.cmake --- a/Resources/CMake/OrthancFrameworkConfiguration.cmake Thu Dec 06 10:39:27 2018 +0100 +++ b/Resources/CMake/OrthancFrameworkConfiguration.cmake Thu Dec 06 11:16:23 2018 +0100 @@ -125,6 +125,7 @@ ${ORTHANC_ROOT}/Core/Cache/MemoryCache.cpp ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp ${ORTHANC_ROOT}/Core/DicomFormat/DicomTag.cpp + ${ORTHANC_ROOT}/Core/EnumerationDictionary.h ${ORTHANC_ROOT}/Core/Enumerations.cpp ${ORTHANC_ROOT}/Core/FileStorage/MemoryStorageArea.cpp ${ORTHANC_ROOT}/Core/Logging.cpp diff -r 5f64ecbdfcb4 -r e62e296a5714 TODO --- a/TODO Thu Dec 06 10:39:27 2018 +0100 +++ b/TODO Thu Dec 06 11:16:23 2018 +0100 @@ -134,8 +134,6 @@ Release() and Acquire()) * Avoid direct calls to FromDcmtkBridge (make most of its methods private), go through ParsedDicomFile wherever possible -* avoid boost::bad_lexical_cast exception at least in happy path - by using boost::conversion::try_lexical_convert ================= Platform-specific