From ca60124624646971855639255fe96fcfc5f1aa3f Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 12 Sep 2018 14:41:24 +0300 Subject: [PATCH] Disable compilation warnings --- src/XGUI/XGUI_Displayer.cpp | 6 +++--- src/XGUI/XGUI_Selection.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 3ff7886e0..f0ac7b3b3 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -1107,12 +1107,12 @@ void XGUI_Displayer::AddOrRemoveSelectedShapes(Handle(AIS_InteractiveContext) th /// If count of calls setSelectec is even, the object stays in the previous state /// (selected, deselected) /// OCCT: to write about the problem that active owners method returns one owner several times - QList aSelectedIds; // Remember of selected address in order to avoid duplicates + QList aSelectedIds; // Remember of selected address in order to avoid duplicates for (; anOwnersIt.More(); anOwnersIt.Next()) { anOwner = Handle(SelectMgr_EntityOwner)::DownCast (anOwnersIt.Value()); - if (aSelectedIds.contains((long)anOwner.get())) + if (aSelectedIds.contains((size_t)anOwner.get())) continue; - aSelectedIds.append((long)anOwner.get()); + aSelectedIds.append((size_t)anOwner.get()); Handle(StdSelect_BRepOwner) BROwnr = Handle(StdSelect_BRepOwner)::DownCast(anOwner); if (!BROwnr.IsNull() && BROwnr->HasShape()) { diff --git a/src/XGUI/XGUI_Selection.cpp b/src/XGUI/XGUI_Selection.cpp index da67a6bbb..6962a47ac 100644 --- a/src/XGUI/XGUI_Selection.cpp +++ b/src/XGUI/XGUI_Selection.cpp @@ -101,14 +101,14 @@ void XGUI_Selection::getSelectedInViewer(QList& thePres { Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext(); if (!aContext.IsNull()) { - QList aSelectedIds; // Remember of selected address in order to avoid duplicates + QList aSelectedIds; // Remember of selected address in order to avoid duplicates for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) { ModuleBase_ViewerPrsPtr aPrs(new ModuleBase_ViewerPrs()); Handle(SelectMgr_EntityOwner) anOwner = aContext->SelectedOwner(); - if (aSelectedIds.contains((long)anOwner.get())) + if (aSelectedIds.contains((size_t)anOwner.get())) continue; - aSelectedIds.append((long)anOwner.get()); + aSelectedIds.append((size_t)anOwner.get()); fillPresentation(aPrs, anOwner); @@ -284,14 +284,14 @@ QList XGUI_Selection::getHighlighted() const if (aContext.IsNull()) return aPresentations; - QList aSelectedIds; // Remember of selected address in order to avoid duplicates + QList aSelectedIds; // Remember of selected address in order to avoid duplicates XGUI_Displayer* aDisplayer = myWorkshop->displayer(); for (aContext->InitDetected(); aContext->MoreDetected(); aContext->NextDetected()) { Handle(SelectMgr_EntityOwner) anOwner = aContext->DetectedOwner(); if (!anOwner.IsNull()) { - if (aSelectedIds.contains((long)anOwner.get())) + if (aSelectedIds.contains((size_t)anOwner.get())) continue; - aSelectedIds.append((long)anOwner.get()); + aSelectedIds.append((size_t)anOwner.get()); ModuleBase_ViewerPrsPtr aPrs(new ModuleBase_ViewerPrs()); fillPresentation(aPrs, anOwner); -- 2.39.2