Fix several clazy issue:
* Using copy-ctor but class SbMatrix/SbViewportRegion has a trivial copy-ctor but non trivial assign operator [-Wclazy-rule-of-two-soft]
This commit is contained in:
@@ -94,7 +94,7 @@ void SoAutoZoomTranslation::doAction(SoAction * action)
|
||||
auto state = action->getState();
|
||||
SbRotation r,so;
|
||||
SbVec3f s,t;
|
||||
SbMatrix matrix = SoModelMatrixElement::get(action->getState());
|
||||
SbMatrix matrix = SoModelMatrixElement::get(action->getState()); // clazy:exclude=rule-of-two-soft
|
||||
matrix.getTransform(t,r,s,so);
|
||||
matrix.multVecMatrix(SbVec3f(0,0,0),t);
|
||||
// reset current model scale factor
|
||||
|
||||
@@ -684,7 +684,7 @@ QuarterWidget::setSoRenderManager(SoRenderManager * manager)
|
||||
if (PRIVATE(this)->sorendermanager && manager) {
|
||||
scene = PRIVATE(this)->sorendermanager->getSceneGraph();
|
||||
camera = PRIVATE(this)->sorendermanager->getCamera();
|
||||
vp = PRIVATE(this)->sorendermanager->getViewportRegion();
|
||||
vp = PRIVATE(this)->sorendermanager->getViewportRegion(); // clazy:exclude=rule-of-two-soft
|
||||
carrydata = true;
|
||||
}
|
||||
|
||||
@@ -729,7 +729,7 @@ QuarterWidget::setSoEventManager(SoEventManager * manager)
|
||||
if (PRIVATE(this)->soeventmanager && manager) {
|
||||
scene = PRIVATE(this)->soeventmanager->getSceneGraph();
|
||||
camera = PRIVATE(this)->soeventmanager->getCamera();
|
||||
vp = PRIVATE(this)->soeventmanager->getViewportRegion();
|
||||
vp = PRIVATE(this)->soeventmanager->getViewportRegion(); // clazy:exclude=rule-of-two-soft
|
||||
carrydata = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ void TDragger::fieldSensorCB(void *f, SoSensor *)
|
||||
{
|
||||
TDragger *sudoThis = static_cast<TDragger *>(f);
|
||||
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix();
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix(); // clazy:exclude=rule-of-two-soft
|
||||
sudoThis->workFieldsIntoTransform(matrix);
|
||||
sudoThis->setMotionMatrix(matrix);
|
||||
}
|
||||
@@ -225,7 +225,7 @@ void TDragger::valueChangedCB(void *, SoDragger *d)
|
||||
{
|
||||
TDragger *sudoThis = dynamic_cast<TDragger *>(d);
|
||||
assert(sudoThis);
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix();
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix(); // clazy:exclude=rule-of-two-soft
|
||||
|
||||
//all this just to get the translation?
|
||||
SbVec3f trans, scaleDummy;
|
||||
@@ -488,7 +488,7 @@ void RDragger::fieldSensorCB(void *f, SoSensor *)
|
||||
{
|
||||
RDragger *sudoThis = static_cast<RDragger *>(f);
|
||||
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix();
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix(); // clazy:exclude=rule-of-two-soft
|
||||
sudoThis->workFieldsIntoTransform(matrix);
|
||||
sudoThis->setMotionMatrix(matrix);
|
||||
}
|
||||
@@ -497,7 +497,7 @@ void RDragger::valueChangedCB(void *, SoDragger *d)
|
||||
{
|
||||
RDragger *sudoThis = dynamic_cast<RDragger *>(d);
|
||||
assert(sudoThis);
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix();
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix(); // clazy:exclude=rule-of-two-soft
|
||||
|
||||
//all this just to get the translation?
|
||||
SbVec3f translationDummy, scaleDummy;
|
||||
@@ -870,7 +870,7 @@ void SoFCCSysDragger::translationSensorCB(void *f, SoSensor *)
|
||||
{
|
||||
SoFCCSysDragger *sudoThis = static_cast<SoFCCSysDragger *>(f);
|
||||
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix();
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix(); // clazy:exclude=rule-of-two-soft
|
||||
sudoThis->workFieldsIntoTransform(matrix);
|
||||
sudoThis->setMotionMatrix(matrix);
|
||||
}
|
||||
@@ -879,7 +879,7 @@ void SoFCCSysDragger::rotationSensorCB(void *f, SoSensor *)
|
||||
{
|
||||
SoFCCSysDragger *sudoThis = static_cast<SoFCCSysDragger *>(f);
|
||||
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix();
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix(); // clazy:exclude=rule-of-two-soft
|
||||
sudoThis->workFieldsIntoTransform(matrix);
|
||||
sudoThis->setMotionMatrix(matrix);
|
||||
}
|
||||
@@ -888,7 +888,7 @@ void SoFCCSysDragger::valueChangedCB(void *, SoDragger *d)
|
||||
{
|
||||
SoFCCSysDragger *sudoThis = dynamic_cast<SoFCCSysDragger *>(d);
|
||||
assert(sudoThis);
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix();
|
||||
SbMatrix matrix = sudoThis->getMotionMatrix(); // clazy:exclude=rule-of-two-soft
|
||||
|
||||
//all this just to get the translation?
|
||||
SbVec3f localTranslation, scaleDummy;
|
||||
|
||||
@@ -423,7 +423,7 @@ void SoQtOffscreenRenderer::init(const SbViewportRegion & vpr,
|
||||
}
|
||||
|
||||
this->didallocation = glrenderaction ? false : true;
|
||||
this->viewport = vpr;
|
||||
this->viewport = vpr; // clazy:exclude=rule-of-two-soft
|
||||
|
||||
this->framebuffer = nullptr;
|
||||
this->numSamples = -1;
|
||||
@@ -473,7 +473,7 @@ SoQtOffscreenRenderer::~SoQtOffscreenRenderer()
|
||||
void
|
||||
SoQtOffscreenRenderer::setViewportRegion(const SbViewportRegion & region)
|
||||
{
|
||||
PRIVATE(this)->viewport = region;
|
||||
PRIVATE(this)->viewport = region; // clazy:exclude=rule-of-two-soft
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -1063,7 +1063,7 @@ SoBoxSelectionRenderActionP::updateBbox(const SoPath * path)
|
||||
this->cube->height = y;
|
||||
this->cube->depth = z;
|
||||
|
||||
SbMatrix transform = box.getTransform();
|
||||
SbMatrix transform = box.getTransform(); // clazy:exclude=rule-of-two-soft
|
||||
|
||||
// get center (in the local bbox coordinate system)
|
||||
SbVec3f center = box.SbBox3f::getCenter();
|
||||
|
||||
@@ -334,7 +334,7 @@ RotTransDragger::valueChangedCB(void *, SoDragger *inDragger)
|
||||
RotTransDragger *myself = (RotTransDragger *) inDragger;
|
||||
|
||||
// Factor the motionMatrix into its parts
|
||||
SbMatrix motMat = myself->getMotionMatrix();
|
||||
SbMatrix motMat = myself->getMotionMatrix(); // clazy:exclude=rule-of-two-soft
|
||||
SbVec3f trans, scale;
|
||||
SbRotation rot, scaleOrient;
|
||||
motMat.getTransform(trans, rot, scale, scaleOrient);
|
||||
@@ -357,7 +357,7 @@ RotTransDragger::fieldSensorCB(void *inDragger, SoSensor *)
|
||||
{
|
||||
RotTransDragger *myself = (RotTransDragger *) inDragger;
|
||||
|
||||
SbMatrix motMat = myself->getMotionMatrix();
|
||||
SbMatrix motMat = myself->getMotionMatrix(); // clazy:exclude=rule-of-two-soft
|
||||
myself->workFieldsIntoTransform(motMat);
|
||||
|
||||
myself->setMotionMatrix(motMat);
|
||||
|
||||
Reference in New Issue
Block a user