Fixed some mingw-w64 compilation issues

pull/370/head
Maksim Shabunin 10 years ago
parent 88a72a0596
commit c1f27e9a69
  1. 6
      modules/datasets/src/util.cpp
  2. 2
      modules/line_descriptor/src/bitarray.hpp
  3. 2
      modules/line_descriptor/src/bitops.hpp
  4. 2
      modules/line_descriptor/src/precomp.hpp
  5. 2
      modules/line_descriptor/src/types.hpp
  6. 6
      modules/surface_matching/src/icp.cpp

@ -45,7 +45,7 @@
#include <sstream>
#ifdef __GNUC__
#ifndef _WIN32
#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>
@ -73,7 +73,7 @@ void split(const string &s, vector<string> &elems, char delim)
void createDirectory(const string &path)
{
#ifdef __GNUC__
#ifndef _WIN32
mkdir(path.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
#else
mkdir(path.c_str());
@ -82,7 +82,7 @@ void createDirectory(const string &path)
void getDirList(const string &dirName, vector<string> &fileNames)
{
#ifdef __GNUC__
#ifndef _WIN32
struct dirent **namelist;
int n = scandir(dirName.c_str(), &namelist, NULL, alphasort);
for (int i=0; i<n; ++i)

@ -43,7 +43,7 @@
#ifndef __OPENCV_BITARRAY_HPP
#define __OPENCV_BITARRAY_HPP
#ifdef _WIN32
#ifdef _MSC_VER
#pragma warning( disable : 4267 )
#endif

@ -45,7 +45,7 @@
#include "precomp.hpp"
#ifdef _WIN32
#ifdef _MSC_VER
# include <intrin.h>
# define popcnt __popcnt
# pragma warning( disable : 4267 )

@ -42,7 +42,7 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#ifdef _WIN32
#ifdef _MSC_VER
#pragma warning( disable : 4267 )
#endif

@ -49,7 +49,7 @@
#ifndef __OPENCV_TYPES_HPP
#define __OPENCV_TYPES_HPP
#ifdef _WIN32
#ifdef _MSC_VER
#pragma warning( disable : 4267 )
#endif

@ -425,14 +425,14 @@ int ICP::registerModelToScene(const Mat& srcPC, const Mat& dstPC, double& residu
if (node)
{
// select the first node
long idx = reinterpret_cast<long>(node->data)-1, dn=0;
size_t idx = reinterpret_cast<size_t>(node->data)-1, dn=0;
int dup = (int)node->key-1;
long minIdxD = idx;
size_t minIdxD = idx;
float minDist = distances[idx];
while ( node )
{
idx = reinterpret_cast<long>(node->data)-1;
idx = reinterpret_cast<size_t>(node->data)-1;
if (distances[idx] < minDist)
{

Loading…
Cancel
Save