mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024186: Eliminate remaining compiler warnings in MSVC++ 2010 64 bit with warning level 4
Eliminated some warnings of type C4267 (conversion from Type1 to Type2: possible loss of data); size_t to int explicit casts added. Fixed warning C4267 and 4244 in OSD* files Change in OSD_FileNode and OSD_File reverted since different handle types are needed on Unix and Windows
This commit is contained in:
@@ -97,7 +97,7 @@ is
|
||||
myEntry : Address ; -- unused by Windows NT code
|
||||
myInit : Integer ; -- unused by Windows NT code
|
||||
myError : Error;
|
||||
myHandle : Integer; -- Windows NT specific
|
||||
myHandle : Address; -- Windows NT specific
|
||||
myData : Address; -- Windows NT specific
|
||||
myFirstCall : Boolean; -- Windows NT specific
|
||||
end DirectoryIterator from OSD;
|
||||
|
@@ -208,7 +208,7 @@ OSD_DirectoryIterator :: OSD_DirectoryIterator (
|
||||
) {
|
||||
|
||||
myFlag = Standard_False;
|
||||
myHandle = ( Standard_Integer )INVALID_HANDLE_VALUE;
|
||||
myHandle = INVALID_HANDLE_VALUE;
|
||||
|
||||
where.SystemName ( myPlace );
|
||||
|
||||
@@ -223,7 +223,7 @@ void OSD_DirectoryIterator :: Destroy () {
|
||||
|
||||
if ( myData != NULL ) HeapFree ( GetProcessHeap (), 0, myData );
|
||||
|
||||
if ( myHandle != ( Standard_Integer )INVALID_HANDLE_VALUE )
|
||||
if ( myHandle != INVALID_HANDLE_VALUE )
|
||||
|
||||
FindClose ( ( HANDLE )myHandle );
|
||||
|
||||
@@ -231,7 +231,7 @@ void OSD_DirectoryIterator :: Destroy () {
|
||||
|
||||
Standard_Boolean OSD_DirectoryIterator :: More () {
|
||||
|
||||
if ( myHandle == ( Standard_Integer )INVALID_HANDLE_VALUE ) {
|
||||
if ( myHandle == INVALID_HANDLE_VALUE ) {
|
||||
|
||||
TCollection_AsciiString wc = myPlace + TEXT( "/" ) + myMask;
|
||||
|
||||
@@ -239,13 +239,11 @@ Standard_Boolean OSD_DirectoryIterator :: More () {
|
||||
GetProcessHeap (), HEAP_GENERATE_EXCEPTIONS, sizeof ( WIN32_FIND_DATA )
|
||||
);
|
||||
|
||||
myHandle = ( Standard_Integer )FindFirstFile (
|
||||
wc.ToCString (), ( PWIN32_FIND_DATA )myData
|
||||
);
|
||||
myHandle = FindFirstFile (wc.ToCString (), (PWIN32_FIND_DATA)myData);
|
||||
|
||||
if ( myHandle == ( Standard_Integer )INVALID_HANDLE_VALUE )
|
||||
|
||||
_osd_wnt_set_error ( myError, OSD_WDirectoryIterator );
|
||||
if ( myHandle == INVALID_HANDLE_VALUE )
|
||||
|
||||
_osd_wnt_set_error ( myError, OSD_WDirectoryIterator );
|
||||
|
||||
else {
|
||||
|
||||
@@ -259,7 +257,7 @@ Standard_Boolean OSD_DirectoryIterator :: More () {
|
||||
} else if ( !myFlag ) {
|
||||
|
||||
FindClose ( ( HANDLE )myHandle );
|
||||
myHandle = ( Standard_Integer )INVALID_HANDLE_VALUE;
|
||||
myHandle = INVALID_HANDLE_VALUE;
|
||||
|
||||
} // end if
|
||||
|
||||
|
@@ -96,7 +96,7 @@ is
|
||||
myEntry : Address ; -- unused by Windows NT code
|
||||
myInit : Integer ; -- unused by Windows NT code
|
||||
myError : Error;
|
||||
myHandle : Integer; -- Windows NT specific
|
||||
myHandle : Address; -- Windows NT specific
|
||||
myData : Address; -- Windows NT specific
|
||||
myFirstCall : Boolean; -- Windows NT specific
|
||||
end FileIterator from OSD;
|
||||
|
@@ -292,7 +292,7 @@ OSD_FileIterator :: OSD_FileIterator (
|
||||
) {
|
||||
|
||||
myFlag = Standard_False;
|
||||
myHandle = ( Standard_Integer )INVALID_HANDLE_VALUE;
|
||||
myHandle = INVALID_HANDLE_VALUE;
|
||||
|
||||
where.SystemName ( myPlace );
|
||||
|
||||
@@ -307,7 +307,7 @@ void OSD_FileIterator :: Destroy () {
|
||||
|
||||
if ( myData != NULL ) HeapFree ( GetProcessHeap (), 0, myData );
|
||||
|
||||
if ( myHandle != ( Standard_Integer )INVALID_HANDLE_VALUE )
|
||||
if ( myHandle != INVALID_HANDLE_VALUE )
|
||||
|
||||
FindClose ( ( HANDLE )myHandle );
|
||||
|
||||
@@ -315,7 +315,7 @@ void OSD_FileIterator :: Destroy () {
|
||||
|
||||
Standard_Boolean OSD_FileIterator :: More () {
|
||||
|
||||
if ( myHandle == ( Standard_Integer )INVALID_HANDLE_VALUE ) {
|
||||
if ( myHandle == INVALID_HANDLE_VALUE ) {
|
||||
|
||||
TCollection_AsciiString wc = myPlace + TEXT( "/" ) + myMask;
|
||||
|
||||
@@ -323,11 +323,9 @@ Standard_Boolean OSD_FileIterator :: More () {
|
||||
GetProcessHeap (), HEAP_GENERATE_EXCEPTIONS, sizeof ( WIN32_FIND_DATA )
|
||||
);
|
||||
|
||||
myHandle = ( Standard_Integer )FindFirstFile (
|
||||
wc.ToCString (), ( PWIN32_FIND_DATA )myData
|
||||
);
|
||||
myHandle = FindFirstFile (wc.ToCString (), (PWIN32_FIND_DATA)myData);
|
||||
|
||||
if ( myHandle == ( Standard_Integer )INVALID_HANDLE_VALUE )
|
||||
if ( myHandle == INVALID_HANDLE_VALUE )
|
||||
|
||||
_osd_wnt_set_error ( myError, OSD_WDirectoryIterator );
|
||||
|
||||
@@ -343,7 +341,7 @@ Standard_Boolean OSD_FileIterator :: More () {
|
||||
} else if ( !myFlag ) {
|
||||
|
||||
FindClose ( ( HANDLE )myHandle );
|
||||
myHandle = ( Standard_Integer )INVALID_HANDLE_VALUE;
|
||||
myHandle = INVALID_HANDLE_VALUE;
|
||||
|
||||
} // end if
|
||||
|
||||
|
Reference in New Issue
Block a user