aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorColin Snover2017-11-12 17:00:35 -0600
committerColin Snover2017-11-18 16:52:15 -0600
commit9f465b406222aba77d5a57f626b52be17d1749e3 (patch)
tree5a3e60831cfe3347819b226c7bb7fa83a0b9fb92 /test
parent62825c5cf8ca353e1210a9d49754501f9f313af9 (diff)
downloadscummvm-rg350-9f465b406222aba77d5a57f626b52be17d1749e3.tar.gz
scummvm-rg350-9f465b406222aba77d5a57f626b52be17d1749e3.tar.bz2
scummvm-rg350-9f465b406222aba77d5a57f626b52be17d1749e3.zip
TESTS: Remove unnecessary heap allocation
Diffstat (limited to 'test')
-rw-r--r--test/common/ptr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/common/ptr.h b/test/common/ptr.h
index 0c871a761d..790d541b13 100644
--- a/test/common/ptr.h
+++ b/test/common/ptr.h
@@ -127,14 +127,14 @@ class PtrTestSuite : public CxxTest::TestSuite {
void test_deleter() {
Deleter<int> myDeleter;
- myDeleter.test = new bool(false);
+ bool test = false;
+ myDeleter.test = &test;
{
Common::SharedPtr<int> p(new int(1), myDeleter);
}
- TS_ASSERT_EQUALS(*myDeleter.test, true);
- delete myDeleter.test;
+ TS_ASSERT_EQUALS(test, true);
}
void test_compare() {