* mln/core/internal/image_morpher.hh: remove operator I().
---
milena/ChangeLog | 7 ++++++
milena/mln/core/internal/image_morpher.hh | 31 ++++++++--------------------
2 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 4a24f51..7e6190d 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,12 @@
2009-04-08 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Remove an invalid conversion operator from a morpher to a concrete
+ image.
+
+ * mln/core/internal/image_morpher.hh: remove operator I().
+
+2009-04-08 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Introduce edge_image and vertex_image types.
* mln/core/site_set/p_graph_piter.hh,
diff --git a/milena/mln/core/internal/image_morpher.hh
b/milena/mln/core/internal/image_morpher.hh
index ab50ea8..fd170ea 100644
--- a/milena/mln/core/internal/image_morpher.hh
+++ b/milena/mln/core/internal/image_morpher.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,12 +29,11 @@
#ifndef MLN_CORE_INTERNAL_IMAGE_MORPHER_HH
# define MLN_CORE_INTERNAL_IMAGE_MORPHER_HH
-/*! \file mln/core/internal/image_morpher.hh
- *
- * \brief Definition of a base class for image morphers.
- *
- * \todo Add the appropriate checks in .rw().
- */
+/// \file mln/core/internal/image_morpher.hh
+///
+/// Definition of a base class for image morphers.
+///
+/// \todo Add the appropriate checks in .rw().
# include <mln/core/internal/image_base.hh>
# include <mln/metal/const.hh>
@@ -47,9 +47,8 @@ namespace mln
namespace internal
{
- /*! A base class for images that are morphers. Parameter
- * \c I is the underlying-morphed image type.
- */
+ /// A base class for images that are morphers. Parameter
+ /// \c I is the underlying-morphed image type.
template <typename I, typename T, typename S, typename E>
class image_morpher : public image_base<T, S, E>
{
@@ -80,9 +79,6 @@ namespace mln
*/
bool is_valid() const;
- /// Conversion to the underlying (morphed) image.
- operator I() const; // FIXME: Very dangerous? Remove?
-
/// State that the morpher is writable. This allows for C++ to
/// use it as a mutable object even if it is a temporary object.
@@ -165,15 +161,6 @@ namespace mln
return *ptr;
}
-
- template <typename I, typename T, typename S, typename E>
- inline
- image_morpher<I, T, S, E>::operator I() const
- {
- mln_precondition(exact(this)->is_valid());
- return * this->delegatee_();
- }
-
template <typename I, typename T, typename S, typename E>
inline
bool
--
1.5.6.5
Show replies by date