Merge branch 'marinom/add-om_suppress_deprecated' into 'master'

Add OM_SUPPRESS_DEPRECATED to allow suppressing deprecated code warnings

See merge request OpenMesh/OpenMesh!264
This commit is contained in:
Jan Möbius
2020-05-13 07:16:38 +02:00
2 changed files with 7 additions and 2 deletions

View File

@@ -274,7 +274,7 @@ write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _prec
unsigned int num = _be.get_face_texcoords(texCoords);
for(size_t i = 0; i < num ; ++i)
{
texMap[texCoords[i]] = i;
texMap[texCoords[i]] = static_cast<int>(i);
}
}

View File

@@ -83,7 +83,12 @@
# endif
#endif
#if defined(_MSC_VER)
//! define OM_SUPPRESS_DEPRECATED to suppress deprecated code warnings
#if defined(OM_SUPPRESS_DEPRECATED)
#pragma message( \
"OpenMesh deprecated code warnings suppressed, please fix your code soon")
# define OM_DEPRECATED(msg)
#elif defined(_MSC_VER)
# define OM_DEPRECATED(msg) __declspec(deprecated(msg))
#elif defined(__GNUC__)
# if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40500 /* Test for GCC >= 4.5.0 */