mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
libutil: Make CanonPath::root const
By all means CanonPath::root must be immutable. Let's enforce this with in the code.
This commit is contained in:
parent
b56cc1808d
commit
edf9163c22
2 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
CanonPath CanonPath::root = CanonPath("/");
|
||||
const CanonPath CanonPath::root = CanonPath("/");
|
||||
|
||||
static std::string absPathPure(std::string_view path)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
*/
|
||||
CanonPath(const std::vector<std::string> & elems);
|
||||
|
||||
static CanonPath root;
|
||||
static const CanonPath root;
|
||||
|
||||
/**
|
||||
* If `raw` starts with a slash, return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue