changeset 3505:b2d4dd16dae8

removed C++11 primitive
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Aug 2019 12:21:23 +0200
parents 18566f9e1831
children d2b9981017c4
files Core/Images/ImageProcessing.cpp Core/Logging.cpp
diffstat 2 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Images/ImageProcessing.cpp	Tue Aug 27 14:26:04 2019 +0200
+++ b/Core/Images/ImageProcessing.cpp	Wed Aug 28 12:21:23 2019 +0200
@@ -378,11 +378,11 @@
       {
         float v = (static_cast<float>(*p) + offset) * scaling;
 
-        if (v > maxFloatValue)
+        if (v >= maxFloatValue)
         {
           *p = maxPixelValue;
         }
-        else if (v < minFloatValue)
+        else if (v <= minFloatValue)
         {
           *p = minPixelValue;
         }
@@ -1090,6 +1090,17 @@
         }
         return;
 
+      case PixelFormat_Float32:
+        if (useRound)
+        {
+          ShiftScaleInternal<float, true>(image, offset, scaling);
+        }
+        else
+        {
+          ShiftScaleInternal<float, false>(image, offset, scaling);
+        }
+        return;
+
       default:
         throw OrthancException(ErrorCode_NotImplemented);
     }
--- a/Core/Logging.cpp	Tue Aug 27 14:26:04 2019 +0200
+++ b/Core/Logging.cpp	Wed Aug 28 12:21:23 2019 +0200
@@ -272,7 +272,7 @@
         {
           std::stringstream ss;
           ss << "Unknown log level (" << level_ << ") for message: " << message;
-          auto s = ss.str();
+          std::string s = ss.str();
           globalErrorLogFunc(s.c_str());
         }
       }