From 3eff713765f14e45710d24d8000b7dae1445bdac Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 16 Sep 2020 19:48:33 +0300 Subject: [PATCH] Remove unused Registration.hpp --- OpenRCT2.xcodeproj/project.pbxproj | 2 -- src/openrct2/core/Registration.hpp | 58 ------------------------------ src/openrct2/libopenrct2.vcxproj | 3 +- 3 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 src/openrct2/core/Registration.hpp diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index 06ff2ec076..594477890c 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -1692,7 +1692,6 @@ F76C838E1EC4E7CC00FA49E2 /* Nullable.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Nullable.hpp; sourceTree = ""; }; F76C838F1EC4E7CC00FA49E2 /* Path.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Path.cpp; sourceTree = ""; }; F76C83901EC4E7CC00FA49E2 /* Path.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Path.hpp; sourceTree = ""; }; - F76C83911EC4E7CC00FA49E2 /* Registration.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Registration.hpp; sourceTree = ""; }; F76C83921EC4E7CC00FA49E2 /* String.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = String.cpp; sourceTree = ""; }; F76C83931EC4E7CC00FA49E2 /* String.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = String.hpp; sourceTree = ""; }; F76C83941EC4E7CC00FA49E2 /* StringBuilder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = StringBuilder.hpp; sourceTree = ""; }; @@ -2838,7 +2837,6 @@ F76C838F1EC4E7CC00FA49E2 /* Path.cpp */, F76C83901EC4E7CC00FA49E2 /* Path.hpp */, 2ADE2F21224418B1002598AF /* Random.hpp */, - F76C83911EC4E7CC00FA49E2 /* Registration.hpp */, F76C83921EC4E7CC00FA49E2 /* String.cpp */, F76C83931EC4E7CC00FA49E2 /* String.hpp */, F76C83941EC4E7CC00FA49E2 /* StringBuilder.hpp */, diff --git a/src/openrct2/core/Registration.hpp b/src/openrct2/core/Registration.hpp deleted file mode 100644 index d43967db41..0000000000 --- a/src/openrct2/core/Registration.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014-2020 OpenRCT2 developers - * - * For a complete list of all authors, please refer to contributors.md - * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is licensed under the GNU General Public License version 3. - *****************************************************************************/ - -#pragma once - -#include "../common.h" - -namespace OpenRCT2 -{ - /** - * Represents a registration of some service which when deleted will be - * unregistered. - */ - struct IRegistration - { - virtual ~IRegistration() = default; - }; - - class Registration - { - private: - /** - * Class which can wrap a function in an IRegistration. - */ - template struct CallbackRegistration : public IRegistration - { - private: - T _callback; - - public: - CallbackRegistration(T callback) - : _callback(callback) - { - } - - virtual ~CallbackRegistration() override - { - _callback(); - } - }; - - public: - /** - * Creates a new IRegistration which when deleted, calls the given - * function. - */ - template static IRegistration* Create(T unregisterCallback) - { - return new CallbackRegistration(unregisterCallback); - } - }; -} // namespace OpenRCT2 diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index dd2b045f3a..4f4a15b34c 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -175,7 +175,6 @@ - @@ -771,4 +770,4 @@ - + \ No newline at end of file