Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/rq_bench.hpp

    rc4241b6 rf9b2e73  
    9797}
    9898
    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 
    11399bool parse_settrue (const char *, bool & value ) {
    114100        value = true;
     
    240226        {
    241227                int idx = 0;
    242                 for(size_t i = 0; i < opt_count; i++) {
     228                for(int i = 0; i < opt_count; i++) {
    243229                        if(options[i].long_name) {
    244230                                optarr[idx].name = options[i].long_name;
     
    270256        {
    271257                int idx = 0;
    272                 for(size_t i = 0; i < opt_count; i++) {
     258                for(int i = 0; i < opt_count; i++) {
    273259                        optstring[idx] = options[i].short_name;
    274260                        idx++;
     
    293279                        case 'h':
    294280                                out = stdout;
    295                                 [[fallthrough]];
    296281                        case '?':
    297282                                usage(argv[0], options, opt_count, usage_msg, out);
    298283                        default:
    299                                 for(size_t i = 0; i < opt_count; i++) {
     284                                for(int i = 0; i < opt_count; i++) {
    300285                                        if(opt == options[i].short_name) {
    301286                                                const char * arg = optarg ? optarg : "";
    302                                                 if( arg[0] == '=' ) { arg++; }
    303287                                                bool success = options[i].parse_fun( arg, options[i].variable );
    304288                                                if(success) goto NEXT_ARG;
     
    335319        int width = 0;
    336320        {
    337                 for(size_t i = 0; i < opt_count; i++) {
     321                for(int i = 0; i < opt_count; i++) {
    338322                        if(options[i].long_name) {
    339323                                int w = strlen(options[i].long_name);
     
    354338        fprintf(out, "Usage:\n  %s %s\n", cmd, help);
    355339
    356         for(size_t i = 0; i < opt_count; i++) {
     340        for(int i = 0; i < opt_count; i++) {
    357341                printopt(out, width, max_width, options[i].short_name, options[i].long_name, options[i].help);
    358342        }
Note: See TracChangeset for help on using the changeset viewer.