mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 08:44:11 +08:00
eliminate build warnings / fix bug in text module
This commit is contained in:
@@ -9,4 +9,7 @@ endif()
|
||||
|
||||
ocv_define_module(datasets opencv_core opencv_imgcodecs opencv_ml opencv_flann OPTIONAL opencv_text WRAP python)
|
||||
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267) # flann, Win64
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS
|
||||
/wd4267 # flann, Win64
|
||||
-Wimplicit-fallthrough # tinyxml2.cpp
|
||||
)
|
||||
|
@@ -125,16 +125,22 @@ FORCE_INLINE void hashMurmurx64 ( const void * key, const int len, const uint se
|
||||
{
|
||||
case 7:
|
||||
k2 ^= tail[6] << 16;
|
||||
/* fallthrough */
|
||||
case 6:
|
||||
k2 ^= tail[5] << 8;
|
||||
/* fallthrough */
|
||||
case 5:
|
||||
k2 ^= tail[4] << 0;
|
||||
/* fallthrough */
|
||||
case 4:
|
||||
k1 ^= tail[3] << 24;
|
||||
/* fallthrough */
|
||||
case 3:
|
||||
k1 ^= tail[2] << 16;
|
||||
/* fallthrough */
|
||||
case 2:
|
||||
k1 ^= tail[1] << 8;
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
k1 ^= tail[0] << 0;
|
||||
bmix32(h1,h2,k1,k2,c1,c2);
|
||||
|
@@ -935,6 +935,7 @@ Ptr<OCRHMMDecoder::ClassifierCallback> loadOCRHMMClassifier(const String& _filen
|
||||
break;
|
||||
case OCR_CNN_CLASSIFIER:
|
||||
pt = loadOCRHMMClassifierCNN(_filename);
|
||||
break;
|
||||
default:
|
||||
CV_Error(Error::StsBadArg, "Specified HMM classifier is not supported!");
|
||||
break;
|
||||
|
@@ -960,16 +960,16 @@ bool SuperpixelSEEDSImpl::probability(int image_idx, int label1, int label2,
|
||||
switch( seeds_prior )
|
||||
{
|
||||
case 5: p *= p;
|
||||
//no break
|
||||
/* fallthrough */
|
||||
case 4: p *= p;
|
||||
//no break
|
||||
/* fallthrough */
|
||||
case 3: p *= p;
|
||||
//no break
|
||||
/* fallthrough */
|
||||
case 2:
|
||||
p *= p;
|
||||
P_label1 *= T[seeds_top_level][label2];
|
||||
P_label2 *= T[seeds_top_level][label1];
|
||||
//no break
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
P_label1 *= p;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user