From 0079887b645e0ee441bd2cfcd7874a1148fdd656 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Thu, 29 Oct 2015 23:26:03 -0400 Subject: [PATCH] Move AreaStore to util --- build/android/jni/Android.mk | 2 +- src/CMakeLists.txt | 1 - src/script/lua_api/l_areastore.cpp | 2 +- src/script/lua_api/l_areastore.h | 13 ++++++------- src/script/lua_api/l_util.cpp | 1 - src/unittest/test_areastore.cpp | 2 +- src/util/CMakeLists.txt | 1 + src/{ => util}/areastore.cpp | 2 +- src/{ => util}/areastore.h | 6 +++--- 9 files changed, 14 insertions(+), 16 deletions(-) rename src/{ => util}/areastore.cpp (99%) rename src/{ => util}/areastore.h (98%) diff --git a/build/android/jni/Android.mk b/build/android/jni/Android.mk index e1a2a54cb..92738e6cc 100644 --- a/build/android/jni/Android.mk +++ b/build/android/jni/Android.mk @@ -112,7 +112,6 @@ LOCAL_C_INCLUDES := \ deps/sqlite/ LOCAL_SRC_FILES := \ - jni/src/areastore.cpp \ jni/src/ban.cpp \ jni/src/camera.cpp \ jni/src/cavegen.cpp \ @@ -221,6 +220,7 @@ LOCAL_SRC_FILES := \ jni/src/version.cpp \ jni/src/voxel.cpp \ jni/src/voxelalgorithms.cpp \ + jni/src/util/areastore.cpp \ jni/src/util/auth.cpp \ jni/src/util/base64.cpp \ jni/src/util/directiontables.cpp \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0b84ff85a..feca199c1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -348,7 +348,6 @@ add_subdirectory(unittest) add_subdirectory(util) set(common_SRCS - areastore.cpp ban.cpp cavegen.cpp chat.cpp diff --git a/src/script/lua_api/l_areastore.cpp b/src/script/lua_api/l_areastore.cpp index ff6abbd9f..8b8b157d7 100644 --- a/src/script/lua_api/l_areastore.cpp +++ b/src/script/lua_api/l_areastore.cpp @@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common/c_converter.h" #include "cpp_api/s_security.h" #include "irr_v3d.h" -#include "areastore.h" +#include "util/areastore.h" #include "filesys.h" #ifndef ANDROID #include "cmake_config.h" diff --git a/src/script/lua_api/l_areastore.h b/src/script/lua_api/l_areastore.h index 543a2aa32..6321de6d1 100644 --- a/src/script/lua_api/l_areastore.h +++ b/src/script/lua_api/l_areastore.h @@ -17,15 +17,14 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef L_AREASTORE_H_ -#define L_AREASTORE_H_ +#ifndef L_AREA_STORE_H_ +#define L_AREA_STORE_H_ #include "lua_api/l_base.h" -#include "areastore.h" -/* - AreaStore - */ + +class AreaStore; + class LuaAreaStore : public ModApiBase { private: @@ -66,4 +65,4 @@ public: static void Register(lua_State *L); }; -#endif /* L_AREASTORE_H_ */ +#endif // L_AREA_STORE_H_ diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp index 98f70d917..f990dacf9 100644 --- a/src/script/lua_api/l_util.cpp +++ b/src/script/lua_api/l_util.cpp @@ -25,7 +25,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "serialization.h" #include "json/json.h" #include "cpp_api/s_security.h" -#include "areastore.h" #include "porting.h" #include "debug.h" #include "log.h" diff --git a/src/unittest/test_areastore.cpp b/src/unittest/test_areastore.cpp index 9d70d0b70..cac9e0b58 100644 --- a/src/unittest/test_areastore.cpp +++ b/src/unittest/test_areastore.cpp @@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "test.h" -#include "areastore.h" +#include "util/areastore.h" class TestAreaStore : public TestBase { public: diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index 33900a43a..0e7cbad07 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -1,4 +1,5 @@ set(UTIL_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/areastore.cpp ${CMAKE_CURRENT_SOURCE_DIR}/auth.cpp ${CMAKE_CURRENT_SOURCE_DIR}/base64.cpp ${CMAKE_CURRENT_SOURCE_DIR}/directiontables.cpp diff --git a/src/areastore.cpp b/src/util/areastore.cpp similarity index 99% rename from src/areastore.cpp rename to src/util/areastore.cpp index b1b5c0db4..b0076faa3 100644 --- a/src/areastore.cpp +++ b/src/util/areastore.cpp @@ -17,7 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "areastore.h" +#include "util/areastore.h" #include "util/serialize.h" #include "util/container.h" diff --git a/src/areastore.h b/src/util/areastore.h similarity index 98% rename from src/areastore.h rename to src/util/areastore.h index 493b4fc25..c36cbc389 100644 --- a/src/areastore.h +++ b/src/util/areastore.h @@ -17,8 +17,8 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef AREASTORE_H_ -#define AREASTORE_H_ +#ifndef AREA_STORE_H_ +#define AREA_STORE_H_ #include "irr_v3d.h" #include "noise.h" // for PcgRandom @@ -174,4 +174,4 @@ private: #endif -#endif /* AREASTORE_H_ */ +#endif // AREA_STORE_H_