Skip to content

Commit f93114c

Browse files
committed
CroppedArray2DRef: either all dimensions are zero, or none are
1 parent 2000a2b commit f93114c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librawspeed/adt/CroppedArray2DRef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ inline void CroppedArray2DRef<T>::establishClassInvariants() const noexcept {
100100
invariant(croppedHeight <= base.height());
101101
invariant(offsetCols + croppedWidth <= base.width());
102102
invariant(offsetRows + croppedHeight <= base.height());
103+
invariant((croppedWidth == 0) == (croppedHeight == 0));
103104
}
104105

105106
template <class T>

0 commit comments

Comments
 (0)