diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-26 14:10:15 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-26 14:10:15 +1000 |
commit | 537504925449cdfe16b7feaf5fad18b6e34e8a2e (patch) | |
tree | 8e7b272f823e7f187d90e69b7cc4028866e73680 /src/EditView.cxx | |
parent | eb42a44f7a9fe514ff8677254e3a707777449acf (diff) | |
download | scintilla-mirror-537504925449cdfe16b7feaf5fad18b6e34e8a2e.tar.gz |
Specify concrete class for ldTabstops and use directly instead of copying value
of .get() before use.
Diffstat (limited to 'src/EditView.cxx')
-rw-r--r-- | src/EditView.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 5c9bb7ff4..7a2225e2e 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -223,22 +223,19 @@ XYPOSITION EditView::NextTabstopPos(Sci::Line line, XYPOSITION x, XYPOSITION tab } bool EditView::ClearTabstops(Sci::Line line) { - LineTabstops *lt = static_cast<LineTabstops *>(ldTabstops.get()); - return lt && lt->ClearTabstops(line); + return ldTabstops && ldTabstops->ClearTabstops(line); } bool EditView::AddTabstop(Sci::Line line, int x) { if (!ldTabstops) { ldTabstops = std::make_unique<LineTabstops>(); } - LineTabstops *lt = static_cast<LineTabstops *>(ldTabstops.get()); - return lt && lt->AddTabstop(line, x); + return ldTabstops && ldTabstops->AddTabstop(line, x); } int EditView::GetNextTabstop(Sci::Line line, int x) const { - const LineTabstops *lt = static_cast<LineTabstops *>(ldTabstops.get()); - if (lt) { - return lt->GetNextTabstop(line, x); + if (ldTabstops) { + return ldTabstops->GetNextTabstop(line, x); } else { return 0; } |