minor optimization in the unreference routine
This commit is contained in:
+6
-6
@@ -162,13 +162,8 @@ inline gddStatus gdd::unreference(void) const
|
||||
if ( ref_cnt > 1u ) {
|
||||
ref_cnt--;
|
||||
}
|
||||
else if ( ref_cnt == 0u )
|
||||
else if ( ref_cnt == 1u )
|
||||
{
|
||||
fprintf(stderr,"gdd reference count underflow!!\n");
|
||||
gddAutoPrint("gdd::unreference()",gddErrorUnderflow);
|
||||
rc=gddErrorUnderflow;
|
||||
}
|
||||
else {
|
||||
if ( isManaged() ) {
|
||||
// managed dd always destroys the entire thing
|
||||
if(destruct) destruct->destroy((void *)this);
|
||||
@@ -181,6 +176,11 @@ inline gddStatus gdd::unreference(void) const
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"gdd reference count underflow!!\n");
|
||||
gddAutoPrint("gdd::unreference()",gddErrorUnderflow);
|
||||
rc=gddErrorUnderflow;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user