chore: use auto to avoid repeating type (#26113)
This commit is contained in:
parent
f714556a12
commit
4be10523e8
25 changed files with 38 additions and 48 deletions
|
@ -55,7 +55,7 @@ void CallTranslater(v8::Local<v8::External> external,
|
|||
}
|
||||
}
|
||||
|
||||
TranslaterHolder* holder = static_cast<TranslaterHolder*>(external->Value());
|
||||
auto* holder = static_cast<TranslaterHolder*>(external->Value());
|
||||
holder->translater.Run(args);
|
||||
|
||||
// Free immediately for one-time callback.
|
||||
|
|
|
@ -64,8 +64,7 @@ void WrappableBase::InitWith(v8::Isolate* isolate,
|
|||
// static
|
||||
void WrappableBase::FirstWeakCallback(
|
||||
const v8::WeakCallbackInfo<WrappableBase>& data) {
|
||||
WrappableBase* wrappable =
|
||||
static_cast<WrappableBase*>(data.GetInternalField(0));
|
||||
auto* wrappable = static_cast<WrappableBase*>(data.GetInternalField(0));
|
||||
if (wrappable) {
|
||||
wrappable->wrapper_.Reset();
|
||||
data.SetSecondPassCallback(SecondWeakCallback);
|
||||
|
@ -75,8 +74,7 @@ void WrappableBase::FirstWeakCallback(
|
|||
// static
|
||||
void WrappableBase::SecondWeakCallback(
|
||||
const v8::WeakCallbackInfo<WrappableBase>& data) {
|
||||
WrappableBase* wrappable =
|
||||
static_cast<WrappableBase*>(data.GetInternalField(0));
|
||||
auto* wrappable = static_cast<WrappableBase*>(data.GetInternalField(0));
|
||||
if (wrappable)
|
||||
delete wrappable;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue