[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCH] kate vi ptr constructors
From: Adriaan de Groot <groot () kde ! org>
Date: 2008-12-27 10:10:20
Message-ID: 200812271110.20764.groot () kde ! org
[Download RAW message or body]
This is a very peculiar idiom for me, since it does some extra futzing on a 0
in trying to create a null pointer; but it occurs twice, so there might be
some secret hidden meaning to it. This patch replaces static_cast by the null
Ptr constructor.
--- kate/vimode/katevivisualmode.cpp (revision 901981)
+++ kate/vimode/katevivisualmode.cpp (working copy)
@@ -50,7 +50,7 @@
void KateViVisualMode::highlight() const
{
// FIXME: HACK to avoid highlight bug: remove highlighing and re-set it
- highlightRange->setAttribute(static_cast<KTextEditor::Attribute::Ptr>(0));
+ highlightRange->setAttribute(KTextEditor::Attribute::Ptr());
highlightRange->setAttribute(attribute);
KTextEditor::Cursor c1 = m_start;
@@ -100,7 +100,7 @@
void KateViVisualMode::reset()
{
// remove highlighting
- highlightRange-
>setAttribute(static_cast<KTextEditor::Attribute::Ptr>(0));
+ highlightRange->setAttribute(KTextEditor::Attribute::Ptr());
m_awaitingMotionOrTextObject.push_back( 0 ); // search for text
objects/mot
ion from char 0
[ade]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic