diff options
author | Neil <nyamatongwe@gmail.com> | 2025-01-31 12:36:49 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2025-01-31 12:36:49 +1100 |
commit | 6017737861df5f3799ec2538e5fb62fe378a309e (patch) | |
tree | 5ac8c50182793e2b2a79e9feeecf28bbed0856b6 /src/Selection.cxx | |
parent | e2d7f790b130234829cde227a1439812fb510e50 (diff) | |
download | scintilla-mirror-6017737861df5f3799ec2538e5fb62fe378a309e.tar.gz |
Add default basic constructor and operator!= to SelectionPosition to ease use.
Use default member initializer, constexpr for constructors and equality
operators and <, [[nodiscard]] for comparison operators.
Add simple unit tests for Selection. Not trying to be exhaustive here, just
start the process of adding tests.
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r-- | src/Selection.cxx | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx index 5b99b7c3a..ad63afd70 100644 --- a/src/Selection.cxx +++ b/src/Selection.cxx @@ -52,13 +52,6 @@ void SelectionPosition::MoveForInsertDelete(bool insertion, Sci::Position startC } } -bool SelectionPosition::operator <(const SelectionPosition &other) const noexcept { - if (position == other.position) - return virtualSpace < other.virtualSpace; - else - return position < other.position; -} - bool SelectionPosition::operator >(const SelectionPosition &other) const noexcept { if (position == other.position) return virtualSpace > other.virtualSpace; |