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

Side by Side Diff: Source/core/dom/QualifiedName.cpp

Issue 17045008: HashSet: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' meth… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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 | « no previous file | Source/core/svg/SVGAElement.cpp » ('j') | 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, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2009 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 }; 66 };
67 67
68 static QNameSet* gNameCache; 68 static QNameSet* gNameCache;
69 69
70 QualifiedName::QualifiedName(const AtomicString& p, const AtomicString& l, const AtomicString& n) 70 QualifiedName::QualifiedName(const AtomicString& p, const AtomicString& l, const AtomicString& n)
71 { 71 {
72 if (!gNameCache) 72 if (!gNameCache)
73 gNameCache = new QNameSet; 73 gNameCache = new QNameSet;
74 QualifiedNameComponents components = { p.impl(), l.impl(), n.isEmpty() ? nul lAtom.impl() : n.impl() }; 74 QualifiedNameComponents components = { p.impl(), l.impl(), n.isEmpty() ? nul lAtom.impl() : n.impl() };
75 QNameSet::AddResult addResult = gNameCache->add<QualifiedNameComponents, QNa meComponentsTranslator>(components); 75 QNameSet::AddResult addResult = gNameCache->add<QNameComponentsTranslator>(c omponents);
76 m_impl = *addResult.iterator; 76 m_impl = *addResult.iterator;
77 if (!addResult.isNewEntry) 77 if (!addResult.isNewEntry)
78 m_impl->ref(); 78 m_impl->ref();
79 } 79 }
80 80
81 QualifiedName::~QualifiedName() 81 QualifiedName::~QualifiedName()
82 { 82 {
83 deref(); 83 deref();
84 } 84 }
85 85
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 { 158 {
159 new (reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom, AtomicS tring(name), nameNamespace); 159 new (reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom, AtomicS tring(name), nameNamespace);
160 } 160 }
161 161
162 void createQualifiedName(void* targetAddress, StringImpl* name) 162 void createQualifiedName(void* targetAddress, StringImpl* name)
163 { 163 {
164 new (reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom, AtomicS tring(name), nullAtom); 164 new (reinterpret_cast<void*>(targetAddress)) QualifiedName(nullAtom, AtomicS tring(name), nullAtom);
165 } 165 }
166 166
167 } 167 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGAElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698