Skip to content

Commit b892930

Browse files
committed
fix: more warnings
1 parent 995cabe commit b892930

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

models/correlomatrix_detector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,11 @@ nest::correlomatrix_detector::State_::reset( const Parameters_& p )
228228
count_covariance_.clear();
229229
count_covariance_.resize( p.N_channels_ );
230230

231-
for ( long i = 0; i < p.N_channels_; ++i )
231+
for ( decltype( p.N_channels_ ) i = 0; i < p.N_channels_; ++i )
232232
{
233233
covariance_[ i ].resize( p.N_channels_ );
234234
count_covariance_[ i ].resize( p.N_channels_ );
235-
for ( long j = 0; j < p.N_channels_; ++j )
235+
for ( decltype( p.N_channels_ ) j = 0; j < p.N_channels_; ++j )
236236
{
237237
covariance_[ i ][ j ].resize( 1 + p.tau_max_.get_steps() / p.delta_tau_.get_steps(), 0 );
238238
count_covariance_[ i ][ j ].resize( 1 + p.tau_max_.get_steps() / p.delta_tau_.get_steps(), 0 );
@@ -349,7 +349,7 @@ nest::correlomatrix_detector::handle( SpikeEvent& e )
349349
for ( SpikelistType::const_iterator spike_j = otherSpikes.begin(); spike_j != otherSpikes.end(); ++spike_j )
350350
{
351351
size_t bin;
352-
long other = spike_j->receptor_channel_;
352+
decltype( sender ) other = spike_j->receptor_channel_;
353353
long sender_ind, other_ind;
354354

355355
if ( spike_i < spike_j->timestep_ )

models/correlospinmatrix_detector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ nest::correlospinmatrix_detector::handle( SpikeEvent& e )
392392
// yet every impulse in the queue that is further in the past than
393393
// this minimum - tau_max cannot contribute to the count covariance
394394
long t_min_on = t_i_on;
395-
for ( int n = 0; n < P_.N_channels_; n++ )
395+
for ( decltype( P_.N_channels_ ) n = 0; n < P_.N_channels_; n++ )
396396
{
397397
if ( S_.curr_state_[ n ] )
398398
{

0 commit comments

Comments
 (0)