ENH: consistent reverse iterator definitions for UList and FixedList
- consistent with C++ STL conventions, the reverse iterators should use operator++ to transit the list from rbegin() to rend(). The previous implementation used raw pointers, which meant that they had the opposite behaviour: operator-- to transit from rbegin() to rend(). The updated version only has operator++ defined, thus the compiler should catch any possible instances where people were using the old (incorrect) versions. - updated forAllReverseIters() and forAllConstReverseIters() macros to be consistent with new implementation and with C++ STL conventions.
Showing
- applications/test/FixedList/Test-FixedList.C 58 additions, 0 deletionsapplications/test/FixedList/Test-FixedList.C
- applications/test/List/Test-List.C 31 additions, 3 deletionsapplications/test/List/Test-List.C
- src/OpenFOAM/containers/Lists/FixedList/FixedList.H 82 additions, 8 deletionssrc/OpenFOAM/containers/Lists/FixedList/FixedList.H
- src/OpenFOAM/containers/Lists/FixedList/FixedListI.H 12 additions, 12 deletionssrc/OpenFOAM/containers/Lists/FixedList/FixedListI.H
- src/OpenFOAM/containers/Lists/UList/UList.H 88 additions, 7 deletionssrc/OpenFOAM/containers/Lists/UList/UList.H
- src/OpenFOAM/containers/Lists/UList/UListI.H 12 additions, 12 deletionssrc/OpenFOAM/containers/Lists/UList/UListI.H
- src/OpenFOAM/include/stdFoam.H 4 additions, 4 deletionssrc/OpenFOAM/include/stdFoam.H
Please register or sign in to comment