# HG changeset patch # User jodogne # Date 1402488522 -7200 # Node ID e21d1a5f5934bed1a7b760163b39191243237d2e # Parent d21031a7a6e439dc341bc16278a7ba2a48f2ecfd fix msvc warnings diff -r d21031a7a6e4 -r e21d1a5f5934 Core/ImageFormats/ImageProcessing.cpp --- a/Core/ImageFormats/ImageProcessing.cpp Wed Jun 11 13:23:05 2014 +0200 +++ b/Core/ImageFormats/ImageProcessing.cpp Wed Jun 11 14:08:42 2014 +0200 @@ -151,11 +151,11 @@ if (v > maxValue) { - *p = maxValue; + *p = std::numeric_limits::max(); } else if (v < minValue) { - *p = minValue; + *p = std::numeric_limits::min(); } else { @@ -189,11 +189,11 @@ if (v > maxValue) { - *p = maxValue; + *p = std::numeric_limits::max(); } else if (v < minValue) { - *p = minValue; + *p = std::numeric_limits::min(); } else { diff -r d21031a7a6e4 -r e21d1a5f5934 OrthancServer/DicomProtocol/ReusableDicomUserConnection.h --- a/OrthancServer/DicomProtocol/ReusableDicomUserConnection.h Wed Jun 11 13:23:05 2014 +0200 +++ b/OrthancServer/DicomProtocol/ReusableDicomUserConnection.h Wed Jun 11 14:08:42 2014 +0200 @@ -90,7 +90,7 @@ unsigned int GetMillisecondsBeforeClose() const { - return timeBeforeClose_.total_milliseconds(); + return static_cast(timeBeforeClose_.total_milliseconds()); } void SetMillisecondsBeforeClose(unsigned int ms); diff -r d21031a7a6e4 -r e21d1a5f5934 OrthancServer/Internals/DicomImageDecoder.cpp --- a/OrthancServer/Internals/DicomImageDecoder.cpp Wed Jun 11 13:23:05 2014 +0200 +++ b/OrthancServer/Internals/DicomImageDecoder.cpp Wed Jun 11 14:08:42 2014 +0200 @@ -662,7 +662,7 @@ } else { - ImageProcessing::ShiftScale(sourceAccessor, -a, 255.0f / static_cast(b - a)); + ImageProcessing::ShiftScale(sourceAccessor, static_cast(-a), 255.0f / static_cast(b - a)); if (source.GetFormat() == PixelFormat_Grayscale8) { diff -r d21031a7a6e4 -r e21d1a5f5934 UnitTestsSources/SQLite.cpp --- a/UnitTestsSources/SQLite.cpp Wed Jun 11 13:23:05 2014 +0200 +++ b/UnitTestsSources/SQLite.cpp Wed Jun 11 14:08:42 2014 +0200 @@ -316,7 +316,7 @@ ASSERT_EQ(42ll, s.ColumnInt64(1)); ASSERT_TRUE(s.Step()); ASSERT_EQ(SQLite::COLUMN_TYPE_FLOAT, s.GetColumnType(1)); - ASSERT_FLOAT_EQ(42.5, s.ColumnDouble(1)); + ASSERT_DOUBLE_EQ(42.5, s.ColumnDouble(1)); ASSERT_TRUE(s.Step()); ASSERT_EQ(SQLite::COLUMN_TYPE_TEXT, s.GetColumnType(1)); ASSERT_EQ("Hello", s.ColumnString(1));