Skip to content

Commit d3f54c2

Browse files
committed
noexcept + constexpr in gdsassert
1 parent a0bc771 commit d3f54c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/gdsassert.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
#include <unistd.h> // isatty()
3636
#endif
3737

38-
inline void fb_assert_impl(const char* msg, const char* file, int line, bool do_abort)
38+
inline void fb_assert_impl(const char* msg, const char* file, int line, bool do_abort) noexcept
3939
{
40-
const char* const ASSERT_FAILURE_STRING = "Assertion (%s) failure: %s %" LINEFORMAT"\n";
40+
static constexpr const char* ASSERT_FAILURE_STRING = "Assertion (%s) failure: %s %" LINEFORMAT"\n";
4141

4242
if (isatty(2))
4343
fprintf(stderr, ASSERT_FAILURE_STRING, msg, file, line);
@@ -69,7 +69,7 @@ inline void fb_assert_impl(const char* msg, const char* file, int line, bool do_
6969
#endif // DEV_BUILD
7070

7171
namespace DtorException {
72-
inline void devHalt()
72+
inline void devHalt() noexcept
7373
{
7474
// If any guard's dtor is executed during exception processing,
7575
// (remember - this guards live on the stack), exception

0 commit comments

Comments
 (0)