- improve warning text
- add checkbox to disable warning git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1232 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -24,6 +24,10 @@ endif()
|
|||||||
|
|
||||||
include (ACGOutput)
|
include (ACGOutput)
|
||||||
|
|
||||||
|
# ========================================================================
|
||||||
|
# Definitions
|
||||||
|
# ========================================================================
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-D_USE_MATH_DEFINES -DNOMINMAX
|
-D_USE_MATH_DEFINES -DNOMINMAX
|
||||||
@@ -31,6 +35,10 @@ if (WIN32)
|
|||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
set(NO_DECREMENT_DEPRECATED_WARNINGS OFF CACHE BOOL "Disables all deprecated warnings warning about decrement operations on normal circulators.")
|
||||||
|
if(NO_DECREMENT_DEPRECATED_WARNINGS)
|
||||||
|
add_definitions( -DNO_DECREMENT_DEPRECATED_WARNINGS )
|
||||||
|
endif()
|
||||||
|
|
||||||
# ========================================================================
|
# ========================================================================
|
||||||
# Windows build style control
|
# Windows build style control
|
||||||
|
|||||||
@@ -485,7 +485,20 @@ class GenericCirculatorT_DEPRECATED : protected GenericCirculatorBaseT<Mesh> {
|
|||||||
GenericCirculator_ValueHandleFns::increment(this->mesh_, this->heh_, this->start_, this->lap_counter_);
|
GenericCirculator_ValueHandleFns::increment(this->mesh_, this->heh_, this->start_, this->lap_counter_);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
DEPRECATED("current decrement operator is deprecated. Please use CCW/CW iterators.")
|
#ifndef NO_DECREMENT_DEPRECATED_WARNINGS
|
||||||
|
#define DECREMENT_DEPRECATED_WARNINGS_TEXT "The current decrement operator has the unintended behavior that it stays\
|
||||||
|
valid when iterating below the start and will visit the first entity\
|
||||||
|
twice before getting invalid. Furthermore it gets valid again, if you\
|
||||||
|
increment at the end.\
|
||||||
|
When you are sure that you don't iterate below the start anywhere in\
|
||||||
|
your code or rely on this behaviour, you can disable this warning by\
|
||||||
|
setting the define NO_DECREMENT_DEPRECATED_WARNINGS at the command line (or enable it via the\
|
||||||
|
cmake flags).\
|
||||||
|
To be save, you can use the CW/CCW circulator definitions, which behave\
|
||||||
|
the same as the original ones, without the previously mentioned issues."
|
||||||
|
|
||||||
|
DEPRECATED( DECREMENT_DEPRECATED_WARNINGS_TEXT )
|
||||||
|
#endif // NO_DECREMENT_DEPRECATED_WARNINGS
|
||||||
GenericCirculatorT_DEPRECATED& operator--() {
|
GenericCirculatorT_DEPRECATED& operator--() {
|
||||||
assert(this->mesh_);
|
assert(this->mesh_);
|
||||||
GenericCirculator_ValueHandleFns::decrement(this->mesh_, this->heh_, this->start_, this->lap_counter_);
|
GenericCirculator_ValueHandleFns::decrement(this->mesh_, this->heh_, this->start_, this->lap_counter_);
|
||||||
@@ -501,7 +514,10 @@ class GenericCirculatorT_DEPRECATED : protected GenericCirculatorBaseT<Mesh> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Post-decrement
|
/// Post-decrement
|
||||||
DEPRECATED("current decrement operator is deprecated. Please use CCW/CW iterators.")
|
#ifndef NO_DECREMENT_DEPRECATED_WARNINGS
|
||||||
|
DEPRECATED( DECREMENT_DEPRECATED_WARNINGS_TEXT )
|
||||||
|
#undef DECREMENT_DEPRECATED_WARNINGS_TEXT
|
||||||
|
#endif //NO_DECREMENT_DEPRECATED_WARNINGS
|
||||||
GenericCirculatorT_DEPRECATED operator--(int) {
|
GenericCirculatorT_DEPRECATED operator--(int) {
|
||||||
assert(this->mesh_);
|
assert(this->mesh_);
|
||||||
GenericCirculatorT_DEPRECATED cpy(*this);
|
GenericCirculatorT_DEPRECATED cpy(*this);
|
||||||
|
|||||||
Reference in New Issue
Block a user