From b8839a7ba64fb8b6755abca37850b1d3b03140b9 Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 31 Mar 2011 11:56:33 +0100 Subject: [PATCH] Intel icpc compiler: made a few random changes to keep the Intel compiler happy --- .../Lists/PackedList/PackedBoolList.C | 2 +- .../Lists/PackedList/PackedBoolList.H | 2 +- .../Lists/PackedList/PackedBoolListI.H | 2 +- .../IOobjects/CompactIOField/CompactIOField.H | 21 +------------------ .../db/IOobjects/IOdictionary/IOdictionary.C | 6 ++---- .../fields/Fields/DynamicField/DynamicField.H | 18 +--------------- .../decompose/ptscotchDecomp/ptscotchDecomp.C | 2 +- 7 files changed, 8 insertions(+), 45 deletions(-) diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C index 94d6308658..3b51bc10ff 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.C @@ -287,7 +287,7 @@ Foam::Xfer Foam::PackedBoolList::used() const // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // Foam::PackedBoolList& -Foam::PackedBoolList::operator=(const UList& lst) +Foam::PackedBoolList::operator=(const Foam::UList& lst) { this->setSize(lst.size()); diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H index f9948d719a..697c7983c1 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolList.H @@ -115,7 +115,7 @@ public: inline PackedBoolList(const Xfer >&); //- Construct from a list of bools - explicit inline PackedBoolList(const UList&); + explicit inline PackedBoolList(const Foam::UList&); //- Construct from a list of labels // using the labels as indices to indicate which bits are set diff --git a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H index 219fb79b37..f781b7370f 100644 --- a/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H +++ b/src/OpenFOAM/containers/Lists/PackedList/PackedBoolListI.H @@ -73,7 +73,7 @@ inline Foam::PackedBoolList::PackedBoolList(const Xfer >& lst) {} -inline Foam::PackedBoolList::PackedBoolList(const UList& lst) +inline Foam::PackedBoolList::PackedBoolList(const Foam::UList& lst) : PackedList<1>() { diff --git a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H index f7622cae55..ffd2dcd21b 100644 --- a/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H +++ b/src/OpenFOAM/db/IOobjects/CompactIOField/CompactIOField.H @@ -47,9 +47,6 @@ SourceFiles namespace Foam { -class Istream; -class Ostream; - // Forward declaration of friend functions and operators template class CompactIOField; @@ -58,6 +55,7 @@ template Istream& operator>> Istream&, CompactIOField& ); + template Ostream& operator<< ( Ostream&, @@ -122,23 +120,6 @@ public: void operator=(const CompactIOField&); void operator=(const Field&); - - - // IOstream operators - - //- Read Field from Istream, discarding contents of existing Field. - friend Istream& operator>> - ( - Istream&, - CompactIOField& - ); - - // Write Field to Ostream. - friend Ostream& operator<< - ( - Ostream&, - const CompactIOField& - ); }; diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C index 0954a23a7e..2c5087c120 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C @@ -124,16 +124,14 @@ Foam::IOdictionary::IOdictionary(const IOobject& io) regIOobject(io) { // Temporary warning - if (io.readOpt() == IOobject::MUST_READ) + if (debug && io.readOpt() == IOobject::MUST_READ) { WarningIn("IOdictionary::IOdictionary(const IOobject&)") - //FatalErrorIn("IOdictionary::IOdictionary(const IOobject&)") << "Dictionary " << name() << " constructed with IOobject::MUST_READ" " instead of IOobject::MUST_READ_IF_MODIFIED." << nl << "Use MUST_READ_IF_MODIFIED if you need automatic rereading." << endl; - //<< abort(FatalError); } // Everyone check or just master @@ -182,7 +180,7 @@ Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict) regIOobject(io) { // Temporary warning - if (io.readOpt() == IOobject::MUST_READ) + if (debug && io.readOpt() == IOobject::MUST_READ) { WarningIn ( diff --git a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H index e1870f4f47..bafba9f877 100644 --- a/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H +++ b/src/OpenFOAM/fields/Fields/DynamicField/DynamicField.H @@ -55,6 +55,7 @@ Ostream& operator<< Ostream&, const DynamicField& ); + template Istream& operator>> ( @@ -234,23 +235,6 @@ public: //- Assignment from UList inline void operator=(const UList&); - - - // IOstream operators - - // Write DynamicField to Ostream. - friend Ostream& operator<< - ( - Ostream&, - const DynamicField& - ); - - //- Read from Istream, discarding contents of existing DynamicField. - friend Istream& operator>> - ( - Istream&, - DynamicField& - ); }; diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index 7478de9c9a..414e113ec8 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -282,7 +282,7 @@ Foam::label Foam::ptscotchDecomp::decomposeZeroDomains << ( cWeights.size() - ? scalarField::subField(cWeights, nCells, startCell) + ? static_cast(scalarField::subField(cWeights, nCells, startCell)) : scalarField(0) );