File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ double FORB::distance(const FORB::TDescriptor &a,
9797 (sizeof (uint64_t ) - 1 ) * CHAR_BIT;
9898 }
9999
100- return ret;
100+ return static_cast < double >( ret) ;
101101
102102 // // If uint64_t is not defined in your system, you can try this
103103 // // portable approach (requires DUtils from DLib)
@@ -171,14 +171,14 @@ void FORB::toMat32F(const std::vector<TDescriptor> &descriptors,
171171
172172 for (int j = 0 ; j < C; ++j, p += 8 )
173173 {
174- p[0 ] = (desc[j] & (1 << 7 ) ? 1 : 0 );
175- p[1 ] = (desc[j] & (1 << 6 ) ? 1 : 0 );
176- p[2 ] = (desc[j] & (1 << 5 ) ? 1 : 0 );
177- p[3 ] = (desc[j] & (1 << 4 ) ? 1 : 0 );
178- p[4 ] = (desc[j] & (1 << 3 ) ? 1 : 0 );
179- p[5 ] = (desc[j] & (1 << 2 ) ? 1 : 0 );
180- p[6 ] = (desc[j] & (1 << 1 ) ? 1 : 0 );
181- p[7 ] = desc[j] & (1 );
174+ p[0 ] = (desc[j] & (1 << 7 ) ? 1 . f : 0 . f );
175+ p[1 ] = (desc[j] & (1 << 6 ) ? 1 . f : 0 . f );
176+ p[2 ] = (desc[j] & (1 << 5 ) ? 1 . f : 0 . f );
177+ p[3 ] = (desc[j] & (1 << 4 ) ? 1 . f : 0 . f );
178+ p[4 ] = (desc[j] & (1 << 3 ) ? 1 . f : 0 . f );
179+ p[5 ] = (desc[j] & (1 << 2 ) ? 1 . f : 0 . f );
180+ p[6 ] = (desc[j] & (1 << 1 ) ? 1 . f : 0 . f );
181+ p[7 ] = ( desc[j] & (1 ) ? 1 . f : 0 . f );
182182 }
183183 }
184184}
You can’t perform that action at this time.
0 commit comments