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

STYLE: use word methods to obtain IOobject member/group

parent 6de8df50
Branches
Tags
No related merge requests found
...@@ -374,31 +374,13 @@ const Foam::fileName& Foam::IOobject::caseName() const ...@@ -374,31 +374,13 @@ const Foam::fileName& Foam::IOobject::caseName() const
Foam::word Foam::IOobject::group() const Foam::word Foam::IOobject::group() const
{ {
const auto i = name_.rfind('.'); return name_.ext();
if (i == std::string::npos || i == 0)
{
return word::null;
}
else
{
return name_.substr(i+1);
}
} }
Foam::word Foam::IOobject::member() const Foam::word Foam::IOobject::member() const
{ {
const auto i = name_.rfind('.'); return name_.lessExt();
if (i == std::string::npos || i == 0)
{
return name_;
}
else
{
return name_.substr(0, i);
}
} }
......
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