Skip to content

Commit

Permalink
Possible bugfix: Use insert not emplace fixes nvhpc + gcc9
Browse files Browse the repository at this point in the history
  • Loading branch information
ptheywood committed Jan 8, 2024
1 parent 952f123 commit f2d2573
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/flamegpu/model/AgentFunctionDescription.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ AgentFunctionDescription AgentDescription::newFunction(const std::string &functi
}
}
auto rtn = std::shared_ptr<AgentFunctionData>(new AgentFunctionData(this->agent->shared_from_this(), function_name, f, in_t, out_t));
agent->functions.emplace(function_name, rtn);
agent->functions.insert({function_name, rtn}); // emplace causes nvhpc with gcc 9 to segfault
return AgentFunctionDescription(rtn);
}
THROW exception::InvalidAgentFunc("Agent ('%s') already contains function '%s', "
Expand Down

0 comments on commit f2d2573

Please sign in to comment.