diff options
| author | Maxime Coste <mawww@kakoune.org> | 2023-10-25 21:06:52 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2023-10-25 21:06:52 +1100 |
| commit | 2fa55be40a787be71f4360fd4e36b7a790c74fa6 (patch) | |
| tree | 4ba6c0bc844f2d4ce6a004ae71ef52aa21f95448 /src/highlighters.hh | |
| parent | 96884193ddad76530a09a1b095180b0ca8257b7c (diff) | |
Default comparison operators that can be
Diffstat (limited to 'src/highlighters.hh')
| -rw-r--r-- | src/highlighters.hh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/highlighters.hh b/src/highlighters.hh index f68f0b26..c8f1dd22 100644 --- a/src/highlighters.hh +++ b/src/highlighters.hh @@ -10,12 +10,12 @@ namespace Kakoune void register_highlighters(); -struct InclusiveBufferRange{ BufferCoord first, last; }; - -inline bool operator==(const InclusiveBufferRange& lhs, const InclusiveBufferRange& rhs) +struct InclusiveBufferRange { - return lhs.first == rhs.first and lhs.last == rhs.last; -} + BufferCoord first, last; + friend bool operator==(const InclusiveBufferRange& lhs, const InclusiveBufferRange& rhs) = default; +}; + String option_to_string(InclusiveBufferRange range); InclusiveBufferRange option_from_string(Meta::Type<InclusiveBufferRange>, StringView str); |
