Mercurial > hg > orthanc-stl
comparison Sources/StructureSetGeometry.cpp @ 57:ce2333b5cb00 nexus
fix warnings
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 21 May 2024 16:02:23 +0200 |
parents | 8a1daa321afe |
children |
comparison
equal
deleted
inserted
replaced
56:9ed0cb5d6082 | 57:ce2333b5cb00 |
---|---|
157 | 157 |
158 | 158 |
159 // Find the projection along the normal with the largest support | 159 // Find the projection along the normal with the largest support |
160 | 160 |
161 bool first = true; | 161 bool first = true; |
162 size_t bestSupport; | 162 size_t bestSupport = 0; // Explicit initialization to avoid valgrind warnings on old compilers |
163 double bestProjection; | 163 double bestProjection = 0.0; // Explicit initialization to make old compilers happy |
164 | 164 |
165 std::list<size_t> candidates; | 165 std::list<size_t> candidates; |
166 for (size_t i = 0; i < projections.size(); i++) | 166 for (size_t i = 0; i < projections.size(); i++) |
167 { | 167 { |
168 candidates.push_back(i); | 168 candidates.push_back(i); |
207 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat, | 207 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat, |
208 "Structure set with multiple support, which is not allowed in Strict mode"); | 208 "Structure set with multiple support, which is not allowed in Strict mode"); |
209 } | 209 } |
210 | 210 |
211 candidates.swap(next); | 211 candidates.swap(next); |
212 } | |
213 | |
214 if (first) | |
215 { | |
216 // Should never happen | |
217 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); | |
212 } | 218 } |
213 | 219 |
214 | 220 |
215 // Compute the range of the projections | 221 // Compute the range of the projections |
216 | 222 |