Part one - removed references and smart pointers

This commit is contained in:
2022-11-11 19:08:46 -08:00
parent 4c2fc4cfcf
commit 42645883cd
76 changed files with 3899 additions and 3707 deletions

View File

@ -3,7 +3,7 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
target_sources(${PROJECT_NAME}
target_sources(${DAWN_TARGET_NAME}
PRIVATE
assert.cpp
)

View File

@ -27,15 +27,11 @@
}
void assertNotNull(const void *pointer) {
assertTrue(pointer != NULL);
}
void assertNotNullptr(const void *ptr) {
assertTRue(ptr != nullptr);
assertTrue(pointer != nullptr && pointer != NULL);
}
void assertNull(const void *pointer) {
assertTrue(pointer == NULL);
assertTrue(pointer == NULL || pointer == nullptr);
}
void assertDeprecated() {

View File

@ -13,11 +13,6 @@
#if ASSERTS_ENABLED == 0
static inline void assertTrue(bool_t x) {}
static inline void assertFalse(bool_t x) {}
static inline void assertUnreachable() {}
static inline void assertNotNull(const void *pointer) {}
static inline void assertNull(const void *pointer) {}
static inline void assertDeprecated() {}
#elif ASSERTS_ENABLED == 1
@ -45,13 +40,6 @@ static inline void assertDeprecated() {}
*/
void assertNotNull(const void *pointer);
/**
* Asserts a given pointer to not be a C++ nullptr.
*
* @param ptr Pointer to assert not nullptr.
*/
void assertNotNullptr(const void *ptr);
/**
* Asserts a given pointer to be a nullptr.
* @param pointer Pointer to assert is nullptr.
@ -66,9 +54,5 @@ static inline void assertDeprecated() {}
#else
#define assertTrue assert
#define assertFalse(x) assertTrue(x == 0)
#define assertNotNull(x) assert(x != NULL)
#define assertUnreachable() assert(false)
#define assertDeprecated assertUnreachable
#endif