Commit 9224daad authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: add 'this->' qualifier to find methods in base case

parent 90ea219f
......@@ -47,7 +47,7 @@ Foam::HashPtrTable<T, Key, Hash>::HashPtrTable
{
for (const_iterator iter = ht.begin(); iter != ht.end(); ++iter)
{
insert(iter.key(), new T(**iter));
this->insert(iter.key(), new T(**iter));
}
}
......@@ -129,11 +129,11 @@ void Foam::HashPtrTable<T, Key, Hash>::operator=
<< abort(FatalError);
}
clear();
this->clear();
for (const_iterator iter = rhs.begin(); iter != rhs.end(); ++iter)
{
insert(iter.key(), new T(**iter));
this->insert(iter.key(), new T(**iter));
}
}
......
......@@ -98,7 +98,7 @@ public:
//- Construct from dictionary using default dictionary constructor
// class
HashPtrTable(const dictionary& dict);
HashPtrTable(const dictionary&);
//- Construct as copy
HashPtrTable(const HashPtrTable<T, Key, Hash>&);
......
......@@ -65,7 +65,7 @@ void Foam::HashPtrTable<T, Key, Hash>::read(Istream& is, const INew& inewt)
{
Key key;
is >> key;
insert(key, inewt(key, is).ptr());
this->insert(key, inewt(key, is).ptr());
is.fatalCheck
(
......@@ -112,7 +112,7 @@ void Foam::HashPtrTable<T, Key, Hash>::read(Istream& is, const INew& inewt)
is.putBack(lastToken);
Key key;
is >> key;
insert(key, inewt(key, is).ptr());
this->insert(key, inewt(key, is).ptr());
is.fatalCheck
(
......@@ -148,7 +148,11 @@ void Foam::HashPtrTable<T, Key, Hash>::read
{
forAllConstIter(dictionary, dict, iter)
{
insert(iter().keyword(), inewt(dict.subDict(iter().keyword())).ptr());
this->insert
(
iter().keyword(),
inewt(dict.subDict(iter().keyword())).ptr()
);
}
}
......@@ -177,21 +181,21 @@ template<class T, class Key, class Hash>
template<class INew>
Foam::HashPtrTable<T, Key, Hash>::HashPtrTable(Istream& is, const INew& inewt)
{
read(is, inewt);
this->read(is, inewt);
}
template<class T, class Key, class Hash>
Foam::HashPtrTable<T, Key, Hash>::HashPtrTable(Istream& is)
{
read(is, INew<T>());
this->read(is, INew<T>());
}
template<class T, class Key, class Hash>
Foam::HashPtrTable<T, Key, Hash>::HashPtrTable(const dictionary& dict)
{
read(dict, INew<T>());
this->read(dict, INew<T>());
}
......
......@@ -37,7 +37,7 @@ Foam::HashSet<Key, Hash>::HashSet(const UList<Key>& lst)
{
forAll(lst, elemI)
{
insert(lst[elemI]);
this->insert(lst[elemI]);
}
}
......@@ -59,7 +59,7 @@ Foam::HashSet<Key, Hash>::HashSet
++cit
)
{
insert(cit.key());
this->insert(cit.key());
}
}
......@@ -72,7 +72,7 @@ Foam::label Foam::HashSet<Key, Hash>::insert(const UList<Key>& lst)
label count = 0;
forAll(lst, elemI)
{
if (insert(lst[elemI]))
if (this->insert(lst[elemI]))
{
++count;
}
......@@ -87,7 +87,7 @@ Foam::label Foam::HashSet<Key, Hash>::insert(const UList<Key>& lst)
template<class Key, class Hash>
inline bool Foam::HashSet<Key, Hash>::operator[](const Key& key) const
{
return found(key);
return this->found(key);
}
......@@ -106,7 +106,7 @@ bool Foam::HashSet<Key, Hash>::operator==(const HashSet<Key, Hash>& rhs) const
// Are all rhs elements in lhs?
for (const_iterator iter = rhs.cbegin(); iter != rhs.cend(); ++iter)
{
if (!found(iter.key()))
if (!this->found(iter.key()))
{
return false;
}
......@@ -129,7 +129,7 @@ void Foam::HashSet<Key, Hash>::operator|=(const HashSet<Key, Hash>& rhs)
// Add rhs elements into lhs
for (const_iterator iter = rhs.cbegin(); iter != rhs.cend(); ++iter)
{
insert(iter.key());
this->insert(iter.key());
}
}
......@@ -142,7 +142,7 @@ void Foam::HashSet<Key, Hash>::operator&=(const HashSet<Key, Hash>& rhs)
{
if (!rhs.found(iter.key()))
{
erase(iter);
this->erase(iter);
}
}
}
......@@ -154,13 +154,13 @@ void Foam::HashSet<Key, Hash>::operator^=(const HashSet<Key, Hash>& rhs)
// Add missed rhs elements, remove duplicate elements
for (const_iterator iter = rhs.cbegin(); iter != rhs.cend(); ++iter)
{
if (found(iter.key()))
if (this->found(iter.key()))
{
erase(iter.key());
this->erase(iter.key());
}
else
{
insert(iter.key());
this->insert(iter.key());
}
}
}
......@@ -173,7 +173,7 @@ void Foam::HashSet<Key, Hash>::operator-=(const HashSet<Key, Hash>& rhs)
// Remove rhs elements from lhs
for (const_iterator iter = rhs.cbegin(); iter != rhs.cend(); ++iter)
{
erase(iter.key());
this->erase(iter.key());
}
}
......
......@@ -39,7 +39,7 @@ Foam::ILList<LListBase, T>::ILList(const ILList<LListBase, T>& lst)
++iter
)
{
append(iter().clone().ptr());
this->append(iter().clone().ptr());
}
}
......@@ -62,7 +62,7 @@ Foam::ILList<LListBase, T>::ILList
++iter
)
{
append(iter().clone(cloneArg).ptr());
this->append(iter().clone(cloneArg).ptr());
}
}
#endif
......@@ -114,7 +114,7 @@ template<class LListBase, class T>
void Foam::ILList<LListBase, T>::clear()
{
label oldSize = this->size();
for (label i=0; i<oldSize; i++)
for (label i=0; i<oldSize; ++i)
{
eraseHead();
}
......@@ -145,7 +145,7 @@ void Foam::ILList<LListBase, T>::operator=(const ILList<LListBase, T>& lst)
++iter
)
{
append(iter().clone().ptr());
this->append(iter().clone().ptr());
}
}
......
......@@ -53,9 +53,9 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
{
if (delimiter == token::BEGIN_LIST)
{
for (label i=0; i<s; i++)
for (label i=0; i<s; ++i)
{
append(iNew(is).ptr());
this->append(iNew(is).ptr());
is.fatalCheck
(
......@@ -67,7 +67,7 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
else
{
T* tPtr = iNew(is).ptr();
append(tPtr);
this->append(tPtr);
is.fatalCheck
(
......@@ -75,9 +75,9 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
"reading entry"
);
for (label i=1; i<s; i++)
for (label i=1; i<s; ++i)
{
append(new T(*tPtr));
this->append(new T(*tPtr));
}
}
}
......@@ -109,7 +109,7 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
)
{
is.putBack(lastToken);
append(iNew(is).ptr());
this->append(iNew(is).ptr());
is >> lastToken;
is.fatalCheck("operator>>(Istream&, ILList<LListBase, T>&)");
......@@ -131,14 +131,14 @@ template<class LListBase, class T>
template<class INew>
Foam::ILList<LListBase, T>::ILList(Istream& is, const INew& iNew)
{
read(is, iNew);
this->read(is, iNew);
}
template<class LListBase, class T>
Foam::ILList<LListBase, T>::ILList(Istream& is)
{
read(is, INew<T>());
this->read(is, INew<T>());
}
......@@ -154,6 +154,4 @@ Foam::Istream& Foam::operator>>(Istream& is, ILList<LListBase, T>& L)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //
......@@ -35,7 +35,7 @@ Foam::LList<LListBase, T>::LList(const LList<LListBase, T>& lst)
{
for (const_iterator iter = lst.begin(); iter != lst.end(); ++iter)
{
append(iter());
this->append(iter());
}
}
......@@ -53,9 +53,9 @@ template<class LListBase, class T>
void Foam::LList<LListBase, T>::clear()
{
label oldSize = this->size();
for (label i=0; i<oldSize; i++)
for (label i=0; i<oldSize; ++i)
{
removeHead();
this->removeHead();
}
LListBase::clear();
......@@ -79,7 +79,7 @@ void Foam::LList<LListBase, T>::operator=(const LList<LListBase, T>& lst)
for (const_iterator iter = lst.begin(); iter != lst.end(); ++iter)
{
append(iter());
this->append(iter());
}
}
......
......@@ -238,10 +238,7 @@ public:
public:
//- Construct from base iterator
iterator
(
LListBase_iterator baseIter
)
iterator(LListBase_iterator baseIter)
:
LListBase_iterator(baseIter)
{}
......@@ -282,20 +279,14 @@ public:
public:
//- Construct from base const_iterator
const_iterator
(
LListBase_const_iterator baseIter
)
const_iterator(LListBase_const_iterator baseIter)
:
LListBase_const_iterator(baseIter)
{}
//- Construct from base iterator
const_iterator
(
LListBase_iterator baseIter
)
const_iterator(LListBase_iterator baseIter)
:
LListBase_const_iterator(baseIter)
{}
......
......@@ -64,7 +64,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
{
if (delimiter == token::BEGIN_LIST)
{
for (register label i=0; i<s; i++)
for (register label i=0; i<s; ++i)
{
T element;
is >> element;
......@@ -76,7 +76,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
T element;
is >> element;
for (register label i=0; i<s; i++)
for (register label i=0; i<s; ++i)
{
L.append(element);
}
......
......@@ -34,7 +34,7 @@ Foam::LPtrList<LListBase, T>::LPtrList(const LPtrList<LListBase, T>& lst)
{
for (const_iterator iter = lst.begin(); iter != lst.end(); ++iter)
{
append(iter().clone().ptr());
this->append(iter().clone().ptr());
}
}
......@@ -44,7 +44,7 @@ Foam::LPtrList<LListBase, T>::LPtrList(const LPtrList<LListBase, T>& lst)
template<class LListBase, class T>
Foam::LPtrList<LListBase, T>::~LPtrList()
{
clear();
this->clear();
}
......@@ -69,8 +69,8 @@ bool Foam::LPtrList<LListBase, T>::eraseHead()
template<class LListBase, class T>
void Foam::LPtrList<LListBase, T>::clear()
{
label oldSize = this->size();
for (label i=0; i<oldSize; i++)
const label oldSize = this->size();
for (label i=0; i<oldSize; ++i)
{
eraseHead();
}
......@@ -96,7 +96,7 @@ void Foam::LPtrList<LListBase, T>::operator=(const LPtrList<LListBase, T>& lst)
for (const_iterator iter = lst.begin(); iter != lst.end(); ++iter)
{
append(iter().clone().ptr());
this->append(iter().clone().ptr());
}
}
......
......@@ -63,7 +63,7 @@ Ostream& operator<<
/*---------------------------------------------------------------------------*\
Class LPtrList Declaration
Class LPtrList Declaration
\*---------------------------------------------------------------------------*/
template<class LListBase, class T>
......@@ -75,7 +75,7 @@ class LPtrList
//- Read from Istream using given Istream constructor class
template<class INew>
void read(Istream&, const INew& inewt);
void read(Istream&, const INew&);
public:
......@@ -188,10 +188,7 @@ public:
public:
//- Construct from base iterator
iterator
(
LListBase_iterator baseIter
)
iterator(LListBase_iterator baseIter)
:
LList<LListBase, T*>::iterator(baseIter)
{}
......@@ -224,19 +221,13 @@ public:
public:
//- Construct from base const_iterator
const_iterator
(
LListBase_const_iterator baseIter
)
const_iterator(LListBase_const_iterator baseIter)
:
LList<LListBase, T*>::const_iterator(baseIter)
{}
//- Construct from base iterator
const_iterator
(
LListBase_iterator baseIter
)
const_iterator(LListBase_iterator baseIter)
:
LList<LListBase, T*>::const_iterator(baseIter)
{}
......
......@@ -58,9 +58,9 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
{
if (delimiter == token::BEGIN_LIST)
{
for (label i=0; i<s; i++)
for (label i=0; i<s; ++i)
{
append(iNew(is).ptr());
this->append(iNew(is).ptr());
is.fatalCheck
(
......@@ -72,7 +72,7 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
else
{
T* tPtr = iNew(is).ptr();
append(tPtr);
this->append(tPtr);
is.fatalCheck
(
......@@ -80,7 +80,7 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
"reading entry"
);
for (label i=1; i<s; i++)
for (label i=1; i<s; ++i)
{
append(tPtr->clone().ptr());
}
......@@ -114,7 +114,7 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
)
{
is.putBack(lastToken);
append(iNew(is).ptr());
this->append(iNew(is).ptr());
is >> lastToken;
is.fatalCheck
......@@ -144,14 +144,14 @@ template<class LListBase, class T>
template<class INew>
Foam::LPtrList<LListBase, T>::LPtrList(Istream& is, const INew& iNew)
{
read(is, iNew);
this->read(is, iNew);
}
template<class LListBase, class T>
Foam::LPtrList<LListBase, T>::LPtrList(Istream& is)
{
read(is, INew<T>());
this->read(is, INew<T>());
}
......
......@@ -32,7 +32,7 @@ Foam::UILList<LListBase, T>::UILList(const UILList<LListBase, T>& lst)
{
for (const_iterator iter = lst.begin(); iter != lst.end(); ++iter)
{
append(&iter());
this->append(&iter());
}
}
......@@ -46,7 +46,7 @@ void Foam::UILList<LListBase, T>::operator=(const UILList<LListBase, T>& rhs)
for (const_iterator iter = rhs.begin(); iter != rhs.end(); ++iter)
{
append(&iter());
this->append(&iter());
}
}
......
......@@ -181,10 +181,7 @@ public:
public:
//- Construct from base iterator
iterator
(
LListBase_iterator baseIter
)
iterator(LListBase_iterator baseIter)
:
LListBase_iterator(baseIter)
{}
......@@ -223,19 +220,13 @@ public:
public:
//- Construct from base const_iterator
const_iterator
(
LListBase_const_iterator baseIter
)
const_iterator(LListBase_const_iterator baseIter)
:
LListBase_const_iterator(baseIter)
{}
//- Construct from base iterator
const_iterator
(
LListBase_iterator baseIter
)
const_iterator(LListBase_iterator baseIter)
:
LListBase_const_iterator(baseIter)
{}
......
......@@ -26,6 +26,7 @@ Class
Description
A FIFO stack based on a singly-linked list.
Operations are push(), pop(), top(), bottom() and empty().
SourceFiles
......
......@@ -26,6 +26,7 @@ Class
Description
A LIFO stack based on a singly-linked list.
Operations are push(), pop(), top(), bottom() and empty().
SourceFiles
......
......@@ -459,7 +459,7 @@ void DimensionedField<Type, GeoMesh>::operator=
checkField(*this, df, "=");
dimensions_ = df.dimensions();
transfer(const_cast<DimensionedField<Type, GeoMesh>&>(df));
this->transfer(const_cast<DimensionedField<Type, GeoMesh>&>(df));
tdf.clear();
}
......
......@@ -39,7 +39,7 @@ void Foam::DimensionedField<Type, GeoMesh>::readField
dimensions_.reset(dimensionSet(fieldDict.lookup("dimensions")));
Field<Type> f(fieldDictEntry, fieldDict, GeoMesh::size(mesh_));
transfer(f);
this->transfer(f);
}
......
......@@ -53,7 +53,7 @@ GeometricBoundaryField
forAll(bmesh_, patchi)
{
set
this->set
(
patchi,
PatchField<Type>::New
......@@ -112,7 +112,7 @@ GeometricBoundaryField
{
forAll(bmesh_, patchi)
{
set