@@ -1108,7 +1108,7 @@ _Tp& Mat::at(int i0)
1108
1108
CV_DbgAssert (dims <= 2 );
1109
1109
CV_DbgAssert (data);
1110
1110
CV_DbgAssert ((unsigned )i0 < (unsigned )(size.p [0 ] * size.p [1 ]));
1111
- CV_DbgAssert (elemSize () == CV_ELEM_SIZE (traits::Type< _Tp>::value ));
1111
+ CV_DbgAssert (elemSize () == sizeof ( _Tp));
1112
1112
if ( isContinuous () || size.p [0 ] == 1 )
1113
1113
return ((_Tp*)data)[i0];
1114
1114
if ( size.p [1 ] == 1 )
@@ -1123,7 +1123,7 @@ const _Tp& Mat::at(int i0) const
1123
1123
CV_DbgAssert (dims <= 2 );
1124
1124
CV_DbgAssert (data);
1125
1125
CV_DbgAssert ((unsigned )i0 < (unsigned )(size.p [0 ] * size.p [1 ]));
1126
- CV_DbgAssert (elemSize () == CV_ELEM_SIZE (traits::Type< _Tp>::value ));
1126
+ CV_DbgAssert (elemSize () == sizeof ( _Tp));
1127
1127
if ( isContinuous () || size.p [0 ] == 1 )
1128
1128
return ((const _Tp*)data)[i0];
1129
1129
if ( size.p [1 ] == 1 )
@@ -1135,42 +1135,42 @@ const _Tp& Mat::at(int i0) const
1135
1135
template <typename _Tp> inline
1136
1136
_Tp& Mat::at (int i0, int i1, int i2)
1137
1137
{
1138
- CV_DbgAssert ( elemSize () == CV_ELEM_SIZE (traits::Type< _Tp>::value ) );
1138
+ CV_DbgAssert ( elemSize () == sizeof ( _Tp) );
1139
1139
return *(_Tp*)ptr (i0, i1, i2);
1140
1140
}
1141
1141
1142
1142
template <typename _Tp> inline
1143
1143
const _Tp& Mat::at (int i0, int i1, int i2) const
1144
1144
{
1145
- CV_DbgAssert ( elemSize () == CV_ELEM_SIZE (traits::Type< _Tp>::value ) );
1145
+ CV_DbgAssert ( elemSize () == sizeof ( _Tp) );
1146
1146
return *(const _Tp*)ptr (i0, i1, i2);
1147
1147
}
1148
1148
1149
1149
template <typename _Tp> inline
1150
1150
_Tp& Mat::at (const int * idx)
1151
1151
{
1152
- CV_DbgAssert ( elemSize () == CV_ELEM_SIZE (traits::Type< _Tp>::value ) );
1152
+ CV_DbgAssert ( elemSize () == sizeof ( _Tp) );
1153
1153
return *(_Tp*)ptr (idx);
1154
1154
}
1155
1155
1156
1156
template <typename _Tp> inline
1157
1157
const _Tp& Mat::at (const int * idx) const
1158
1158
{
1159
- CV_DbgAssert ( elemSize () == CV_ELEM_SIZE (traits::Type< _Tp>::value ) );
1159
+ CV_DbgAssert ( elemSize () == sizeof ( _Tp) );
1160
1160
return *(const _Tp*)ptr (idx);
1161
1161
}
1162
1162
1163
1163
template <typename _Tp, int n> inline
1164
1164
_Tp& Mat::at (const Vec<int , n>& idx)
1165
1165
{
1166
- CV_DbgAssert ( elemSize () == CV_ELEM_SIZE (traits::Type< _Tp>::value ) );
1166
+ CV_DbgAssert ( elemSize () == sizeof ( _Tp) );
1167
1167
return *(_Tp*)ptr (idx.val );
1168
1168
}
1169
1169
1170
1170
template <typename _Tp, int n> inline
1171
1171
const _Tp& Mat::at (const Vec<int , n>& idx) const
1172
1172
{
1173
- CV_DbgAssert ( elemSize () == CV_ELEM_SIZE (traits::Type< _Tp>::value ) );
1173
+ CV_DbgAssert ( elemSize () == sizeof ( _Tp) );
1174
1174
return *(const _Tp*)ptr (idx.val );
1175
1175
}
1176
1176
0 commit comments