mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-03 19:47:46 +08:00
refactor: simplify printUsage function by removing program argument
This commit is contained in:
@@ -93,7 +93,7 @@ std::vector<std::string> splitCsv(const std::string &value) {
|
||||
return result;
|
||||
}
|
||||
|
||||
void printUsage(const char *program) {
|
||||
void printUsage() {
|
||||
std::cout
|
||||
<< "Usage:\n"
|
||||
<< "ros2 run orbbec_camera firmware_update_tool --\\\n"
|
||||
@@ -628,11 +628,11 @@ int main(int argc, char **argv) {
|
||||
std::string parse_error;
|
||||
if (!parseArgs(argc, argv, args, parse_error)) {
|
||||
std::cerr << "Argument error: " << parse_error << std::endl;
|
||||
printUsage(argv[0]);
|
||||
printUsage();
|
||||
return 1;
|
||||
}
|
||||
if (args.help) {
|
||||
printUsage(argv[0]);
|
||||
printUsage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user