diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
| commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
| tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/JavaScriptCore/runtime/Identifier.h | |
| parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/JavaScriptCore/runtime/Identifier.h')
| -rw-r--r-- | Source/JavaScriptCore/runtime/Identifier.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/runtime/Identifier.h b/Source/JavaScriptCore/runtime/Identifier.h index b9e5a1854..14960876b 100644 --- a/Source/JavaScriptCore/runtime/Identifier.h +++ b/Source/JavaScriptCore/runtime/Identifier.h @@ -178,11 +178,11 @@ namespace JSC { if (!length) return StringImpl::empty(); CharBuffer<T> buf = {s, length}; - pair<HashSet<StringImpl*>::iterator, bool> addResult = globalData->identifierTable->add<CharBuffer<T>, IdentifierCharBufferTranslator<T> >(buf); + HashSet<StringImpl*>::AddResult addResult = globalData->identifierTable->add<CharBuffer<T>, IdentifierCharBufferTranslator<T> >(buf); // If the string is newly-translated, then we need to adopt it. // The boolean in the pair tells us if that is so. - return addResult.second ? adoptRef(*addResult.first) : *addResult.first; + return addResult.isNewEntry ? adoptRef(*addResult.iterator) : *addResult.iterator; } inline bool operator==(const Identifier& a, const Identifier& b) @@ -246,10 +246,10 @@ namespace JSC { typedef HashMap<RefPtr<StringImpl>, int, IdentifierRepHash, HashTraits<RefPtr<StringImpl> >, IdentifierMapIndexHashTraits> IdentifierMap; template<typename U, typename V> - std::pair<HashSet<StringImpl*>::iterator, bool> IdentifierTable::add(U value) + HashSet<StringImpl*>::AddResult IdentifierTable::add(U value) { - std::pair<HashSet<StringImpl*>::iterator, bool> result = m_table.add<U, V>(value); - (*result.first)->setIsIdentifier(true); + HashSet<StringImpl*>::AddResult result = m_table.add<U, V>(value); + (*result.iterator)->setIsIdentifier(true); return result; } |
