Further fixes for Assert
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-03-22 11:52:08 +01:00
parent 07f215a4fa
commit 2d4cc2cd80
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 2 additions and 6 deletions

View File

@ -1,5 +1,3 @@
#ifndef ARBUTILS_ASSERT_HPP
#define ARBUTILS_ASSERT_HPP
#include <sstream>
#include <stdexcept>
#include <string.h>
@ -15,12 +13,10 @@
ss << #expr << "\""; \
throw std::logic_error(ss.str()); \
} \
}
};
#else
// Assert is empty if NO_ASSERT is defined.
#define Assert(expr)
#endif
#define AssertNotNull(value) Assert(value != nullptr)
#endif
#define AssertNotNull(value) Assert(value != nullptr)