Skip to content
Snippets Groups Projects
Commit 09c1621a authored by Mark OLESEN's avatar Mark OLESEN
Browse files

BUG: incorrect IOobject instance for absolute windows path (#1238)

STYLE: remove unused local variables in edgeMeshFormat
parent c9d0fefd
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -30,6 +30,9 @@ License
#if defined WM_SP
# define PRECISION "SP"
# define SCALAR_SIZE (8*sizeof(float))
#elif defined(WM_SPDP)
# define PRECISION "SPDP"
# define SCALAR_SIZE (8*sizeof(float))
#elif defined WM_DP
# define PRECISION "DP"
# define SCALAR_SIZE (8*sizeof(double))
......@@ -38,9 +41,23 @@ License
# define SCALAR_SIZE (8*sizeof(long double))
#endif
// Test additional exported symbols
#ifdef _WIN32
#define defineWindowsLibEntryPoint(libName) \
extern "C" void lib_##libName##_entry_point() {}
#else
#define defineWindowsLibEntryPoint(libName) /* Nothing */
#endif
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// The 'extern C' export is independent of namespace
namespace Foam
{
defineWindowsLibEntryPoint(dummyLib);
}
const std::string Foam::Detail::dummyLib::arch(WM_ARCH);
const std::string Foam::Detail::dummyLib::compiler(WM_COMPILER);
......
......@@ -160,10 +160,10 @@ bool Foam::IOobject::fileNameComponents
#endif
)
{
// Absolute path (starts with '/')
// Absolute path (starts with '/' or 'd:/')
// => no local
instance = path.substr(first, last);
instance = path.substr(0, last);
const std::string ending = path.substr(last+1);
nameLen = ending.size(); // The raw length of name
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2011-2017 OpenFOAM Foundation
......@@ -52,10 +52,6 @@ bool Foam::fileFormats::edgeMeshFormat::read
{
clear();
fileName dir = filename.path();
fileName caseName = dir.name();
fileName rootPath = dir.path();
// Construct dummy time to use as an objectRegistry
Time dummyTime
(
......@@ -117,10 +113,7 @@ bool Foam::fileFormats::edgeMeshFormat::read
<< exit(FatalError);
}
// read points:
is >> pointLst;
// read edges:
is >> edgeLst;
return true;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2013-2017 OpenFOAM Foundation
......@@ -50,10 +50,6 @@ bool Foam::fileFormats::extendedEdgeMeshFormat::read
{
clear();
fileName dir = filename.path();
fileName caseName = dir.name();
fileName rootPath = dir.path();
// Construct dummy time to use as an objectRegistry
Time dummyTime
(
......
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