diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-07-09 13:09:34 +0100 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-07-09 13:09:34 +0100 |
| commit | fa277f69b14446b47a3dfa63ed7fc1a8a16ef7f8 (patch) | |
| tree | a740ad434e192676ccab12f6a3ab2821902b58c1 /src/logTypes.hpp | |
| parent | f8d326a7d6f49a6b6009a7869ce61d782ad9c7b6 (diff) | |
| download | webstat-0.7.1.tar.bz2 webstat-0.7.1.tar.xz webstat-0.7.1.zip | |
Include type in existingEntities cacheHEADwebstat-0.7.1main
Fixes the issues of entities having the same value (hash) but occurring
in different places. This is most often when the client states the
virtual host name as the referrer.
Diffstat (limited to 'src/logTypes.hpp')
| -rw-r--r-- | src/logTypes.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/logTypes.hpp b/src/logTypes.hpp index 7f0473e..d1bda3f 100644 --- a/src/logTypes.hpp +++ b/src/logTypes.hpp @@ -38,10 +38,15 @@ namespace WebStat { using EntityId = int32_t; using EntityHash = std::array<uint8_t, MD5_DIGEST_LENGTH>; - struct Entity { + struct EntityKey { EntityHash hash; - std::optional<EntityId> id; EntityType type; + constexpr auto operator<=>(const EntityKey &) const noexcept = default; + }; + + struct Entity { + EntityKey key; + std::optional<EntityId> id; std::string_view value; }; } |
