Skip to content

Commit a1055c6

Browse files
authored
Merge pull request #71 from NiceAndPeter/claude/remove-ctb-int-overload-01KbZCVSAa1dWFWu8r1TTJAJ
Remove ctb(int) overload and update LuaT enums
2 parents 99366a0 + 0ca0e30 commit a1055c6

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

src/objects/ltvalue.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -276,16 +276,8 @@ class TValue {
276276
};
277277

278278

279-
/* Access to TValue's internal value union */
280-
constexpr Value& val_(TValue* o) noexcept { return o->valueField(); }
281-
constexpr const Value& val_(const TValue* o) noexcept { return o->valueField(); }
282-
constexpr Value& valraw(TValue* o) noexcept { return val_(o); }
283-
constexpr const Value& valraw(const TValue* o) noexcept { return val_(o); }
284-
285-
286279
/* raw type tag of a TValue */
287280
constexpr LuaT rawtt(const TValue* o) noexcept { return o->getType(); }
288-
constexpr lu_byte rawtt_byte(const TValue* o) noexcept { return o->getRawType(); } /* for legacy code */
289281

290282
/* tag with no variants (bits 0-3) */
291283
constexpr int novariant(int t) noexcept { return (t & 0x0F); }
@@ -296,7 +288,6 @@ constexpr int withvariant(int t) noexcept { return (t & 0x3F); }
296288
constexpr LuaT withvariant(LuaT t) noexcept { return static_cast<LuaT>(static_cast<int>(t) & 0x3F); }
297289

298290
constexpr LuaT ttypetag(const TValue* o) noexcept { return withvariant(rawtt(o)); }
299-
constexpr lu_byte ttypetag_byte(const TValue* o) noexcept { return static_cast<lu_byte>(withvariant(rawtt(o))); } /* for legacy code */
300291

301292
/* type of a TValue */
302293
constexpr int ttype(const TValue* o) noexcept { return novariant(rawtt(o)); }
@@ -307,15 +298,13 @@ constexpr LuaT TValue::typeTag() const noexcept { return withvariant(tt_); }
307298

308299
/* Macros to test type */
309300
constexpr bool checktag(const TValue* o, LuaT t) noexcept { return rawtt(o) == t; }
310-
constexpr bool checktag(const TValue* o, lu_byte t) noexcept { return rawtt(o) == static_cast<LuaT>(t); } /* overload for raw bytes */
311301
constexpr bool checktype(const TValue* o, int t) noexcept { return ttype(o) == t; }
312302

313303
/* Bit mark for collectable types */
314304
inline constexpr int BIT_ISCOLLECTABLE = (1 << 6);
315305

316306
/* mark a tag as collectable */
317307
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 */
319308

320309

321310
/* Macros for internal tests */
@@ -327,7 +316,6 @@ constexpr lu_byte ctb(int t) noexcept { return static_cast<lu_byte>(t | BIT_ISCO
327316

328317
/* set a value's tag */
329318
inline void settt_(TValue* o, LuaT t) noexcept { o->setType(t); }
330-
inline void settt_(TValue* o, lu_byte t) noexcept { o->setType(t); } /* overload for raw bytes */
331319

332320

333321
#endif

0 commit comments

Comments
 (0)