Commit d48d9466 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Fixing operator-> in circulators.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@895 fdac6126-5c0c-442c-9429-916003d36597
parent 26f9e84e
......@@ -283,9 +283,17 @@ class GenericCirculatorT : protected GenericCirculatorBaseT<Mesh> {
#endif
}
/// Standard pointer operator.
value_type operator->() const {
return **this;
/**
* @brief Pointer dereferentiation.
*
* This returns a pointer which points to a handle
* that loses its validity once this dereferentiation is
* invoked again. Thus, do not store the result of
* this operation.
*/
pointer operator->() const {
pointer_deref_value = **this;
return &pointer_deref_value;
}
GenericCirculatorT &operator=(const GenericCirculatorT &rhs) {
......@@ -332,6 +340,8 @@ class GenericCirculatorT : protected GenericCirculatorBaseT<Mesh> {
return s << self.mesh_ << ", " << self.start_.idx() << ", " << self.heh_.idx() << ", " << self.lap_counter_;
}
private:
mutable value_type pointer_deref_value;
};
} // namespace Iterators
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment