aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2025-04-03 14:52:19 +1100
committerNeil <nyamatongwe@gmail.com>2025-04-03 14:52:19 +1100
commitb4300bf40c1134231af48cab4f38c5394976d9a1 (patch)
tree9ee9c88ab3b5f19a1933ecc5dfd02d5d2c5e9d0b /src/Selection.cxx
parentedb7369a2c6a19393dc413a9595a234969fc2731 (diff)
downloadscintilla-mirror-b4300bf40c1134231af48cab4f38c5394976d9a1.tar.gz
Turn on type conversion warnings for GCC and fix them.
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r--src/Selection.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx
index 0de60a958..795570ee2 100644
--- a/src/Selection.cxx
+++ b/src/Selection.cxx
@@ -96,6 +96,10 @@ bool SelectionPosition::operator >=(const SelectionPosition &other) const noexce
return *this > other;
}
+double SelectionPosition::VirtualSpaceWidth(double spaceWidth) const noexcept {
+ return static_cast<double>(virtualSpace) * spaceWidth;
+}
+
std::string SelectionPosition::ToString() const {
std::string result = std::to_string(position);
if (virtualSpace) {