Modernize QualifiedName by wrapping gNameCache in a function and using more early...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Jul 2013 00:45:12 +0000 (00:45 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Jul 2013 00:45:12 +0000 (00:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=118299

Reviewed by Andreas Kling.

Address Ben's review comment.

* dom/QualifiedName.cpp:
(WebCore::QualifiedName::toString):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@152618 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/QualifiedName.cpp

index 0ca4ab858c2990580d955a13c76f4d936b1a270b..e15ce63351bb897f7c8680e20b28ed92158aa1fe 100644 (file)
@@ -1,3 +1,15 @@
+2013-07-14  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Modernize QualifiedName by wrapping gNameCache in a function and using more early exits
+        https://bugs.webkit.org/show_bug.cgi?id=118299
+
+        Reviewed by Andreas Kling.
+
+        Address Ben's review comment.
+
+        * dom/QualifiedName.cpp:
+        (WebCore::QualifiedName::toString):
+
 2013-07-14  Ryosuke Niwa  <rniwa@webkit.org>
 
         HTMLTextFormControlElement::valueWithHardLineBreaks shouldn't upconvert 8-bit string
index 587dad2e14a1cb67adc912426daef5ed37c10f11..1b3fe8de4d6f24ea6852908a0fd7437ce947dc51 100644 (file)
@@ -117,11 +117,7 @@ String QualifiedName::toString() const
     if (!hasPrefix())
         return localName();
 
-    StringBuilder result;
-    result.append(prefix());
-    result.append(':');
-    result.append(localName());
-    return result.toString();
+    return prefix() + ':' + localName();
 }
 
 // Global init routines