Wrong overload of function push() got called when pushing a cEntity*. (#4512)
* Now having two funcs, Push(cEntity* ..) and Push(const cEntity* ...). For now, the const function just casts away the const qualifier and passes to the other. Co-authored-by: mluchterhand <mluchterhand@max.de>
This commit is contained in:
parent
0de2a32365
commit
4f60eaabca
@ -949,6 +949,16 @@ void cLuaState::Push(bool a_Value)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cLuaState::Push(const cEntity * a_Entity)
|
||||||
|
{
|
||||||
|
// Once we can make Lua understand constness, this function shall receive a corresponding function body
|
||||||
|
Push(const_cast<cEntity * >(a_Entity));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cLuaState::Push(cEntity * a_Entity)
|
void cLuaState::Push(cEntity * a_Entity)
|
||||||
{
|
{
|
||||||
ASSERT(IsValid());
|
ASSERT(IsValid());
|
||||||
|
@ -624,6 +624,7 @@ public:
|
|||||||
// Push a simple value onto the stack (keep alpha-sorted):
|
// Push a simple value onto the stack (keep alpha-sorted):
|
||||||
void Push(bool a_Value);
|
void Push(bool a_Value);
|
||||||
void Push(cEntity * a_Entity);
|
void Push(cEntity * a_Entity);
|
||||||
|
void Push(const cEntity * a_Entity);
|
||||||
void Push(cLuaServerHandle * a_ServerHandle);
|
void Push(cLuaServerHandle * a_ServerHandle);
|
||||||
void Push(cLuaTCPLink * a_TCPLink);
|
void Push(cLuaTCPLink * a_TCPLink);
|
||||||
void Push(cLuaUDPEndpoint * a_UDPEndpoint);
|
void Push(cLuaUDPEndpoint * a_UDPEndpoint);
|
||||||
|
Loading…
Reference in New Issue
Block a user