@@ -16,7 +16,7 @@ namespace reactor {
1616
1717void BasePort::base_bind_to (BasePort* port) {
1818 reactor_assert (port != nullptr );
19- reactor_assert (this ->environment () == port->environment ()); // NOLINT
19+ reactor_assert (this ->environment () == port->environment ());
2020 validate (!port->has_inward_binding (), " Ports may only be connected once" );
2121 validate (!port->has_anti_dependencies (), " Ports with anti dependencies may not be connected to other ports" );
2222 assert_phase (this , Environment::Phase::Assembly);
@@ -41,12 +41,13 @@ void BasePort::base_bind_to(BasePort* port) {
4141 }
4242
4343 port->inward_binding_ = this ;
44- reactor_assert (this ->outward_bindings_ .insert (port).second );
44+ [[maybe_unused]] bool result = this ->outward_bindings_ .insert (port).second ;
45+ reactor_assert (result);
4546}
4647
4748void BasePort::register_dependency (Reaction* reaction, bool is_trigger) noexcept {
4849 reactor_assert (reaction != nullptr );
49- reactor_assert (this ->environment () == reaction->environment ()); // NOLINT
50+ reactor_assert (this ->environment () == reaction->environment ());
5051 validate (!this ->has_outward_bindings (), " Dependencies may no be declared on ports with an outward binding!" );
5152 assert_phase (this , Environment::Phase::Assembly);
5253
@@ -58,15 +59,17 @@ void BasePort::register_dependency(Reaction* reaction, bool is_trigger) noexcept
5859 " Dependent output ports must belong to a contained reactor" );
5960 }
6061
61- reactor_assert (dependencies_.insert (reaction).second );
62+ [[maybe_unused]] bool result = dependencies_.insert (reaction).second ;
63+ reactor_assert (result);
6264 if (is_trigger) {
63- reactor_assert (triggers_.insert (reaction).second );
65+ result = triggers_.insert (reaction).second ;
66+ reactor_assert (result);
6467 }
6568}
6669
6770void BasePort::register_antidependency (Reaction* reaction) noexcept {
6871 reactor_assert (reaction != nullptr );
69- reactor_assert (this ->environment () == reaction->environment ()); // NOLINT
72+ reactor_assert (this ->environment () == reaction->environment ());
7073 validate (!this ->has_inward_binding (), " Antidependencies may no be declared on ports with an inward binding!" );
7174 assert_phase (this , Environment::Phase::Assembly);
7275
@@ -79,7 +82,8 @@ void BasePort::register_antidependency(Reaction* reaction) noexcept {
7982 " Antidependent input ports must belong to a contained reactor" );
8083 }
8184
82- reactor_assert (anti_dependencies_.insert (reaction).second );
85+ [[maybe_unused]] bool result = anti_dependencies_.insert (reaction).second ;
86+ reactor_assert (result);
8387}
8488
8589[[maybe_unused]] auto Port<void >::typed_outward_bindings() const noexcept -> const std::set<Port<void >*>& {
0 commit comments