mirror of
https://github.com/NixOS/nix.git
synced 2025-12-01 06:31:00 +01:00
Merge pull request #79 from DeterminateSystems/path-position-info
Include the source location when warning about inefficient double copies
This commit is contained in:
commit
f8aabb0749
9 changed files with 36 additions and 22 deletions
|
|
@ -15,12 +15,12 @@ class PosIdx
|
|||
private:
|
||||
uint32_t id;
|
||||
|
||||
public:
|
||||
explicit PosIdx(uint32_t id)
|
||||
: id(id)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
PosIdx()
|
||||
: id(0)
|
||||
{
|
||||
|
|
@ -45,6 +45,11 @@ public:
|
|||
{
|
||||
return std::hash<uint32_t>{}(id);
|
||||
}
|
||||
|
||||
uint32_t get() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
};
|
||||
|
||||
inline PosIdx noPos = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue