Skip to content
Snippets Groups Projects
Commit d0cc2813 authored by laurence's avatar laurence
Browse files

BUG: static variable initialisation: Cannot rely on other static variables to...

BUG: static variable initialisation: Cannot rely on other static variables to be initialised when initialising a static variable
parent cf5317d6
Branches
Tags
No related merge requests found
...@@ -32,23 +32,48 @@ License ...@@ -32,23 +32,48 @@ License
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<> template<>
const char* const triad::Vector<vector>::typeName = "triad"; const char* const triad::Vector<vector>::typeName = "triad";
template<> template<>
const char* triad::Vector<vector>::componentNames[] = {"x", "y", "z"}; const char* triad::Vector<vector>::componentNames[] = {"x", "y", "z"};
const triad triad::zero(vector::zero, vector::zero, vector::zero); const triad triad::zero
(
const triad triad::one(vector::one, vector::one, vector::one); vector(0, 0, 0),
vector(0, 0, 0),
const triad triad::max(vector::max, vector::max, vector::max); vector(0, 0, 0)
);
const triad triad::min(vector::min, vector::min, vector::min);
const triad triad::one
(
vector(1, 1, 1),
vector(1, 1, 1),
vector(1, 1, 1)
);
const triad triad::max
(
vector(VGREAT, VGREAT, VGREAT),
vector(VGREAT, VGREAT, VGREAT),
vector(VGREAT, VGREAT, VGREAT)
);
const triad triad::min
(
vector(-VGREAT, -VGREAT, -VGREAT),
vector(-VGREAT, -VGREAT, -VGREAT),
vector(-VGREAT, -VGREAT, -VGREAT)
);
const triad triad::unset
(
vector(VGREAT, VGREAT, VGREAT),
vector(VGREAT, VGREAT, VGREAT),
vector(VGREAT, VGREAT, VGREAT)
);
const triad triad::unset(triad::max); }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
...@@ -348,8 +373,4 @@ void Foam::triad::operator=(const tensor& t) ...@@ -348,8 +373,4 @@ void Foam::triad::operator=(const tensor& t)
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* // // ************************************************************************* //
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