Bug 189082

Summary: Rename wtf/text/mac/StringMac.mm to wtf/text/cocoa/StringCocoa.mm
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Web Template FrameworkAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=186924
Bug Depends on:    
Bug Blocks: 188754    
Attachments:
Description Flags
Patch v1 none

Description David Kilzer (:ddkilzer) 2018-08-29 09:37:09 PDT
Rename wtf/text/mac/StringMac.mm to wtf/text/cococa/StringCococa.mm.

In the WTF Xcode project, StringMac.mm is already in the Source/wtf/text/cocoa folder.

Moving it makes tidy-Xcode-project-file (Bug 188754) work without warnings, and renaming it makes it match naming conventions.
Comment 1 David Kilzer (:ddkilzer) 2018-08-29 09:46:27 PDT
Created attachment 348404 [details]
Patch v1
Comment 2 David Kilzer (:ddkilzer) 2018-08-29 09:47:05 PDT
(In reply to David Kilzer (:ddkilzer) from comment #1)
> Created attachment 348404 [details]
> Patch v1

Here are the changes to String{Mac,Cocoa}.mm:

diff --git a/Source/WTF/wtf/text/mac/StringMac.mm b/Source/WTF/wtf/text/cocoa/StringCocoa.mm
similarity index 95%
rename from Source/WTF/wtf/text/mac/StringMac.mm
rename to Source/WTF/wtf/text/cocoa/StringCocoa.mm
index 34e5c1a84fd..c6940aac125 100644
--- a/Source/WTF/wtf/text/mac/StringMac.mm
+++ b/Source/WTF/wtf/text/cocoa/StringCocoa.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Apple Inc.
+ * Copyright (C) 2006-2018 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -31,7 +31,7 @@ String::String(NSString *str)
         return;
 
     CFIndex size = CFStringGetLength(reinterpret_cast<CFStringRef>(str));
-    if (size == 0)
+    if (!size)
         m_impl = StringImpl::empty();
     else {
         Vector<LChar, 1024> lcharBuffer(size);
Comment 3 WebKit Commit Bot 2018-08-29 12:24:47 PDT
Comment on attachment 348404 [details]
Patch v1

Clearing flags on attachment: 348404

Committed r235473: <https://trac.webkit.org/changeset/235473>
Comment 4 WebKit Commit Bot 2018-08-29 12:24:49 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-08-29 12:25:32 PDT
<rdar://problem/43852919>