]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fixed 64bit portability src/SUIT/SUIT_TreeModel.cxx
authorkan <kan@opencascade.com>
Fri, 15 Jul 2011 11:18:38 +0000 (11:18 +0000)
committerkan <kan@opencascade.com>
Fri, 15 Jul 2011 11:18:38 +0000 (11:18 +0000)
src/SUIT/SUIT_TreeModel.cxx

index 6935787583f392a077642e8671c947c27f715404..95ccb9e6b83570be8fdd687c88f745dfd847914c 100755 (executable)
@@ -1752,8 +1752,6 @@ QMimeData* SUIT_TreeModel::mimeData( const QModelIndexList& indexes ) const
 
   QDataStream stream( &encodedData, QIODevice::WriteOnly );
 
-  bool is64 = ( sizeof( void* ) == 64 );
-
   QSet<SUIT_DataObject*> anAdded;
   foreach( QModelIndex index, indexes ) 
   {
@@ -1769,10 +1767,11 @@ QMimeData* SUIT_TreeModel::mimeData( const QModelIndexList& indexes ) const
         return 0;      
       }
         
-      if ( is64 )
-        stream << (quint64)dataObj;
-      else
-        stream << (quint32)dataObj;
+#if (defined _WIN64) || (defined __amd64__)
+      stream << (quint64)dataObj;
+#else
+      stream << (quint32)dataObj;
+#endif
       anAdded.insert( dataObj );
     }
   }