From 3d154c9ddeabffeb6cb51548511ac843040f87cd Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Tue, 17 May 2011 13:32:42 +0000 Subject: [PATCH] fix build problems on Windows --- modules/core/include/opencv2/core/core.hpp | 16 ++++++++-------- modules/core/src/CommandLineParser.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/core/include/opencv2/core/core.hpp b/modules/core/include/opencv2/core/core.hpp index 59b9864..b20917b 100644 --- a/modules/core/include/opencv2/core/core.hpp +++ b/modules/core/include/opencv2/core/core.hpp @@ -4178,7 +4178,7 @@ protected: cv::Size size = parser.get("--size"); string inputFile = parser.get("--inputFile"); */ -class CommandLineParser +class CV_EXPORTS CommandLineParser { public: //! the default constructor @@ -4257,10 +4257,10 @@ protected: } }; -template<> +template<> CV_EXPORTS std::vector CommandLineParser::getVec(const std::string& keys); -template +template inline std::vector<_Tp> CommandLineParser::getVec(const std::string& keys) { if (!has(keys)) @@ -4277,19 +4277,19 @@ std::vector<_Tp> CommandLineParser::getVec(const std::string& keys) return res; } -template<> +template<> CV_EXPORTS std::string CommandLineParser::fromString(const std::string& str); -template<> +template<> CV_EXPORTS int CommandLineParser::fromString(const std::string& str); -template<> +template<> CV_EXPORTS unsigned int CommandLineParser::fromString(const std::string& str); -template<> +template<> CV_EXPORTS double CommandLineParser::fromString(const std::string& str); -template<> +template<> CV_EXPORTS cv::Size CommandLineParser::fromStringsVec(const std::vector& str); } diff --git a/modules/core/src/CommandLineParser.cpp b/modules/core/src/CommandLineParser.cpp index 16bd46a..dbef9ad 100755 --- a/modules/core/src/CommandLineParser.cpp +++ b/modules/core/src/CommandLineParser.cpp @@ -32,7 +32,7 @@ void PreprocessArgs(int _argc, const char* _argv[], int& argc, char**& argv) find_symbol = buffer_string.find('='); if (find_symbol == -1) buffer_vector.push_back(buffer_string); - else if (find_symbol == 0 || find_symbol == (buffer_string.length() - 1)) + else if (find_symbol == 0 || find_symbol == ((int)buffer_string.length() - 1)) { buffer_string.erase(find_symbol, (find_symbol + 1)); buffer_vector.push_back(buffer_string); -- 2.7.4