Updates for clang++-3.9

This commit is contained in:
Henry Weller
2017-01-18 18:12:45 +00:00
parent 9d39850df3
commit 63dee8f2da
9 changed files with 25 additions and 18 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,13 +32,13 @@ Description
#ifndef FieldMapper_H
#define FieldMapper_H
#include "mapDistributeBase.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
class mapDistributeBase;
/*---------------------------------------------------------------------------*\
Class FieldMapper Declaration
\*---------------------------------------------------------------------------*/
@ -76,7 +76,7 @@ public:
FatalErrorInFunction
<< "attempt to access null distributeMap"
<< abort(FatalError);
return *static_cast<mapDistributeBase*>(nullptr);
return *(new mapDistributeBase());
}
//- Are there unmapped values? I.e. do all size() elements get

View File

@ -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-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,8 +29,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const Foam::labelRange Foam::labelRange::endLabelRange_;
const Foam::labelRange::const_iterator Foam::labelRange::endIter_;
int Foam::labelRange::debug(::Foam::debug::debugSwitch("labelRange", 0));

View File

@ -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-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,6 +31,7 @@ SourceFiles
labelRange.C
\*---------------------------------------------------------------------------*/
#ifndef labelRange_H
#define labelRange_H
@ -79,6 +80,7 @@ public:
}
};
// Constructors
//- Construct an empty range
@ -196,9 +198,11 @@ public:
private:
//- const labelRange held by endIter_
static const labelRange endLabelRange_;
//- const_iterator returned by end(), cend()
static const const_iterator endIter_;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ inline Foam::labelRange::labelRange(const label start, const label size)
inline Foam::labelRange::const_iterator::const_iterator()
:
range_(*reinterpret_cast<Foam::labelRange* >(0)),
range_(endLabelRange_),
index_(-1)
{}

View File

@ -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-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,6 +28,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const Foam::labelRanges Foam::labelRanges::endLabelRanges_;
const Foam::labelRanges::const_iterator Foam::labelRanges::endIter_;

View File

@ -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-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -170,9 +170,11 @@ public:
private:
//- const labelRanges held by endIter_
static const labelRanges endLabelRanges_;
//- const_iterator returned by end(), cend()
static const const_iterator endIter_;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,7 +42,7 @@ inline Foam::labelRanges::labelRanges(const label nElem)
inline Foam::labelRanges::const_iterator::const_iterator()
:
list_(*reinterpret_cast<Foam::labelRanges* >(0)),
list_(endLabelRanges_),
index_(-1),
subIndex_(-1)
{}

View File

@ -1,6 +1,6 @@
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-c++11-extensions
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-undefined-var-template
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-tautological-undefined-compare -Wno-shift-negative-value

View File

@ -1,9 +1,9 @@
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-c++11-extensions
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-undefined-var-template
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedef -Wno-tautological-undefined-compare -Wno-shift-negative-value
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-tautological-undefined-compare -Wno-shift-negative-value
CC = clang++ -std=c++11 -m32