ceil/floor break compilation of cvcheckchessboard with Visual Studio 2008 (Bug #58)


Added by Volker Hilsenstein about 15 years ago. Updated about 15 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:Gary Bradski % Done:

0%

Category:imgproc, video
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

lines 180/181 in cvcheckchessboard.cpp

const int black_count = ceil(size.width/2)*ceil(size.height/2);
const int white_count = floor(size.width/2)*floor(size.height/2);

should be replaced with

const int black_count = ceil(size.width/2.0)*ceil(size.height/2.0);
const int white_count = floor(size.width/2.0)*floor(size.height/2.0);

otherwise Visual Studio 2008 generates the error messages

'ceil' : ambiguous call to overloaded function
and
'floor' : ambigous call to overloaded function


History

Updated by Gary Bradski about 15 years ago

  • Status deleted (Open)

Updated by Gary Bradski about 15 years ago

Updated this

  • Status set to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF