Make GenericPath.parentPath pure.
This commit is contained in:
parent
7c609dd07f
commit
f6b97b04c3
|
@ -478,7 +478,7 @@ struct GenericPath(F) {
|
||||||
GenericPath parentPath()
|
GenericPath parentPath()
|
||||||
const @nogc {
|
const @nogc {
|
||||||
auto b = Format.getBackNode(m_path);
|
auto b = Format.getBackNode(m_path);
|
||||||
static const Exception e = new Exception("Path has no parent path");
|
static immutable Exception e = new Exception("Path has no parent path");
|
||||||
if (b.length >= m_path.length) throw e;
|
if (b.length >= m_path.length) throw e;
|
||||||
return GenericPath.fromTrustedString(m_path[0 .. $ - b.length]);
|
return GenericPath.fromTrustedString(m_path[0 .. $ - b.length]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue