diff options
author | Neil <nyamatongwe@gmail.com> | 2014-06-22 13:44:46 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-06-22 13:44:46 +1000 |
commit | a0ebebe503affd3447a29c1253579f392cc45132 (patch) | |
tree | 4110d4750ad2ba7e8c9e173ee049af35bdb40709 /src/Selection.cxx | |
parent | ee07f2adf11213314cdb76b04f1577d01692eab5 (diff) | |
download | scintilla-mirror-a0ebebe503affd3447a29c1253579f392cc45132.tar.gz |
Stop storing a pointer to the selection on LineLayout objects where it may have
a lifetime that is too long. Instead provide it as an argument to BreakFinder
where it is only needed during intialisation.
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r-- | src/Selection.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx index 4c2ab0508..b46dca890 100644 --- a/src/Selection.cxx +++ b/src/Selection.cxx @@ -226,10 +226,18 @@ SelectionRange &Selection::Range(size_t r) { return ranges[r]; } +const SelectionRange &Selection::Range(size_t r) const { + return ranges[r]; +} + SelectionRange &Selection::RangeMain() { return ranges[mainRange]; } +const SelectionRange &Selection::RangeMain() const { + return ranges[mainRange]; +} + SelectionPosition Selection::Start() const { if (IsRectangular()) { return rangeRectangular.Start(); |