Changeset 148993 in webkit


Ignore:
Timestamp:
Apr 23, 2013 2:24:57 PM (11 years ago)
Author:
benjamin@webkit.org
Message:

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):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r148992 r148993  
     12013-04-23  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Minor String usage fixes in WebCore/platform
     4        https://bugs.webkit.org/show_bug.cgi?id=115021
     5
     6        Reviewed by Andreas Kling.
     7
     8        Use ASCIILiteral when possible + minor fixes.
     9
     10        * platform/ContentType.cpp:
     11        (WebCore::ContentType::codecs):
     12        * platform/ContentType.h:
     13        (ContentType):
     14        * platform/Decimal.cpp:
     15        (WebCore::Decimal::toString):
     16        * platform/KURL.cpp:
     17        (WebCore::KURL::setProtocol):
     18
    1192013-04-23  Dirk Schulze  <krit@webkit.org>
    220
  • trunk/Source/WebCore/platform/ContentType.cpp

    r117662 r148993  
    11/*
    2  * Copyright (C) 2006, 2008 Apple Inc.  All rights reserved.
     2 * Copyright (C) 2006, 2008, 2013 Apple Inc.  All rights reserved.
    33 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
    44 * Copyright (C) 2009 Google Inc.  All rights reserved.
     
    7979Vector<String> ContentType::codecs() const
    8080{
    81     String codecsParameter = parameter("codecs");
     81    String codecsParameter = parameter(ASCIILiteral("codecs"));
    8282
    8383    if (codecsParameter.isEmpty())
     
    8585
    8686    Vector<String> codecs;
    87     codecsParameter.split(",", codecs);
     87    codecsParameter.split(',', codecs);
    8888    for (size_t i = 0; i < codecs.size(); ++i)
    8989        codecs[i] = codecs[i].simplifyWhiteSpace();
  • trunk/Source/WebCore/platform/ContentType.h

    r127757 r148993  
    11/*
    2  * Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
     2 * Copyright (C) 2006, 2013 Apple Computer, Inc.  All rights reserved.
    33 * Copyright (C) 2009 Google Inc.  All rights reserved.
    44 *
     
    3636        explicit ContentType(const String& type);
    3737
    38         String parameter (const String& parameterName) const;
     38        String parameter(const String& parameterName) const;
    3939        String type() const;
    4040        Vector<String> codecs() const;
  • trunk/Source/WebCore/platform/Decimal.cpp

    r143232 r148993  
    11/*
    22 * Copyright (C) 2012 Google Inc. All rights reserved.
     3 * Copyright (C) 2013 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    946947    switch (m_data.formatClass()) {
    947948    case EncodedData::ClassInfinity:
    948         return sign() ? "-Infinity" : "Infinity";
     949        return sign() ? ASCIILiteral("-Infinity") : ASCIILiteral("Infinity");
    949950
    950951    case EncodedData::ClassNaN:
    951         return "NaN";
     952        return ASCIILiteral("NaN");
    952953
    953954    case EncodedData::ClassNormal:
     
    957958    default:
    958959        ASSERT_NOT_REACHED();
    959         return "";
     960        return emptyString();
    960961    }
    961962
  • trunk/Source/WebCore/platform/KURL.cpp

    r148921 r148993  
    11/*
    2  * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2004, 2007, 2008, 2011, 2012, 2013 Apple Inc. All rights reserved.
    33 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
    44 *
     
    701701
    702702    if (!m_isValid) {
    703         parse(newProtocol + ":" + m_string);
     703        parse(newProtocol + ':' + m_string);
    704704        return true;
    705705    }
Note: See TracChangeset for help on using the changeset viewer.