From 6396557af81130adcd7bea74a6baa5724f307f6c Mon Sep 17 00:00:00 2001 From: filbert14 Date: Mon, 30 Jan 2023 19:52:42 +0100 Subject: [PATCH] test formatting --- apps/src/openni_color_filter.cpp | 4 +++- apps/src/openni_fast_mesh.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/src/openni_color_filter.cpp b/apps/src/openni_color_filter.cpp index d31f741ff7a..3c5ca4aa1e9 100644 --- a/apps/src/openni_color_filter.cpp +++ b/apps/src/openni_color_filter.cpp @@ -206,7 +206,9 @@ main(int argc, char** argv) int rr, gg, bb; unsigned char radius = 442; // all colors! - pcl::console::parse_argument(argc, argv, "-device_id", device_id); + if(pcl::console::parse_argument(argc, argv, "-device_id", device_id) == -1 && + argc > 1 && + argv[1][0] != '-') device_id = argv[1]; if (pcl::console::parse_3x_arguments(argc, argv, "-rgb", rr, gg, bb, true) != -1) { std::cout << "-rgb present" << std::endl; int rad; diff --git a/apps/src/openni_fast_mesh.cpp b/apps/src/openni_fast_mesh.cpp index aad88d15c62..e62e4a72258 100644 --- a/apps/src/openni_fast_mesh.cpp +++ b/apps/src/openni_fast_mesh.cpp @@ -191,7 +191,9 @@ main(int argc, char** argv) } std::string device_id = ""; - pcl::console::parse_argument(argc, argv, "-device_id", device_id); + if(pcl::console::parse_argument(argc, argv, "-device_id", device_id) == -1 && + argc > 1 && + argv[1][0] != '-') device_id = argv[1]; ///////////////////////////////////////////////////////////////////// pcl::OpenNIGrabber grabber(device_id);