changeset 325:b460cd08041f signals

dmd 2.037 opEquals bug-feature
author eldar1@eldar1-laptop
date Wed, 30 Dec 2009 11:25:07 +0000
parents 0cc996b7a601
children baaf74652f4c
files generator/CMakeLists.txt qt/d2/qt/core/QLine.d qt/d2/qt/core/QPoint.d qt/d2/qt/core/QRect.d qt/d2/qt/core/QRectF.d qt/d2/qt/core/QSize.d qt/qtd/Atomic.d
diffstat 7 files changed, 23 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/generator/CMakeLists.txt	Tue Dec 29 02:48:09 2009 +0500
+++ b/generator/CMakeLists.txt	Wed Dec 30 11:25:07 2009 +0000
@@ -139,21 +139,6 @@
     generator.qrc
 )
 
-#win32-msvc2005:{
-#        QMAKE_CXXFLAGS += -wd4996
-#        QMAKE_CFLAGS += -wd4996
-#}
-
-#if(MSVC)
-#    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm500 /Zc:wchar_t-")
-#endif(MSVC)
-
-#win32-msvc.net {
-#        QMAKE_CXXFLAGS += /Zm500
-#        QMAKE_CXXFLAGS -= -Zm200
-#        QMAKE_CFLAGS -= -Zm200
-#}
-
 ## Includes path.
 set(inc_paths
     ${CMAKE_CURRENT_SOURCE_DIR}/../common 
--- a/qt/d2/qt/core/QLine.d	Tue Dec 29 02:48:09 2009 +0500
+++ b/qt/d2/qt/core/QLine.d	Wed Dec 30 11:25:07 2009 +0000
@@ -123,7 +123,7 @@
         pt2 = QPoint(aX2, aY2);
     }
 
-    bool opEquals(ref QLine d) // const
+    bool opEquals(ref const QLine d) const
     {
         return pt1 == d.pt1 && pt2 == d.pt2;
     }
@@ -320,7 +320,7 @@
         pt2 = QPointF(aX2, aY2);
     }
 
-    bool opEquals(ref QLineF d) // const
+    bool opEquals(ref const QLineF d) const
     {
         return pt1 == d.pt1 && pt2 == d.pt2;
     }
--- a/qt/d2/qt/core/QPoint.d	Tue Dec 29 02:48:09 2009 +0500
+++ b/qt/d2/qt/core/QPoint.d	Wed Dec 30 11:25:07 2009 +0000
@@ -61,7 +61,7 @@
     QPoint opMulAssign(qreal c)
     { xp = qRound(xp*c); yp = qRound(yp*c); return this; }
 
-    bool opEquals(ref QPoint p)
+    bool opEquals(ref const QPoint p) const
     { return xp == p.xp && yp == p.yp; }
 
     QPoint opAdd(ref QPoint p)
@@ -184,7 +184,7 @@
     QPointF opMulAssign(qreal c)
     { xp*=c; yp*=c; return this; }
 
-    bool opEquals(ref QPointF p)
+    bool opEquals(ref const QPointF p) const
     { return qFuzzyCompare(xp, p.xp) && qFuzzyCompare(yp, p.yp); }
 
     QPointF opAdd(ref QPointF p)
--- a/qt/d2/qt/core/QRect.d	Tue Dec 29 02:48:09 2009 +0500
+++ b/qt/d2/qt/core/QRect.d	Wed Dec 30 11:25:07 2009 +0000
@@ -300,7 +300,7 @@
         return this | r;
     }
 
-    bool opEquals(const QRect r)
+    bool opEquals(ref const QRect r) const
     {
         return x1==r.x1 && x2==r.x2 && y1==r.y1 && y2==r.y2;
     }
--- a/qt/d2/qt/core/QRectF.d	Tue Dec 29 02:48:09 2009 +0500
+++ b/qt/d2/qt/core/QRectF.d	Wed Dec 30 11:25:07 2009 +0000
@@ -254,7 +254,7 @@
         return this | r;
     }
 
-    bool opEquals(ref QRectF r)
+    bool opEquals(ref const QRectF r) const
     {
         return qFuzzyCompare(xp, r.xp) && qFuzzyCompare(yp, r.yp)
             && qFuzzyCompare(w, r.w) && qFuzzyCompare(h, r.h);
--- a/qt/d2/qt/core/QSize.d	Tue Dec 29 02:48:09 2009 +0500
+++ b/qt/d2/qt/core/QSize.d	Wed Dec 30 11:25:07 2009 +0000
@@ -91,7 +91,7 @@
 	QSize opMulAssign(qreal c)
 	{ wd = qRound(wd*c); ht = qRound(ht*c); return this; }
 
-	bool opEquals(ref QSize s)
+	bool opEquals(ref const QSize s) const
 	{ return wd == s.wd && ht == s.ht; }
 
 	QSize opAdd(ref QSize s)
@@ -225,7 +225,7 @@
 	QSizeF opMulAssign(qreal c)
 	{ wd *= c; ht *= c; return this; }
 
-	bool opEquals(ref QSizeF s)
+	bool opEquals(ref const QSizeF s) const
 	{ return qFuzzyCompare(wd, s.wd) && qFuzzyCompare(ht, s.ht); }
 
 	QSizeF opAdd(ref QSizeF s)
--- a/qt/qtd/Atomic.d	Tue Dec 29 02:48:09 2009 +0500
+++ b/qt/qtd/Atomic.d	Wed Dec 30 11:25:07 2009 +0000
@@ -116,7 +116,7 @@
          * Returns:
          *  The loaded value.
          */
-        T atomicLoad( inout T val )
+        T atomicLoad( ref T val )
         {
             return val;
         }
@@ -146,7 +146,7 @@
          *  val     = The destination variable.
          *  newval  = The value to store.
          */
-        void atomicStore( inout T val, T newval )
+        void atomicStore( ref T val, T newval )
         {
 
         }
@@ -180,7 +180,7 @@
          * Returns:
          *  true if the store occurred, false if not.
          */
-        bool atomicStoreIf( inout T val, T newval, T equalTo )
+        bool atomicStoreIf( ref T val, T newval, T equalTo )
         {
             return false;
         }
@@ -220,7 +220,7 @@
          *  newly stored value.  Thus, competing writes are allowed to occur
          *  between the increment and successive load operation.
          */
-        T atomicIncrement( inout T val )
+        T atomicIncrement( ref T val )
         {
             return val;
         }
@@ -260,7 +260,7 @@
          *  newly stored value.  Thus, competing writes are allowed to occur
          *  between the increment and successive load operation.
          */
-        T atomicDecrement( inout T val )
+        T atomicDecrement( ref T val )
         {
             return val;
         }
@@ -523,7 +523,7 @@
 
     template atomicLoad( msync ms = msync.seq, T )
     {
-        T atomicLoad( inout T val )
+        T atomicLoad( ref T val )
         in
         {
             assert( atomicValueIsProperlyAligned!(T)( cast(size_t) &val ) );
@@ -670,7 +670,7 @@
 
     template atomicStore( msync ms = msync.seq, T )
     {
-        void atomicStore( inout T val, T newval )
+        void atomicStore( ref T val, T newval )
         in
         {
             assert( atomicValueIsProperlyAligned!(T)( cast(size_t) &val ) );
@@ -824,7 +824,7 @@
 
     template atomicStoreIf( msync ms = msync.seq, T )
     {
-        bool atomicStoreIf( inout T val, T newval, T equalTo )
+        bool atomicStoreIf( ref T val, T newval, T equalTo )
         in
         {
             // NOTE: 32 bit x86 systems support 8 byte CAS, which only requires
@@ -970,7 +970,7 @@
         static assert( isValidNumericType!(T) );
 
 
-        T atomicIncrement( inout T val )
+        T atomicIncrement( ref T val )
         in
         {
             assert( atomicValueIsProperlyAligned!(T)( cast(size_t) &val ) );
@@ -1082,7 +1082,7 @@
         static assert( isValidNumericType!(T) );
 
 
-        T atomicDecrement( inout T val )
+        T atomicDecrement( ref T val )
         in
         {
             assert( atomicValueIsProperlyAligned!(T)( cast(size_t) &val ) );
@@ -1228,7 +1228,7 @@
 
     template atomicLoad( msync ms = msync.seq, T )
     {
-        T atomicLoad( inout T val )
+        T atomicLoad( ref T val )
         in
         {
             assert( atomicValueIsProperlyAligned!(T)( cast(size_t) &val ) );
@@ -1278,7 +1278,7 @@
 
     template atomicStore( msync ms = msync.seq, T )
     {
-        void atomicStore( inout T val, T newval )
+        void atomicStore( ref T val, T newval )
         in
         {
             assert( atomicValueIsProperlyAligned!(T)( cast(size_t) &val ) );
@@ -1328,7 +1328,7 @@
 
     template atomicStoreIf( msync ms = msync.seq, T )
     {
-        bool atomicStoreIf( inout T val, T newval, T equalTo )
+        bool atomicStoreIf( ref T val, T newval, T equalTo )
         in
         {
             assert( atomicValueIsProperlyAligned!(T)( cast(size_t) &val ) );
@@ -1379,7 +1379,7 @@
         static assert( isValidNumericType!(T) );
 
 
-        T atomicIncrement( inout T val )
+        T atomicIncrement( ref T val )
         in
         {
             assert( atomicValueIsProperlyAligned!(T)( cast(size_t) &val ) );
@@ -1425,7 +1425,7 @@
         static assert( isValidNumericType!(T) );
 
 
-        T atomicDecrement( inout T val )
+        T atomicDecrement( ref T val )
         in
         {
             assert( atomicValueIsProperlyAligned!(T)( cast(size_t) &val ) );