TLS utils - remove useless static_assert
Compiler (gcc) keeps nagging and complaining about an address of function to be never nullptr in any particular instantiation, when argument is an address of a function. Change-Id: If67e80f2ff4d408608429d53814083777cc8441c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
4a9ed41075
commit
c0a17ecfaf
@ -72,8 +72,6 @@ namespace QTlslUtils
|
||||
template <class NativeTlsType, void (*Deleter)(NativeTlsType *)>
|
||||
void safe_delete(NativeTlsType *object)
|
||||
{
|
||||
static_assert (Deleter, "safe_delete: invalid (nullptr) function pointer provided");
|
||||
|
||||
if (object)
|
||||
Deleter(object);
|
||||
}
|
||||
@ -81,8 +79,6 @@ void safe_delete(NativeTlsType *object)
|
||||
template<class NativeTlsType, int ok, int (*Deleter)(NativeTlsType *)>
|
||||
void safe_delete(NativeTlsType *object)
|
||||
{
|
||||
static_assert (Deleter, "safe_delete: invalid (nullptr) function pointer provided");
|
||||
|
||||
if (object) {
|
||||
if (Deleter(object) != ok) {
|
||||
qCWarning(lcSsl, "Failed to free a resource.");
|
||||
|
Loading…
Reference in New Issue
Block a user