From f2b280565298dc86af2885ad78d331ba37602bfc Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 26 Apr 2018 14:10:15 +1000 Subject: Backport: Specify concrete class for ldTabstops and use directly instead of copying value of .get() before use. Backport of changeset 6745:f8cf44b26722. --- src/EditView.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/EditView.cxx') diff --git a/src/EditView.cxx b/src/EditView.cxx index 2d4e6a040..0a14d582b 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(ldTabstops.get()); - return lt && lt->ClearTabstops(line); + return ldTabstops && ldTabstops->ClearTabstops(line); } bool EditView::AddTabstop(Sci::Line line, int x) { if (!ldTabstops) { ldTabstops.reset(new LineTabstops()); } - LineTabstops *lt = static_cast(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(ldTabstops.get()); - if (lt) { - return lt->GetNextTabstop(line, x); + if (ldTabstops) { + return ldTabstops->GetNextTabstop(line, x); } else { return 0; } -- cgit v1.2.3