From 09a44fa680b9350221019dd106b5cf6cafb4810e Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 13 Mar 2022 13:51:15 -0700 Subject: [PATCH] util: update function dtors, update gitignore --- .gitignore | 3 +++ libraries/libvapours/include/vapours/util/util_i_function.hpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e4678951a..a4a9c2613 100644 --- a/.gitignore +++ b/.gitignore @@ -93,6 +93,7 @@ dkms.conf **/out **/build +**/lib **/build_nintendo_nx_arm64 **/build_nintendo_nx_arm64_armv8a **/build_nintendo_nx_arm @@ -102,6 +103,8 @@ dkms.conf **/build_nintendo_nx_x64 **/build_nintendo_nx_x86 +tools/*/ + package3 stratosphere/test/ diff --git a/libraries/libvapours/include/vapours/util/util_i_function.hpp b/libraries/libvapours/include/vapours/util/util_i_function.hpp index e49f4350c..b2966baf8 100644 --- a/libraries/libvapours/include/vapours/util/util_i_function.hpp +++ b/libraries/libvapours/include/vapours/util/util_i_function.hpp @@ -58,6 +58,7 @@ namespace ams::util { F m_f; public: constexpr explicit Function(F f) : m_f(std::move(f)) { /* ... */} + constexpr virtual ~Function() override { /* ... */ } constexpr virtual R operator()(Args... args) const override final { return m_f(std::forward(args)...); @@ -68,6 +69,7 @@ namespace ams::util { class Function::value && !std::is_final::value>::type> final : public IFunction, private F { public: constexpr explicit Function(F f) : F(std::move(f)) { /* ... */} + constexpr virtual ~Function() override { /* ... */ } constexpr virtual R operator()(Args... args) const override final { return static_cast(*this).operator()(std::forward(args)...); @@ -90,7 +92,7 @@ namespace ams::util { template class IFunction { protected: - constexpr virtual ~IFunction() = default; + constexpr virtual ~IFunction() { /* ... */ }; public: constexpr virtual R operator()(Args... args) const = 0;