From ac8bb457aae58867cbb96a5e64d286e7edc18e16 Mon Sep 17 00:00:00 2001 From: est31 Date: Fri, 1 Apr 2016 01:52:17 +0200 Subject: Pathfinder: Fix style * Fix naming style for methods and classes: Use camelCase for methods and PascalCase for classes as code style demands it. And use sneak_case for methods that are not member of a class. * Replace "* " with " *" for Pointers * Same for references * Put function body opening braces on new line * Other misc minor non functional style improvements --- src/script/lua_api/l_env.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/script/lua_api') diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp index af89da9a1..8284c3fcb 100644 --- a/src/script/lua_api/l_env.cpp +++ b/src/script/lua_api/l_env.cpp @@ -915,19 +915,19 @@ int ModApiEnvMod::l_find_path(lua_State *L) unsigned int searchdistance = luaL_checkint(L, 3); unsigned int max_jump = luaL_checkint(L, 4); unsigned int max_drop = luaL_checkint(L, 5); - algorithm algo = A_PLAIN_NP; + PathAlgorithm algo = PA_PLAIN_NP; if (!lua_isnil(L, 6)) { std::string algorithm = luaL_checkstring(L,6); if (algorithm == "A*") - algo = A_PLAIN; + algo = PA_PLAIN; if (algorithm == "Dijkstra") - algo = DIJKSTRA; + algo = PA_DIJKSTRA; } - std::vector path = - get_Path(env,pos1,pos2,searchdistance,max_jump,max_drop,algo); + std::vector path = get_path(env, pos1, pos2, + searchdistance, max_jump, max_drop, algo); if (path.size() > 0) { -- cgit v1.2.3