Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix string comparison #13798

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
Loading