From 60810c4d04f8b1926106cf8d343d9c7091fe1d64 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 16 Jan 2017 12:06:50 +0200 Subject: [PATCH] Use parent implementation for methods incrementReferens() and decrementReferens() where possible. --HG-- branch : feature --- src/libs/vtools/tools/nodeDetails/vabstractnode.cpp | 7 ++----- src/libs/vtools/tools/nodeDetails/vtoolpiecepath.cpp | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/libs/vtools/tools/nodeDetails/vabstractnode.cpp b/src/libs/vtools/tools/nodeDetails/vabstractnode.cpp index 381509163..a8e2f433c 100644 --- a/src/libs/vtools/tools/nodeDetails/vabstractnode.cpp +++ b/src/libs/vtools/tools/nodeDetails/vabstractnode.cpp @@ -75,7 +75,7 @@ void VAbstractNode::ShowVisualization(bool show) //--------------------------------------------------------------------------------------------------------------------- void VAbstractNode::incrementReferens() { - ++_referens; + VAbstractTool::incrementReferens(); if (_referens == 1) { if (idTool != NULL_ID) @@ -102,10 +102,7 @@ void VAbstractNode::incrementReferens() */ void VAbstractNode::decrementReferens() { - if (_referens > 0) - { - --_referens; - } + VAbstractTool::decrementReferens(); if (_referens == 0) { if (idTool != NULL_ID) diff --git a/src/libs/vtools/tools/nodeDetails/vtoolpiecepath.cpp b/src/libs/vtools/tools/nodeDetails/vtoolpiecepath.cpp index e86ff9d1c..053748e9f 100644 --- a/src/libs/vtools/tools/nodeDetails/vtoolpiecepath.cpp +++ b/src/libs/vtools/tools/nodeDetails/vtoolpiecepath.cpp @@ -114,7 +114,7 @@ QString VToolPiecePath::getTagName() const //--------------------------------------------------------------------------------------------------------------------- void VToolPiecePath::incrementReferens() { - ++_referens; + VAbstractTool::incrementReferens(); if (_referens == 1) { if (idTool != NULL_ID) @@ -137,10 +137,7 @@ void VToolPiecePath::incrementReferens() //--------------------------------------------------------------------------------------------------------------------- void VToolPiecePath::decrementReferens() { - if (_referens > 0) - { - --_referens; - } + VAbstractTool::decrementReferens(); if (_referens == 0) { if (idTool != NULL_ID)