Skip to content

Commit 25151ae

Browse files
committed
Fix BS_ASSERT to work with template types
1 parent 6f011cf commit 25151ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/bitstream/utility/assert.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#define BS_BREAKPOINT() throw
1111
#endif
1212

13-
#define BS_ASSERT(x) if (!(x)) { BS_BREAKPOINT(); return false; }
13+
#define BS_ASSERT(...) if (!(__VA_ARGS__)) { BS_BREAKPOINT(); return false; }
1414
#else // BS_DEBUG_BREAK
15-
#define BS_ASSERT(x) if (!(x)) { return false; }
15+
#define BS_ASSERT(...) if (!(__VA_ARGS__)) { return false; }
1616

1717
#define BS_BREAKPOINT() throw
1818
#endif // BS_DEBUG_BREAK

0 commit comments

Comments
 (0)