fs/AllocatedPath: add FromFS() with pointer range
This commit is contained in:
@@ -48,6 +48,9 @@ class AllocatedPath {
|
|||||||
AllocatedPath(std::nullptr_t):value() {}
|
AllocatedPath(std::nullptr_t):value() {}
|
||||||
explicit AllocatedPath(const_pointer_type _value):value(_value) {}
|
explicit AllocatedPath(const_pointer_type _value):value(_value) {}
|
||||||
|
|
||||||
|
AllocatedPath(const_pointer_type _begin, const_pointer_type _end)
|
||||||
|
:value(_begin, _end) {}
|
||||||
|
|
||||||
AllocatedPath(string &&_value):value(std::move(_value)) {}
|
AllocatedPath(string &&_value):value(std::move(_value)) {}
|
||||||
|
|
||||||
static AllocatedPath Build(const_pointer_type a, size_t a_size,
|
static AllocatedPath Build(const_pointer_type a, size_t a_size,
|
||||||
@@ -132,6 +135,12 @@ public:
|
|||||||
return AllocatedPath(fs);
|
return AllocatedPath(fs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gcc_pure
|
||||||
|
static AllocatedPath FromFS(const_pointer_type _begin,
|
||||||
|
const_pointer_type _end) {
|
||||||
|
return AllocatedPath(_begin, _end);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a C++ string that is already in the filesystem
|
* Convert a C++ string that is already in the filesystem
|
||||||
* character set to a #Path instance.
|
* character set to a #Path instance.
|
||||||
|
Reference in New Issue
Block a user