* mln/canvas/browsing/depth_first_search.hh,
* mln/debug/filename.hh,
* mln/debug/quiet.hh,
* mln/labeling/colorize.hh,
* mln/math/pi.hh: Add missing MLN_WO_GLOBAL_VARS guards.
---
milena/ChangeLog | 10 ++++++++++
milena/mln/canvas/browsing/depth_first_search.hh | 7 ++++++-
milena/mln/debug/filename.hh | 15 ++++++++++++++-
milena/mln/debug/quiet.hh | 7 ++++++-
milena/mln/labeling/colorize.hh | 4 ++++
milena/mln/math/pi.hh | 7 ++++++-
6 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 8e43f9f..dd33710 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-10 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Handle more global vars with MLN_WO_GLOBAL_VARS
+
+ * mln/canvas/browsing/depth_first_search.hh,
+ * mln/debug/filename.hh,
+ * mln/debug/quiet.hh,
+ * mln/labeling/colorize.hh,
+ * mln/math/pi.hh: Add missing MLN_WO_GLOBAL_VARS guards.
+
2010-11-25 Guillaume Lazzara <z(a)lrde.epita.fr>
* mln/io/magick/save.hh: Fix a crash when using GraphicsMagick
diff --git a/milena/mln/canvas/browsing/depth_first_search.hh
b/milena/mln/canvas/browsing/depth_first_search.hh
index 4b61d4d..3d76633 100644
--- a/milena/mln/canvas/browsing/depth_first_search.hh
+++ b/milena/mln/canvas/browsing/depth_first_search.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -86,8 +87,12 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
const depth_first_search_t depth_first_search;
+# endif // ! MLN_WO_GLOBAL_VARS
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::canvas::browsing
diff --git a/milena/mln/debug/filename.hh b/milena/mln/debug/filename.hh
index 85def95..1fc268b 100644
--- a/milena/mln/debug/filename.hh
+++ b/milena/mln/debug/filename.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -58,8 +59,18 @@ namespace mln
filename(const std::string& filename, int id);
+ namespace internal
+ {
+
+ extern std::string filename_prefix;
+
+ } // end of namespace mln::debug::internal
+
+
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
namespace internal
{
@@ -67,6 +78,8 @@ namespace mln
} // end of namespace mln::debug::internal
+# endif // ! MLN_WO_GLOBAL_VARS
+
inline
std::string
diff --git a/milena/mln/debug/quiet.hh b/milena/mln/debug/quiet.hh
index a469e30..23c44dd 100644
--- a/milena/mln/debug/quiet.hh
+++ b/milena/mln/debug/quiet.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -43,8 +44,12 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
bool quiet = false;
+# endif // ! MLN_WO_GLOBAL_VARS
+
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/labeling/colorize.hh b/milena/mln/labeling/colorize.hh
index 673af27..af9585c 100644
--- a/milena/mln/labeling/colorize.hh
+++ b/milena/mln/labeling/colorize.hh
@@ -94,16 +94,20 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
namespace colorize_
{
unsigned min_value = 20;
unsigned max_value = 220;
}
+# endif // ! MLN_WO_GLOBAL_VARS
namespace internal
{
+ inline
unsigned random_number()
{
unsigned last = colorize_::min_value + (colorize_::max_value - colorize_::min_value + 1)
* rand();
diff --git a/milena/mln/math/pi.hh b/milena/mln/math/pi.hh
index 054b004..8f6a4e2 100644
--- a/milena/mln/math/pi.hh
+++ b/milena/mln/math/pi.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -36,8 +37,12 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
const double pi = 3.1415926535897932385;
+# endif // ! MLN_WO_GLOBAL_VARS
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::math
--
1.5.6.5
Show replies by date