mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-16 20:13:27 +00:00
util: update function dtors, update gitignore
This commit is contained in:
parent
9911c44670
commit
9866285f0e
3
.gitignore
vendored
3
.gitignore
vendored
@ -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/
|
||||
|
@ -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>(args)...);
|
||||
@ -68,6 +69,7 @@ namespace ams::util {
|
||||
class Function<R(Args...), F, typename std::enable_if<std::is_class<F>::value && !std::is_final<F>::value>::type> final : public IFunction<R(Args...)>, 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<const F &>(*this).operator()(std::forward<Args>(args)...);
|
||||
@ -90,7 +92,7 @@ namespace ams::util {
|
||||
template<typename R, typename... Args>
|
||||
class IFunction<R(Args...)> {
|
||||
protected:
|
||||
constexpr virtual ~IFunction() = default;
|
||||
constexpr virtual ~IFunction() { /* ... */ };
|
||||
public:
|
||||
constexpr virtual R operator()(Args... args) const = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user