fs/Path: use base class StringPointer
This commit is contained in:
@@ -37,14 +37,10 @@ class AllocatedPath;
|
||||
* This class manages a pointer to an existing path string. While an
|
||||
* instance lives, the string must not be invalidated.
|
||||
*/
|
||||
class Path {
|
||||
typedef PathTraitsFS::value_type value_type;
|
||||
typedef PathTraitsFS::pointer pointer;
|
||||
typedef PathTraitsFS::const_pointer const_pointer;
|
||||
class Path : public PathTraitsFS::Pointer {
|
||||
typedef PathTraitsFS::Pointer Base;
|
||||
|
||||
const_pointer value;
|
||||
|
||||
constexpr Path(const_pointer _value):value(_value) {}
|
||||
constexpr Path(const_pointer _value):Base(_value) {}
|
||||
|
||||
public:
|
||||
/**
|
||||
@@ -80,7 +76,7 @@ public:
|
||||
* must not be used.
|
||||
*/
|
||||
bool IsNull() const {
|
||||
return value == nullptr;
|
||||
return Base::IsNull();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +85,7 @@ public:
|
||||
* @see IsNull()
|
||||
*/
|
||||
void SetNull() {
|
||||
value = nullptr;
|
||||
*this = nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,7 +106,7 @@ public:
|
||||
*/
|
||||
gcc_pure
|
||||
const_pointer c_str() const {
|
||||
return value;
|
||||
return Base::c_str();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user