STYLE: use word methods to obtain IOobject member/group

This commit is contained in:
Mark Olesen 2017-10-23 09:56:34 +02:00
parent e1167d9592
commit 0adf8d0a7e

View File

@ -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();
}