mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-04 01:07:56 -04:00
cast.hpp helper
I was tired of manually bounds-checking my integer casts.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include "helpers/cast.hpp"
|
||||
#include "global.h"
|
||||
|
||||
namespace dusk::helpers::cast::_impl {
|
||||
|
||||
void overrun_high() {
|
||||
CRASH("bounded cast overran!");
|
||||
}
|
||||
|
||||
void overrun_low() {
|
||||
CRASH("bounded cast overran!");
|
||||
}
|
||||
|
||||
} // namespace dusk::helpers::cast::_impl
|
||||
Reference in New Issue
Block a user