Browse Source

适配接口

xx 2 years ago
parent
commit
58842c796a
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/localstorage.cpp
  2. 1 1
      src/localstorage.h

+ 1 - 1
src/localstorage.cpp

@@ -47,7 +47,7 @@ void module::local_storage::regist(sol::state* lua)
     );
 }
 
-void module::local_storage::regist_global(const std::string& name, sol::state* lua)
+void module::local_storage::regist_global(const char* name, sol::state* lua)
 {
     lua->registry()[name] = this;
     (*lua)[name] = this;

+ 1 - 1
src/localstorage.h

@@ -20,7 +20,7 @@ namespace module
 		static void regist(sol::state* lua);
 	private:
 		// 通过 imodule 继承
-		virtual void regist_global(const std::string& name, sol::state* lua);
+		virtual void regist_global(const char* name, sol::state* lua);
 		virtual void delete_global() { delete this; }
 	};
 }