diff options
author | Colin Snover | 2017-11-12 17:00:35 -0600 |
---|---|---|
committer | Colin Snover | 2017-11-18 16:52:15 -0600 |
commit | 9f465b406222aba77d5a57f626b52be17d1749e3 (patch) | |
tree | 5a3e60831cfe3347819b226c7bb7fa83a0b9fb92 | |
parent | 62825c5cf8ca353e1210a9d49754501f9f313af9 (diff) | |
download | scummvm-rg350-9f465b406222aba77d5a57f626b52be17d1749e3.tar.gz scummvm-rg350-9f465b406222aba77d5a57f626b52be17d1749e3.tar.bz2 scummvm-rg350-9f465b406222aba77d5a57f626b52be17d1749e3.zip |
TESTS: Remove unnecessary heap allocation
-rw-r--r-- | test/common/ptr.h | 6 |
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() { |