(svn r10561) -Fix: don't give 'unused variable' warnings when disabling asserts
This commit is contained in:
@@ -39,7 +39,11 @@ protected:
|
|||||||
if (name == NULL) return;
|
if (name == NULL) return;
|
||||||
|
|
||||||
this->name = strdup(name);
|
this->name = strdup(name);
|
||||||
std::pair<Blitters::iterator, bool> P = GetBlitters().insert(Blitters::value_type(name, this));
|
#if !defined(NDEBUG)
|
||||||
|
/* NDEBUG disables asserts and gives a warning: unused variable 'P' */
|
||||||
|
std::pair<Blitters::iterator, bool> P =
|
||||||
|
#endif /* !NDEBUG */
|
||||||
|
GetBlitters().insert(Blitters::value_type(name, this));
|
||||||
assert(P.second);
|
assert(P.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -79,7 +79,11 @@ protected:
|
|||||||
strecpy(buf, GetDriverTypeName(type), lastof(buf));
|
strecpy(buf, GetDriverTypeName(type), lastof(buf));
|
||||||
strecpy(buf + 5, name, 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);
|
assert(P.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user