mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Revert "add new version of CommandLineParser. add empty docs"
This reverts commit 54a202b3d5.
Conflicts:
modules/core/doc/command_line_parser.rst
modules/core/include/opencv2/core/core.hpp
modules/core/src/cmdparser.cpp
modules/gpu/perf/main.cpp
modules/gpu/test/main.cpp
modules/ts/src/ts_perf.cpp
This commit is contained in:
@@ -3,23 +3,19 @@
|
||||
|
||||
const char* keys =
|
||||
{
|
||||
"{ b build | | print complete build info }"
|
||||
"{ h help | | print this help }"
|
||||
"{ b |build |false | print complete build info }"
|
||||
"{ h |help |false | print this help }"
|
||||
};
|
||||
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
cv::CommandLineParser parser(argc, argv, keys);
|
||||
|
||||
if (parser.has("help"))
|
||||
if (parser.get<bool>("help"))
|
||||
{
|
||||
parser.printMessage();
|
||||
parser.printParams();
|
||||
}
|
||||
else if (!parser.check())
|
||||
{
|
||||
parser.printErrors();
|
||||
}
|
||||
else if (parser.has("build"))
|
||||
else if (parser.get<bool>("build"))
|
||||
{
|
||||
std::cout << cv::getBuildInformation() << std::endl;
|
||||
}
|
||||
@@ -29,4 +25,4 @@ int main(int argc, const char* argv[])
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user