From 5b235a7f26deeffabdaf2e57d8d369975e609659 Mon Sep 17 00:00:00 2001 From: ninemine <1371605831@qq.com> Date: Tue, 25 Nov 2025 11:58:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=8D=87=E7=B1=BB=E5=9E=8B=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E7=9A=84=E5=AE=8C=E6=95=B4=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PublicTypes/InjectVariable/CStyle.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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; }