[Scummvm-git-logs] scummvm master -> 9f465b406222aba77d5a57f626b52be17d1749e3

csnover csnover at users.noreply.github.com
Sat Nov 18 23:52:33 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9f465b4062 TESTS: Remove unnecessary heap allocation


Commit: 9f465b406222aba77d5a57f626b52be17d1749e3
    https://github.com/scummvm/scummvm/commit/9f465b406222aba77d5a57f626b52be17d1749e3
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-11-18T16:52:15-06:00

Commit Message:
TESTS: Remove unnecessary heap allocation

Changed paths:
    test/common/ptr.h


diff --git a/test/common/ptr.h b/test/common/ptr.h
index 0c871a7..790d541 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() {





More information about the Scummvm-git-logs mailing list