1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024023: Revamp the OCCT Handle - gcc and clang

Adaptations for compiling with GCC 4.7 and 4.8:
- Construction semantics is used for Handle objects being initialized by const Handle objects of derived type, to avoid overload resolution error in GCC 4.7.
- Missing includes added.
- Fixed bugs related to misuse of direct casts of handle.
- Eliminate CLang warnings on uninitialized and unused variables, functions, and expressions
This commit is contained in:
abv
2015-07-03 11:31:43 +03:00
parent caaeed1b91
commit 5b111128de
72 changed files with 250 additions and 431 deletions

View File

@@ -753,7 +753,7 @@ static Standard_Integer gcarc (Draw_Interpretor& di,Standard_Integer n, const ch
if (!strcmp(a[2], "seg")) {
if (DrawTrSurf::GetPoint(a[3], P1)) {
if (DrawTrSurf::GetPoint(a[4], P2)) {
Handle(Geom_Curve) theline = GC_MakeSegment(P1,P2).Value();
Handle(Geom_Curve) theline (GC_MakeSegment(P1,P2).Value());
DrawTrSurf::Set(a[1], theline);
return 1;
}
@@ -767,12 +767,12 @@ static Standard_Integer gcarc (Draw_Interpretor& di,Standard_Integer n, const ch
if (n>6) {
DrawTrSurf::GetPoint(a[6], P4);
gp_Vec V1 = gp_Vec(P2,P3);
Handle(Geom_Curve)thearc = GC_MakeArcOfCircle(P1,V1,P4).Value();
Handle(Geom_Curve)thearc (GC_MakeArcOfCircle(P1,V1,P4).Value());
DrawTrSurf::Set(a[1], thearc);
return 1;
}
else {
Handle(Geom_Curve)thearc = GC_MakeArcOfCircle(P1,P2,P3).Value();
Handle(Geom_Curve)thearc (GC_MakeArcOfCircle(P1,P2,P3).Value());
DrawTrSurf::Set(a[1], thearc);
return 1;
}