forked from OctaForge/libcubescript
get_code for TaggedValue
parent
364ca98e54
commit
6922853d66
|
@ -570,6 +570,12 @@ float Ident::get_float() const {
|
|||
return cs_get_float(val, get_valtype());
|
||||
}
|
||||
|
||||
ostd::Uint32 *TaggedValue::get_code() const {
|
||||
if (get_type() != VAL_CODE)
|
||||
return nullptr;
|
||||
return const_cast<ostd::Uint32 *>(code);
|
||||
}
|
||||
|
||||
static inline ostd::String cs_get_str(IdentValue const &v, int type, int len) {
|
||||
switch (type) {
|
||||
case VAL_STR:
|
||||
|
|
|
@ -127,6 +127,7 @@ struct OSTD_EXPORT TaggedValue: IdentValue {
|
|||
ostd::String get_str() const;
|
||||
int get_int() const;
|
||||
float get_float() const;
|
||||
ostd::Uint32 *get_code() const;
|
||||
void get_val(TaggedValue &r) const;
|
||||
|
||||
void force_null();
|
||||
|
|
Loading…
Reference in New Issue