diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-04 14:48:57 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-12-04 14:48:57 +0000 |
commit | ebce0301082cda9dc3e3298f6db91d46fe66298b (patch) | |
tree | 5b52f251b26a83b40869eebde13f16c2b888bd90 | |
parent | 4a9a612b5200597cca0bda0a356250835cbdc7d6 (diff) |
Fix stale iterators in LList test. Add newline to end of SkTLList.h
git-svn-id: http://skia.googlecode.com/svn/trunk@6663 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/core/SkTLList.h | 3 | ||||
-rw-r--r-- | tests/LListTest.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h index 30d440fd4e..01d63394d1 100644 --- a/src/core/SkTLList.h +++ b/src/core/SkTLList.h @@ -359,4 +359,5 @@ void *operator new(size_t, SkTLList<T>* list, SkNEW_INSERT_IN_LLIST_BEFORE((list), (list)->headIter(), type_name, args) #define SkNEW_INSERT_AT_LLIST_TAIL(list, type_name, args) \ - SkNEW_INSERT_IN_LLIST_AFTER((list), (list)->tailIter(), type_name, args)
\ No newline at end of file + SkNEW_INSERT_IN_LLIST_AFTER((list), (list)->tailIter(), type_name, args) + diff --git a/tests/LListTest.cpp b/tests/LListTest.cpp index d574e090ec..89c4971b96 100644 --- a/tests/LListTest.cpp +++ b/tests/LListTest.cpp @@ -174,7 +174,10 @@ static void TestTLList(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, list2 == list1); // add an element to the second list, check that iters are still valid + iter3.init(list2, Iter::kHead_IterStart); + iter4.init(list2, Iter::kTail_IterStart); list2.addToHead(ListElement(2)); + #ifdef SK_ENABLE_INST_COUNT SkASSERT(3 == ListElement::InstanceCount()); #endif |