diff --git a/src/dawn/native/DynamicUploader.cpp b/src/dawn/native/DynamicUploader.cpp index 262c07d718..56ef735e08 100644 --- a/src/dawn/native/DynamicUploader.cpp +++ b/src/dawn/native/DynamicUploader.cpp @@ -19,8 +19,8 @@ namespace dawn::native { DynamicUploader::DynamicUploader(DeviceBase* device) : mDevice(device) { - mRingBuffers.emplace_back( - std::unique_ptr(new RingBuffer{nullptr, {kRingBufferSize}})); + mRingBuffers.emplace_back(std::unique_ptr( + new RingBuffer{nullptr, RingBufferAllocator(kRingBufferSize)})); } void DynamicUploader::ReleaseStagingBuffer(std::unique_ptr stagingBuffer) { @@ -66,8 +66,8 @@ namespace dawn::native { // Upon failure, append a newly created ring buffer to fulfill the // request. if (startOffset == RingBufferAllocator::kInvalidOffset) { - mRingBuffers.emplace_back( - std::unique_ptr(new RingBuffer{nullptr, {kRingBufferSize}})); + mRingBuffers.emplace_back(std::unique_ptr( + new RingBuffer{nullptr, RingBufferAllocator(kRingBufferSize)})); targetRingBuffer = mRingBuffers.back().get(); startOffset = targetRingBuffer->mAllocator.Allocate(allocationSize, serial); diff --git a/src/dawn/native/RingBufferAllocator.h b/src/dawn/native/RingBufferAllocator.h index 27f7622449..569521c8a0 100644 --- a/src/dawn/native/RingBufferAllocator.h +++ b/src/dawn/native/RingBufferAllocator.h @@ -27,7 +27,7 @@ namespace dawn::native { class RingBufferAllocator { public: RingBufferAllocator() = default; - RingBufferAllocator(uint64_t maxSize); + explicit RingBufferAllocator(uint64_t maxSize); ~RingBufferAllocator() = default; RingBufferAllocator(const RingBufferAllocator&) = default; RingBufferAllocator& operator=(const RingBufferAllocator&) = default;