Commit ddbb9c06 authored by h.weller@opencfd.co.uk's avatar h.weller@opencfd.co.uk Committed by graham
Browse files

Updates to remove warning messages from gcc-4.3.1

parent 604527dc
......@@ -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_;
}
......
Supports Markdown
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