Hi,
may I report a little bug I have found in the assignment operator of
class FrustumVolume (OSGFrustumVolume.cpp, ~360):
At first the implementation fails because of the wrong number of
iterations
const FrustumVolume &FrustumVolume::operator =(const FrustumVolume &b1)
{
=> for(Int32 i = 0; i < 5; i++)
{
_planeVec[i] = b1._planeVec[i];
}
_state = b1._state;
return *this;
}
Second, the implementation does not check for self assignment.
Third, it would be better if the operator would return a non const
reference to itself in order to allow statements like
a = b = c;
FrustumVolume &FrustumVolume::operator =(const FrustumVolume &b1)
{
if (&b1 == this)
return *this;
for(Int32 i = 0; i < 6; i++)
{
_planeVec[i] = b1._planeVec[i];
}
_state = b1._state;
return *this;
}
with best regards,
Johannes
____________
Virus checked by G DATA AntiVirusKit
Version: AVK 17.7329 from 03.09.2007
Virus news: www.antiviruslab.com
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users