diff options
author | James M Snell <jasnell@gmail.com> | 2020-05-14 12:47:59 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-05-30 16:20:05 -0700 |
commit | 830ef8134160fdcbb96289af4a136b70d994f6d6 (patch) | |
tree | 146fe42b0f656d5d6a530e42d82f29a4c4253933 /src/allocated_buffer-inl.h | |
parent | e2cd71536161589dff96adf882970b9a33380f02 (diff) | |
download | node-new-830ef8134160fdcbb96289af4a136b70d994f6d6.tar.gz |
src: remove superfluous inline keywords
PR-URL: https://github.com/nodejs/node/pull/33291
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src/allocated_buffer-inl.h')
-rw-r--r-- | src/allocated_buffer-inl.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/allocated_buffer-inl.h b/src/allocated_buffer-inl.h index e10aa08e7f..2dee6f09a3 100644 --- a/src/allocated_buffer-inl.h +++ b/src/allocated_buffer-inl.h @@ -65,7 +65,7 @@ void AllocatedBuffer::Resize(size_t len) { env_->isolate(), std::move(backing_store_), len); } -inline uv_buf_t AllocatedBuffer::release() { +uv_buf_t AllocatedBuffer::release() { if (data() == nullptr) return uv_buf_init(nullptr, 0); CHECK_NOT_NULL(env_); @@ -75,33 +75,33 @@ inline uv_buf_t AllocatedBuffer::release() { return ret; } -inline char* AllocatedBuffer::data() { +char* AllocatedBuffer::data() { if (!backing_store_) return nullptr; return static_cast<char*>(backing_store_->Data()); } -inline const char* AllocatedBuffer::data() const { +const char* AllocatedBuffer::data() const { if (!backing_store_) return nullptr; return static_cast<char*>(backing_store_->Data()); } -inline size_t AllocatedBuffer::size() const { +size_t AllocatedBuffer::size() const { if (!backing_store_) return 0; return backing_store_->ByteLength(); } -inline void AllocatedBuffer::clear() { +void AllocatedBuffer::clear() { backing_store_.reset(); } -inline v8::MaybeLocal<v8::Object> AllocatedBuffer::ToBuffer() { +v8::MaybeLocal<v8::Object> AllocatedBuffer::ToBuffer() { v8::Local<v8::ArrayBuffer> ab = ToArrayBuffer(); return Buffer::New(env_, ab, 0, ab->ByteLength()) .FromMaybe(v8::Local<v8::Uint8Array>()); } -inline v8::Local<v8::ArrayBuffer> AllocatedBuffer::ToArrayBuffer() { +v8::Local<v8::ArrayBuffer> AllocatedBuffer::ToArrayBuffer() { return v8::ArrayBuffer::New(env_->isolate(), std::move(backing_store_)); } |