Ticket #1852: wrong-operator-signature.patch

File wrong-operator-signature.patch, 2.6 KB (added by Markus, 11 years ago)
  • trunk/source/gui/GUIRenderer.cpp

    diff -Nur a/trunk/source/gui/GUIRenderer.cpp b/trunk/source/gui/GUIRenderer.cpp
    a b  
    5050{
    5151}
    5252
    53 const DrawCalls& DrawCalls::operator=(const DrawCalls&)
     53DrawCalls& DrawCalls::operator=(const DrawCalls&)
    5454{
    5555    return *this;
    5656}
  • trunk/source/gui/GUIRenderer.h

    diff -Nur a/trunk/source/gui/GUIRenderer.h b/trunk/source/gui/GUIRenderer.h
    a b  
    6969        DrawCalls();
    7070        // Copy/assignment results in an empty list, not an actual copy
    7171        DrawCalls(const DrawCalls&);
    72         const DrawCalls& operator=(const DrawCalls&);
     72        DrawCalls& operator=(const DrawCalls&);
    7373    };
    7474}
    7575
  • trunk/source/ps/Overlay.cpp

    diff -Nur a/trunk/source/ps/Overlay.cpp b/trunk/source/ps/Overlay.cpp
    a b  
    103103}
    104104
    105105// =
    106 void CRect::operator = (const CRect& a)
     106CRect& CRect::operator = (const CRect& a)
    107107{
    108108    left = a.left;
    109109    top = a.top;
    110110    right = a.right;
    111111    bottom = a.bottom;
     112    return *this;
    112113}
    113114
    114115// ==
     
    296297}
    297298
    298299// =
    299 void CPos::operator = (const CPos& a)
     300CPos& CPos::operator = (const CPos& a)
    300301{
    301302    x = a.x;
    302303    y = a.y;
     304    return *this;
    303305}
    304306
    305307// ==
     
    397399}
    398400
    399401// =
    400 void CSize::operator = (const CSize& a)
     402CSize& CSize::operator = (const CSize& a)
    401403{
    402404    cx = a.cx;
    403405    cy = a.cy;
     406    return *this;
    404407}
    405408
    406409// ==
  • trunk/source/ps/Overlay.h

    diff -Nur a/trunk/source/ps/Overlay.h b/trunk/source/ps/Overlay.h
    a b  
    7979    CRect(const float l, const float t, const float r, const float b);
    8080
    8181    // Operators
    82     void                operator =  (const CRect& a);
     82    CRect&              operator =  (const CRect& a);
    8383    bool                operator == (const CRect& a) const;
    8484    bool                operator != (const CRect& a) const;
    8585    CRect               operator -  (void) const;
     
    172172    CPos(const float &_x, const float &_y);
    173173
    174174    // Operators
    175     void                operator =  (const CPos& a);
     175    CPos&               operator =  (const CPos& a);
    176176    bool                operator == (const CPos& a) const;
    177177    bool                operator != (const CPos& a) const;
    178178    CPos                operator -  (void) const;
     
    211211    CSize(const float &_cx, const float &_cy);
    212212
    213213    // Operators
    214     void                operator =  (const CSize& a);
     214    CSize&              operator =  (const CSize& a);
    215215    bool                operator == (const CSize& a) const;
    216216    bool                operator != (const CSize& a) const;
    217217    CSize               operator -  (void) const;