LibJS: Delete unused operator=s in SafeFunction

This commit is contained in:
Aliaksandr Kalenik 2023-08-17 15:13:01 +02:00 committed by Andreas Kling
parent 70919dbed7
commit ee29a21ae8
Notes: sideshowbarker 2024-07-17 16:42:19 +09:00

View file

@ -83,25 +83,6 @@ public:
explicit operator bool() const { return !!callable_wrapper(); }
template<typename CallableType>
SafeFunction& operator=(CallableType&& callable)
requires((AK::IsFunctionObject<CallableType> && IsCallableWithArguments<CallableType, Out, In...>))
{
clear();
init_with_callable(forward<CallableType>(callable), CallableKind::FunctionObject);
return *this;
}
template<typename FunctionType>
SafeFunction& operator=(FunctionType f)
requires((AK::IsFunctionPointer<FunctionType> && IsCallableWithArguments<RemovePointer<FunctionType>, Out, In...>))
{
clear();
if (f)
init_with_callable(move(f), CallableKind::FunctionPointer);
return *this;
}
SafeFunction& operator=(nullptr_t)
{
clear();