diff options
author | chai <chaifix@163.com> | 2018-11-15 19:29:27 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-15 19:29:27 +0800 |
commit | 7e51ff3bfae0becc260452a427a1fc1232a4b348 (patch) | |
tree | e2c4cddcd5ed719a611be4c92edf1991a63203c5 /src/lua/common | |
parent | a6f2d5fff89b7322009c46a9272668ca4c32ce64 (diff) |
*修改代码结构
Diffstat (limited to 'src/lua/common')
-rw-r--r-- | src/lua/common/je_lua_function.cpp | 0 | ||||
-rw-r--r-- | src/lua/common/je_lua_function.h | 6 | ||||
-rw-r--r-- | src/lua/common/je_lua_proxy.h | 5 | ||||
-rw-r--r-- | src/lua/common/je_lua_shared.hpp | 7 |
4 files changed, 15 insertions, 3 deletions
diff --git a/src/lua/common/je_lua_function.cpp b/src/lua/common/je_lua_function.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/lua/common/je_lua_function.cpp diff --git a/src/lua/common/je_lua_function.h b/src/lua/common/je_lua_function.h new file mode 100644 index 0000000..49c1b31 --- /dev/null +++ b/src/lua/common/je_lua_function.h @@ -0,0 +1,6 @@ +#ifndef __JE_LUA_FUNCTION_H__ +#define __JE_LUA_FUNCTION_H__ + + + +#endif
\ No newline at end of file diff --git a/src/lua/common/je_lua_proxy.h b/src/lua/common/je_lua_proxy.h index 9f55490..ca4a56a 100644 --- a/src/lua/common/je_lua_proxy.h +++ b/src/lua/common/je_lua_proxy.h @@ -18,6 +18,7 @@ namespace JinEngine if (s == nullptr) return; shared = s; + shared->retain(); } void release() @@ -28,13 +29,13 @@ namespace JinEngine shared = nullptr; } } - +/* void retain() { if (shared != nullptr) shared->retain(); } - +*/ template<class T> Shared<T>& getShared() { diff --git a/src/lua/common/je_lua_shared.hpp b/src/lua/common/je_lua_shared.hpp index 9cd7073..91705d1 100644 --- a/src/lua/common/je_lua_shared.hpp +++ b/src/lua/common/je_lua_shared.hpp @@ -85,12 +85,17 @@ namespace JinEngine return mDependencies.find(key)->second; } + bool isType(const char* t) + { + return strcmp(type, t) == 0; + } + protected: using DepMap = std::map<int, SharedBase*>; SharedBase(void* obj, const char* t) - : mCount(1) + : mCount(0) , mObject(obj) , type(t) { |