summaryrefslogtreecommitdiffstats
path: root/examples/animation/stickman/stickman.cpp
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-09-03 13:33:31 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-09-03 14:17:32 (GMT)
commit99929a28df4812c86b4aabc4d02490d9fac87e85 (patch)
tree3af64ee824ae1ca2a2b53496d2ec3e99de73597a /examples/animation/stickman/stickman.cpp
parent245c63c306be18442ee9fd1178e30bfb4aad7717 (diff)
downloadQt-99929a28df4812c86b4aabc4d02490d9fac87e85.zip
Qt-99929a28df4812c86b4aabc4d02490d9fac87e85.tar.gz
Qt-99929a28df4812c86b4aabc4d02490d9fac87e85.tar.bz2
fix warnings in stickman demo on mingw
We now also use the brand-new QGraphicsObject class We also make sure we have less memory leak or bad deallocation.
Diffstat (limited to 'examples/animation/stickman/stickman.cpp')
-rw-r--r--examples/animation/stickman/stickman.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/examples/animation/stickman/stickman.cpp b/examples/animation/stickman/stickman.cpp
index 78e9e5b..67e022b 100644
--- a/examples/animation/stickman/stickman.cpp
+++ b/examples/animation/stickman/stickman.cpp
@@ -52,7 +52,6 @@
#define M_PI 3.14159265358979323846
#endif
-static const int NodeCount = 16;
static const qreal Coords[NodeCount * 2] = {
0.0, -150.0, // head, #0
@@ -79,7 +78,6 @@ static const qreal Coords[NodeCount * 2] = {
};
-static const int BoneCount = 24;
static const int Bones[BoneCount * 2] = {
0, 1, // neck
@@ -116,7 +114,6 @@ static const int Bones[BoneCount * 2] = {
StickMan::StickMan()
{
- m_nodes = new Node*[NodeCount];
m_sticks = true;
m_isDead = false;
m_pixmap = QPixmap("images/head.png");
@@ -129,7 +126,6 @@ StickMan::StickMan()
connect(m_nodes[i], SIGNAL(positionChanged()), this, SLOT(childPositionChanged()));
}
- m_perfectBoneLengths = new qreal[BoneCount];
for (int i=0; i<BoneCount; ++i) {
int n1 = Bones[i * 2];
int n2 = Bones[i * 2 + 1];
@@ -146,7 +142,6 @@ StickMan::StickMan()
StickMan::~StickMan()
{
- delete m_nodes;
}
void StickMan::childPositionChanged()