[PATCH] kate vi ptr constructors

André Wöbbeking Woebbeking at kde.org
Sat Dec 27 11:05:30 GMT 2008


On Saturday 27 December 2008, Adriaan de Groot wrote:
> 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());

I wonder why this compiles at all?!?




More information about the kde-core-devel mailing list