From 4127cc3ab1c9a6fbb9793b00c8425703cd61ca54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Thu, 4 Jul 2019 10:50:29 -0700 Subject: [PATCH] IDL: Trim underscores. --- scripts/csharp.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/csharp.lua b/scripts/csharp.lua index 1b21bac18..8c3f59bcf 100644 --- a/scripts/csharp.lua +++ b/scripts/csharp.lua @@ -146,14 +146,16 @@ local function FlagBlock(typ) yield("{") for _, flag in ipairs(typ.flag) do + local flagName = flag.name:gsub("_", "") yield("\t" - .. flag.name - .. string.rep(" ", 22 - #(flag.name)) + .. flagName + .. string.rep(" ", 22 - #(flagName)) .. " = " .. string.format(flag.format or format, flag.value) .. "," ) end + if typ.shift then yield("\t" .. "Shift" @@ -212,7 +214,7 @@ function converter.types(typ) local lookup = combinedFlag.lookup or {} combinedFlag.lookup = lookup for _, flag in ipairs(typ.flag) do - local flagName = name .. flag.name + local flagName = name .. flag.name:gsub("_", "") local value = flag.value if value == nil then -- It's a combined flag