Remove the unused variable warning for the deprecated variable default_random.

This commit is contained in:
Guillaume Damiand 2016-06-03 18:11:34 +02:00
parent e394b71791
commit d544f4a5f7
2 changed files with 9 additions and 1 deletions

View File

@ -418,12 +418,20 @@ using std::max;
// Macro to trigger deprecation warnings
#ifdef CGAL_NO_DEPRECATION_WARNINGS
# define CGAL_DEPRECATED
# define CGAL_DEPRECATED_UNUSED
#elif defined(__GNUC__) || __has_attribute(__deprecated__)
# define CGAL_DEPRECATED __attribute__((__deprecated__))
#if __has_attribute(__unused__)
# define CGAL_DEPRECATED_UNUSED __attribute__((__deprecated__, __unused__))
#else
# define CGAL_DEPRECATED_UNUSED __attribute__((__deprecated__))
#endif
#elif defined (_MSC_VER) && (_MSC_VER > 1300)
# define CGAL_DEPRECATED __declspec(deprecated)
# define CGAL_DEPRECATED_UNUSED __declspec(deprecated)
#else
# define CGAL_DEPRECATED
# define CGAL_DEPRECATED_UNUSED
#endif

View File

@ -237,7 +237,7 @@ inline Random& get_default_random()
}
#ifndef CGAL_NO_DEPRECATED_CODE
namespace { CGAL_DEPRECATED CGAL::Random& default_random = get_default_random(); }
namespace { CGAL_DEPRECATED_UNUSED CGAL::Random& default_random = get_default_random(); }
#endif // CGAL_NO_DEPRECATED_CODE
#else // CGAL_HEADER_ONLY