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

Method as_bool

Source/Utils/dukglue/dukvalue.h:318–322  ·  view source on GitHub ↗

various (type-safe) getters

Source from the content-addressed store, hash-verified

316
317 // various (type-safe) getters
318 inline bool as_bool() const {
319 if (mType != BOOLEAN)
320 throw DukException() << "Expected boolean, got " << type_name();
321 return mPOD.boolean;
322 }
323
324 inline double as_double() const {
325 if (mType != NUMBER)

Callers

nothing calls this directly

Calls 2

DukExceptionClass · 0.85
type_nameFunction · 0.85

Tested by

no test coverage detected