Minor String usage fixes in WebCore/platform
https://bugs.webkit.org/show_bug.cgi?id=115021
Reviewed by Andreas Kling.
Use ASCIILiteral when possible + minor fixes.
* platform/ContentType.cpp:
(WebCore::ContentType::codecs):
* platform/ContentType.h:
(ContentType):
* platform/Decimal.cpp:
(WebCore::Decimal::toString):
* platform/KURL.cpp:
(WebCore::KURL::setProtocol):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/platform/Decimal.cpp b/Source/WebCore/platform/Decimal.cpp
index a47c207..624c3c5 100644
--- a/Source/WebCore/platform/Decimal.cpp
+++ b/Source/WebCore/platform/Decimal.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -945,10 +946,10 @@
{
switch (m_data.formatClass()) {
case EncodedData::ClassInfinity:
- return sign() ? "-Infinity" : "Infinity";
+ return sign() ? ASCIILiteral("-Infinity") : ASCIILiteral("Infinity");
case EncodedData::ClassNaN:
- return "NaN";
+ return ASCIILiteral("NaN");
case EncodedData::ClassNormal:
case EncodedData::ClassZero:
@@ -956,7 +957,7 @@
default:
ASSERT_NOT_REACHED();
- return "";
+ return emptyString();
}
StringBuilder builder;