From e84c7dc23cb4fbd9b1620f72af38ee10ced40f30 Mon Sep 17 00:00:00 2001 From: stv Date: Tue, 21 Feb 2006 13:40:04 +0000 Subject: [PATCH] Updated SALOME GUI sources for building under Ms Visual .NET on Windows platform. --- src/GLViewer/GLViewer_BaseObjects.cxx | 4 ++-- src/GLViewer/GLViewer_Drawer.cxx | 4 ++-- src/GLViewer/GLViewer_Object.cxx | 4 ++-- src/GLViewer/GLViewer_Tools.cxx | 25 ++++++++++++------------- src/GLViewer/GLViewer_ViewPort2d.cxx | 2 +- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/GLViewer/GLViewer_BaseObjects.cxx b/src/GLViewer/GLViewer_BaseObjects.cxx index 79c32e3f8..e5489fdcb 100644 --- a/src/GLViewer/GLViewer_BaseObjects.cxx +++ b/src/GLViewer/GLViewer_BaseObjects.cxx @@ -649,7 +649,7 @@ QByteArray GLViewer_MarkerSet::getByteCopy() aResult[i] = *aPointer; - for( ; i < aResult.size(); i++ ) + for ( ; i < (int)aResult.size(); i++ ) aResult[i] = aObject[i - anISize - 2*aFSize*myNumber - aFSize]; return aResult; @@ -1111,7 +1111,7 @@ QByteArray GLViewer_Polyline::getByteCopy() for( ; i < anISize + 2*aFSize*myNumber + 2*aBSize; i++, aPointer++ ) aResult[i] = *aPointer; - for( ; i < aResult.size(); i++ ) + for ( ; i < (int)aResult.size(); i++ ) aResult[i] = aObject[i - anISize - 2*aFSize*myNumber - 2*aBSize]; return aResult; diff --git a/src/GLViewer/GLViewer_Drawer.cxx b/src/GLViewer/GLViewer_Drawer.cxx index 9a0f3ef6b..2da866512 100644 --- a/src/GLViewer/GLViewer_Drawer.cxx +++ b/src/GLViewer/GLViewer_Drawer.cxx @@ -308,7 +308,7 @@ void GLViewer_TexFont::drawString( QString theStr, GLdouble theX , GLdouble theY float aDY = ( aRowPixelHeight - 1 ) / aYScale, aDX; char aLetter; int aLettIndex, row; - for( int i = 0; i < theStr.length(); i++ ) + for ( int i = 0; i < (int)theStr.length(); i++ ) { aLetter = theStr.data()[i]; aLettIndex = (int)aLetter - FirstSymbolNumber; @@ -341,7 +341,7 @@ void GLViewer_TexFont::drawString( QString theStr, GLdouble theX , GLdouble theY int GLViewer_TexFont::getStringWidth( QString theStr ) { int aWidth = 0; - for( int i = 0; i < theStr.length(); i ++ ) + for ( int i = 0; i < (int)theStr.length(); i ++ ) { char aLetter = theStr.data()[i]; int aLettIndex = (int)aLetter - FirstSymbolNumber; diff --git a/src/GLViewer/GLViewer_Object.cxx b/src/GLViewer/GLViewer_Object.cxx index f5972674b..38124a22e 100644 --- a/src/GLViewer/GLViewer_Object.cxx +++ b/src/GLViewer/GLViewer_Object.cxx @@ -169,12 +169,12 @@ QByteArray GLViewer_Object::getByteCopy() int aCurPos = 2*anISize + sizeOf8Float + aTypeLength + aToolTipLength; // adds aspect byte array - for( i = aCurPos; i < aCurPos + aAspect.size(); i++ ) + for ( i = aCurPos; i < (int)( aCurPos + aAspect.size() ); i++ ) aResult[i] = aAspect[i - aCurPos]; aCurPos = aCurPos + aAspect.size(); // adds GL text byte array - for( i = aCurPos; i < aCurPos + aGLText.size(); i++ ) + for ( i = aCurPos; i < (int)( aCurPos + aGLText.size() ); i++ ) aResult[i] = aGLText[i - aCurPos]; aCurPos += aGLText.size(); diff --git a/src/GLViewer/GLViewer_Tools.cxx b/src/GLViewer/GLViewer_Tools.cxx index a54ad837f..ec7c00920 100644 --- a/src/GLViewer/GLViewer_Tools.cxx +++ b/src/GLViewer/GLViewer_Tools.cxx @@ -22,12 +22,11 @@ // File: GLViewer_Tools.cxx // Created: April, 2005 -//#include "GLViewerAfx.h" #include "GLViewer_Tools.h" #include -#include +#include /**************************************************************************** ** Class: GLViewer_LineList @@ -45,7 +44,7 @@ GLViewer_LineList::GLViewer_LineList( int size ) if( !myArray ) { - cout << "Can't allocate memory: " << size << endl; + std::cout << "Can't allocate memory: " << size << std::endl; myRealSize = 0; } else @@ -358,11 +357,11 @@ void GLViewer_LineList::clear() void GLViewer_LineList::print() { - cout << "MainCoord: " << myMainCoord <<" SIZE: " << myRealSize << " ENum: " << mySegmentNumber << " :::"; + std::cout << "MainCoord: " << myMainCoord <<" SIZE: " << myRealSize << " ENum: " << mySegmentNumber << " :::"; for( int i = 0; i < mySegmentNumber; i++ ) - cout << " " << myArray[2*i] << " " << myArray[2*i+1] << " | "; + std::cout << " " << myArray[2*i] << " " << myArray[2*i+1] << " | "; - cout << endl; + std::cout << std::endl; } void GLViewer_LineList::show( FieldDim theDim ) @@ -614,11 +613,11 @@ void GLViewer_LineField::addRectangle( double top, double right, double bottom, void GLViewer_LineField::print() { - cout << "My X matrix Number: " << myXSize << endl; + std::cout << "My X matrix Number: " << myXSize << std::endl; for( int i = 0; i < myXSize; i++ ) myXLineArray[i]->print(); - cout << "My Y matrix Number: " << myYSize << endl; + std::cout << "My Y matrix Number: " << myYSize << std::endl; for( int j = 0; j < myYSize; j++ ) myYLineArray[j]->print(); } @@ -641,7 +640,7 @@ void GLViewer_LineField::show() } glEnd(); delete[] anArray; - cout << "Show function" << endl; + std::cout << "Show function" << std::endl; } int GLViewer_LineField::getDimSize( FieldDim theDim ) @@ -891,7 +890,7 @@ GLViewer_LineField::IterationStatus GLViewer_LineField::checkComplete() aCurArray[i].myLineIndex == myEndPoint.myXLineIndex && aCurArray[i].mySegmentindex == myEndPoint.myXSegmentIndex ) { - cout << "Algorithm complete X!!!!!!!" << endl; + std::cout << "Algorithm complete X!!!!!!!" << std::endl; myEndPoint.mySolveIndex = i; return IS_SOLVED; } @@ -899,7 +898,7 @@ GLViewer_LineField::IterationStatus GLViewer_LineField::checkComplete() aCurArray[i].myLineIndex == myEndPoint.myYLineIndex && aCurArray[i].mySegmentindex == myEndPoint.myYSegmentIndex ) { - cout << "Algorithm complete Y!!!!!!!" << endl; + std::cout << "Algorithm complete Y!!!!!!!" << std::endl; myEndPoint.mySolveIndex = i; return IS_SOLVED; } @@ -917,7 +916,7 @@ GLViewer_LineField::IterationStatus GLViewer_LineField::checkComplete() else myCurArrayIndex = 0; - cout << "Number of ways: " << count << endl; + std::cout << "Number of ways: " << count << std::endl; if( count == 0 ) return IS_LOOP; @@ -976,7 +975,7 @@ GLViewer_LineField::EndStatus GLViewer_LineField::startAlgorithm() while( true ) { - cout << "-----------Iteration #" << myCurCount << "-------------" << endl; + std::cout << "-----------Iteration #" << myCurCount << "-------------" << std::endl; iteration(); IterationStatus is = checkComplete(); diff --git a/src/GLViewer/GLViewer_ViewPort2d.cxx b/src/GLViewer/GLViewer_ViewPort2d.cxx index 17d9d68da..b44efbc32 100644 --- a/src/GLViewer/GLViewer_ViewPort2d.cxx +++ b/src/GLViewer/GLViewer_ViewPort2d.cxx @@ -1238,7 +1238,7 @@ void GLViewer_ViewPort2d::onMaybeTip( QPoint thePoint, QString& theText, QFont& int str_size = aList.first().length(); for( int i = 1, size = aList.count(); i < size; i++ ) { - if( str_size < aList[i].length() ) + if ( str_size < (int)aList[i].length() ) { index = i; str_size = aList[i].length(); -- 2.39.2