ClassCompiler: Validate field types -> Icinga Name correctly

When the classcompiler is validating/transforming field types -> Icinga type names, it is currently returning
Icinga `Number` type for field type of `bool`, which is actually wrong. This PR ensures to always transform
into the correct Icinga type names.
This commit is contained in:
Yonas Habteab 2022-09-05 17:16:53 +02:00
parent 3a8abdcc3b
commit aa702b050c

View File

@ -151,9 +151,6 @@ static std::string FieldTypeToIcingaName(const Field& field, bool inner)
if (field.Attributes & FAEnum)
return "Number";
if (ftype == "bool" || ftype == "int" || ftype == "double")
return "Number";
if (ftype == "int" || ftype == "double")
return "Number";
else if (ftype == "bool")