Changeset 156967 in webkit


Ignore:
Timestamp:
Oct 5, 2013 11:32:37 AM (11 years ago)
Author:
Darin Adler
Message:

Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
https://bugs.webkit.org/show_bug.cgi?id=122387

Reviewed by Anders Carlsson.

Source/WebCore:

  • html/canvas/CanvasStyle.h: Take out conditionals.

Source/WebKit2:

  • UIProcess/API/cpp/WKRetainPtr.h: Take out conditionals.

Source/WTF:

  • wtf/RefPtr.h:
  • wtf/RetainPtr.h:
  • wtf/Vector.h:
  • wtf/text/AtomicString.h:
  • wtf/text/WTFString.h:

Take out conditionals.

Location:
trunk/Source
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r156965 r156967  
     12013-10-05  Darin Adler  <darin@apple.com>
     2
     3        Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
     4        https://bugs.webkit.org/show_bug.cgi?id=122387
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * wtf/RefPtr.h:
     9        * wtf/RetainPtr.h:
     10        * wtf/Vector.h:
     11        * wtf/text/AtomicString.h:
     12        * wtf/text/WTFString.h:
     13        Take out conditionals.
     14
    1152013-10-05  Darin Adler  <darin@apple.com>
    216
  • trunk/Source/WTF/wtf/RefPtr.h

    r156931 r156967  
    4343        template<typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { refIfNotNull(m_ptr); }
    4444
    45 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    4645        ALWAYS_INLINE RefPtr(RefPtr&& o) : m_ptr(o.release().leakRef()) { }
    4746        template<typename U> RefPtr(RefPtr<U>&& o) : m_ptr(o.release().leakRef()) { }
    48 #endif
    4947
    5048        // See comments in PassRefPtr.h for an explanation of why this takes a const reference.
     
    7977        template<typename U> RefPtr& operator=(const RefPtr<U>&);
    8078        template<typename U> RefPtr& operator=(const PassRefPtr<U>&);
    81 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    8279        RefPtr& operator=(RefPtr&&);
    8380        template<typename U> RefPtr& operator=(RefPtr<U>&&);
    84 #endif
    8581        void swap(RefPtr&);
    8682
     
    138134    }
    139135
    140 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    141 
    142136    template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(RefPtr&& o)
    143137    {
     
    153147        return *this;
    154148    }
    155 
    156 #endif
    157149
    158150    template<class T> inline void RefPtr<T>::swap(RefPtr& o)
  • trunk/Source/WTF/wtf/RetainPtr.h

    r155604 r156967  
    102102        RetainPtr(const RetainPtr& o) : m_ptr(o.m_ptr) { if (StorageType ptr = m_ptr) CFRetain(ptr); }
    103103
    104 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    105104        RetainPtr(RetainPtr&& o) : m_ptr(toStorageType(o.leakRef())) { }
    106105        template<typename U> RetainPtr(RetainPtr<U>&& o) : m_ptr(toStorageType(o.leakRef())) { }
    107 #endif
    108106
    109107        // Hash table deleted values, which are only constructed and never copied or destroyed.
     
    135133        template<typename U> RetainPtr& operator=(U*);
    136134
    137 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    138135        RetainPtr& operator=(RetainPtr&&);
    139136        template<typename U> RetainPtr& operator=(RetainPtr<U>&&);
    140 #endif
    141137
    142138#if !COMPILER_SUPPORTS(CXX_NULLPTR)
     
    225221    }
    226222
    227 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    228 
    229223    template<typename T> inline RetainPtr<T>& RetainPtr<T>::operator=(RetainPtr&& o)
    230224    {
     
    240234        return *this;
    241235    }
    242 
    243 #endif
    244236
    245237    template<typename T> inline void RetainPtr<T>::swap(RetainPtr& o)
  • trunk/Source/WTF/wtf/Vector.h

    r156507 r156967  
    562562    Vector& operator=(const Vector<T, otherCapacity, otherOverflowBehaviour>&);
    563563
    564 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    565564    Vector(Vector&&);
    566565    Vector& operator=(Vector&&);
    567 #endif
    568566
    569567    size_t size() const { return m_size; }
     
    774772}
    775773
    776 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    777774template<typename T, size_t inlineCapacity, typename OverflowHandler>
    778775Vector<T, inlineCapacity, OverflowHandler>::Vector(Vector<T, inlineCapacity, OverflowHandler>&& other)
     
    789786    return *this;
    790787}
    791 #endif
    792788
    793789template<typename T, size_t inlineCapacity, typename OverflowHandler>
  • trunk/Source/WTF/wtf/text/AtomicString.h

    r156965 r156967  
    7575    }
    7676
    77 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    7877    // We have to declare the copy constructor and copy assignment operator as well, otherwise
    7978    // they'll be implicitly deleted by adding the move constructor and move assignment operator.
     
    8281    AtomicString& operator=(const AtomicString& other) { m_string = other.m_string; return *this; }
    8382    AtomicString& operator=(AtomicString&& other) { m_string = std::move(other.m_string); return *this; }
    84 #endif
    8583
    8684    // Hash table deleted values, which are only constructed and never copied or destroyed.
  • trunk/Source/WTF/wtf/text/WTFString.h

    r156948 r156967  
    134134    String(const char (&characters)[charactersCount], ConstructFromLiteralTag) : m_impl(StringImpl::createFromLiteral<charactersCount>(characters)) { }
    135135
    136 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    137136    // We have to declare the copy constructor and copy assignment operator as well, otherwise
    138137    // they'll be implicitly deleted by adding the move constructor and move assignment operator.
     
    141140    String& operator=(const String& other) { m_impl = other.m_impl; return *this; }
    142141    String& operator=(String&& other) { m_impl = other.m_impl.release(); return *this; }
    143 #endif
    144142
    145143    // Inline the destructor.
  • trunk/Source/WebCore/ChangeLog

    r156965 r156967  
     12013-10-05  Darin Adler  <darin@apple.com>
     2
     3        Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
     4        https://bugs.webkit.org/show_bug.cgi?id=122387
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * html/canvas/CanvasStyle.h: Take out conditionals.
     9
    1102013-10-05  Darin Adler  <darin@apple.com>
    211
  • trunk/Source/WebCore/html/canvas/CanvasStyle.h

    r149928 r156967  
    7373        CanvasStyle(const CanvasStyle&);
    7474        CanvasStyle& operator=(const CanvasStyle&);
    75 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    7675        CanvasStyle(CanvasStyle&&);
    7776        CanvasStyle& operator=(CanvasStyle&&);
    78 #endif
    7977
    8078    private:
     
    142140    }
    143141
    144 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    145142    inline CanvasStyle::CanvasStyle(CanvasStyle&& other)
    146143    {
     
    157154        return *this;
    158155    }
    159 #endif
    160156
    161157} // namespace WebCore
  • trunk/Source/WebKit2/ChangeLog

    r156964 r156967  
     12013-10-05  Darin Adler  <darin@apple.com>
     2
     3        Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
     4        https://bugs.webkit.org/show_bug.cgi?id=122387
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * UIProcess/API/cpp/WKRetainPtr.h: Take out conditionals.
     9
    1102013-10-05  Darin Adler  <darin@apple.com>
    211
  • trunk/Source/WebKit2/UIProcess/API/cpp/WKRetainPtr.h

    r101529 r156967  
    6969    }
    7070
    71 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    7271    template<typename U> WKRetainPtr(WKRetainPtr<U>&& o)
    7372        : m_ptr(o.leakRef())
     
    7978    {
    8079    }
    81 #endif
    8280
    8381    ~WKRetainPtr()
     
    116114    template<typename U> WKRetainPtr& operator=(U*);
    117115
    118 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    119116    WKRetainPtr& operator=(WKRetainPtr&&);
    120117    template<typename U> WKRetainPtr& operator=(WKRetainPtr<U>&&);
    121 #endif
    122118
    123119    void adopt(PtrType);
     
    174170}
    175171
    176 #if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
    177172template<typename T> inline WKRetainPtr<T>& WKRetainPtr<T>::operator=(WKRetainPtr<T>&& o)
    178173{
     
    186181    return *this;
    187182}
    188 #endif
    189183
    190184template<typename T> inline void WKRetainPtr<T>::adopt(PtrType optr)
Note: See TracChangeset for help on using the changeset viewer.