Remove PassTraits.h
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Sep 2013 21:53:38 +0000 (21:53 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Sep 2013 21:53:38 +0000 (21:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121805

Reviewed by Andreas Kling.

We no longer need PassTraits.h, get rid of it.

* GNUmakefile.list.am:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/PassTraits.h: Removed.

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

Source/WTF/ChangeLog
Source/WTF/GNUmakefile.list.am
Source/WTF/WTF.vcxproj/WTF.vcxproj
Source/WTF/WTF.vcxproj/WTF.vcxproj.filters
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/PassTraits.h [deleted file]

index bb8d8061ab13c5e53e0d19ec679562328716927f..3f5fc618ded390ecd8511d21068be330e441188b 100644 (file)
@@ -1,3 +1,19 @@
+2013-09-23  Anders Carlsson  <andersca@apple.com>
+
+        Remove PassTraits.h
+        https://bugs.webkit.org/show_bug.cgi?id=121805
+
+        Reviewed by Andreas Kling.
+
+        We no longer need PassTraits.h, get rid of it.
+
+        * GNUmakefile.list.am:
+        * WTF.vcxproj/WTF.vcxproj:
+        * WTF.vcxproj/WTF.vcxproj.filters:
+        * WTF.xcodeproj/project.pbxproj:
+        * wtf/CMakeLists.txt:
+        * wtf/PassTraits.h: Removed.
+
 2013-09-23  Anders Carlsson  <andersca@apple.com>
 
         ListHashSet should work with move-only types
index 5931a2f59a3784844643de20f5b2f9f358d2e0a2..902ceedbc4b6a31c12354c75a6be244ae8c6e356 100644 (file)
@@ -118,7 +118,6 @@ wtf_sources += \
     Source/WTF/wtf/ParallelJobsOpenMP.h \
     Source/WTF/wtf/PassOwnPtr.h \
     Source/WTF/wtf/PassRefPtr.h \
-    Source/WTF/wtf/PassTraits.h \
     Source/WTF/wtf/Platform.h \
     Source/WTF/wtf/PossiblyNull.h \
     Source/WTF/wtf/PrintStream.cpp \
index 1deb14eb4842bc3d3166ad954a5b38f8df746973..39d5b5d6fe379a318f982701447fd34b86799927 100644 (file)
     <ClInclude Include="..\wtf\ParallelJobsOpenMP.h" />\r
     <ClInclude Include="..\wtf\PassOwnPtr.h" />\r
     <ClInclude Include="..\wtf\PassRefPtr.h" />\r
-    <ClInclude Include="..\wtf\PassTraits.h" />\r
     <ClInclude Include="..\wtf\Platform.h" />\r
     <ClInclude Include="..\wtf\PossiblyNull.h" />\r
     <ClInclude Include="..\wtf\PrintStream.h" />\r
index 99b44baad2f7013b7bdd3c45f0f99925369971f1..2bd73a3929dcef870349230e995fd10879677f9a 100644 (file)
     <ClInclude Include="..\wtf\PassRefPtr.h">\r
       <Filter>wtf</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\wtf\PassTraits.h">\r
-      <Filter>wtf</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="..\wtf\Platform.h">\r
       <Filter>wtf</Filter>\r
     </ClInclude>\r
index 2e82230257424afc9d6db2d3287d49076bd656fd..12e464a41f6274acc1864d7c0c81077857bb17d5 100644 (file)
                A8A47408151A825B004123FF /* ParallelJobsLibdispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472E9151A825B004123FF /* ParallelJobsLibdispatch.h */; };
                A8A4740B151A825B004123FF /* PassOwnPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472EC151A825B004123FF /* PassOwnPtr.h */; };
                A8A4740C151A825B004123FF /* PassRefPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472ED151A825B004123FF /* PassRefPtr.h */; };
-               A8A4740D151A825B004123FF /* PassTraits.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472EE151A825B004123FF /* PassTraits.h */; };
                A8A4740F151A825B004123FF /* PossiblyNull.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472F3151A825B004123FF /* PossiblyNull.h */; };
                A8A47414151A825B004123FF /* RandomNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A472FB151A825B004123FF /* RandomNumber.cpp */; };
                A8A47415151A825B004123FF /* RandomNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472FC151A825B004123FF /* RandomNumber.h */; };
                A8A472E9151A825B004123FF /* ParallelJobsLibdispatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParallelJobsLibdispatch.h; sourceTree = "<group>"; };
                A8A472EC151A825B004123FF /* PassOwnPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PassOwnPtr.h; sourceTree = "<group>"; };
                A8A472ED151A825B004123FF /* PassRefPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PassRefPtr.h; sourceTree = "<group>"; };
-               A8A472EE151A825B004123FF /* PassTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PassTraits.h; sourceTree = "<group>"; };
                A8A472F3151A825B004123FF /* PossiblyNull.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PossiblyNull.h; sourceTree = "<group>"; };
                A8A472FB151A825B004123FF /* RandomNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RandomNumber.cpp; sourceTree = "<group>"; };
                A8A472FC151A825B004123FF /* RandomNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomNumber.h; sourceTree = "<group>"; };
                                A8A472E9151A825B004123FF /* ParallelJobsLibdispatch.h */,
                                A8A472EC151A825B004123FF /* PassOwnPtr.h */,
                                A8A472ED151A825B004123FF /* PassRefPtr.h */,
-                               A8A472EE151A825B004123FF /* PassTraits.h */,
                                A876DBD7151816E500DADB95 /* Platform.h */,
                                A8A472F3151A825B004123FF /* PossiblyNull.h */,
                                0F9D335D165DBA73005AD387 /* PrintStream.cpp */,
                                A8A47408151A825B004123FF /* ParallelJobsLibdispatch.h in Headers */,
                                A8A4740B151A825B004123FF /* PassOwnPtr.h in Headers */,
                                A8A4740C151A825B004123FF /* PassRefPtr.h in Headers */,
-                               A8A4740D151A825B004123FF /* PassTraits.h in Headers */,
                                A876DBD8151816E500DADB95 /* Platform.h in Headers */,
                                A8A4740F151A825B004123FF /* PossiblyNull.h in Headers */,
                                0F9D3363165DBA73005AD387 /* PrintStream.h in Headers */,
index ec652fe6d574bc07eb396cd53be5e285006391d4..01e604b8988114d8c72e4bf33328910f08b1a328 100644 (file)
@@ -68,7 +68,6 @@ set(WTF_HEADERS
     ParallelJobsOpenMP.h
     PassOwnPtr.h
     PassRefPtr.h
-    PassTraits.h
     Platform.h
     PossiblyNull.h
     PrintStream.h
diff --git a/Source/WTF/wtf/PassTraits.h b/Source/WTF/wtf/PassTraits.h
deleted file mode 100644 (file)
index 9564e3a..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2011 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 met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WTF_PassTraits_h
-#define WTF_PassTraits_h
-
-#include <wtf/OwnPtr.h>
-#include <wtf/RefPtr.h>
-
-// The PassTraits template exists to help optimize (or make possible) use
-// of WTF data structures with WTF smart pointers that have a Pass
-// variant for transfer of ownership
-
-namespace WTF {
-
-template<typename T> struct PassTraits {
-    typedef T Type;
-    typedef T PassType;
-    static PassType transfer(Type& value) { return value; }
-};
-
-template<typename T> struct PassTraits<OwnPtr<T> > {
-    typedef OwnPtr<T> Type;
-    typedef PassOwnPtr<T> PassType;
-    static PassType transfer(Type& value) { return value.release(); }
-};
-
-template<typename T> struct PassTraits<RefPtr<T> > {
-    typedef RefPtr<T> Type;
-    typedef PassRefPtr<T> PassType;
-    static PassType transfer(Type& value) { return value.release(); }
-};
-
-} // namespace WTF
-
-using WTF::PassTraits;
-
-#endif // WTF_PassTraits_h