Related Objects
- Duplicates Merged Here
- T19704: [Warnings as errors] partialvolumeanalysis
Event Timeline
Okay. Just a hint for the future: These unsigned int / int comparisons often occur when there is a semi-unknown type involved, for example, any typedef one is too lazy to look up. C++11 decltype comes to the rescue:
old: for(int c=0; c<matrix.ColumnDimensions; c++)
new: for(decltype(matrix.ColumnDimensions) c = 0; c < matrix.ColumnDimensions; ++c)
This does not seem to work:
error: increment of read-only variable ‘c’
But it works with auto:
for(auto c = decltype(matrix.ColumnDimensions){0}; c < matrix.ColumnDimensions; ++c)
[4543c5]: COMP: Merge branch 'bug-19720-RemoveDeprecatedIOUtilStrings'
Merged commits:
2016-05-09 18:29:51 Christoph Kolb [5c93be]
use auto and decltype in for loop
2016-05-09 18:16:27 Christoph Kolb [7cdfb4]
use decltype in matrix iteration
2016-05-09 17:58:08 Christoph Kolb [1b7c1c]
Fix integer comparison warnings
2016-05-09 17:57:58 Christoph Kolb [4012a6]
Remove deprecated strings in IOUtil
That's because the type seems to be const. For this case please use std::remove_const in the future.
std::remove_const isn't working in this context. However, until itkMatrix colum/row index is surely of type unsigned int we should use it directly!
[8b6411]: COMP:Merge branch 'bug-19720-fixTypeComparison'
Merged commits:
2016-05-11 14:54:50 Jonas Cordes [77c9ab]
remove decltype type declarations
itkMatrix col/row indices are unsigned int