Skip to content
This repository was archived by the owner on Mar 15, 2025. It is now read-only.

Commit 0379540

Browse files
committed
Use anonymous namespace instead of static in dmath.cpp.
1 parent 7de911d commit 0379540

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

dang-math/lua/src/dmath.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
#include "dang-math/lua-geometry.h"
44
#include "dang-math/lua-vector-matrix.h"
55

6+
namespace {
7+
68
template <typename T>
7-
static void add(dang::lua::State& lua, dang::lua::Arg table)
9+
void add(dang::lua::State& lua, dang::lua::Arg table)
810
{
911
auto name = lua(dang::lua::ClassInfo<T>::className());
1012
auto lib = table.state().pushRequire<T>(false);
1113
table.rawSetTable(std::move(name), std::move(lib));
1214
}
1315

14-
extern "C" int luaopen_dmath(lua_State* L)
16+
} // namespace
17+
18+
extern "C" DANG_DLLEXPORT int luaopen_dmath(lua_State* L)
1519
{
1620
dang::lua::State lua(L);
1721
lua.checkVersion();

0 commit comments

Comments
 (0)