1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Fixed several cases of unaligned pointer cast

This commit is contained in:
Maksim Shabunin
2024-11-28 19:20:14 +03:00
parent a5f8711ce1
commit c58b6bf11f
3 changed files with 22 additions and 6 deletions
+5 -1
View File
@@ -137,7 +137,11 @@ uchar* FillGrayRow1( uchar* data, uchar* indices, int len, uchar* palette );
CV_INLINE bool isBigEndian( void )
{
return (((const int*)"\0\x1\x2\x3\x4\x5\x6\x7")[0] & 255) != 0;
#ifdef WORDS_BIGENDIAN
return true;
#else
return false;
#endif
}
} // namespace