Add wextra level warnings.

This commit is contained in:
James Grogan 2023-01-23 11:55:58 +00:00
parent e559f9674d
commit 119ea6f2cc
62 changed files with 235 additions and 231 deletions

View file

@ -4,52 +4,52 @@
#include "LineNode.h"
BlochSphereNode::BlochSphereNode(const Point& location)
: AbstractVisualNode(location, "BlochSphereNode")
: AbstractVisualNode(location, "BlochSphereNode")
{
}
void BlochSphereNode::setContent(BlochSphere* content)
{
mContent = content;
mContentDirty = true;
mContent = content;
mContentDirty = true;
}
void BlochSphereNode::setSize(double size)
{
if (size != mSize)
{
mSize = size;
mContentDirty = true;
}
if (size != mSize)
{
mSize = size;
mContentDirty = true;
}
}
void BlochSphereNode::update(SceneInfo* sceneInfo)
void BlochSphereNode::update(SceneInfo*)
{
if (!mContentDirty)
{
return;
}
if (!mContentDirty)
{
return;
}
mChildren.clear();
mChildren.clear();
auto loc = Point(mSize / 2.0, mSize / 2.0);
mInnerCircle = std::make_unique<CircleNode>(loc, mSize / 2.0);
mInnerCircle->setMinorRadius(mSize / 4.0);
mInnerCircle->setStrokeThickness(0.5);
auto loc = Point(mSize / 2.0, mSize / 2.0);
mInnerCircle = std::make_unique<CircleNode>(loc, mSize / 2.0);
mInnerCircle->setMinorRadius(mSize / 4.0);
mInnerCircle->setStrokeThickness(0.5);
mOuterCircle = std::make_unique<CircleNode>(loc, mSize/2.0);
mOuterCircle = std::make_unique<CircleNode>(loc, mSize/2.0);
const auto end_point_x = Point(loc.getX() + 1.2 * mSize / 2.0, loc.getY());
const std::vector<Point> points{end_point_x };
mXAxis = std::make_unique<LineNode>(loc, points);
const auto end_point_x = Point(loc.getX() + 1.2 * mSize / 2.0, loc.getY());
const std::vector<Point> points{end_point_x };
mXAxis = std::make_unique<LineNode>(loc, points);
mCentreCircle = std::make_unique<CircleNode>(loc, mSize / 50.0);
mCentreCircle->setFillColor(Color(0, 0, 0));
mCentreCircle->setHasStrokeColor(false);
mCentreCircle = std::make_unique<CircleNode>(loc, mSize / 50.0);
mCentreCircle->setFillColor(Color(0, 0, 0));
mCentreCircle->setHasStrokeColor(false);
addChild(mInnerCircle.get());
addChild(mOuterCircle.get());
addChild(mXAxis.get());
addChild(mCentreCircle.get());
}
addChild(mInnerCircle.get());
addChild(mOuterCircle.get());
addChild(mXAxis.get());
addChild(mCentreCircle.get());
}