/[svn]/libgig/trunk/src/gig.cpp
ViewVC logotype

Diff of /libgig/trunk/src/gig.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3799 by schoenebeck, Sat Jul 25 09:28:56 2020 UTC revision 3903 by schoenebeck, Wed May 12 18:31:25 2021 UTC
# Line 3807  namespace { Line 3807  namespace {
3807       * @throws gig::Exception if requested zone could not be deleted       * @throws gig::Exception if requested zone could not be deleted
3808       */       */
3809      void Region::DeleteDimensionZone(dimension_t type, int zone) {      void Region::DeleteDimensionZone(dimension_t type, int zone) {
3810            if (!Dimensions)
3811                throw gig::Exception("Could not delete dimension zone, because there is no dimension at all.");
3812          dimension_def_t* oldDef = GetDimensionDefinition(type);          dimension_def_t* oldDef = GetDimensionDefinition(type);
3813          if (!oldDef)          if (!oldDef)
3814              throw gig::Exception("Could not delete dimension zone, no such dimension of given type");              throw gig::Exception("Could not delete dimension zone, no such dimension of given type");
# Line 3835  namespace { Line 3837  namespace {
3837          // requested by the arguments of this method call) to the temporary          // requested by the arguments of this method call) to the temporary
3838          // region, and don't use Region::CopyAssign() here for this task, since          // region, and don't use Region::CopyAssign() here for this task, since
3839          // it would also alter fast lookup helper variables here and there          // it would also alter fast lookup helper variables here and there
3840          dimension_def_t newDef;          dimension_def_t newDef = {};
3841          for (int i = 0; i < Dimensions; ++i) {          for (int i = 0; i < Dimensions; ++i) {
3842              dimension_def_t def = pDimensionDefinitions[i]; // copy, don't reference              dimension_def_t def = pDimensionDefinitions[i]; // copy, don't reference
3843              // is this the dimension requested by the method arguments? ...              // is this the dimension requested by the method arguments? ...
# Line 3846  namespace { Line 3848  namespace {
3848              }              }
3849              tempRgn->AddDimension(&def);              tempRgn->AddDimension(&def);
3850          }          }
3851            // silence clang sanitizer warning
3852            if (newDef.dimension == dimension_none)
3853                throw gig::Exception("Unexpected internal failure resolving dimension in DeleteDimensionZone() [this is a bug].");
3854    
3855          // find the dimension index in the tempRegion which is the dimension          // find the dimension index in the tempRegion which is the dimension
3856          // type passed to this method (paranoidly expecting different order)          // type passed to this method (paranoidly expecting different order)

Legend:
Removed from v.3799  
changed lines
  Added in v.3903

  ViewVC Help
Powered by ViewVC