avoid -Wshadow and 'unrecognized command line option' with gcc

This commit is contained in:
Dane Springmeyer 2016-11-29 13:50:08 -08:00
parent 9cc8af9173
commit 8262eb5206
3 changed files with 13 additions and 13 deletions

View file

@ -77,18 +77,18 @@ struct offset_converter
return threshold_; return threshold_;
} }
void set_offset(double value) void set_offset(double val)
{ {
if (offset_ != value) if (offset_ != val)
{ {
offset_ = value; offset_ = val;
reset(); reset();
} }
} }
void set_threshold(double value) void set_threshold(double val)
{ {
threshold_ = value; threshold_ = val;
// no need to reset(), since threshold doesn't affect // no need to reset(), since threshold doesn't affect
// offset vertices' computation, it only controls how // offset vertices' computation, it only controls how
// far will we be looking for self-intersections // far will we be looking for self-intersections

View file

@ -120,11 +120,11 @@ public:
return algorithm_; return algorithm_;
} }
void set_simplify_algorithm(simplify_algorithm_e value) void set_simplify_algorithm(simplify_algorithm_e val)
{ {
if (algorithm_ != value) if (algorithm_ != val)
{ {
algorithm_ = value; algorithm_ = val;
reset(); reset();
} }
} }
@ -134,11 +134,11 @@ public:
return tolerance_; return tolerance_;
} }
void set_simplify_tolerance(double value) void set_simplify_tolerance(double val)
{ {
if (tolerance_ != value) if (tolerance_ != val)
{ {
tolerance_ = value; tolerance_ = val;
reset(); reset();
} }
} }

View file

@ -83,9 +83,9 @@ config_override () {
configure () { configure () {
if enabled ${COVERAGE}; then if enabled ${COVERAGE}; then
./configure "$@" PREFIX=${PREFIX} PGSQL2SQLITE=False SVG2PNG=False SVG_RENDERER=False \ ./configure "$@" PREFIX=${PREFIX} PGSQL2SQLITE=False SVG2PNG=False SVG_RENDERER=False \
COVERAGE=True DEBUG=True WARNING_CXXFLAGS="-Wno-unknown-warning-option" COVERAGE=True DEBUG=True
else else
./configure "$@" PREFIX=${PREFIX} WARNING_CXXFLAGS="-Wno-unknown-warning-option" ./configure "$@" PREFIX=${PREFIX}
fi fi
# print final config values, sorted and indented # print final config values, sorted and indented
sort -sk1,1 ./config.py | sed -e 's/^/ /' sort -sk1,1 ./config.py | sed -e 's/^/ /'