Commit e6c79ce2 authored by Mark Olesen's avatar Mark Olesen
Browse files

STYLE: use word methods to obtain IOobject member/group

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