Compile with clang and add cotire

* Add cotire cmake module to speedup compilation https://github.com/sakra/cotire
* Fix clang error and warnings
* Rename Font to BitmapFont to fix conflict with Xlib.g Font typedef
* Remove legacy PCH support
* Improve Position hash
This commit is contained in:
Eduardo Bart
2012-06-16 20:19:43 -03:00
parent 4813b7eb4b
commit 10b33c6124
24 changed files with 2835 additions and 373 deletions

View File

@@ -95,7 +95,7 @@ namespace luabinder
template<typename Ret, typename F, typename Tuple>
LuaCppFunction bind_fun_specializer(const F& f) {
enum { N = std::tuple_size<Tuple>::value };
return [=](LuaInterface* lua) {
return [=](LuaInterface* lua) -> int {
if(lua->stackSize() != N)
throw LuaBadNumberOfArgumentsException(N, lua->stackSize());
Tuple tuple;
@@ -248,7 +248,7 @@ namespace luabinder
template<typename C>
LuaCppFunction bind_mem_fun(int (C::*f)(LuaInterface*)) {
auto mf = std::mem_fn(f);
return [=](LuaInterface* lua) {
return [=](LuaInterface* lua) -> int {
auto obj = lua->castValue<std::shared_ptr<C>>(1);
lua->remove(1);
return mf(obj, lua);

View File

@@ -53,7 +53,7 @@ void LuaInterface::init()
bindClassMemberFunction<LuaObject>("getUseCount", &LuaObject::getUseCount);
bindClassMemberFunction<LuaObject>("getClassName", &LuaObject::getClassName);
registerClassMemberFunction<LuaObject>("getFieldsTable", (LuaCppFunction) ([](LuaInterface* lua) {
registerClassMemberFunction<LuaObject>("getFieldsTable", (LuaCppFunction) ([](LuaInterface* lua) -> int {
LuaObjectPtr obj = g_lua.popObject();
obj->luaGetFieldsTable();
return 1;