Skip to content

Commit

Permalink
[build] fix for tiny for warning detected by @rperrot
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Oct 5, 2015
1 parent 61a32d7 commit f0889f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cmakeFindModules/OptimizeForArchitecture.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ macro(AutodetectHostArchitecture)
if(_vendor_id STREQUAL "GenuineIntel")
if(_cpu_family EQUAL 6)
# Any recent Intel CPU except NetBurst
if(_cpu_model EQUAL 70) #intel core i7-3720qm MacBook Pro Retina
set(TARGET_ARCHITECTURE "ivy-bridge")
if(_cpu_model EQUAL 70) #intel haswell
set(TARGET_ARCHITECTURE "haswell")
elseif(_cpu_model EQUAL 69) # Core i5/i7-4xxxU CPUs
set(TARGET_ARCHITECTURE "haswell")
elseif(_cpu_model EQUAL 63) # Xeon E5 series
Expand Down
3 changes: 2 additions & 1 deletion src/openMVG/image/image_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,8 @@ int ReadTiff(const char * filename,
}
} else {
for (size_t i=0; i<TIFFNumberOfStrips(tiff); ++i) {
if (TIFFReadEncodedStrip(tiff, i, ((uint8*)&((*ptr)[0]))+i*TIFFStripSize(tiff),(tsize_t)-1)<0) {
if (TIFFReadEncodedStrip(tiff, i, ((uint8*)&((*ptr)[0]))+i*TIFFStripSize(tiff),(tsize_t)-1) ==
std::numeric_limits<tsize_t>::max()) {
TIFFClose(tiff);
return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions src/openMVG/matching/kvld/kvld.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ class VLD
{
for( int j = 0; j < subdirection; j++ )
{// term of descriptor
diff[ 0 ] += abs( descriptor[ i * subdirection + j ] - vld2.descriptor[ i * subdirection + j ] );
diff[ 0 ] += std::abs( descriptor[ i * subdirection + j ] - vld2.descriptor[ i * subdirection + j ] );
}
//term of main SIFT like orientation
diff[ 1 ] += std::min( abs( principleAngle[ i ] - vld2.principleAngle[ i ] ),
binNum - abs( principleAngle[ i ] - vld2.principleAngle[ i ] ) ) * ( weight[ i ] + vld2.weight[ i ] );// orientation term
diff[ 1 ] += std::min( std::abs( principleAngle[ i ] - vld2.principleAngle[ i ] ),
binNum - std::abs( principleAngle[ i ] - vld2.principleAngle[ i ] ) ) * ( weight[ i ] + vld2.weight[ i ] );// orientation term
}

diff[ 0 ] *= 0.36;
Expand Down

0 comments on commit f0889f0

Please sign in to comment.