[GIT] ppl/ppl(compliance): Comments should never be used for " commenting out" code.

Module: ppl/ppl Branch: compliance Commit: 270d1d0c5e09996d077b52a21a85bd6c7ca09a07 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=270d1d0c5e099...
Author: Roberto Bagnara roberto.bagnara@bugseng.com Date: Sun Jul 27 09:29:04 2014 +0200
Comments should never be used for "commenting out" code. Fixes violations of rule EP1.17 detected by ECLAIR.
---
src/Bit_Row.cc | 18 ++++++++++-------- src/CO_Tree_inlines.hh | 14 ++++++++------ src/PIP_Tree.cc | 8 +++++--- src/Polyhedron_nonpublic.cc | 2 -- src/iterator_to_const_defs.hh | 1 - 5 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/src/Bit_Row.cc b/src/Bit_Row.cc index c8e5e87..e17d475 100644 --- a/src/Bit_Row.cc +++ b/src/Bit_Row.cc @@ -47,14 +47,16 @@ unsigned long PPL::Bit_Row::next(unsigned long position) const { ++position;
- // The alternative implementation using the mpz_scan1() function - // of GMP was measured to be slower that ours. Here it is, in - // case mpz_scan1() is improved. - // - // <CODE> - // unsigned long r = mpz_scan1(vec, position); - // return (r == C_Integer<unsigned long>::max) ? -1 : r; - // </CODE> + /* + The alternative implementation using the mpz_scan1() function + of GMP was measured to be slower that ours. Here it is, in + case mpz_scan1() is improved: + + <CODE> + unsigned long r = mpz_scan1(vec, position); + return (r == C_Integer<unsigned long>::max) ? -1 : r; + </CODE> + */
const unsigned long uli = position / PPL_BITS_PER_GMP_LIMB; mp_size_t li = static_cast<mp_size_t>(uli); diff --git a/src/CO_Tree_inlines.hh b/src/CO_Tree_inlines.hh index f94f81e..1209bf5 100644 --- a/src/CO_Tree_inlines.hh +++ b/src/CO_Tree_inlines.hh @@ -343,12 +343,14 @@ CO_Tree::refresh_cached_iterators() {
inline void CO_Tree::move_data_element(data_type& to, data_type& from) { - // The following code is equivalent (but slower): - // - // <CODE> - // new (&to) data_type(from); - // from.~data_type(); - // </CODE> + /* + The following code is equivalent (but slower): + + <CODE> + new (&to) data_type(from); + from.~data_type(); + </CODE> + */ std::memcpy(&to, &from, sizeof(data_type)); }
diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc index dae15f1..fe2318b 100644 --- a/src/PIP_Tree.cc +++ b/src/PIP_Tree.cc @@ -28,9 +28,11 @@ site: http://bugseng.com/products/ppl/ . */ #include <memory> #include <map>
-// #define NOISY_PIP_TREE_STRUCTURE 1 -// #define NOISY_PIP 1 -// #define VERY_NOISY_PIP 1 +#if 0 +#define NOISY_PIP_TREE_STRUCTURE 1 +#define NOISY_PIP 1 +#define VERY_NOISY_PIP 1 +#endif
namespace Parma_Polyhedra_Library {
diff --git a/src/Polyhedron_nonpublic.cc b/src/Polyhedron_nonpublic.cc index 4743e3c..70addd4 100644 --- a/src/Polyhedron_nonpublic.cc +++ b/src/Polyhedron_nonpublic.cc @@ -2453,8 +2453,6 @@ PPL::Polyhedron::positive_time_elapse_assign_impl(const Polyhedron& y) { }
PPL_ASSERT(gs->OK()); - //gs->ascii_dump(std::cout); - //IO_Operators::operator<<(std::cout, *gs);
const dimension_type gs_num_rows = gs->num_rows();
diff --git a/src/iterator_to_const_defs.hh b/src/iterator_to_const_defs.hh index 9a6c29e..0e011fc 100644 --- a/src/iterator_to_const_defs.hh +++ b/src/iterator_to_const_defs.hh @@ -26,7 +26,6 @@ site: http://bugseng.com/products/ppl/ . */
#include "iterator_to_const_types.hh" #include "Powerset_types.hh" -//#include "Ask_Tell_types.hh" #include <iterator>
#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
participants (1)
-
Roberto Bagnara