Skip to content

Commit

Permalink
Changed order of set funtions in 5g branch, see PR nest#333
Browse files Browse the repository at this point in the history
  • Loading branch information
Susanne Kunkel committed Mar 1, 2017
1 parent ee469c1 commit 141d164
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions nestkernel/connector_model_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ GenericConnectorModel< ConnectionT >::add_connection_5g( Node& src,
double delay,
double weight )
{
std::cout << "here weight: " << weight << std::endl;
if ( !numerics::is_nan( delay ) )
{
kernel().connection_manager.get_delay_checker().assert_valid_delay_ms(
Expand All @@ -282,12 +283,10 @@ GenericConnectorModel< ConnectionT >::add_connection_5g( Node& src,
used_default_delay();
}


// create a new instance of the default connection
ConnectionT c = ConnectionT( default_connection_ );
if ( !p->empty() )
c.set_status( p, *this ); // reference to connector model needed here to
// check delay (maybe this
// could be done one level above?)

if ( !numerics::is_nan( weight ) )
{
c.set_weight( weight );
Expand All @@ -296,7 +295,11 @@ GenericConnectorModel< ConnectionT >::add_connection_5g( Node& src,
{
c.set_delay( delay );
}

if ( !p->empty() )
c.set_status( p, *this ); // reference to connector model needed here to
// check delay (maybe this
// could be done one level above?)

// We must use a local variable here to hold the actual value of the
// receptor type. We must not change the receptor_type_ data member, because
// that represents the *default* value. See #921.
Expand Down

0 comments on commit 141d164

Please sign in to comment.