Commit c1f27e9a authored by Maksim Shabunin's avatar Maksim Shabunin

Fixed some mingw-w64 compilation issues

parent 88a72a05
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment