Modernize the codebase - convert C-style casts to static_casts#2506
Modernize the codebase - convert C-style casts to static_casts#2506jougs merged 6 commits intonest:masterfrom
Conversation
|
The PR is based on #2498, which should therefore be merged first. |
|
@JanVogelsang I am surprised that there are many changes in this one that I thought we had handled in previous PRs (boolean operators especially). Were they overlooked? Could you also pull master and ensure that |
|
As this PR was based on #2498, all these boolean operator changes will be gone after merging master into this branch. |
|
Why does git not remove files on a branch when merging with a branch in which they were removed? I know, because they changed in the branch that gets merged with the other one, but shouldn't that at least result in a merge conflict then instead of just silently re-introducing these files again? |
heplesser
left a comment
There was a problem hiding this comment.
@JanVogelsang Thanks, looks good! Just one suggestion for a follow-up issue.
|
Pull request automatically marked stale! |
|
@JanVogelsang: Could you please merge master again? It somehow feels like the diff list is not completely up-to-date. Thanks! |
|
Done! |
jougs
left a comment
There was a problem hiding this comment.
I think technically we can merge this as is. However, I hear almost each of the changes begging for refactoring, so the casts are not needed in the first place. I will thus not yet approve.
|
See also #2541. |
|
Pull request automatically marked stale! |
|
@JanVogelsang: Please merge master and tell me to re-review when you are done. Thanks! |
# Conflicts: # libnestutil/stopwatch.h # models/ac_generator.cpp # models/aeif_cond_alpha.cpp # models/aeif_cond_alpha_multisynapse.cpp # models/aeif_cond_beta_multisynapse.cpp # models/aeif_cond_exp.cpp # models/aeif_psc_alpha.cpp # models/aeif_psc_delta.cpp # models/aeif_psc_delta_clopath.cpp # models/aeif_psc_exp.cpp # models/amat2_psc_exp.cpp # models/binary_neuron.h # models/cm_default.cpp # models/dc_generator.cpp # models/gamma_sup_generator.cpp # models/gif_cond_exp.cpp # models/gif_cond_exp_multisynapse.cpp # models/gif_pop_psc_exp.cpp # models/gif_psc_exp.cpp # models/gif_psc_exp_multisynapse.cpp # models/hh_cond_beta_gap_traub.cpp # models/hh_cond_exp_traub.cpp # models/hh_psc_alpha.cpp # models/hh_psc_alpha_clopath.cpp # models/hh_psc_alpha_gap.cpp # models/ht_neuron.cpp # models/iaf_chs_2007.cpp # models/iaf_chxk_2008.cpp # models/iaf_cond_alpha.cpp # models/iaf_cond_alpha_mc.cpp # models/iaf_cond_beta.cpp # models/iaf_cond_exp.cpp # models/iaf_cond_exp_sfa_rr.cpp # models/iaf_psc_alpha.cpp # models/iaf_psc_alpha_multisynapse.cpp # models/iaf_psc_delta.cpp # models/iaf_psc_exp.cpp # models/iaf_psc_exp_htum.cpp # models/iaf_psc_exp_multisynapse.cpp # models/inhomogeneous_poisson_generator.cpp # models/izhikevich.cpp # models/mat2_psc_exp.cpp # models/noise_generator.cpp # models/parrot_neuron.cpp # models/poisson_generator.cpp # models/poisson_generator_ps.cpp # models/pp_cond_exp_mc_urbanczik.cpp # models/pp_psc_delta.cpp # models/ppd_sup_generator.cpp # models/rate_neuron_ipn_impl.h # models/rate_neuron_opn_impl.h # models/rate_transformer_node_impl.h # models/siegert_neuron.cpp # models/sinusoidal_gamma_generator.cpp # models/sinusoidal_poisson_generator.cpp # models/step_current_generator.cpp # models/step_rate_generator.cpp # nestkernel/connection_creator_impl.h # nestkernel/event_delivery_manager.cpp # nestkernel/ring_buffer.h # nestkernel/simulation_manager.cpp # nestkernel/slice_ring_buffer.h
This PR converts all old C-style casts of the form
(type) valueto modern C++ casts of the formstatic_cast<type>(value).