From 5f941a05f2a971f39735ee9af0467b10be27f960 Mon Sep 17 00:00:00 2001
From: Joseph Walton-Rivers <joseph@walton-rivers.uk>
Date: Wed, 12 Jul 2023 22:48:15 +0100
Subject: [PATCH] remove unused module

---
 .../core/include/fggl/services/module.hpp     |  4 +-
 fggl/CMakeLists.txt                           |  1 -
 fggl/data/module.cpp                          | 34 ---------------
 include/fggl/assets/module.hpp                |  4 +-
 include/fggl/assets/packed/module.hpp         |  1 -
 include/fggl/data/module.hpp                  | 42 -------------------
 include/fggl/fggl.hpp                         |  1 -
 include/fggl/gui/module.hpp                   |  1 -
 .../lua/include/fggl/script/lua/module.hpp    |  1 -
 9 files changed, 3 insertions(+), 86 deletions(-)
 delete mode 100644 fggl/data/module.cpp
 delete mode 100644 include/fggl/data/module.hpp

diff --git a/components/core/include/fggl/services/module.hpp b/components/core/include/fggl/services/module.hpp
index 1e32642..6278cfd 100644
--- a/components/core/include/fggl/services/module.hpp
+++ b/components/core/include/fggl/services/module.hpp
@@ -21,8 +21,8 @@
 
 #define FGGL_MODULE(id, ...) constexpr static const auto MODULE_ID = fggl::services::ModuleID::make(#id); \
 						constexpr static const auto MODULE_DEPS = fggl::services::mod_extract_names<__VA_ARGS__>(); \
-                        inline fggl::services::ModuleID getName() const override { return MODULE_ID; } \
-						inline fggl::services::Module::ServiceList getDepends() const override { return fggl::services::mod_svc_list( MODULE_DEPS ); }
+                        inline auto getName() const -> fggl::services::ModuleID override { return MODULE_ID; } \
+						inline auto getDepends() const -> fggl::services::Module::ServiceList override { return fggl::services::mod_svc_list( MODULE_DEPS ); }
 
 #define FGGL_MODULE_CONTRACT(name, id) struct name { constexpr static const auto MODULE_ID = fggl::services::ModuleID::make(#id); };
 
diff --git a/fggl/CMakeLists.txt b/fggl/CMakeLists.txt
index 30e4ee5..644f5b5 100644
--- a/fggl/CMakeLists.txt
+++ b/fggl/CMakeLists.txt
@@ -50,7 +50,6 @@ target_sources(${PROJECT_NAME}
         data/model.cpp
         data/procedural.cpp
         data/heightmap.cpp
-        data/module.cpp
 
         scenes/menu.cpp
         scenes/game.cpp
diff --git a/fggl/data/module.cpp b/fggl/data/module.cpp
deleted file mode 100644
index 27941b1..0000000
--- a/fggl/data/module.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is part of FGGL.
- *
- * FGGL is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
- *
- * FGGL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License along with FGGL.
- * If not, see <https://www.gnu.org/licenses/>.
- */
-
-//
-// Created by webpigeon on 20/08/22.
-//
-
-#include "fggl/data/module.hpp"
-
-namespace fggl::data {
-
-	/*
-	auto LocalStorage::factory(modules::ServiceName service, modules::Services &data) -> bool {
-		if (service == SERVICE_STORAGE) {
-			// FIXME: no easy way to set the application name
-			auto pathConfig = fggl::platform::calc_engine_paths("fggl-demo");
-			data.create<Storage>(pathConfig);
-			return true;
-		}
-		return false;
-	}*/
-
-} // namespace fggl::data
\ No newline at end of file
diff --git a/include/fggl/assets/module.hpp b/include/fggl/assets/module.hpp
index 7e150ac..a335375 100644
--- a/include/fggl/assets/module.hpp
+++ b/include/fggl/assets/module.hpp
@@ -20,9 +20,7 @@
 #define FGGL_ASSETS_MODULE_HPP
 
 #include "fggl/modules/module.hpp"
-	#include "fggl/services/module.hpp"
-
-#include "fggl/data/module.hpp"
+#include "fggl/services/module.hpp"
 
 #include "fggl/assets/packed/module.hpp"
 #include "fggl/assets/manager.hpp"
diff --git a/include/fggl/assets/packed/module.hpp b/include/fggl/assets/packed/module.hpp
index fb25fe0..089372c 100644
--- a/include/fggl/assets/packed/module.hpp
+++ b/include/fggl/assets/packed/module.hpp
@@ -22,7 +22,6 @@
 #include "fggl/modules/module.hpp"
 #include "fggl/services/module.hpp"
 
-#include "fggl/data/module.hpp"
 #include "fggl/assets/loader.hpp"
 
 #include "fggl/assets/packed/adapter.hpp"
diff --git a/include/fggl/data/module.hpp b/include/fggl/data/module.hpp
deleted file mode 100644
index 5c72d99..0000000
--- a/include/fggl/data/module.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * This file is part of FGGL.
- *
- * FGGL is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
- * later version.
- *
- * FGGL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License along with FGGL.
- * If not, see <https://www.gnu.org/licenses/>.
- */
-
-//
-// Created by webpigeon on 27/06/22.
-//
-
-#ifndef FGGL_DATA_MODULE_HPP
-#define FGGL_DATA_MODULE_HPP
-
-#include "fggl/modules/module.hpp"
-#include "fggl/filesystem/Finder.hpp"
-#include "fggl/data/storage.hpp"
-
-namespace fggl::data {
-
-	using Storage = fggl::filesystem::Locator;
-
-	/*
-	struct LocalStorage {
-		constexpr static const char *name = "fggl::data::Storage";
-		constexpr static const std::array<modules::ServiceName, 1> provides = {
-			SERVICE_STORAGE
-		};
-		constexpr static const std::array<modules::ServiceName, 0> depends = {};
-		static bool factory(modules::ServiceName service, modules::Services &serviceManager);
-	};*/
-
-} // namespace fggl::data
-
-#endif //FGGL_DATA_MODULE_HPP
diff --git a/include/fggl/fggl.hpp b/include/fggl/fggl.hpp
index 67eda43..c3f96b9 100644
--- a/include/fggl/fggl.hpp
+++ b/include/fggl/fggl.hpp
@@ -19,7 +19,6 @@
 
 // module system
 #include "fggl/modules/manager.hpp"
-#include "fggl/data/module.hpp"
 #include "fggl/input/module.hpp"
 #include "fggl/gui/module.hpp"
 
diff --git a/include/fggl/gui/module.hpp b/include/fggl/gui/module.hpp
index ad2b363..f8e08e4 100644
--- a/include/fggl/gui/module.hpp
+++ b/include/fggl/gui/module.hpp
@@ -22,7 +22,6 @@
 #include "fggl/gui/fonts.hpp"
 #include "fggl/gui/model/parser.hpp"
 
-#include "fggl/data/module.hpp"
 #include "fggl/assets/packed/module.hpp"
 
 namespace fggl::gui {
diff --git a/integrations/lua/include/fggl/script/lua/module.hpp b/integrations/lua/include/fggl/script/lua/module.hpp
index 22593f5..e99d8ed 100644
--- a/integrations/lua/include/fggl/script/lua/module.hpp
+++ b/integrations/lua/include/fggl/script/lua/module.hpp
@@ -26,7 +26,6 @@
 
 	#include "fggl/entity/module.hpp"
 	#include "fggl/script/engine.hpp"
-	#include "fggl/data/module.hpp"
 	#include "fggl/assets/packed/adapter.hpp"
 
 namespace fggl::script::lua {
-- 
GitLab