summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/Identifier.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/JavaScriptCore/runtime/Identifier.cpp
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/JavaScriptCore/runtime/Identifier.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/Identifier.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/runtime/Identifier.cpp b/Source/JavaScriptCore/runtime/Identifier.cpp
index fbc5787ce..182bcc462 100644
--- a/Source/JavaScriptCore/runtime/Identifier.cpp
+++ b/Source/JavaScriptCore/runtime/Identifier.cpp
@@ -110,11 +110,11 @@ PassRefPtr<StringImpl> Identifier::add(JSGlobalData* globalData, const char* c)
if (iter != literalIdentifierTable.end())
return iter->second;
- pair<HashSet<StringImpl*>::iterator, bool> addResult = identifierTable.add<const LChar*, IdentifierCStringTranslator>(reinterpret_cast<const LChar*>(c));
+ HashSet<StringImpl*>::AddResult addResult = identifierTable.add<const LChar*, IdentifierCStringTranslator>(reinterpret_cast<const LChar*>(c));
// If the string is newly-translated, then we need to adopt it.
// The boolean in the pair tells us if that is so.
- RefPtr<StringImpl> addedString = addResult.second ? adoptRef(*addResult.first) : *addResult.first;
+ RefPtr<StringImpl> addedString = addResult.isNewEntry ? adoptRef(*addResult.iterator) : *addResult.iterator;
literalIdentifierTable.add(c, addedString.get());
@@ -138,11 +138,11 @@ PassRefPtr<StringImpl> Identifier::add8(JSGlobalData* globalData, const UChar* s
if (!length)
return StringImpl::empty();
CharBuffer<UChar> buf = {s, length};
- pair<HashSet<StringImpl*>::iterator, bool> addResult = globalData->identifierTable->add<CharBuffer<UChar>, IdentifierLCharFromUCharTranslator >(buf);
+ HashSet<StringImpl*>::AddResult addResult = globalData->identifierTable->add<CharBuffer<UChar>, IdentifierLCharFromUCharTranslator >(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;
}
template <typename CharType>
@@ -210,7 +210,7 @@ PassRefPtr<StringImpl> Identifier::addSlowCase(JSGlobalData* globalData, StringI
return r;
}
- return *globalData->identifierTable->add(r).first;
+ return *globalData->identifierTable->add(r).iterator;
}
PassRefPtr<StringImpl> Identifier::addSlowCase(ExecState* exec, StringImpl* r)