Use parent implementation for methods incrementReferens() and

decrementReferens() where possible.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-01-16 12:06:50 +02:00
parent 5442eb40b9
commit 60810c4d04
2 changed files with 4 additions and 10 deletions

View File

@ -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)

View File

@ -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)