Skip to content

Commit

Permalink
ClassCompiler: Validate field types -> Icinga Name correctly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yhabteab committed Sep 5, 2022
1 parent 3a8abdc commit aa702b0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tools/mkclass/classcompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit aa702b0

Please sign in to comment.