~gpcf/advtrains-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Simplify codes... yay

Details
Message ID
<20240907234430.39244-1-yiufamily.hh@gmail.com>
DKIM signature
pass
Download raw message
Patch: +1 -9
From: 1F616EMO <root@1f616emo.xyz>

---
 advtrains/wagons.lua | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 536c8d4..a9f2562 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -16,15 +16,7 @@ advtrains.wagons = {}
advtrains.wagon_alias = {}
advtrains.wagon_prototypes = setmetatable({}, {
	__index = function(t, k)
		local rtn_val = rawget(t, k)
		if rtn_val ~= nil then
			return rtn_val
		end
		local alias = advtrains.wagon_alias[k]
		if alias then
			return rawget(t, alias)
		end
		return nil
		return rawget(t, advtrains.wagon_alias[k])
	end
})
advtrains.wagon_objects = {}
-- 
2.46.0
Details
Message ID
<048df462-dfd8-4b1c-9a41-bc7297326223@gmail.com>
In-Reply-To
<20240907234430.39244-1-yiufamily.hh@gmail.com> (view parent)
DKIM signature
pass
Download raw message
Sorry for not seeing y5nw's suggestions soon enough. This patch applies 
the suggested optimizations.
Reply to thread Export thread (mbox)