1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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:
omy
2013-09-26 17:20:52 +04:00
committed by bugmaster
parent b62b3e079f
commit 7dc9e04716
37 changed files with 93 additions and 100 deletions

View File

@@ -431,8 +431,8 @@ Standard_Integer Image_Diff::ignoreBorderEffect()
if (myGroupsOfDiffPixels.IsEmpty())
{
TColStd_MapOfInteger* aGroup = new TColStd_MapOfInteger();
aGroup->Add (aValue1);
aGroup->Add (aValue2);
aGroup->Add ((Standard_Integer)aValue1);
aGroup->Add ((Standard_Integer)aValue2);
myGroupsOfDiffPixels.Append (aGroup);
}
else
@@ -442,9 +442,9 @@ Standard_Integer Image_Diff::ignoreBorderEffect()
for (ListOfMapOfInteger::Iterator aGrIter (myGroupsOfDiffPixels); aGrIter.More(); aGrIter.Next())
{
TColStd_MapOfInteger*& aGroup = aGrIter.ChangeValue();
if (aGroup->Contains (aValue1))
if (aGroup->Contains ((Standard_Integer)aValue1))
{
aGroup->Add (aValue2);
aGroup->Add ((Standard_Integer)aValue2);
isFound = Standard_True;
break;
}
@@ -454,8 +454,8 @@ Standard_Integer Image_Diff::ignoreBorderEffect()
{
// Create a new group
TColStd_MapOfInteger* aGroup = new TColStd_MapOfInteger();
aGroup->Add (aValue1);
aGroup->Add (aValue2);
aGroup->Add ((Standard_Integer)aValue1);
aGroup->Add ((Standard_Integer)aValue2);
myGroupsOfDiffPixels.Append (aGroup);
}
}
@@ -480,7 +480,7 @@ Standard_Integer Image_Diff::ignoreBorderEffect()
for (Standard_Size aNgbrIter = 0; aNgbrIter < NEIGHBOR_PIXELS_NB; ++aNgbrIter)
{
if (NEIGHBOR_PIXELS[aNgbrIter].isValid (aDataRef, aRow1, aCol1)
&& aGroup->Contains (NEIGHBOR_PIXELS[aNgbrIter].pixel2Int (aRow1, aCol1)))
&& aGroup->Contains ((Standard_Integer)NEIGHBOR_PIXELS[aNgbrIter].pixel2Int (aRow1, aCol1)))
{
++aNeighboursNb;
}