Skip to content

Commit 60228fb

Browse files
authored
Merge pull request #3576 from heplesser/muffaga_3026
Fix some warnings about mismatching integer types (replaces #3026)
2 parents 4dcf79c + 9845a51 commit 60228fb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

models/correlomatrix_detector.cpp

Lines changed: 5 additions & 4 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 ( auto 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 ( auto 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,8 +349,9 @@ 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_;
353-
long sender_ind, other_ind;
352+
size_t other = spike_j->receptor_channel_;
353+
size_t sender_ind = 0;
354+
size_t other_ind = 0;
354355

355356
if ( spike_i < spike_j->timestep_ )
356357
{

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 ( auto n = 0; n < P_.N_channels_; n++ )
396396
{
397397
if ( S_.curr_state_[ n ] )
398398
{

0 commit comments

Comments
 (0)