Add an assert in wcharz_t's constructor that it is not null

These strings should never be null.
This commit is contained in:
ridiculousfish 2023-03-04 13:13:24 -08:00
parent 8427e05bf7
commit 497073f74e

View file

@ -29,7 +29,7 @@
struct wcharz_t {
const wchar_t *str;
/* implicit */ wcharz_t(const wchar_t *s) : str(s) {}
/* implicit */ wcharz_t(const wchar_t *s) : str(s) { assert(s && "wcharz_t must be non-null"); }
operator const wchar_t *() const { return str; }
operator wcstring() const { return str; }