File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
modules/line_descriptor/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -830,7 +830,7 @@ int BinaryDescriptorMatcher::SparseHashtable::init( int _b )
830830 return 1 ;
831831
832832 size = UINT64_1 << ( b - 5 ); // size = 2 ^ b
833- table = std::vector<BucketGroup>(size, BucketGroup (false ));
833+ table = std::vector<BucketGroup>(( size_t ) size, BucketGroup (false ));
834834
835835 return 0 ;
836836
@@ -844,13 +844,13 @@ BinaryDescriptorMatcher::SparseHashtable::~SparseHashtable()
844844/* insert data */
845845void BinaryDescriptorMatcher::SparseHashtable::insert ( UINT64 index, UINT32 data )
846846{
847- table[index >> 5 ].insert ( (int ) ( index % 32 ), data );
847+ table[( size_t )( index >> 5 ) ].insert ( (int ) ( index & 31 ), data );
848848}
849849
850850/* query data */
851851UINT32* BinaryDescriptorMatcher::SparseHashtable::query ( UINT64 index, int *Size )
852852{
853- return table[index >> 5 ].query ( (int ) ( index % 32 ), Size );
853+ return table[( size_t )( index >> 5 ) ].query ( (int ) ( index & 31 ), Size );
854854}
855855
856856/* constructor */
You can’t perform that action at this time.
0 commit comments