diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-07-26 23:04:29 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-07-26 23:28:43 +0200 |
commit | 07286e80ddc3d0e448401a4432dc88d4df7c7387 (patch) | |
tree | 6d0cc82729f8d865f66faa2746a24103d5bbd9af | |
parent | ec2229471d4f7e9d10cee41c25ba544c59dc84a1 (diff) |
Fix result filtering in identity property lookup
-rw-r--r-- | src/identity.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/identity.cpp b/src/identity.cpp index 3b8d3bf..fc62995 100644 --- a/src/identity.cpp +++ b/src/identity.cpp @@ -6,8 +6,6 @@ #include <set> #include <stdexcept> -#include <iostream> - using namespace erebos; using std::async; @@ -354,8 +352,8 @@ optional<Stored<IdentityData>> Identity::Priv::lookupProperty( } for (auto x = prop_heads.begin(); x != prop_heads.end(); x++) - for (auto y = std::next(x); y != prop_heads.end();) - if (y->precedes(*x)) + for (auto y = prop_heads.begin(); y != prop_heads.end();) + if (y != x && y->precedes(*x)) y = prop_heads.erase(y); else y++; |