Changed code slightly to avoid a warning from gcc.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403758
This commit is contained in:
Davis King 2010-07-23 20:20:34 +00:00
parent e93e9560a1
commit bc0e12f2af
1 changed files with 6 additions and 0 deletions

View File

@ -79,7 +79,13 @@ namespace dlib
{} {}
template <typename T> template <typename T>
// This funny #ifdef thing is here because gcc sometimes gives a warning
// about v being unused otherwise.
#ifdef ENABLE_ASSERTS
void assert_is_vector(const matrix_exp<T>& v) void assert_is_vector(const matrix_exp<T>& v)
#else
void assert_is_vector(const matrix_exp<T>& )
#endif
{ {
// make sure requires clause is not broken // make sure requires clause is not broken
DLIB_ASSERT(is_vector(v) == true, DLIB_ASSERT(is_vector(v) == true,