MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031699Community[OCCT] OCCT:VISpublic2020-08-04 19:292020-09-14 14:07
Reporterjensgw 
Assigned Tossv 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 7.3.0 
Target VersionFixed in Version 
Summary0031699: IVtkOCC_ShapePickerAlgo.cxx is missing a break in a switch/case starting at line 132
DescriptionIVtkOCC_ShapePickerAlgo.cxx is missing a break in a switch/case starting at line 132.

It looks like the case SelectMgr_TOU_Full is missing a break.
RebuildObjectsTree() is called already, so a fallthrough to SelectMgr_TOU_Partial should not be needed.
If the fallthrough is intended, this error report is proof that such coding practice can lead to confusion and I would ask you to refactor.


 switch (aSel->UpdateStatus())
    {
      case SelectMgr_TOU_Full:
        // Recompute the sensitive primitives which correspond to the mode.
        myViewerSelector->RemoveSelectionOfObject (aSelObj, aSelObj->Selection (theMode));
        aSelObj->RecomputePrimitives (theMode);
        myViewerSelector->AddSelectionToObject (aSelObj, aSelObj->Selection (theMode));
        myViewerSelector->RebuildObjectsTree();
        myViewerSelector->RebuildSensitivesTree (aSelObj);
// here should be a break;
      case SelectMgr_TOU_Partial:
        {
          if (aSelObj->HasTransformation())
          {
            myViewerSelector->RebuildObjectsTree();
          }
          break;
        }
      default:
        break;
    }
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0031765closedbugmaster Open CASCADE Coding Rules - eliminate GCC compiler warnings -Wcatch-value in IVtk 

-  Notes
(0093431)
jensgw (reporter)
2020-08-04 19:32

Product Version is 7.4.0. But that can not be selected in the dropdown.

- Issue History
Date Modified Username Field Change
2020-08-04 19:29 jensgw New Issue
2020-08-04 19:29 jensgw Assigned To => ssv
2020-08-04 19:32 jensgw Note Added: 0093431
2020-08-17 15:38 kgv Relationship added related to 0028988
2020-09-14 14:07 kgv Relationship added related to 0031765


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker