diff --git a/src/fileFormats/ensight/file/ensightGeoFile.C b/src/fileFormats/ensight/file/ensightGeoFile.C index c38fd489e3..0989c112ec 100644 --- a/src/fileFormats/ensight/file/ensightGeoFile.C +++ b/src/fileFormats/ensight/file/ensightGeoFile.C @@ -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"); diff --git a/src/fileFormats/vtk/output/foamVtkOutput.C b/src/fileFormats/vtk/output/foamVtkOutput.C index 25eeb50148..a6858aaad6 100644 --- a/src/fileFormats/vtk/output/foamVtkOutput.C +++ b/src/fileFormats/vtk/output/foamVtkOutput.C @@ -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) {