changed C++ samples due to OpenVINO style (#9463)
I'll merge this. We need to talk with someone who know openvino build system better than we to "use cmake function ov_ncc_style_check to perform such check automatically". As far as I can see, currently it used only in one place, so it is not common approach for openvino components
This commit is contained in:
@@ -45,7 +45,7 @@ DEFINE_string(d, "CPU", target_device_message);
|
||||
/**
|
||||
* @brief This function show a help message
|
||||
*/
|
||||
static void showUsage() {
|
||||
static void show_usage() {
|
||||
std::cout << std::endl;
|
||||
std::cout << "classification_sample_async [OPTION]" << std::endl;
|
||||
std::cout << "Options:" << std::endl;
|
||||
|
||||
@@ -40,22 +40,22 @@ using namespace ov::preprocess;
|
||||
* @param argv list of input arguments
|
||||
* @return bool status true(Success) or false(Fail)
|
||||
*/
|
||||
bool ParseAndCheckCommandLine(int argc, char* argv[]) {
|
||||
bool parse_and_check_command_line(int argc, char* argv[]) {
|
||||
gflags::ParseCommandLineNonHelpFlags(&argc, &argv, true);
|
||||
if (FLAGS_h) {
|
||||
showUsage();
|
||||
show_usage();
|
||||
showAvailableDevices();
|
||||
return false;
|
||||
}
|
||||
slog::info << "Parsing input parameters" << slog::endl;
|
||||
|
||||
if (FLAGS_m.empty()) {
|
||||
showUsage();
|
||||
show_usage();
|
||||
throw std::logic_error("Model is required but not set. Please set -m option.");
|
||||
}
|
||||
|
||||
if (FLAGS_i.empty()) {
|
||||
showUsage();
|
||||
show_usage();
|
||||
throw std::logic_error("Input is required but not set. Please set -i option.");
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ int main(int argc, char* argv[]) {
|
||||
slog::info << ov::get_openvino_version() << slog::endl;
|
||||
|
||||
// -------- Parsing and validation of input arguments --------
|
||||
if (!ParseAndCheckCommandLine(argc, argv)) {
|
||||
if (!parse_and_check_command_line(argc, argv)) {
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user