Skip to content

Commit

Permalink
Fix an implicit array-to-pointer decay
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Apr 16, 2024
1 parent 09cf896 commit 617de33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/alassert.h
@@ -1,6 +1,8 @@
#ifndef AL_ASSERT_H
#define AL_ASSERT_H

#include <array>

#include "opthelpers.h"

namespace al {
Expand All @@ -16,7 +18,7 @@ void do_assert(const char *message, int linenum, const char *filename, const cha
*/
#define alassert(cond) do { \
if(!(cond)) UNLIKELY \
al::do_assert("Assertion '" #cond "' failed", __LINE__, __FILE__, __func__); \
al::do_assert("Assertion '" #cond "' failed", __LINE__, __FILE__, std::data(__func__)); \
} while(0)

#endif /* AL_ASSERT_H */

0 comments on commit 617de33

Please sign in to comment.