Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
schaapcommon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
ResearchAndDevelopment
schaapcommon
Commits
6586bd6e
Commit
6586bd6e
authored
1 year ago
by
Maik Nijhuis
Browse files
Options
Downloads
Plain Diff
Merge branch 'ast-1351-initialize-centroid-point' into 'master'
AST-1351
Avoid 'maybe-uninitialized' warning for point_f x See merge request
!126
parents
da0ef2a6
f3b54588
No related branches found
Branches containing commit
No related tags found
1 merge request
!126
AST-1351 Avoid 'maybe-uninitialized' warning for point_f x
Pipeline
#56311
failed
1 year ago
Stage: versioning
Stage: prepare
Stage: linting
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/facets/facet.cc
+2
-1
2 additions, 1 deletion
src/facets/facet.cc
with
2 additions
and
1 deletion
src/facets/facet.cc
+
2
−
1
View file @
6586bd6e
...
...
@@ -106,10 +106,11 @@ PixelPosition Facet::Centroid() const {
boost
::
geometry
::
model
::
point
<
float
,
2
,
boost
::
geometry
::
cs
::
cartesian
>
;
boost
::
geometry
::
model
::
polygon
<
point_f
>
poly
;
point_f
x
;
for
(
const
PixelPosition
&
pixel
:
pixels_
)
{
boost
::
geometry
::
append
(
poly
,
point_f
(
pixel
.
x
,
pixel
.
y
));
}
point_f
x
{};
boost
::
geometry
::
centroid
(
poly
,
x
);
return
PixelPosition
(
x
.
get
<
0
>
(),
x
.
get
<
1
>
());
}
...
...
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