Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
9679d374
Commit
9679d374
authored
Nov 12, 2018
by
Simon Spannagel
Browse files
Disable one warning (strict-overflow) which created problems with GCC 8
parent
43212220
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
9679d374
...
...
@@ -81,7 +81,7 @@ ENDIF("${IsSystemDir}" STREQUAL "-1")
#########################################
# Set standard build flags
SET
(
COMPILER_FLAGS -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wconversion -Wuseless-cast -Wctor-dtor-privacy -Wzero-as-null-pointer-constant -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel
-Wstrict-overflow=5
-Wswitch-default -Wundef -Werror -Wshadow -Wformat-security -Wdeprecated -fdiagnostics-color=auto -Wheader-hygiene
)
SET
(
COMPILER_FLAGS -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wconversion -Wuseless-cast -Wctor-dtor-privacy -Wzero-as-null-pointer-constant -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wswitch-default -Wundef -Werror -Wshadow -Wformat-security -Wdeprecated -fdiagnostics-color=auto -Wheader-hygiene
)
# Require a C++14 compiler but do allow extensions
SET
(
CMAKE_CXX_STANDARD 14
)
...
...
src/modules/ClusteringSpatial/ClusteringSpatial.cpp
View file @
9679d374
...
...
@@ -81,20 +81,25 @@ StatusCode ClusteringSpatial::run(std::shared_ptr<Clipboard> clipboard) {
while
(
addedPixel
)
{
addedPixel
=
false
;
for
(
int
row
=
(
pixel
->
row
()
-
1
)
;
row
<=
(
pixel
->
row
()
+
1
)
;
row
++
)
{
for
(
int
row
=
pixel
->
row
()
-
1
;
row
<=
pixel
->
row
()
+
1
;
row
++
)
{
// If out of bounds for row
if
(
row
<
0
||
row
>=
nRows
)
if
(
row
<
0
||
row
>=
nRows
)
{
continue
;
for
(
int
col
=
(
pixel
->
column
()
-
1
);
col
<=
(
pixel
->
column
()
+
1
);
col
++
)
{
}
for
(
int
col
=
pixel
->
column
()
-
1
;
col
<=
pixel
->
column
()
+
1
;
col
++
)
{
// If out of bounds for column
if
(
col
<
0
||
col
>=
nCols
)
if
(
col
<
0
||
col
>=
nCols
)
{
continue
;
}
// If no pixel in this position, or is already in a cluster, do nothing
if
(
!
hitmap
[
row
][
col
])
if
(
!
hitmap
[
row
][
col
])
{
continue
;
if
(
used
[
hitmap
[
row
][
col
]])
}
if
(
used
[
hitmap
[
row
][
col
]])
{
continue
;
}
// Otherwise add the pixel to the cluster and store it as a found
// neighbour
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment