defined uint for non-windows platforms too. replaced isnan for cvIsNaN.

This commit is contained in:
Miroslav Kobetski 2013-08-12 20:08:06 +02:00 committed by kamjagin
parent 04c86f28b1
commit b595d73d6d
3 changed files with 4 additions and 9 deletions

View File

@ -70,7 +70,7 @@ endif(WITH_OPENGL)
if(APPLE) if(APPLE)
if(WITH_CARBON) if(WITH_CARBON)
set(HAVE_CARBON YES) set(HAVE_CARBON YES)
elif(NOT IOS) elseif(NOT IOS)
set(HAVE_COCOA YES) set(HAVE_COCOA YES)
endif() endif()
endif() endif()

View File

@ -204,6 +204,7 @@
# else # else
# include <stdint.h> # include <stdint.h>
# endif # endif
typedef uint32_t uint;
#else #else
typedef unsigned uint; typedef unsigned uint;
#endif #endif

View File

@ -42,13 +42,7 @@
#include "precomp.hpp" #include "precomp.hpp"
#include "opencv2/calib3d/calib3d_c.h" #include "opencv2/calib3d/calib3d_c.h"
#include "opencv2/core/cvdef.h"
#ifdef _MSC_VER
#include <float.h>
#define isnan(x) _isnan(x)
#else
#include <math.h>
#endif
using namespace cv; using namespace cv;
using namespace cv::detail; using namespace cv::detail;
@ -259,7 +253,7 @@ bool BundleAdjusterBase::estimate(const std::vector<ImageFeatures> &features,
bool ok = true; bool ok = true;
for (int i = 0; i < cam_params_.rows; ++i) for (int i = 0; i < cam_params_.rows; ++i)
{ {
if (isnan(cam_params_.at<double>(i,0))) if (cvIsNaN(cam_params_.at<double>(i,0)))
{ {
ok = false; ok = false;
break; break;