Changes in benchmark/readyQ/rq_bench.hpp [c4241b6:f9b2e73]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/rq_bench.hpp
rc4241b6 rf9b2e73 97 97 } 98 98 99 bool parse_truefalse(const char * arg, bool & value) {100 if(strcmp(arg, "true") == 0) {101 value = true;102 return true;103 }104 105 if(strcmp(arg, "false") == 0) {106 value = false;107 return true;108 }109 110 return false;111 }112 113 99 bool parse_settrue (const char *, bool & value ) { 114 100 value = true; … … 240 226 { 241 227 int idx = 0; 242 for( size_t i = 0; i < opt_count; i++) {228 for(int i = 0; i < opt_count; i++) { 243 229 if(options[i].long_name) { 244 230 optarr[idx].name = options[i].long_name; … … 270 256 { 271 257 int idx = 0; 272 for( size_t i = 0; i < opt_count; i++) {258 for(int i = 0; i < opt_count; i++) { 273 259 optstring[idx] = options[i].short_name; 274 260 idx++; … … 293 279 case 'h': 294 280 out = stdout; 295 [[fallthrough]];296 281 case '?': 297 282 usage(argv[0], options, opt_count, usage_msg, out); 298 283 default: 299 for( size_t i = 0; i < opt_count; i++) {284 for(int i = 0; i < opt_count; i++) { 300 285 if(opt == options[i].short_name) { 301 286 const char * arg = optarg ? optarg : ""; 302 if( arg[0] == '=' ) { arg++; }303 287 bool success = options[i].parse_fun( arg, options[i].variable ); 304 288 if(success) goto NEXT_ARG; … … 335 319 int width = 0; 336 320 { 337 for( size_t i = 0; i < opt_count; i++) {321 for(int i = 0; i < opt_count; i++) { 338 322 if(options[i].long_name) { 339 323 int w = strlen(options[i].long_name); … … 354 338 fprintf(out, "Usage:\n %s %s\n", cmd, help); 355 339 356 for( size_t i = 0; i < opt_count; i++) {340 for(int i = 0; i < opt_count; i++) { 357 341 printopt(out, width, max_width, options[i].short_name, options[i].long_name, options[i].help); 358 342 }
Note: See TracChangeset
for help on using the changeset viewer.