From 4c60be4a31c8395e64ba1f838732cb8b780a1b9b Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Thu, 6 Nov 2014 19:37:37 -0800 Subject: [PATCH] Fix for hang on test exit. --- tests/metavoxels/src/MetavoxelTests.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/metavoxels/src/MetavoxelTests.cpp b/tests/metavoxels/src/MetavoxelTests.cpp index 5a6355483d..0609d7bd01 100644 --- a/tests/metavoxels/src/MetavoxelTests.cpp +++ b/tests/metavoxels/src/MetavoxelTests.cpp @@ -439,8 +439,6 @@ static bool testSerialization(Bitstream::MetadataType metadataType) { return false; } -static AttributePointer simpleAttribute; - bool MetavoxelTests::run() { LimitedNodeList::createInstance(); @@ -448,7 +446,7 @@ bool MetavoxelTests::run() { srand(0xBAAAAABE); // register our test attribute - simpleAttribute = AttributeRegistry::getInstance()->registerAttribute(new FloatAttribute("simpleAttribute")); + AttributePointer testAttribute = AttributeRegistry::getInstance()->registerAttribute(new FloatAttribute("testAttribute")); // check for an optional command line argument specifying a single test QStringList arguments = this->arguments(); @@ -587,7 +585,8 @@ public: }; RandomVisitor::RandomVisitor() : - MetavoxelVisitor(QVector(), QVector() << simpleAttribute), + MetavoxelVisitor(QVector(), QVector() << + AttributeRegistry::getInstance()->getAttribute("testAttribute")), leafCount(0) { } @@ -815,7 +814,8 @@ private: }; MutateVisitor::MutateVisitor() : - MetavoxelVisitor(QVector(), QVector() << simpleAttribute), + MetavoxelVisitor(QVector(), QVector() << + AttributeRegistry::getInstance()->getAttribute("testAttribute")), _mutationsRemaining(randIntInRange(2, 4)) { }