mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +00:00
LibJS: Delete unused operator=
s in SafeFunction
This commit is contained in:
parent
70919dbed7
commit
ee29a21ae8
Notes:
sideshowbarker
2024-07-17 16:42:19 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: ee29a21ae8
Pull-request: https://github.com/SerenityOS/serenity/pull/20614
1 changed files with 0 additions and 19 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue