[PPL-devel] [GIT] ppl/ppl(master): Avoid #include directives after code (except for "*. idefs.hh", "*.inlines.hh" and "*.templates.hh").
Roberto Bagnara
bagnara at cs.unipr.it
Tue Oct 18 16:19:18 CEST 2011
Module: ppl/ppl
Branch: master
Commit: 615033adbfb7fbc0ec72cf5c35ef64d6c8935590
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=615033adbfb7fbc0ec72cf5c35ef64d6c8935590
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Tue Oct 18 16:14:35 2011 +0200
Avoid #include directives after code (except for "*.idefs.hh", "*.inlines.hh" and "*.templates.hh").
Detected by ECLAIR service inclmixd.
---
src/Checked_Number.defs.hh | 1 -
src/Coefficient.types.hh | 8 ++++----
src/Sparse_Row.defs.hh | 2 +-
src/globals.defs.hh | 8 ++++----
4 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/Checked_Number.defs.hh b/src/Checked_Number.defs.hh
index 2f5578c..ba35243 100644
--- a/src/Checked_Number.defs.hh
+++ b/src/Checked_Number.defs.hh
@@ -1048,7 +1048,6 @@ int maybe_check_fpu_inexact();
} // namespace Parma_Polyhedra_Library
#include "Checked_Number.inlines.hh"
-#include "checked_numeric_limits.hh"
#include "Checked_Number.templates.hh"
#endif // !defined(PPL_Checked_Number_defs_hh)
diff --git a/src/Coefficient.types.hh b/src/Coefficient.types.hh
index 7e4d6b5..d090aab 100644
--- a/src/Coefficient.types.hh
+++ b/src/Coefficient.types.hh
@@ -15,6 +15,10 @@ PURPOSE. */
#include "Checked_Number.defs.hh"
+#ifdef PPL_GMP_INTEGERS
+#include "GMP_Integer.types.hh"
+#endif
+
#if defined(PPL_CHECKED_INTEGERS) || defined(PPL_NATIVE_INTEGERS)
namespace Parma_Polyhedra_Library {
@@ -145,10 +149,6 @@ struct Coefficient_traits_template<Checked_Number<int64_t, Policy> > {
#endif // defined(PPL_CHECKED_INTEGERS) || defined(PPL_NATIVE_INTEGERS)
-#ifdef PPL_GMP_INTEGERS
-#include "GMP_Integer.types.hh"
-#endif
-
namespace Parma_Polyhedra_Library {
//! An alias for easily naming the type of PPL coefficients.
diff --git a/src/Sparse_Row.defs.hh b/src/Sparse_Row.defs.hh
index ecc997b..7c14a29 100644
--- a/src/Sparse_Row.defs.hh
+++ b/src/Sparse_Row.defs.hh
@@ -836,7 +836,7 @@ bool operator!=(const Sparse_Row& x, const Sparse_Row& y);
} // namespace Parma_Polyhedra_Library
-#include "Sparse_Row.templates.hh"
#include "Sparse_Row.inlines.hh"
+#include "Sparse_Row.templates.hh"
#endif // !defined(PPL_Sparse_Row_defs_hh)
diff --git a/src/globals.defs.hh b/src/globals.defs.hh
index 3be28b6..310f133 100644
--- a/src/globals.defs.hh
+++ b/src/globals.defs.hh
@@ -32,6 +32,10 @@ site: http://www.cs.unipr.it/ppl/ . */
#include <exception>
#include <gmpxx.h>
+#if defined(NDEBUG) && PPL_PROFILE_ADD_WEIGHT
+#include "Weight_Profiler.defs.hh"
+#endif
+
namespace Parma_Polyhedra_Library {
//! Returns a value that does not designate a valid dimension.
@@ -467,10 +471,6 @@ FOK(mpq_class)
} // namespace Parma_Polyhedra_Library
-#if defined(NDEBUG) && PPL_PROFILE_ADD_WEIGHT
-#include "Weight_Profiler.defs.hh"
-#endif
-
// By default, use sparse matrices both for MIP_Problem and PIP_Problem.
#ifndef USE_PPL_SPARSE_MATRIX
#define USE_PPL_SPARSE_MATRIX 1
More information about the PPL-devel
mailing list