1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +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

@@ -207,7 +207,7 @@ void IGESDraw_ToolViewsVisible::OwnCheck
{
Standard_Integer res = 0;
Standard_Integer nb = ent->NbDisplayedEntities();
Handle(IGESData_ViewKindEntity) entcomp = ent;
Handle(IGESData_ViewKindEntity) entcomp (ent);
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i);
if (entcomp != displayed->View()) res ++;
@@ -246,7 +246,7 @@ Standard_Boolean IGESDraw_ToolViewsVisible::OwnCorrect
// Les entites affichees doivent referencer <ent>. Elles ont priorite.
Standard_Boolean res = Standard_False;
Standard_Integer nb = ent->NbDisplayedEntities();
Handle(IGESData_ViewKindEntity) entcomp = ent;
Handle(IGESData_ViewKindEntity) entcomp (ent);
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i);
if (entcomp != displayed->View()) res = Standard_True;

View File

@@ -314,7 +314,7 @@ void IGESDraw_ToolViewsVisibleWithAttr::OwnCheck
if (ent->LineFontValue(i) != 0 && ent->IsFontDefinition(i)) ach->AddFail
("At least one Line Font Definition Mismatch (both Value and Entity");
}
Handle(IGESData_ViewKindEntity) entcomp = ent;
Handle(IGESData_ViewKindEntity) entcomp (ent);
Standard_Integer res = 0;
nb = ent->NbDisplayedEntities();
for (i = 1; i <= nb; i ++) {
@@ -387,7 +387,7 @@ Standard_Boolean IGESDraw_ToolViewsVisibleWithAttr::OwnCorrect
// Les entites affichees doivent referencer <ent>. Elles ont priorite.
Standard_Boolean res = Standard_False;
Standard_Integer nb = ent->NbDisplayedEntities();
Handle(IGESData_ViewKindEntity) entcomp = ent;
Handle(IGESData_ViewKindEntity) entcomp (ent);
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(IGESData_IGESEntity) displayed = ent->DisplayedEntity(i);
if (entcomp != displayed->View()) res = Standard_True;