(svn r13351) -Codechange: disable warnings about unused variable for builds without asserts

This commit is contained in:
smatz
2008-06-01 15:08:14 +00:00
parent 4623846515
commit 69ebefe1ac
6 changed files with 12 additions and 27 deletions

View File

@@ -156,11 +156,7 @@ void DriverFactoryBase::RegisterDriver(const char *name, Driver::Type type, int
strecpy(buf, GetDriverTypeName(type), lastof(buf));
strecpy(buf + 5, name, lastof(buf));
#if !defined(NDEBUG) || defined(WITH_ASSERT)
/* 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));
std::pair<Drivers::iterator, bool> P = GetDrivers().insert(Drivers::value_type(buf, this));
assert(P.second);
}