Skip to content

Commit

Permalink
src: format cpp files
Browse files Browse the repository at this point in the history
  • Loading branch information
RedYetiDev committed Jul 19, 2024
1 parent 4cd432b commit 0f14f08
Show file tree
Hide file tree
Showing 150 changed files with 8,981 additions and 10,169 deletions.
14 changes: 5 additions & 9 deletions src/aliased_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ class AliasedBufferBase : public MemoryRetainer {
: aliased_buffer_(aliased_buffer), index_(index) {}

Reference(const Reference& that)
: aliased_buffer_(that.aliased_buffer_),
index_(that.index_) {
}
: aliased_buffer_(that.aliased_buffer_), index_(that.index_) {}

inline Reference& operator=(const NativeT& val) {
aliased_buffer_->SetValue(index_, val);
Expand All @@ -85,9 +83,7 @@ class AliasedBufferBase : public MemoryRetainer {
return *this = static_cast<NativeT>(val);
}

operator NativeT() const {
return aliased_buffer_->GetValue(index_);
}
operator NativeT() const { return aliased_buffer_->GetValue(index_); }

inline Reference& operator+=(const NativeT& val) {
const NativeT current = aliased_buffer_->GetValue(index_);
Expand Down Expand Up @@ -126,9 +122,9 @@ class AliasedBufferBase : public MemoryRetainer {
inline void MakeWeak();

/**
* Get the underlying v8::ArrayBuffer underlying the TypedArray and
* overlaying the native buffer
*/
* Get the underlying v8::ArrayBuffer underlying the TypedArray and
* overlaying the native buffer
*/
v8::Local<v8::ArrayBuffer> GetArrayBuffer() const;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/aliased_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AliasedStruct final {

const T& operator*() const { return *ptr_; }

T& operator*() { return *ptr_; }
T& operator*() { return *ptr_; }

const T* operator->() const { return ptr_; }

Expand Down
16 changes: 3 additions & 13 deletions src/async_wrap-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,22 @@ inline double AsyncWrap::get_async_id() const {
return async_id_;
}


inline double AsyncWrap::get_trigger_async_id() const {
return trigger_async_id_;
}


inline v8::MaybeLocal<v8::Value> AsyncWrap::MakeCallback(
const v8::Local<v8::String> symbol,
int argc,
v8::Local<v8::Value>* argv) {
const v8::Local<v8::String> symbol, int argc, v8::Local<v8::Value>* argv) {
return MakeCallback(symbol.As<v8::Name>(), argc, argv);
}


inline v8::MaybeLocal<v8::Value> AsyncWrap::MakeCallback(
const v8::Local<v8::Symbol> symbol,
int argc,
v8::Local<v8::Value>* argv) {
const v8::Local<v8::Symbol> symbol, int argc, v8::Local<v8::Value>* argv) {
return MakeCallback(symbol.As<v8::Name>(), argc, argv);
}


inline v8::MaybeLocal<v8::Value> AsyncWrap::MakeCallback(
const v8::Local<v8::Name> symbol,
int argc,
v8::Local<v8::Value>* argv) {
const v8::Local<v8::Name> symbol, int argc, v8::Local<v8::Value>* argv) {
v8::Local<v8::Value> cb_v;
if (!object()->Get(env()->context(), symbol).ToLocal(&cb_v))
return v8::MaybeLocal<v8::Value>();
Expand Down
Loading

0 comments on commit 0f14f08

Please sign in to comment.