Skip to content
Snippets Groups Projects
Commit 8f1c66cf authored by Tobias Schruff's avatar Tobias Schruff
Browse files

FieldIterator const-conversion now returns a copy of the const_iterator...

FieldIterator const-conversion now returns a copy of the const_iterator instead of a const reference.
parent c8f5be8a
Branches
Tags
No related merge requests found
Pipeline #
//======================================================================================================================
//
// This file is part of waLBerla. waLBerla is free software: you can
// This file is part of waLBerla. waLBerla is free software: you can
// redistribute it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation, either version 3 of
// License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// waLBerla is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
//
// waLBerla is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
//
// You should have received a copy of the GNU General Public License along
// with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
//
......@@ -91,9 +91,9 @@ namespace field {
inline bool operator==( const FieldIterator& it ) const;
inline bool operator!=( const FieldIterator& it ) const;
operator const FieldIterator<const T, fieldFSize> & () const {
const FieldIterator<const T, fieldFSize> * ptr;
ptr = reinterpret_cast< const FieldIterator<const T, fieldFSize>* > ( this );
operator FieldIterator<const T, fieldFSize> () {
FieldIterator<const T, fieldFSize> * ptr;
ptr = reinterpret_cast< FieldIterator<const T, fieldFSize>* > ( this );
return *ptr;
}
......@@ -304,4 +304,3 @@ namespace field {
#include "FieldIterator.impl.h"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment