Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
fc30c763
Commit
fc30c763
authored
10 years ago
by
Rashad Kanavath
Browse files
Options
Downloads
Patches
Plain Diff
WRG: use itk assert instead of system assert to prevent warning in release and debug mode
parent
9cc4861c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/BasicFilters/otbLabelImageRegionPruningFilter.txx
+5
-2
5 additions, 2 deletions
Code/BasicFilters/otbLabelImageRegionPruningFilter.txx
Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.txx
+3
-5
3 additions, 5 deletions
Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.txx
with
8 additions
and
7 deletions
Code/BasicFilters/otbLabelImageRegionPruningFilter.txx
+
5
−
2
View file @
fc30c763
...
...
@@ -402,13 +402,16 @@ LabelImageRegionPruningFilter<TInputLabelImage, TInputSpectralImage, TOutputLabe
LabelType l = outputIt.Get();
LabelType canLabel;
assert(m_CanonicalLabels[l] <= oldRegionCount);
if (m_CanonicalLabels[l] <= oldRegionCount)
{
itkAssertInDebugAndIgnoreInReleaseMacro( 0 );
}
canLabel = newLabels[m_CanonicalLabels[l]];
outputIt.Set( canLabel );
++outputIt;
}
finishedPruning = !minRegionCount || regionCount == 1 || pruneIterations>=10;
// only one iteration for now
...
...
This diff is collapsed.
Click to expand it.
Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.txx
+
3
−
5
View file @
fc30c763
...
...
@@ -145,10 +145,8 @@ void otb::ogr::Feature::SetGeometryDirectly(UniqueGeometryPtr geometry)
CheckInvariants();
OGRGeometry * g = geometry.get();
UncheckedSetGeometryDirectly(otb::move(geometry));
assert(m_Feature->GetGeometryRef() == g && "The new geometry hasn't been set as expected");
assert(! geometry && "UniqueGeometryPtr hasn't released its pointer");
// avoid unused variable warning
g=NULL;
itkAssertOrThrowMacro((m_Feature->GetGeometryRef() == g), "The new geometry hasn't been set as expected");
itkAssertOrThrowMacro(!geometry, "UniqueGeometryPtr hasn't released its pointer");
}
inline
...
...
@@ -156,7 +154,7 @@ otb::ogr::UniqueGeometryPtr otb::ogr::Feature::StealGeometry()
{
CheckInvariants();
UniqueGeometryPtr res = UncheckedStealGeometry();
a
ssert(!
m_Feature->GetGeometryRef()
&&
"Geometry hasn't been properly stolen");
itkA
ssert
OrThrowMacro
(!m_Feature->GetGeometryRef()
,
"Geometry hasn't been properly stolen");
return otb::move(res);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment