Commit edbb6a12 authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

STYLE: use foamVersion::api instead of OPENFOAM define for string output

parent 7a75b9c0
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011 OpenFOAM Foundation
......@@ -26,7 +26,7 @@ License
\*---------------------------------------------------------------------------*/
#include "ensightGeoFile.H"
#include "macros.H"
#include "foamVersion.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
......@@ -39,11 +39,7 @@ void Foam::ensightGeoFile::initialize()
newline();
// Description line 2
#if OPENFOAM
write("Written by OpenFOAM " STRING_QUOTE(OPENFOAM));
#else
write("Written by OpenFOAM");
#endif
write(string("Written by OpenFOAM " + std::to_string(foamVersion::api)));
newline();
write("node id assign");
......
......@@ -32,6 +32,7 @@ License
#include "foamVtkAppendRawFormatter.H"
#include "foamVtkLegacyAsciiFormatter.H"
#include "foamVtkLegacyRawFormatter.H"
#include "foamVersion.H"
#include "typeInfo.H"
#include "globalIndex.H"
#include "instant.H"
......@@ -234,12 +235,7 @@ void Foam::vtk::legacy::fileHeader
if (title.empty() || 0 == truncate)
{
// Avoid an empty title
os << "File generated by OpenFOAM";
#if OPENFOAM
os << ' ' << OPENFOAM;
#endif
os << nl;
os << "File generated by OpenFOAM " << foamVersion::api << nl;
}
else if (std::string::npos == truncate)
{
......
Markdown is supported
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