Mercurial > hg > orthanc
comparison Core/ImageFormats/ImageProcessing.cpp @ 876:e21d1a5f5934
fix msvc warnings
author | jodogne |
---|---|
date | Wed, 11 Jun 2014 14:08:42 +0200 |
parents | 3c0d0836f704 |
children | 501880d76474 |
comparison
equal
deleted
inserted
replaced
875:d21031a7a6e4 | 876:e21d1a5f5934 |
---|---|
149 { | 149 { |
150 int64_t v = static_cast<int64_t>(*p) + constant; | 150 int64_t v = static_cast<int64_t>(*p) + constant; |
151 | 151 |
152 if (v > maxValue) | 152 if (v > maxValue) |
153 { | 153 { |
154 *p = maxValue; | 154 *p = std::numeric_limits<PixelType>::max(); |
155 } | 155 } |
156 else if (v < minValue) | 156 else if (v < minValue) |
157 { | 157 { |
158 *p = minValue; | 158 *p = std::numeric_limits<PixelType>::min(); |
159 } | 159 } |
160 else | 160 else |
161 { | 161 { |
162 *p = static_cast<PixelType>(v); | 162 *p = static_cast<PixelType>(v); |
163 } | 163 } |
187 { | 187 { |
188 int64_t v = boost::math::llround(static_cast<float>(*p) * factor); | 188 int64_t v = boost::math::llround(static_cast<float>(*p) * factor); |
189 | 189 |
190 if (v > maxValue) | 190 if (v > maxValue) |
191 { | 191 { |
192 *p = maxValue; | 192 *p = std::numeric_limits<PixelType>::max(); |
193 } | 193 } |
194 else if (v < minValue) | 194 else if (v < minValue) |
195 { | 195 { |
196 *p = minValue; | 196 *p = std::numeric_limits<PixelType>::min(); |
197 } | 197 } |
198 else | 198 else |
199 { | 199 { |
200 *p = static_cast<PixelType>(v); | 200 *p = static_cast<PixelType>(v); |
201 } | 201 } |