Fix Lua Version Preprocessor Warning

pull/3/head
dlshcbmuipmam 2019-08-04 17:55:36 +02:00 committed by Hleb Valoshka
parent 204ba15f37
commit 85fa5ddade
2 changed files with 6 additions and 6 deletions

View File

@ -12,10 +12,6 @@
#ifndef _CELESTIA_CELX_H_
#define _CELESTIA_CELX_H_
#ifndef LUA_VER
#define LUA_VER 0x050100
#endif
#include <iostream>
#include <string>
#include <vector>
@ -23,7 +19,11 @@
#include <celutil/timer.h>
#include <celengine/observer.h>
#if LUA_VER < 0x050300
#ifndef LUA_VERSION_NUM
#define LUA_VERSION_NUM 501
#endif
#if LUA_VERSION_NUM < 503
int lua_isinteger(lua_State *L, int index);
#endif

View File

@ -920,7 +920,7 @@ void CreateObserverMetaTable(lua_State* l)
celx.registerMethod("__tostring", observer_tostring);
celx.registerMethod("isvalid", observer_isvalid);
#if LUA_VER < 0x050200
#if LUA_VERSION_NUM < 502
celx.registerMethod("goto", observer_goto);
#endif
celx.registerMethod("gotoobject", observer_goto);