Skip to content

Commit 4117492

Browse files
committed
Possible bugfix: Use insert not emplace fixes nvhpc + gcc9
1 parent 70de900 commit 4117492

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/flamegpu/model/AgentDescription.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ AgentFunctionDescription& AgentDescription::newRTCFunction(const std::string& fu
199199
func_src_str.append(func_src);
200200
}
201201
auto rtn = std::shared_ptr<AgentFunctionData>(new AgentFunctionData(this->agent->shared_from_this(), function_name, func_src_str, in_type_name, out_type_name, code_func_name));
202-
agent->functions.emplace(function_name, rtn);
202+
agent->functions.insert({function_name, rtn}); // emplace causes nvhpc with gcc 9 to segfault
203203
return *rtn->description;
204204
} else {
205205
THROW exception::InvalidAgentFunc("Runtime agent function('%s') is missing FLAMEGPU_AGENT_FUNCTION arguments e.g. (func_name, message_input_type, message_output_type), "

0 commit comments

Comments
 (0)