Skip to content

Commit

Permalink
Make format happy
Browse files Browse the repository at this point in the history
  • Loading branch information
iomaganaris committed Dec 7, 2023
1 parent a6acc3d commit c726805
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/codegen/codegen_neuron_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ void CodegenNeuronCppVisitor::print_mechanism_register() {
}


void CodegenNeuronCppVisitor::print_mechanism_range_var_structure(bool [[maybe_unused]] print_initializers) {
void CodegenNeuronCppVisitor::print_mechanism_range_var_structure(
bool [[maybe_unused]] print_initializers) {

Check warning on line 458 in src/codegen/codegen_neuron_cpp_visitor.cpp

View workflow job for this annotation

GitHub Actions / { "flag_warnings": "ON", "os": "ubuntu-22.04" }

attribute ignored [-Wattributes]

Check failure on line 458 in src/codegen/codegen_neuron_cpp_visitor.cpp

View workflow job for this annotation

GitHub Actions / { "flag_warnings": "ON", "os": "ubuntu-22.04", "sanitizer": "undefined" }

'maybe_unused' attribute cannot be applied to types
printer->add_newline(2);
printer->add_line("/* NEURON RANGE variables macro definitions */");
for (auto i = 0; i < codegen_float_variables.size(); ++i) {
Expand Down
6 changes: 4 additions & 2 deletions test/unit/codegen/codegen_neuron_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,10 @@ void _nrn_mechanism_register_data_fields(Args&&... args) {
std::string expected_initlists_s_var = "_slist1[0] = {4, 0};";
std::string expected_initlists_Ds_var = "_dlist1[0] = {7, 0};";

REQUIRE_THAT(generated, ContainsSubstring(reindent_and_trim_text(expected_initlists_s_var)));
REQUIRE_THAT(generated, ContainsSubstring(reindent_and_trim_text(expected_initlists_Ds_var)));
REQUIRE_THAT(generated,
ContainsSubstring(reindent_and_trim_text(expected_initlists_s_var)));
REQUIRE_THAT(generated,
ContainsSubstring(reindent_and_trim_text(expected_initlists_Ds_var)));
}
THEN("Placeholder registration function is printed") {
std::string expected_placeholder_reg = R"CODE(/** register channel with the simulator */
Expand Down

0 comments on commit c726805

Please sign in to comment.