MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / as_uint

Method as_uint

Source/Utils/dukglue/dukvalue.h:342–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340 }
341
342 inline duk_uint_t as_uint() const {
343 if (mType != NUMBER)
344 throw DukException() << "Expected number, got " << type_name();
345 return static_cast<uint32_t>(mPOD.number);
346 }
347
348 inline void* as_pointer() const {
349 if (mType != POINTER && mType != NULLREF)

Callers

nothing calls this directly

Calls 2

DukExceptionClass · 0.85
type_nameFunction · 0.85

Tested by

no test coverage detected