From: Alexander Alekhin Date: Tue, 22 Sep 2015 19:00:16 +0000 (+0300) Subject: disable String(int) ctor X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~2168^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd9da5386081121531eb6fce8f21f8838542a1c2;p=platform%2Fupstream%2Fopencv.git disable String(int) ctor MSVC and GCC compilers interprets cv::String a(0) as a valid statement with conversion of "int" argument to "const char*". This patch forbids this expected behaviour. --- diff --git a/modules/core/include/opencv2/core/cvstd.hpp b/modules/core/include/opencv2/core/cvstd.hpp index dff0b20..edae954 100644 --- a/modules/core/include/opencv2/core/cvstd.hpp +++ b/modules/core/include/opencv2/core/cvstd.hpp @@ -576,6 +576,8 @@ private: char* allocate(size_t len); // len without trailing 0 void deallocate(); + + String(int); // disabled and invalid. Catch invalid usages like, commandLineParser.has(0) problem }; //! @} core_basic