Skip to content

Commit ab6d81e

Browse files
committed
fix: remove redundant bools
1 parent 00dd78e commit ab6d81e

File tree

1 file changed

+17
-22
lines changed

1 file changed

+17
-22
lines changed

src/clas-stringspinner.cpp

+17-22
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,21 @@ enum obj_enum { objBeam, objTarget, nObj };
2424
std::string const obj_name[nObj] = { "beam", "target" };
2525

2626
// default option values
27-
static unsigned long num_events = 10000;
28-
static std::string out_file = "clas-stringspinner.dat";
29-
static double beam_energy = 10.60410;
30-
static std::string target_type = "proton";
31-
static std::string pol_type = "UU";
32-
static std::string spin_type[nObj] = {"", ""};
33-
static std::string patch_boost = "beam";
34-
static std::vector<int> cut_inclusive = {};
35-
static std::vector<double> cut_theta = {};
36-
static std::string config_name = "clas12";
37-
static std::vector<std::string> config_overrides = {};
38-
static int seed = -1;
39-
// default flag values
40-
static int flag_count_before_cuts = 0;
41-
static int flag_verbose_mode = 0;
42-
static bool enable_count_before_cuts = false;
43-
static bool enable_verbose_mode = false;
44-
static bool enable_patch_boost = false;
27+
static unsigned long num_events = 10000;
28+
static std::string out_file = "clas-stringspinner.dat";
29+
static double beam_energy = 10.60410;
30+
static std::string target_type = "proton";
31+
static std::string pol_type = "UU";
32+
static std::string spin_type[nObj] = {"", ""};
33+
static std::string patch_boost = "beam";
34+
static std::vector<int> cut_inclusive = {};
35+
static std::vector<double> cut_theta = {};
36+
static std::string config_name = "clas12";
37+
static std::vector<std::string> config_overrides = {};
38+
static int seed = -1;
39+
static bool enable_count_before_cuts = false;
40+
static bool enable_verbose_mode = false;
41+
static bool enable_patch_boost = false;
4542

4643
//////////////////////////////////////////////////////////////////////////////////
4744

@@ -319,8 +316,8 @@ int main(int argc, char** argv)
319316
case opt_seed: seed = std::stoi(optarg); break;
320317
case opt_set: config_overrides.push_back(std::string(optarg)); break;
321318
case opt_patch_boost: patch_boost = std::string(optarg); break;
322-
case opt_count_before_cuts: flag_count_before_cuts = true; break;
323-
case opt_verbose: flag_verbose_mode = true; break;
319+
case opt_count_before_cuts: enable_count_before_cuts = true; break;
320+
case opt_verbose: enable_verbose_mode = true; break;
324321
case opt_help:
325322
Usage();
326323
return 0;
@@ -335,8 +332,6 @@ int main(int argc, char** argv)
335332
// set boolean options
336333
bool enable_cut_inclusive = ! cut_inclusive.empty();
337334
bool enable_cut_theta = ! cut_theta.empty();
338-
enable_count_before_cuts = flag_count_before_cuts == 1;
339-
enable_verbose_mode = flag_verbose_mode == 1;
340335

341336
// initialize "checklist" `cut_inclusive_found` for checking if `cut_inclusive` satisfied for an event
342337
std::vector<std::pair<int, bool>> cut_inclusive_found;

0 commit comments

Comments
 (0)