Mercurial > hg > orthanc
changeset 876:e21d1a5f5934
fix msvc warnings
author | jodogne |
---|---|
date | Wed, 11 Jun 2014 14:08:42 +0200 |
parents | d21031a7a6e4 |
children | e8fde84805a6 b62fac89d614 |
files | Core/ImageFormats/ImageProcessing.cpp OrthancServer/DicomProtocol/ReusableDicomUserConnection.h OrthancServer/Internals/DicomImageDecoder.cpp UnitTestsSources/SQLite.cpp |
diffstat | 4 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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<PixelType>::max(); } else if (v < minValue) { - *p = minValue; + *p = std::numeric_limits<PixelType>::min(); } else { @@ -189,11 +189,11 @@ if (v > maxValue) { - *p = maxValue; + *p = std::numeric_limits<PixelType>::max(); } else if (v < minValue) { - *p = minValue; + *p = std::numeric_limits<PixelType>::min(); } else {
--- 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<unsigned int>(timeBeforeClose_.total_milliseconds()); } void SetMillisecondsBeforeClose(unsigned int ms);
--- 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<float>(b - a)); + ImageProcessing::ShiftScale(sourceAccessor, static_cast<float>(-a), 255.0f / static_cast<float>(b - a)); if (source.GetFormat() == PixelFormat_Grayscale8) {
--- 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));