| 31 | } |
| 32 | |
| 33 | bool CustomFunction::ValidateParam(CustomFunctionParam const & param, OsiArgumentValue const & value) const |
| 34 | { |
| 35 | if (param.Type == ValueType::None |
| 36 | || param.Dir == FunctionArgumentDirection::Out) { |
| 37 | return true; |
| 38 | } |
| 39 | |
| 40 | auto typeMap = *gExtender->GetServer().Osiris().GetWrappers().Globals.Types; |
| 41 | auto typeId = typeMap->ResolveAlias((uint32_t)value.TypeId); |
| 42 | auto paramTypeId = typeMap->ResolveAlias((uint32_t)param.Type); |
| 43 | |
| 44 | if (typeId != paramTypeId) { |
| 45 | OsiError("Function " << name_ << "/" << params_.size() << ": Argument '" << param.Name |
| 46 | << "' type mismatch; expected " << (unsigned)paramTypeId << ", got " << (unsigned)typeId); |
| 47 | return false; |
| 48 | } |
| 49 | |
| 50 | return true; |
| 51 | } |
| 52 | |
| 53 | // FIXME - REMOVE - FunctionNameHash is the same |
| 54 | uint32_t OsiTypeHash(char const* str) |
nothing calls this directly
no test coverage detected