Commit 1efdd657 authored by henry's avatar henry
Browse files

Updates to remove warning messages from gcc-4.3.1

parent e17c195c
......@@ -123,8 +123,8 @@ public:
{
return
(
(a.first() == b.first()) && (a.second() == b.second())
|| (a.first() == b.second()) && (a.second() == b.first())
((a.first() == b.first()) && (a.second() == b.second()))
|| ((a.first() == b.second()) && (a.second() == b.first()))
);
}
......@@ -143,7 +143,7 @@ private:
// Private data
//- Dictionary of phases
//- Dictionary of phases
PtrDictionary<phase> phases_;
//- The phase chosen as reference, the one which is derived from
......
......@@ -30,29 +30,24 @@ License
#include "PtrListLoopM.H"
#include "SLPtrList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
template<class T>
PtrList<T>::PtrList()
Foam::PtrList<T>::PtrList()
:
ptrs_()
{}
template<class T>
PtrList<T>::PtrList(const label s)
Foam::PtrList<T>::PtrList(const label s)
:
ptrs_(s, reinterpret_cast<T*>(NULL))
{}
template<class T>
PtrList<T>::PtrList(const PtrList<T>& a)
Foam::PtrList<T>::PtrList(const PtrList<T>& a)
:
ptrs_(a.size())
{
......@@ -65,7 +60,7 @@ PtrList<T>::PtrList(const PtrList<T>& a)
template<class T>
template<class CloneArg>
PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg)
Foam::PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg)
:
ptrs_(a.size())
{
......@@ -77,7 +72,7 @@ PtrList<T>::PtrList(const PtrList<T>& a, const CloneArg& cloneArg)
template<class T>
PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
Foam::PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
:
ptrs_(a.size())
{
......@@ -101,7 +96,7 @@ PtrList<T>::PtrList(PtrList<T>& a, bool reUse)
template<class T>
PtrList<T>::PtrList(const SLPtrList<T>& sll)
Foam::PtrList<T>::PtrList(const SLPtrList<T>& sll)
:
ptrs_(sll.size())
{
......@@ -124,7 +119,7 @@ PtrList<T>::PtrList(const SLPtrList<T>& sll)
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
template<class T>
PtrList<T>::~PtrList()
Foam::PtrList<T>::~PtrList()
{
forAll(*this, i)
{
......@@ -139,8 +134,15 @@ PtrList<T>::~PtrList()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class T>
void PtrList<T>::setSize(const label newSize)
void Foam::PtrList<T>::setSize(const label newSize)
{
if (newSize < 0)
{
FatalErrorIn("PtrList<T>::setSize(const label)")
<< "bad set size " << newSize
<< abort(FatalError);
}
label oldSize = size();
if (newSize == 0)
......@@ -160,7 +162,7 @@ void PtrList<T>::setSize(const label newSize)
ptrs_.setSize(newSize);
}
else if (newSize > oldSize)
else // newSize > oldSize
{
ptrs_.setSize(newSize);
......@@ -174,7 +176,7 @@ void PtrList<T>::setSize(const label newSize)
template<class T>
void PtrList<T>::clear()
void Foam::PtrList<T>::clear()
{
forAll(*this, i)
{
......@@ -189,7 +191,7 @@ void PtrList<T>::clear()
template<class T>
void PtrList<T>::transfer(PtrList<T>& a)
void Foam::PtrList<T>::transfer(PtrList<T>& a)
{
clear();
ptrs_.transfer(a.ptrs_);
......@@ -197,7 +199,7 @@ void PtrList<T>::transfer(PtrList<T>& a)
template<class T>
void PtrList<T>::reorder(const UList<label>& oldToNew)
void Foam::PtrList<T>::reorder(const UList<label>& oldToNew)
{
if (oldToNew.size() != size())
{
......@@ -247,7 +249,7 @@ void PtrList<T>::reorder(const UList<label>& oldToNew)
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class T>
PtrList<T>& PtrList<T>::operator=(const PtrList<T>& a)
Foam::PtrList<T>& Foam::PtrList<T>::operator=(const PtrList<T>& a)
{
if (this == &a)
{
......@@ -284,10 +286,6 @@ PtrList<T>& PtrList<T>::operator=(const PtrList<T>& a)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "PtrListIO.C"
......
......@@ -85,7 +85,7 @@ void Foam::fvMeshDistribute::addPatchFields(const word& patchFieldType)
);
label sz = bfld.size();
bfld.setSize(sz+1);
bfld.setSize(sz + 1);
bfld.set
(
sz,
......@@ -124,10 +124,8 @@ void Foam::fvMeshDistribute::deleteTrailingPatchFields()
fld.boundaryField()
);
label sz = bfld.size();
// Shrink patchFields
bfld.setSize(sz-1);
bfld.setSize(bfld.size() - 1);
}
}
......
......@@ -196,7 +196,7 @@ public:
const triSurfaceMeshes& surfaces() const;
//- Mode of projection/following
const followMode projectMode() const
followMode projectMode() const
{
return projectMode_;
}
......
......@@ -123,7 +123,7 @@ public:
// Access
inline const label averagesTaken() const;
inline label averagesTaken() const;
inline label nBuffers() const;
......
......@@ -46,7 +46,7 @@ inline const Field<Type>& bufferedAccumulator<Type>::accumulationBuffer() const
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
inline const label bufferedAccumulator<Type>::averagesTaken() const
inline label bufferedAccumulator<Type>::averagesTaken() const
{
return averagesTaken_;
}
......
......@@ -141,13 +141,13 @@ public:
inline const Field< Field<Type> >& tZeroBuffers() const;
inline const scalar duration() const;
inline scalar duration() const;
inline const scalar sampleInterval() const;
inline scalar sampleInterval() const;
inline const scalar averagingInterval() const;
inline scalar averagingInterval() const;
inline const label sampleSteps() const;
inline label sampleSteps() const;
inline label measurandFieldSize() const;
......
......@@ -33,28 +33,28 @@ tZeroBuffers() const
template<class Type>
inline const scalar Foam::correlationFunction<Type>::duration() const
inline scalar Foam::correlationFunction<Type>::duration() const
{
return duration_;
}
template<class Type>
inline const scalar Foam::correlationFunction<Type>::sampleInterval() const
inline scalar Foam::correlationFunction<Type>::sampleInterval() const
{
return sampleInterval_;
}
template<class Type>
inline const scalar Foam::correlationFunction<Type>::averagingInterval() const
inline scalar Foam::correlationFunction<Type>::averagingInterval() const
{
return averagingInterval_;
}
template<class Type>
inline const label Foam::correlationFunction<Type>::sampleSteps() const
inline label Foam::correlationFunction<Type>::sampleSteps() const
{
return sampleSteps_;
}
......
......@@ -94,17 +94,17 @@ public:
void insertMissingKeys();
List< Pair<scalar> > normalised();
List<Pair<scalar> > normalised();
List< Pair<scalar> > normalisedMinusMean();
List<Pair<scalar> > normalisedMinusMean();
List< Pair<scalar> > normalisedShifted(const scalar shiftValue);
List<Pair<scalar> > normalisedShifted(const scalar shiftValue);
List< Pair<scalar> > raw();
List<Pair<scalar> > raw();
// Access
inline const scalar binWidth() const;
inline scalar binWidth() const;
// Member Operators
......
......@@ -24,19 +24,12 @@ License
\*---------------------------------------------------------------------------*/
namespace Foam
{
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline const scalar distribution::binWidth() const
inline Foam::scalar Foam::distribution::binWidth() const
{
return binWidth_;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -166,10 +166,10 @@ public:
// Access
//- Return id
inline const label id() const;
inline label id() const;
//- Return mass
inline const scalar mass() const;
inline scalar mass() const;
//- Return velocity
inline const vector& U() const;
......@@ -180,7 +180,7 @@ public:
inline vector& A();
//- Return potential energy
inline const scalar potentialEnergy() const;
inline scalar potentialEnergy() const;
inline scalar& potentialEnergy();
//- Return stress contribution
......@@ -188,7 +188,7 @@ public:
inline tensor& rf();
//- Return tethered
inline const label tethered() const;
inline label tethered() const;
//- Return tetherPosition
inline const vector& tetherPosition() const;
......
......@@ -24,12 +24,9 @@ License
\*---------------------------------------------------------------------------*/
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
inline molecule::molecule
inline Foam::molecule::molecule
(
const Cloud<molecule>& c,
const vector& position,
......@@ -54,7 +51,7 @@ inline molecule::molecule
{}
inline molecule::trackData::trackData
inline Foam::molecule::trackData::trackData
(
moleculeCloud& molCloud,
label part
......@@ -68,92 +65,88 @@ inline molecule::trackData::trackData
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
inline const label molecule::id() const
inline Foam::label Foam::molecule::id() const
{
return id_;
}
inline const scalar molecule::mass() const
inline Foam::scalar Foam::molecule::mass() const
{
return mass_;
}
inline const vector& molecule::U() const
inline const Foam::vector& Foam::molecule::U() const
{
return U_;
}
inline vector& molecule::U()
inline Foam::vector& Foam::molecule::U()
{
return U_;
}
inline const vector& molecule::A() const
inline const Foam::vector& Foam::molecule::A() const
{
return A_;
}
inline vector& molecule::A()
inline Foam::vector& Foam::molecule::A()
{
return A_;
}
inline const scalar molecule::potentialEnergy() const
inline Foam::scalar Foam::molecule::potentialEnergy() const
{
return potentialEnergy_;
}
inline scalar& molecule::potentialEnergy()
inline Foam::scalar& Foam::molecule::potentialEnergy()
{
return potentialEnergy_;
}
inline const tensor& molecule::rf() const
inline const Foam::tensor& Foam::molecule::rf() const
{
return rf_;
}
inline tensor& molecule::rf()
inline Foam::tensor& Foam::molecule::rf()
{
return rf_;
}
inline const label molecule::tethered() const
inline Foam::label Foam::molecule::tethered() const
{
return tethered_;
}
inline const vector& molecule::tetherPosition() const
inline const Foam::vector& Foam::molecule::tetherPosition() const
{
return tetherPosition_;
}
inline moleculeCloud& molecule::trackData::molCloud()
inline Foam::moleculeCloud& Foam::molecule::trackData::molCloud()
{
return molCloud_;
}
inline label molecule::trackData::part() const
inline Foam::label Foam::molecule::trackData::part() const
{
return part_;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -191,9 +191,9 @@ public:
inline scalar guardRadius() const;
inline const scalar rCutMax() const;
inline scalar rCutMax() const;
inline const scalar rCutMaxSqr() const;
inline scalar rCutMaxSqr() const;
inline const List<word>& idList() const;
......
......@@ -56,13 +56,13 @@ inline scalar moleculeCloud::guardRadius() const
}
inline const scalar moleculeCloud::rCutMax() const
inline scalar moleculeCloud::rCutMax() const
{
return rCutMax_;
}
inline const scalar moleculeCloud::rCutMaxSqr() const
inline scalar moleculeCloud::rCutMaxSqr() const
{
return rCutMaxSqr_;
}
......
......@@ -124,21 +124,21 @@ public:
// Access
inline const scalar m() const;
inline scalar m() const;
inline const scalar gamma() const ;
inline scalar gamma() const ;
inline const scalar rm() const;
inline scalar rm() const;
inline const scalar epsilon() const;
inline scalar epsilon() const;
inline const scalar rCut() const;
inline scalar rCut() const;
inline const scalar rCutSqr() const;
inline scalar rCutSqr() const;
inline const scalar rMin() const;
inline scalar rMin() const;
inline const scalar dr() const;
inline scalar dr() const;
// Write
......
......@@ -24,49 +24,49 @@ License
\*---------------------------------------------------------------------------*/
inline const Foam::scalar Foam::pairPotential::m() const
inline Foam::scalar Foam::pairPotential::m() const
{
return m_;
}
inline const Foam::scalar Foam::pairPotential::gamma() const
inline Foam::scalar Foam::pairPotential::gamma() const
{
return gamma_;
}
inline const Foam::scalar Foam::pairPotential::rm() const
inline Foam::scalar Foam::pairPotential::rm() const
{
return rm_;
}
inline const Foam::scalar Foam::pairPotential::epsilon() const
inline Foam::scalar Foam::pairPotential::epsilon() const
{
return epsilon_;
}
inline const Foam::scalar Foam::pairPotential::rCut() const
inline Foam::scalar Foam::pairPotential::rCut() const
{
return rCut_;
}
inline const Foam::scalar Foam::pairPotential::rCutSqr() const
inline Foam::scalar Foam::pairPotential::rCutSqr() const
{
return rCutSqr_;
}
inline const Foam::scalar Foam::pairPotential::rMin() const
inline Foam::scalar Foam::pairPotential::rMin() const
{
return rMin_;
}
inline const Foam::scalar Foam::pairPotential::dr() const
inline Foam::scalar Foam::pairPotential::dr() const
{
return dr_;
}
......
......@@ -127,7 +127,7 @@ bool pairPotentialList::rCutSqr
}
const scalar pairPotentialList::rCutSqr
scalar pairPotentialList::rCutSqr
(
const label a,
const label b
......@@ -137,7 +137,7 @@ const scalar pairPotentialList::rCutSqr
}
const scalar pairPotentialList::rCut
scalar pairPotentialList::rCut
(
const label a,
const label b
......