Skip to content

Commit 4e21891

Browse files
committed
Phase 122: Remove unused ctb(int) overload
Removed the `lu_byte ctb(int)` overload from ltvalue.h as it was unused. All ctb() calls in the codebase use LuaT enum values, which call the `LuaT ctb(LuaT)` overload. This simplifies the API and removes dead code. Analysis: - Searched codebase for all ctb() calls - All calls use LuaT::* enum values (SHRSTR, LNGSTR, etc.) - Calls like ctb(s->getType()) pass LuaT (from GCBase::getType()) - No integer literals or LUA_T* macros passed to ctb() Changes: - src/objects/ltvalue.h:318 - Removed ctb(int) overload Testing: - Build: ✅ Success (no compilation errors) - Tests: ✅ All pass ("final OK !!!") - Performance: ~4.46s avg (within normal variance)
1 parent 99366a0 commit 4e21891

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/objects/ltvalue.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ inline constexpr int BIT_ISCOLLECTABLE = (1 << 6);
315315

316316
/* mark a tag as collectable */
317317
constexpr LuaT ctb(LuaT t) noexcept { return static_cast<LuaT>(static_cast<int>(t) | BIT_ISCOLLECTABLE); }
318-
constexpr lu_byte ctb(int t) noexcept { return static_cast<lu_byte>(t | BIT_ISCOLLECTABLE); } /* overload for base types */
319318

320319

321320
/* Macros for internal tests */

0 commit comments

Comments
 (0)