Skip to content

Commit 142e0f5

Browse files
authored
Fix string comparison (#13798)
1 parent 3d1e798 commit 142e0f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Generators/src/GeneratorHybrid.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,11 @@ Bool_t GeneratorHybrid::parseJSON(const std::string& path)
382382
// check if there is a mode field
383383
if (doc.HasMember("mode")) {
384384
const auto& mode = doc["mode"].GetString();
385-
if (mode == "sequential") {
385+
if (strcmp(mode, "sequential") == 0) {
386386
// events are generated in the order given by fractions or random weight
387387
mGenerationMode = GenMode::kSeq;
388388
}
389-
if (mode == std::string("parallel")) {
389+
if (strcmp(mode, "parallel") == 0) {
390390
// events are generated fully in parallel and the order will be random
391391
// this is mainly for event pool generation or mono-type generators
392392
mGenerationMode = GenMode::kParallel;
@@ -475,4 +475,4 @@ Bool_t GeneratorHybrid::parseJSON(const std::string& path)
475475
} // namespace eventgen
476476
} // namespace o2
477477

478-
ClassImp(o2::eventgen::GeneratorHybrid);
478+
ClassImp(o2::eventgen::GeneratorHybrid);

0 commit comments

Comments
 (0)