/* ================ idTypeInfoGen::GetFloatConstant ================ */ float idTypeInfoGen::GetFloatConstant( const char *scope, const char *name, idParser &src ) { idConstantInfo *constant = FindConstant( idStr( scope ) + name ); if ( constant == NULL ) { constant = FindConstant( name ); } if ( constant ) { return EvaluateFloatString( constant->value ); } src.Warning( "unknown value '%s' in constant expression", name ); return 0; }
void TypeEnum::AddConstant(const Constant& constant) { RDE_ASSERT(FindConstant(constant.m_name) == 0 && "Enumerator with given name already exists"); m_constants.push_back(constant); }