diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-10-17 22:45:17 +0800 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-10-20 12:21:22 +0800 |
| commit | d486ea84e57bdabec07fe38a0bb4fb5bdf21848f (patch) | |
| tree | 619966c9d6f0a58b329f646be6926b45b72e5fb1 /src/coord.hh | |
| parent | ddff35e5ab6a9bed29c49547eaee91637854f029 (diff) | |
Constexprify various hash functions
Diffstat (limited to 'src/coord.hh')
| -rw-r--r-- | src/coord.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coord.hh b/src/coord.hh index 06c1032d..6109bf14 100644 --- a/src/coord.hh +++ b/src/coord.hh @@ -81,7 +81,7 @@ struct LineAndColumn return line != other.line or column != other.column; } - friend size_t hash_value(const EffectiveType& val) + friend constexpr size_t hash_value(const EffectiveType& val) { return hash_values(val.line, val.column); } @@ -116,7 +116,7 @@ struct BufferCoordAndTarget : BufferCoord ColumnCount target; }; -inline size_t hash_value(const BufferCoordAndTarget& val) +constexpr size_t hash_value(const BufferCoordAndTarget& val) { return hash_values(val.line, val.column, val.target); } |
