Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: third_party/WebKit/Source/wtf/VectorTest.cpp

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/HashTable.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 } 293 }
294 294
295 WrappedInt& operator=(const WrappedInt& other) { 295 WrappedInt& operator=(const WrappedInt& other) {
296 m_i = other.m_i; 296 m_i = other.m_i;
297 return *this; 297 return *this;
298 } 298 }
299 299
300 ~WrappedInt() { 300 ~WrappedInt() {
301 EXPECT_EQ(m_originalThisPtr, this); 301 EXPECT_EQ(m_originalThisPtr, this);
302 EXPECT_TRUE(constructedWrappedInts.contains(this)); 302 EXPECT_TRUE(constructedWrappedInts.contains(this));
303 constructedWrappedInts.remove(this); 303 constructedWrappedInts.erase(this);
304 } 304 }
305 305
306 int get() const { return m_i; } 306 int get() const { return m_i; }
307 307
308 private: 308 private:
309 void* m_originalThisPtr; 309 void* m_originalThisPtr;
310 int m_i; 310 int m_i;
311 }; 311 };
312 312
313 TEST(VectorTest, SwapWithInlineCapacity) { 313 TEST(VectorTest, SwapWithInlineCapacity) {
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 static_assert(VectorTraits<UChar>::canCopyWithMemcpy, 699 static_assert(VectorTraits<UChar>::canCopyWithMemcpy,
700 "UChar should be copied with memcpy."); 700 "UChar should be copied with memcpy.");
701 701
702 class UnknownType; 702 class UnknownType;
703 static_assert(VectorTraits<UnknownType*>::canCopyWithMemcpy, 703 static_assert(VectorTraits<UnknownType*>::canCopyWithMemcpy,
704 "Pointers should be copied with memcpy."); 704 "Pointers should be copied with memcpy.");
705 705
706 } // anonymous namespace 706 } // anonymous namespace
707 707
708 } // namespace WTF 708 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/HashTable.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698