STYLE: use word methods to obtain IOobject member/group
This commit is contained in:
parent
e1167d9592
commit
0adf8d0a7e
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user