/[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 1081 by schoenebeck, Thu Mar 8 00:17:03 2007 UTC revision 1083 by schoenebeck, Thu Mar 8 16:41:27 2007 UTC
# Line 2893  namespace { Line 2893  namespace {
2893          if (!pSamples || !pSamples->size()) throw gig::Exception("Could not delete sample as there are no samples");          if (!pSamples || !pSamples->size()) throw gig::Exception("Could not delete sample as there are no samples");
2894          SampleList::iterator iter = find(pSamples->begin(), pSamples->end(), (DLS::Sample*) pSample);          SampleList::iterator iter = find(pSamples->begin(), pSamples->end(), (DLS::Sample*) pSample);
2895          if (iter == pSamples->end()) throw gig::Exception("Could not delete sample, could not find given sample");          if (iter == pSamples->end()) throw gig::Exception("Could not delete sample, could not find given sample");
2896            if (SamplesIterator != pSamples->end() && *SamplesIterator == pSample) ++SamplesIterator; // avoid iterator invalidation
2897          pSamples->erase(iter);          pSamples->erase(iter);
2898          delete pSample;          delete pSample;
2899      }      }

Legend:
Removed from v.1081  
changed lines
  Added in v.1083

  ViewVC Help
Powered by ViewVC