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:
Maxim Gordeev
2021-12-29 15:36:33 +03:00
committed by GitHub
parent 010877d06c
commit 39a1b98799
8 changed files with 189 additions and 191 deletions

View File

@@ -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;

View File

@@ -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;
}