Fixed many compilation warnings (c++14, like pedantic warnings)

This commit is contained in:
matlabbe
2020-01-30 17:23:02 -05:00
parent ccc5a5be5a
commit f7540196d4
10 changed files with 21 additions and 16 deletions
+1 -1
View File
@@ -278,7 +278,7 @@ public:
private:
virtual std::vector<cv::KeyPoint> generateKeypointsImpl(const cv::Mat & image, const cv::Rect & roi, const cv::Mat & mask = cv::Mat());
virtual cv::Mat generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const {return cv::Mat();}
virtual cv::Mat generateDescriptorsImpl(const cv::Mat &, std::vector<cv::KeyPoint> &) const {return cv::Mat();}
private:
int threshold_;
+1 -1
View File
@@ -346,7 +346,7 @@ private:
//Keypoint stuff
VWDictionary * _vwd;
Feature2D * _feature2D;
float _badSignRatio;;
float _badSignRatio;
bool _tfIdfLikelihoodUsed;
bool _parallelized;
+3 -3
View File
@@ -71,7 +71,7 @@ typedef std::pair<std::string, std::string> ParametersPair;
parametersType_.insert(ParametersPair(#PREFIX "/" #NAME, #TYPE)); \
descriptions_.insert(ParametersPair(#PREFIX "/" #NAME, DESCRIPTION));} \
}; \
Dummy##PREFIX##NAME dummy##PREFIX##NAME;
Dummy##PREFIX##NAME dummy##PREFIX##NAME
// end define PARAM
/**
@@ -105,7 +105,7 @@ typedef std::pair<std::string, std::string> ParametersPair;
parametersType_.insert(ParametersPair(#PREFIX "/" #NAME, "string")); \
descriptions_.insert(ParametersPair(#PREFIX "/" #NAME, DESCRIPTION));} \
}; \
Dummy##PREFIX##NAME dummy##PREFIX##NAME;
Dummy##PREFIX##NAME dummy##PREFIX##NAME
// end define PARAM
/**
@@ -138,7 +138,7 @@ typedef std::pair<std::string, std::string> ParametersPair;
parametersType_.insert(ParametersPair(#PREFIX "/" #NAME, #TYPE)); \
descriptions_.insert(ParametersPair(#PREFIX "/" #NAME, DESCRIPTION));} \
}; \
Dummy##PREFIX##NAME dummy##PREFIX##NAME;
Dummy##PREFIX##NAME dummy##PREFIX##NAME
// end define PARAM
/**
+1 -1
View File
@@ -48,7 +48,7 @@ namespace rtabmap {
public: \
Dummy##PREFIX##NAME() {if(!_defaultDataInitialized)_defaultData.insert(std::pair<std::string, float>(#PREFIX "/" #NAME "/" #UNIT, 0.0f));} \
}; \
Dummy##PREFIX##NAME dummy##PREFIX##NAME;
Dummy##PREFIX##NAME dummy##PREFIX##NAME
class RTABMAP_EXP Statistics
{
+6 -1
View File
@@ -4001,9 +4001,14 @@ Signature * Memory::createSignature(const SensorData & inputData, const Transfor
( (data.imageRaw().empty() && data.depthOrRightRaw().type() != CV_8UC1) ||
(data.imageRaw().rows % data.depthOrRightRaw().rows == 0 && data.imageRaw().cols % data.depthOrRightRaw().cols == 0 &&
data.depthOrRightRaw().rows <= data.imageRaw().rows && data.depthOrRightRaw().cols <= data.imageRaw().cols))),
uFormat("image=(%d/%d) depth=(%d/%d, type=%d [accepted=%d,%d,%d]) RGB should be",
uFormat("image=(%d/%d, type=%d, [accepted=%d,%d]) depth=(%d/%d, type=%d [accepted=%d(depth mm),%d(depth m),%d(stereo)]). "
"For stereo, left and right images should be same size. "
"For RGB-D, depth can be X times smaller than RGB (where X is an integer).",
data.imageRaw().cols,
data.imageRaw().rows,
data.imageRaw().type(),
CV_8UC1,
CV_8UC3,
data.depthOrRightRaw().cols,
data.depthOrRightRaw().rows,
data.depthOrRightRaw().type(),
@@ -77,7 +77,7 @@ public:
kPanelAll = 15
};
// TODO, tried to change the name of PANEL_FLAGS to PanelFlags... but signals/slots errors appeared...
Q_DECLARE_FLAGS(PANEL_FLAGS, PanelFlag);
Q_DECLARE_FLAGS(PANEL_FLAGS, PanelFlag)
enum Src {
kSrcUndef = -1,
+2 -2
View File
@@ -472,8 +472,8 @@ private:
* @param msg the message to write.
* @param arg the variable arguments
*/
virtual void _write(const char* msg, va_list arg) {} // Do nothing by default
virtual void _writeStr(const char* msg) {} // Do nothing by default
virtual void _write(const char*, va_list) {} // Do nothing by default
virtual void _writeStr(const char*) {} // Do nothing by default
private:
/*
+2 -2
View File
@@ -125,8 +125,8 @@ public:
#else
mutable pthread_mutex_t M;
#endif
void operator=(UMutex &M) {}
UMutex( const UMutex &M ) {}
void operator=(UMutex &) {}
UMutex( const UMutex & ) {}
};
/**
+2 -2
View File
@@ -208,12 +208,12 @@ public:
#endif
private:
void operator=(const USemaphore &S){}
void operator=(const USemaphore &){}
#ifdef _WIN32
USemaphore(const USemaphore &S){}
HANDLE S;
#else
USemaphore(const USemaphore &S):_available(0){}
USemaphore(const USemaphore &):_available(0){}
pthread_mutex_t _waitMutex;
pthread_cond_t _cond;
int _available;
+2 -2
View File
@@ -253,8 +253,8 @@ private:
{ return UThreadC<void>::Detach(H); }
private:
void operator=(UThread & t) {}
UThread( const UThread & t ) : state_(kSIdle) {}
void operator=(UThread &) {}
UThread( const UThread &) : state_(kSIdle) {}
private:
enum State{kSIdle, kSCreating, kSRunning, kSKilled}; /* Enum of states. */