MCPcopy Create free account
hub / github.com/boostorg/json / parse_option

Function parse_option

bench/bench.cpp:928–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

926using namespace boost::json;
927
928static bool parse_option( char const* s )
929{
930 if( *s == 0 )
931 return false;
932
933 char opt = *s++;
934
935 if( *s++ != ':' )
936 return false;
937
938 switch( opt )
939 {
940 case 't':
941 s_tests = s;
942 break;
943
944 case 'i':
945 s_impls = s;
946 break;
947
948 case 'n':
949 {
950 int k = std::atoi( s );
951
952 if( k > 0 )
953 s_trials = k;
954 else
955 return false;
956 }
957 break;
958
959 case 'b':
960 s_branch = s;
961 break;
962
963 case 'a':
964 s_alloc = s;
965 break;
966
967 case 'm':
968 s_num_mode = s;
969 break;
970
971 case 'f':
972 s_file_io = s;
973 break;
974 }
975
976 return true;
977}
978
979bool add_impl(
980 impl_list & vi, char kind, char alloc, char io, char num)

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected