Skip to content

Commit

Permalink
Fix string comparison (#13798)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf authored Dec 12, 2024
1 parent 3d1e798 commit 142e0f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Generators/src/GeneratorHybrid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ Bool_t GeneratorHybrid::parseJSON(const std::string& path)
// check if there is a mode field
if (doc.HasMember("mode")) {
const auto& mode = doc["mode"].GetString();
if (mode == "sequential") {
if (strcmp(mode, "sequential") == 0) {
// events are generated in the order given by fractions or random weight
mGenerationMode = GenMode::kSeq;
}
if (mode == std::string("parallel")) {
if (strcmp(mode, "parallel") == 0) {
// events are generated fully in parallel and the order will be random
// this is mainly for event pool generation or mono-type generators
mGenerationMode = GenMode::kParallel;
Expand Down Expand Up @@ -475,4 +475,4 @@ Bool_t GeneratorHybrid::parseJSON(const std::string& path)
} // namespace eventgen
} // namespace o2

ClassImp(o2::eventgen::GeneratorHybrid);
ClassImp(o2::eventgen::GeneratorHybrid);

0 comments on commit 142e0f5

Please sign in to comment.