From aa702b050c74b377aaa9d7971f2cf00f862b85e1 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Mon, 5 Sep 2022 17:16:53 +0200 Subject: [PATCH] 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. --- tools/mkclass/classcompiler.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/mkclass/classcompiler.cpp b/tools/mkclass/classcompiler.cpp index af17c538d43..8df23486daa 100644 --- a/tools/mkclass/classcompiler.cpp +++ b/tools/mkclass/classcompiler.cpp @@ -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")