diff --git a/PublicTypes/InjectVariable/CStyle.cs b/PublicTypes/InjectVariable/CStyle.cs index ac35096..0b4efee 100644 --- a/PublicTypes/InjectVariable/CStyle.cs +++ b/PublicTypes/InjectVariable/CStyle.cs @@ -11,6 +11,20 @@ namespace Convention.RScript.Variable.CStyle { public static string GetTypename(Type type) { + if (type == typeof(int)) + return "int"; + if (type == typeof(float)) + return "float"; + if (type == typeof(double)) + return "double"; + if (type == typeof(bool)) + return "bool"; + if (type == typeof(void)) + return "void"; + if (type.IsEnum) + return type.FullName.Replace('`', '_'); + if (type.IsClass) + return type.FullName.Replace('`', '_'); var name = type.Name.Replace('`', '_'); return name; }