Commit 94401af0 authored by Henry Weller's avatar Henry Weller
Browse files

Resolved issues with virtual function inheritance and warning from clang

Also removed __GNUC__ conditional compilation statements which are no
longer needed.
parent f3f35e8f
......@@ -155,6 +155,9 @@ public:
//- Return the momentum drag turbulence generation rate
virtual tmp<volScalarField> Gk() const = 0;
//- Inherit read from regIOobject
using regIOobject::read;
//- Update properties from given dictionary
virtual bool read(const dictionary& PDRProperties) = 0;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -211,6 +211,9 @@ public:
//- Correct the phase properties
void correct();
//-Inherit read from volScalarField
using volScalarField::read;
//- Read base transportProperties dictionary
bool read(const dictionary& phaseDict);
};
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -144,6 +144,9 @@ public:
//- Correct the phase properties
void correct();
//-Inherit read from volScalarField
using volScalarField::read;
//- Read base transportProperties dictionary
bool read(const dictionary& phaseDict);
};
......
......@@ -186,7 +186,6 @@ mtype {space}"MTYPE:"{space}
label curNumberOfNodes = 0;
label curNumberOfCells = 0;
label curGroupID = 0;
label nFlagsForStream = 0;
label curBoundaryPatch = 0;
label curPatchFace = 0;
%}
......@@ -478,7 +477,7 @@ mtype {space}"MTYPE:"{space}
IStringStream nFlagsStream(YYText());
nFlagsForStream = readLabel(nFlagsStream);
readLabel(nFlagsStream);
BEGIN(cellStreamTitle);
}
......@@ -510,7 +509,6 @@ mtype {space}"MTYPE:"{space}
// reset current group ID and a number of flags
curGroupID = 0;
nFlagsForStream = 0;
}
......@@ -522,7 +520,6 @@ mtype {space}"MTYPE:"{space}
// reset current group ID and a number of flags
curGroupID = 0;
nFlagsForStream = 0;
BEGIN(INITIAL);
}
......
......@@ -426,7 +426,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size())
for
(
;
iterf != pFaces[WEDGE][0].end(), iterb != pFaces[WEDGE][1].end();
iterf != pFaces[WEDGE][0].end() && iterb != pFaces[WEDGE][1].end();
++iterf, ++iterb
)
{
......@@ -585,4 +585,3 @@ Info << "Writing cell zoning info to file: " << czPath << endl;
OFstream cz(czPath);
cz << cellZoning << endl;
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -37,8 +37,6 @@ void Foam::addToFieldList
const typename GeoField::Mesh& mesh
)
{
typedef GeoField fieldType;
if (obj.headerClassName() == GeoField::typeName)
{
fieldList.set
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -81,6 +81,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -88,6 +88,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -104,6 +104,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -108,6 +108,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -108,6 +108,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -98,6 +98,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -102,6 +102,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -110,6 +110,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -71,6 +71,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -102,6 +102,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -103,6 +103,9 @@ public:
// Member Functions
//- Inherit solve from ODESolver
using ODESolver::solve;
//- Solve a single step dx and return the error
scalar solve
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -71,25 +71,21 @@ class sigFpe
//- Saved old signal trapping setting
static struct sigaction oldAction_;
# ifdef LINUX
#ifdef LINUX
//- Saved old malloc
static void *(*oldMallocHook_)(size_t, const void *);
//- NaN malloc function. From malloc_hook manpage.
static void* nanMallocHook_(size_t size, const void *caller);
# endif
#endif
// Static data members
# ifdef LINUX_GNUC
#ifdef LINUX_GNUC
//- Handler for caught signals
static void sigHandler(int);
# endif
#endif
public:
......@@ -113,7 +109,6 @@ public:
//- Helper: fill block of data with NaN
static void fillSignallingNan(UList<scalar>&);
};
......
......@@ -431,9 +431,7 @@ public:
};
#if defined (__GNUC__)
template<>
#endif
Ostream& operator<<(Ostream& os, const InfoProxy<IOobject>& ip);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -21,11 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Print a summary of the data described by the IOobject (for
use in erroring, etc.) via the global 'Info' error
mechanism.
\*---------------------------------------------------------------------------*/
#include "IOobject.H"
......@@ -33,9 +28,7 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#if defined (__GNUC__)
template<>
#endif
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<IOobject>& ip)
{
const IOobject& io = ip.t_;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -227,20 +227,12 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const IOstream::versionNumber& vn)
}
namespace Foam
template<>
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<IOstream>& ip)
{
# if defined (__GNUC__)
template<>
# endif
Ostream& operator<<(Ostream& os, const InfoProxy<IOstream>& ip)
{
ip.t_.print(os);
return os;
}
} // end namespace
ip.t_.print(os);
return os;
}
// ************************************************************************* //
......@@ -52,10 +52,6 @@ SourceFiles
#include <iostream>
#if __GNUC__ < 3
# define ios_base ios
#endif
using std::ios_base;
using std::istream;
using std::ostream;
......@@ -543,6 +539,9 @@ public:
Ostream& operator<<(Ostream& os, const IOstream::streamFormat& sf);
Ostream& operator<<(Ostream& os, const IOstream::versionNumber& vn);
template<>
Ostream& operator<<(Ostream& os, const InfoProxy<IOstream>& ip);
// --------------------------------------------------------------------
// ------ Manipulators (not taking arguments)
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -119,11 +119,7 @@ public:
//- Rewind the OStringStream
void rewind()
{
#if __GNUC__ < 4 && __GNUC_MINOR__ < 4
stdStream().rdbuf()->pubsetbuf(" ", 1);
#else
stdStream().rdbuf()->pubseekpos(0);
#endif
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -433,9 +433,12 @@ public:
Ostream& operator<<(Ostream&, const token::punctuationToken&);
ostream& operator<<(ostream&, const token::punctuationToken&);
ostream& operator<<(ostream&, const InfoProxy<token>&);
Ostream& operator<<(Ostream&, const token::compound&);
ostream& operator<<(ostream&, const InfoProxy<token>&);
template<>
Ostream& operator<<(Ostream& os, const InfoProxy<token>& ip);
#define defineCompoundTypeName(Type, Name) \
defineTemplateTypeNameAndDebugWithName(token::Compound<Type>, #Type, 0);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -21,9 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Stream operators for token
\*---------------------------------------------------------------------------*/
#include "error.H"
......@@ -209,14 +206,8 @@ ostream& Foam::operator<<(ostream& os, const InfoProxy<token>& ip)
}
// template specialization
namespace Foam
{
#if defined (__GNUC__)
template<>
#endif
Ostream& operator<<(Ostream& os, const InfoProxy<token>& ip)
Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<token>& ip)
{
const token& t = ip.t_;
......@@ -287,8 +278,4 @@ Ostream& operator<<(Ostream& os, const InfoProxy<token>& ip)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -21,9 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
DictionaryEntry constructor from Istream and Ostream output operator.
\*---------------------------------------------------------------------------*/
#include "keyType.H"
......@@ -87,9 +84,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const dictionaryEntry& de)
}
#if defined (__GNUC__)
template<>
#endif
Foam::Ostream& Foam::operator<<
(
Ostream& os,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -127,6 +127,9 @@ public:
// Member functions