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

Side by Side Diff: Source/wtf/Vector.h

Issue 23766020: Trivial changes to default Vector sizing in the shadow area. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/shadow/InsertionPoint.cpp ('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) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 ASSERT(begin()); 921 ASSERT(begin());
922 922
923 new (NotNull, end()) T(*ptr); 923 new (NotNull, end()) T(*ptr);
924 ++m_size; 924 ++m_size;
925 } 925 }
926 926
927 // This version of append saves a branch in the case where you know that the 927 // This version of append saves a branch in the case where you know that the
928 // vector's capacity is large enough for the append to succeed. 928 // vector's capacity is large enough for the append to succeed.
929 929
930 template<typename T, size_t inlineCapacity> template<typename U> 930 template<typename T, size_t inlineCapacity> template<typename U>
931 inline void Vector<T, inlineCapacity>::uncheckedAppend(const U& val) 931 ALWAYS_INLINE void Vector<T, inlineCapacity>::uncheckedAppend(const U& val)
esprehn 2013/09/10 03:11:40 What does this do to the binary size?
932 { 932 {
933 ASSERT(size() < capacity()); 933 ASSERT(size() < capacity());
934 const U* ptr = &val; 934 const U* ptr = &val;
935 new (NotNull, end()) T(*ptr); 935 new (NotNull, end()) T(*ptr);
936 ++m_size; 936 ++m_size;
937 } 937 }
938 938
939 // This method should not be called append, a better name would be appendEle ments. 939 // This method should not be called append, a better name would be appendEle ments.
940 // It could also be eliminated entirely, and call sites could just use 940 // It could also be eliminated entirely, and call sites could just use
941 // appendRange(val.begin(), val.end()). 941 // appendRange(val.begin(), val.end()).
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 inline bool operator!=(const Vector<T, inlineCapacity>& a, const Vector<T, i nlineCapacity>& b) 1064 inline bool operator!=(const Vector<T, inlineCapacity>& a, const Vector<T, i nlineCapacity>& b)
1065 { 1065 {
1066 return !(a == b); 1066 return !(a == b);
1067 } 1067 }
1068 1068
1069 } // namespace WTF 1069 } // namespace WTF
1070 1070
1071 using WTF::Vector; 1071 using WTF::Vector;
1072 1072
1073 #endif // WTF_Vector_h 1073 #endif // WTF_Vector_h
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/InsertionPoint.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698