mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0024252: GCC warnings on breakage of strict-aliasing rules
Fixed type casts in NCollection maps Avoid invalid type cast in handling of LDOM text object Use correct pointer type in callback function of Graphic3d_CGraduatedTrihedron class Format of printf() simplified in IntPatch_Point.cxx
This commit is contained in:
@@ -173,13 +173,10 @@ template < class TheKeyType,
|
||||
//! ReSize
|
||||
void ReSize (const Standard_Integer N)
|
||||
{
|
||||
DataMapNode** newdata = NULL;
|
||||
DataMapNode** dummy = NULL;
|
||||
NCollection_ListNode** newdata = NULL;
|
||||
NCollection_ListNode** dummy = NULL;
|
||||
Standard_Integer newBuck;
|
||||
if (BeginResize (N, newBuck,
|
||||
(NCollection_ListNode**&)newdata,
|
||||
(NCollection_ListNode**&)dummy,
|
||||
this->myAllocator))
|
||||
if (BeginResize (N, newBuck, newdata, dummy, this->myAllocator))
|
||||
{
|
||||
if (myData1)
|
||||
{
|
||||
@@ -202,10 +199,7 @@ template < class TheKeyType,
|
||||
}
|
||||
}
|
||||
}
|
||||
EndResize(N,newBuck,
|
||||
(NCollection_ListNode**&)newdata,
|
||||
(NCollection_ListNode**&)dummy,
|
||||
this->myAllocator);
|
||||
EndResize (N, newBuck, newdata, dummy, this->myAllocator);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -193,13 +193,10 @@ template < class TheKey1Type,
|
||||
//! ReSize
|
||||
void ReSize (const Standard_Integer N)
|
||||
{
|
||||
DoubleMapNode** ppNewData1 = NULL;
|
||||
DoubleMapNode** ppNewData2 = NULL;
|
||||
NCollection_ListNode** ppNewData1 = NULL;
|
||||
NCollection_ListNode** ppNewData2 = NULL;
|
||||
Standard_Integer newBuck;
|
||||
if (BeginResize (N, newBuck,
|
||||
(NCollection_ListNode**&)ppNewData1,
|
||||
(NCollection_ListNode**&)ppNewData2,
|
||||
this->myAllocator))
|
||||
if (BeginResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator))
|
||||
{
|
||||
if (myData1)
|
||||
{
|
||||
@@ -216,7 +213,7 @@ template < class TheKey1Type,
|
||||
iK2 = Hasher2::HashCode (p->Key2(), newBuck);
|
||||
q = (DoubleMapNode*) p->Next();
|
||||
p->Next() = ppNewData1[iK1];
|
||||
p->Next2() = ppNewData2[iK2];
|
||||
p->Next2() = (DoubleMapNode*)ppNewData2[iK2];
|
||||
ppNewData1[iK1] = p;
|
||||
ppNewData2[iK2] = p;
|
||||
p = q;
|
||||
@@ -224,10 +221,7 @@ template < class TheKey1Type,
|
||||
}
|
||||
}
|
||||
}
|
||||
EndResize(N,newBuck,
|
||||
(NCollection_ListNode**&)ppNewData1,
|
||||
(NCollection_ListNode**&)ppNewData2,
|
||||
this->myAllocator);
|
||||
EndResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -197,13 +197,10 @@ template < class TheKeyType,
|
||||
//! ReSize
|
||||
void ReSize (const Standard_Integer N)
|
||||
{
|
||||
IndexedDataMapNode** ppNewData1 = NULL;
|
||||
IndexedDataMapNode** ppNewData2 = NULL;
|
||||
NCollection_ListNode** ppNewData1 = NULL;
|
||||
NCollection_ListNode** ppNewData2 = NULL;
|
||||
Standard_Integer newBuck;
|
||||
if (BeginResize (N, newBuck,
|
||||
(NCollection_ListNode**&)ppNewData1,
|
||||
(NCollection_ListNode**&)ppNewData2,
|
||||
this->myAllocator))
|
||||
if (BeginResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator))
|
||||
{
|
||||
if (myData1)
|
||||
{
|
||||
@@ -220,7 +217,7 @@ template < class TheKeyType,
|
||||
iK2 = ::HashCode (p->Key2(), newBuck);
|
||||
q = (IndexedDataMapNode*) p->Next();
|
||||
p->Next() = ppNewData1[iK1];
|
||||
p->Next2() = ppNewData2[iK2];
|
||||
p->Next2() = (IndexedDataMapNode*)ppNewData2[iK2];
|
||||
ppNewData1[iK1] = p;
|
||||
ppNewData2[iK2] = p;
|
||||
p = q;
|
||||
@@ -228,10 +225,7 @@ template < class TheKeyType,
|
||||
}
|
||||
}
|
||||
}
|
||||
EndResize(N,newBuck,
|
||||
(NCollection_ListNode**&)ppNewData1,
|
||||
(NCollection_ListNode**&)ppNewData2,
|
||||
this->myAllocator);
|
||||
EndResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -187,13 +187,10 @@ template < class TheKeyType,
|
||||
//! ReSize
|
||||
void ReSize (const Standard_Integer N)
|
||||
{
|
||||
IndexedMapNode** ppNewData1 = NULL;
|
||||
IndexedMapNode** ppNewData2 = NULL;
|
||||
NCollection_ListNode** ppNewData1 = NULL;
|
||||
NCollection_ListNode** ppNewData2 = NULL;
|
||||
Standard_Integer newBuck;
|
||||
if (BeginResize (N, newBuck,
|
||||
(NCollection_ListNode**&)ppNewData1,
|
||||
(NCollection_ListNode**&)ppNewData2,
|
||||
this->myAllocator))
|
||||
if (BeginResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator))
|
||||
{
|
||||
if (myData1)
|
||||
{
|
||||
@@ -213,7 +210,7 @@ template < class TheKeyType,
|
||||
if (p->Key2() > 0)
|
||||
{
|
||||
iK2 = ::HashCode (p->Key2(), newBuck);
|
||||
p->Next2() = ppNewData2[iK2];
|
||||
p->Next2() = (IndexedMapNode*)ppNewData2[iK2];
|
||||
ppNewData2[iK2] = p;
|
||||
}
|
||||
p = q;
|
||||
@@ -221,10 +218,7 @@ template < class TheKeyType,
|
||||
}
|
||||
}
|
||||
}
|
||||
EndResize(N,newBuck,
|
||||
(NCollection_ListNode**&)ppNewData1,
|
||||
(NCollection_ListNode**&)ppNewData2,
|
||||
this->myAllocator);
|
||||
EndResize (N, newBuck, ppNewData1, ppNewData2, this->myAllocator);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -177,13 +177,10 @@ template < class TheKeyType,
|
||||
//! ReSize
|
||||
void ReSize (const Standard_Integer N)
|
||||
{
|
||||
MapNode** newdata = 0L;
|
||||
MapNode** dummy = 0L;
|
||||
NCollection_ListNode** newdata = 0L;
|
||||
NCollection_ListNode** dummy = 0L;
|
||||
Standard_Integer newBuck;
|
||||
if (BeginResize (N, newBuck,
|
||||
(NCollection_ListNode**&)newdata,
|
||||
(NCollection_ListNode**&)dummy,
|
||||
this->myAllocator))
|
||||
if (BeginResize (N, newBuck, newdata, dummy, this->myAllocator))
|
||||
{
|
||||
if (myData1)
|
||||
{
|
||||
@@ -206,10 +203,7 @@ template < class TheKeyType,
|
||||
}
|
||||
}
|
||||
}
|
||||
EndResize(N,newBuck,
|
||||
(NCollection_ListNode**&)newdata,
|
||||
(NCollection_ListNode**&)dummy,
|
||||
this->myAllocator);
|
||||
EndResize (N, newBuck, newdata, dummy, this->myAllocator);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user