(svn r10561) -Fix: don't give 'unused variable' warnings when disabling asserts

This commit is contained in:
truelight
2007-07-14 20:21:02 +00:00
parent 08780621cc
commit 68c5bcf960
2 changed files with 10 additions and 2 deletions

View File

@@ -79,7 +79,11 @@ protected:
strecpy(buf, GetDriverTypeName(type), lastof(buf));
strecpy(buf + 5, name, lastof(buf));
std::pair<Drivers::iterator, bool> P = GetDrivers().insert(Drivers::value_type(buf, this));
#if !defined(NDEBUG)
/* NDEBUG disables asserts and gives a warning: unused variable 'P' */
std::pair<Drivers::iterator, bool> P =
#endif /* !NDEBUG */
GetDrivers().insert(Drivers::value_type(buf, this));
assert(P.second);
}