Skip to content

Commit

Permalink
Renaming of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
iomaganaris committed Sep 12, 2023
1 parent 091401b commit 301d128
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/codegen/codegen_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2868,18 +2868,18 @@ void CodegenCppVisitor::print_mechanism_register() {
printer->add_line("_nrn_layout_reg(mech_type, 0);"); // 0 for SoA

// register mechanism
auto args = register_mechanism_arguments();
auto nobjects = num_thread_objects();
const auto mech_arguments = register_mechanism_arguments();
const auto number_of_thread_objects = num_thread_objects();
if (info.point_process) {
printer->fmt_line("point_register_mech({}, {}, {}, {});",
args,
mech_arguments,
info.constructor_node ? method_name(naming::NRN_CONSTRUCTOR_METHOD)
: "nullptr",
info.destructor_node ? method_name(naming::NRN_DESTRUCTOR_METHOD)
: "nullptr",
nobjects);
number_of_thread_objects);
} else {
printer->fmt_line("register_mech({}, {});", args, nobjects);
printer->fmt_line("register_mech({}, {});", mech_arguments, number_of_thread_objects);
if (info.constructor_node) {
printer->fmt_line("register_constructor({});",
method_name(naming::NRN_CONSTRUCTOR_METHOD));
Expand Down Expand Up @@ -2930,9 +2930,9 @@ void CodegenCppVisitor::print_mechanism_register() {

// register semantics for index variables
for (auto& semantic: info.semantics) {
auto hoc_register_dparam_semantics_args =
auto args =
fmt::format("mech_type, {}, {}", semantic.index, add_escape_quote(semantic.name));
printer->fmt_line("hoc_register_dparam_semantics({});", hoc_register_dparam_semantics_args);
printer->fmt_line("hoc_register_dparam_semantics({});", args);
}

if (info.is_watch_used()) {
Expand Down

0 comments on commit 301d128

Please sign in to comment.