Skip to content

Commit cd648f0

Browse files
committed
auto & -> const auto &
1 parent 63b2fe1 commit cd648f0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/webgpu/cpp/rnwgpu/api/RNWebGPU.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ class RNWebGPU : public NativeObject<RNWebGPU> {
9696

9797
if (obj.isArrayBuffer(runtime)) {
9898
// Plain ArrayBuffer — use the full buffer
99-
auto &ab = obj.getArrayBuffer(runtime);
99+
const auto &ab = obj.getArrayBuffer(runtime);
100100
data = {ab.data(runtime), ab.size(runtime)};
101101
} else if (obj.hasProperty(runtime, "buffer")) {
102102
// TypedArray or DataView — respect byteOffset/byteLength
103103
auto bufferVal = obj.getProperty(runtime, "buffer");
104104
if (bufferVal.isObject() &&
105105
bufferVal.getObject(runtime).isArrayBuffer(runtime)) {
106-
auto &ab =
106+
const auto &ab =
107107
bufferVal.getObject(runtime).getArrayBuffer(runtime);
108108
auto byteOffset = static_cast<size_t>(
109109
obj.getProperty(runtime, "byteOffset").asNumber());

0 commit comments

Comments
 (0)