diff options
author | Chih-Hung Hsieh <chh@google.com> | 2018-09-25 14:21:50 -0700 |
---|---|---|
committer | Chih-hung Hsieh <chh@google.com> | 2018-10-01 20:27:47 +0000 |
commit | 5bc849f6065971eb92e7a7696b13d90d9add2d9c (patch) | |
tree | 70493a26d645df3f71f1fa458c366f43d5cfb5ea | |
parent | 1f4bf704979ec355ec65a3115dc6b7529bbb3fcd (diff) | |
download | native-5bc849f6065971eb92e7a7696b13d90d9add2d9c.tar.gz |
Add noexcept to move constructors and assignment operators.
Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: I47101c362198665194f8b3248751caaa7da32505
26 files changed, 56 insertions, 56 deletions
diff --git a/libs/gui/FrameTimestamps.cpp b/libs/gui/FrameTimestamps.cpp index a379ad6306..85ae433e42 100644 --- a/libs/gui/FrameTimestamps.cpp +++ b/libs/gui/FrameTimestamps.cpp @@ -621,7 +621,7 @@ status_t FrameEventsDelta::unflatten(void const*& buffer, size_t& size, // ============================================================================ FrameEventHistoryDelta& FrameEventHistoryDelta::operator=( - FrameEventHistoryDelta&& src) { + FrameEventHistoryDelta&& src) noexcept { mCompositorTiming = src.mCompositorTiming; if (CC_UNLIKELY(!mDeltas.empty())) { diff --git a/libs/gui/include/gui/FrameTimestamps.h b/libs/gui/include/gui/FrameTimestamps.h index 9716be4bfd..e06e40f2a6 100644 --- a/libs/gui/include/gui/FrameTimestamps.h +++ b/libs/gui/include/gui/FrameTimestamps.h @@ -311,7 +311,7 @@ public: // Movable. FrameEventHistoryDelta(FrameEventHistoryDelta&& src) = default; - FrameEventHistoryDelta& operator=(FrameEventHistoryDelta&& src); + FrameEventHistoryDelta& operator=(FrameEventHistoryDelta&& src) noexcept; // Not copyable. FrameEventHistoryDelta(const FrameEventHistoryDelta& src) = delete; FrameEventHistoryDelta& operator=( diff --git a/libs/ui/HdrCapabilities.cpp b/libs/ui/HdrCapabilities.cpp index a36911d1cf..a5b3e89314 100644 --- a/libs/ui/HdrCapabilities.cpp +++ b/libs/ui/HdrCapabilities.cpp @@ -24,8 +24,8 @@ namespace android { #endif HdrCapabilities::~HdrCapabilities() = default; -HdrCapabilities::HdrCapabilities(HdrCapabilities&& other) = default; -HdrCapabilities& HdrCapabilities::operator=(HdrCapabilities&& other) = default; +HdrCapabilities::HdrCapabilities(HdrCapabilities&& other) noexcept = default; +HdrCapabilities& HdrCapabilities::operator=(HdrCapabilities&& other) noexcept = default; size_t HdrCapabilities::getFlattenedSize() const { return sizeof(mMaxLuminance) + diff --git a/libs/ui/include/ui/HdrCapabilities.h b/libs/ui/include/ui/HdrCapabilities.h index 4e98c283d1..65ac26cf7e 100644 --- a/libs/ui/include/ui/HdrCapabilities.h +++ b/libs/ui/include/ui/HdrCapabilities.h @@ -37,8 +37,8 @@ public: mMinLuminance(minLuminance) {} // Make this move-constructable and move-assignable - HdrCapabilities(HdrCapabilities&& other); - HdrCapabilities& operator=(HdrCapabilities&& other); + HdrCapabilities(HdrCapabilities&& other) noexcept; + HdrCapabilities& operator=(HdrCapabilities&& other) noexcept; HdrCapabilities() : mSupportedHdrTypes(), diff --git a/libs/vr/libbufferhub/include/private/dvr/bufferhub_rpc.h b/libs/vr/libbufferhub/include/private/dvr/bufferhub_rpc.h index f4918c497e..04f4fb4c21 100644 --- a/libs/vr/libbufferhub/include/private/dvr/bufferhub_rpc.h +++ b/libs/vr/libbufferhub/include/private/dvr/bufferhub_rpc.h @@ -103,8 +103,8 @@ class NativeBufferHandle { opaque_ints_.push_back(buffer.handle()->data[fd_count + i]); } } - NativeBufferHandle(NativeBufferHandle&& other) = default; - NativeBufferHandle& operator=(NativeBufferHandle&& other) = default; + NativeBufferHandle(NativeBufferHandle&& other) noexcept = default; + NativeBufferHandle& operator=(NativeBufferHandle&& other) noexcept = default; // Imports the native handle into the given IonBuffer instance. int Import(IonBuffer* buffer) { @@ -174,8 +174,8 @@ class BufferDescription { acquire_fence_fd_(acquire_fence_fd.Borrow()), release_fence_fd_(release_fence_fd.Borrow()) {} - BufferDescription(BufferDescription&& other) = default; - BufferDescription& operator=(BufferDescription&& other) = default; + BufferDescription(BufferDescription&& other) noexcept = default; + BufferDescription& operator=(BufferDescription&& other) noexcept = default; // ID of the buffer client. All BufferHubBuffer clients derived from the same // buffer in bufferhubd share the same buffer id. @@ -219,8 +219,8 @@ class FenceHandle { FenceHandle() = default; explicit FenceHandle(int fence) : fence_{fence} {} explicit FenceHandle(FileHandleType&& fence) : fence_{std::move(fence)} {} - FenceHandle(FenceHandle&&) = default; - FenceHandle& operator=(FenceHandle&&) = default; + FenceHandle(FenceHandle&&) noexcept = default; + FenceHandle& operator=(FenceHandle&&) noexcept = default; explicit operator bool() const { return fence_.IsValid(); } diff --git a/libs/vr/libbufferhub/include/private/dvr/ion_buffer.h b/libs/vr/libbufferhub/include/private/dvr/ion_buffer.h index f6bc5471f4..860f08ae7a 100644 --- a/libs/vr/libbufferhub/include/private/dvr/ion_buffer.h +++ b/libs/vr/libbufferhub/include/private/dvr/ion_buffer.h @@ -20,8 +20,8 @@ class IonBuffer { uint64_t usage); ~IonBuffer(); - IonBuffer(IonBuffer&& other); - IonBuffer& operator=(IonBuffer&& other); + IonBuffer(IonBuffer&& other) noexcept; + IonBuffer& operator=(IonBuffer&& other) noexcept; // Returns check this IonBuffer holds a valid Gralloc buffer. bool IsValid() const { return buffer_ && buffer_->initCheck() == NO_ERROR; } diff --git a/libs/vr/libbufferhub/ion_buffer.cpp b/libs/vr/libbufferhub/ion_buffer.cpp index cbaa24a7bc..129553128e 100644 --- a/libs/vr/libbufferhub/ion_buffer.cpp +++ b/libs/vr/libbufferhub/ion_buffer.cpp @@ -49,11 +49,11 @@ IonBuffer::~IonBuffer() { FreeHandle(); } -IonBuffer::IonBuffer(IonBuffer&& other) : IonBuffer() { +IonBuffer::IonBuffer(IonBuffer&& other) noexcept : IonBuffer() { *this = std::move(other); } -IonBuffer& IonBuffer::operator=(IonBuffer&& other) { +IonBuffer& IonBuffer::operator=(IonBuffer&& other) noexcept { ALOGD_IF(TRACE, "IonBuffer::operator=: handle_=%p other.handle_=%p", handle(), other.handle()); diff --git a/libs/vr/libbufferhubqueue/include/private/dvr/buffer_hub_queue_parcelable.h b/libs/vr/libbufferhubqueue/include/private/dvr/buffer_hub_queue_parcelable.h index 4dea9b2f6c..ad3f56b24c 100644 --- a/libs/vr/libbufferhubqueue/include/private/dvr/buffer_hub_queue_parcelable.h +++ b/libs/vr/libbufferhubqueue/include/private/dvr/buffer_hub_queue_parcelable.h @@ -28,8 +28,8 @@ class BufferHubQueueParcelable : public Parcelable { public: BufferHubQueueParcelable() = default; - BufferHubQueueParcelable(BufferHubQueueParcelable&& other) = default; - BufferHubQueueParcelable& operator=(BufferHubQueueParcelable&& other) { + BufferHubQueueParcelable(BufferHubQueueParcelable&& other) noexcept = default; + BufferHubQueueParcelable& operator=(BufferHubQueueParcelable&& other) noexcept { channel_parcelable_ = std::move(other.channel_parcelable_); return *this; } diff --git a/libs/vr/libdvrcommon/include/private/dvr/ring_buffer.h b/libs/vr/libdvrcommon/include/private/dvr/ring_buffer.h index 44485a734c..18242411b9 100644 --- a/libs/vr/libdvrcommon/include/private/dvr/ring_buffer.h +++ b/libs/vr/libdvrcommon/include/private/dvr/ring_buffer.h @@ -23,9 +23,9 @@ class RingBuffer { explicit RingBuffer(size_t capacity) { Reset(capacity); } RingBuffer(const RingBuffer& other) = default; - RingBuffer(RingBuffer&& other) = default; + RingBuffer(RingBuffer&& other) noexcept = default; RingBuffer& operator=(const RingBuffer& other) = default; - RingBuffer& operator=(RingBuffer&& other) = default; + RingBuffer& operator=(RingBuffer&& other) noexcept = default; void Append(const T& val) { if (IsFull()) diff --git a/libs/vr/libpdx/private/pdx/channel_handle.h b/libs/vr/libpdx/private/pdx/channel_handle.h index 1e62d250ec..daa08f4cb3 100644 --- a/libs/vr/libpdx/private/pdx/channel_handle.h +++ b/libs/vr/libpdx/private/pdx/channel_handle.h @@ -50,14 +50,14 @@ class ChannelHandle : public ChannelHandleBase { public: ChannelHandle() = default; using ChannelHandleBase::ChannelHandleBase; - ChannelHandle(ChannelHandle&& other) : ChannelHandleBase{other.value_} { + ChannelHandle(ChannelHandle&& other) noexcept : ChannelHandleBase{other.value_} { other.value_ = kEmptyHandle; } ~ChannelHandle() = default; ChannelHandle Duplicate() const { return ChannelHandle{value_}; } - ChannelHandle& operator=(ChannelHandle&& other) { + ChannelHandle& operator=(ChannelHandle&& other) noexcept { value_ = other.value_; other.value_ = kEmptyHandle; return *this; @@ -74,13 +74,13 @@ class ChannelHandle<ChannelHandleMode::Local> : public ChannelHandleBase { ChannelHandle(const ChannelHandle&) = delete; ChannelHandle& operator=(const ChannelHandle&) = delete; - ChannelHandle(ChannelHandle&& other) + ChannelHandle(ChannelHandle&& other) noexcept : ChannelHandleBase{other.value_}, manager_{other.manager_} { other.manager_ = nullptr; other.value_ = kEmptyHandle; } - ChannelHandle& operator=(ChannelHandle&& other) { + ChannelHandle& operator=(ChannelHandle&& other) noexcept { value_ = other.value_; manager_ = other.manager_; other.value_ = kEmptyHandle; diff --git a/libs/vr/libpdx/private/pdx/file_handle.h b/libs/vr/libpdx/private/pdx/file_handle.h index b3c3ad7c8c..fed1529c78 100644 --- a/libs/vr/libpdx/private/pdx/file_handle.h +++ b/libs/vr/libpdx/private/pdx/file_handle.h @@ -43,7 +43,7 @@ class FileHandle { // Move constructor that assumes ownership of the file descriptor, leaving the // other FileHandle object empty. - FileHandle(FileHandle&& other) { + FileHandle(FileHandle&& other) noexcept { fd_ = other.fd_; other.fd_ = kEmptyFileHandle; } @@ -62,7 +62,7 @@ class FileHandle { // Move assignment operator that assumes ownership of the underlying file // descriptor, leaving the other FileHandle object empty. - FileHandle& operator=(FileHandle&& other) { + FileHandle& operator=(FileHandle&& other) noexcept { if (this != &other) { Reset(other.fd_); other.fd_ = kEmptyFileHandle; diff --git a/libs/vr/libpdx/private/pdx/rpc/array_wrapper.h b/libs/vr/libpdx/private/pdx/rpc/array_wrapper.h index 93d87f3cab..d835c57a44 100644 --- a/libs/vr/libpdx/private/pdx/rpc/array_wrapper.h +++ b/libs/vr/libpdx/private/pdx/rpc/array_wrapper.h @@ -39,7 +39,7 @@ class ArrayWrapper { ArrayWrapper(const ArrayWrapper& other) { *this = other; } - ArrayWrapper(ArrayWrapper&& other) { *this = std::move(other); } + ArrayWrapper(ArrayWrapper&& other) noexcept { *this = std::move(other); } ArrayWrapper& operator=(const ArrayWrapper& other) { if (&other == this) { @@ -53,7 +53,7 @@ class ArrayWrapper { return *this; } - ArrayWrapper& operator=(ArrayWrapper&& other) { + ArrayWrapper& operator=(ArrayWrapper&& other) noexcept { if (&other == this) { return *this; } else { diff --git a/libs/vr/libpdx/private/pdx/rpc/buffer_wrapper.h b/libs/vr/libpdx/private/pdx/rpc/buffer_wrapper.h index aa86531061..0421220ee4 100644 --- a/libs/vr/libpdx/private/pdx/rpc/buffer_wrapper.h +++ b/libs/vr/libpdx/private/pdx/rpc/buffer_wrapper.h @@ -39,7 +39,7 @@ class BufferWrapper<T*> { BufferWrapper(const BufferWrapper& other) { *this = other; } - BufferWrapper(BufferWrapper&& other) { *this = std::move(other); } + BufferWrapper(BufferWrapper&& other) noexcept { *this = std::move(other); } BufferWrapper& operator=(const BufferWrapper& other) { if (&other == this) { @@ -53,7 +53,7 @@ class BufferWrapper<T*> { return *this; } - BufferWrapper& operator=(BufferWrapper&& other) { + BufferWrapper& operator=(BufferWrapper&& other) noexcept { if (&other == this) { return *this; } else { @@ -117,9 +117,9 @@ class BufferWrapper<std::vector<T, Allocator>> { BufferWrapper(BufferType&& buffer, const Allocator& allocator) : buffer_(std::move(buffer), allocator) {} BufferWrapper(const BufferWrapper&) = default; - BufferWrapper(BufferWrapper&&) = default; + BufferWrapper(BufferWrapper&&) noexcept = default; BufferWrapper& operator=(const BufferWrapper&) = default; - BufferWrapper& operator=(BufferWrapper&&) = default; + BufferWrapper& operator=(BufferWrapper&&) noexcept = default; pointer data() { return buffer_.data(); } const_pointer data() const { return buffer_.data(); } diff --git a/libs/vr/libpdx/private/pdx/rpc/pointer_wrapper.h b/libs/vr/libpdx/private/pdx/rpc/pointer_wrapper.h index d496719a58..1cb85deb86 100644 --- a/libs/vr/libpdx/private/pdx/rpc/pointer_wrapper.h +++ b/libs/vr/libpdx/private/pdx/rpc/pointer_wrapper.h @@ -15,9 +15,9 @@ class PointerWrapper { PointerWrapper(T* pointer) : pointer_(pointer) {} PointerWrapper(const PointerWrapper&) = default; - PointerWrapper(PointerWrapper&&) = default; + PointerWrapper(PointerWrapper&&) noexcept = default; PointerWrapper& operator=(const PointerWrapper&) = default; - PointerWrapper& operator=(PointerWrapper&&) = default; + PointerWrapper& operator=(PointerWrapper&&) noexcept = default; T& Dereference() { return *pointer_; } const T& Dereference() const { return *pointer_; } diff --git a/libs/vr/libpdx/private/pdx/rpc/string_wrapper.h b/libs/vr/libpdx/private/pdx/rpc/string_wrapper.h index 19fc4c1323..2d0a4ea6ec 100644 --- a/libs/vr/libpdx/private/pdx/rpc/string_wrapper.h +++ b/libs/vr/libpdx/private/pdx/rpc/string_wrapper.h @@ -44,7 +44,7 @@ class StringWrapper { StringWrapper(const StringWrapper& other) { *this = other; } - StringWrapper(StringWrapper&& other) { *this = std::move(other); } + StringWrapper(StringWrapper&& other) noexcept { *this = std::move(other); } StringWrapper& operator=(const StringWrapper& other) { if (&other == this) { @@ -58,7 +58,7 @@ class StringWrapper { return *this; } - StringWrapper& operator=(StringWrapper&& other) { + StringWrapper& operator=(StringWrapper&& other) noexcept { if (&other == this) { return *this; } else { diff --git a/libs/vr/libpdx/private/pdx/rpc/variant.h b/libs/vr/libpdx/private/pdx/rpc/variant.h index 0a4802e9d8..a1292b0819 100644 --- a/libs/vr/libpdx/private/pdx/rpc/variant.h +++ b/libs/vr/libpdx/private/pdx/rpc/variant.h @@ -447,7 +447,7 @@ class Variant { Variant(const Variant& other) : index_{other.index_}, value_{other.value_, other.index_} {} - Variant(Variant&& other) + Variant(Variant&& other) noexcept : index_{other.index_}, value_{std::move(other.value_), other.index_} {} // Recent Clang versions has a regression that produces bogus @@ -472,7 +472,7 @@ class Variant { other.Visit([this](const auto& value) { *this = value; }); return *this; } - Variant& operator=(Variant&& other) { + Variant& operator=(Variant&& other) noexcept { other.Visit([this](auto&& value) { *this = std::move(value); }); return *this; } diff --git a/libs/vr/libpdx/private/pdx/service.h b/libs/vr/libpdx/private/pdx/service.h index 13aa3e90d7..234b24afe4 100644 --- a/libs/vr/libpdx/private/pdx/service.h +++ b/libs/vr/libpdx/private/pdx/service.h @@ -92,8 +92,8 @@ class Message : public OutputResourceMapper, public InputResourceMapper { /* * Message objects support move construction and assignment. */ - Message(Message&& other); - Message& operator=(Message&& other); + Message(Message&& other) noexcept; + Message& operator=(Message&& other) noexcept; /* * Read/write payload, in either single buffer or iovec form. diff --git a/libs/vr/libpdx/private/pdx/status.h b/libs/vr/libpdx/private/pdx/status.h index 067fe25e9c..7e51a52063 100644 --- a/libs/vr/libpdx/private/pdx/status.h +++ b/libs/vr/libpdx/private/pdx/status.h @@ -41,14 +41,14 @@ class Status { // Copy/move constructors. Move constructor leaves |other| object in empty // state. Status(const Status& other) = default; - Status(Status&& other) + Status(Status&& other) noexcept : value_{std::move(other.value_)}, error_{other.error_} { other.error_ = -1; } // Assignment operators. Status& operator=(const Status& other) = default; - Status& operator=(Status&& other) { + Status& operator=(Status&& other) noexcept { error_ = other.error_; value_ = std::move(other.value_); other.error_ = -1; diff --git a/libs/vr/libpdx/private/pdx/utility.h b/libs/vr/libpdx/private/pdx/utility.h index 08fcaea575..c9a0c21dc2 100644 --- a/libs/vr/libpdx/private/pdx/utility.h +++ b/libs/vr/libpdx/private/pdx/utility.h @@ -33,7 +33,7 @@ class ByteBuffer { return *this; } - ByteBuffer& operator=(ByteBuffer&& other) { + ByteBuffer& operator=(ByteBuffer&& other) noexcept { std::swap(data_, other.data_); std::swap(size_, other.size_); std::swap(capacity_, other.capacity_); diff --git a/libs/vr/libpdx/service.cpp b/libs/vr/libpdx/service.cpp index 1d3b62ac08..68b8dd7ed7 100644 --- a/libs/vr/libpdx/service.cpp +++ b/libs/vr/libpdx/service.cpp @@ -31,9 +31,9 @@ Message::Message(const MessageInfo& info) // C++11 specifies the move semantics for shared_ptr but not weak_ptr. This // means we have to manually implement the desired move semantics for Message. -Message::Message(Message&& other) { *this = std::move(other); } +Message::Message(Message&& other) noexcept { *this = std::move(other); } -Message& Message::operator=(Message&& other) { +Message& Message::operator=(Message&& other) noexcept { Destroy(); auto base = reinterpret_cast<std::uint8_t*>(&info_); std::fill(&base[0], &base[sizeof(info_)], 0); diff --git a/libs/vr/libvrflinger/acquired_buffer.cpp b/libs/vr/libvrflinger/acquired_buffer.cpp index 9614c6d306..5d873d15c9 100644 --- a/libs/vr/libvrflinger/acquired_buffer.cpp +++ b/libs/vr/libvrflinger/acquired_buffer.cpp @@ -31,13 +31,13 @@ AcquiredBuffer::AcquiredBuffer(const std::shared_ptr<BufferConsumer>& buffer, } } -AcquiredBuffer::AcquiredBuffer(AcquiredBuffer&& other) { +AcquiredBuffer::AcquiredBuffer(AcquiredBuffer&& other) noexcept { *this = std::move(other); } AcquiredBuffer::~AcquiredBuffer() { Release(LocalHandle(kEmptyFence)); } -AcquiredBuffer& AcquiredBuffer::operator=(AcquiredBuffer&& other) { +AcquiredBuffer& AcquiredBuffer::operator=(AcquiredBuffer&& other) noexcept { if (this != &other) { Release(); diff --git a/libs/vr/libvrflinger/acquired_buffer.h b/libs/vr/libvrflinger/acquired_buffer.h index 32e912a65d..1a200aabd2 100644 --- a/libs/vr/libvrflinger/acquired_buffer.h +++ b/libs/vr/libvrflinger/acquired_buffer.h @@ -31,7 +31,7 @@ class AcquiredBuffer { AcquiredBuffer(const std::shared_ptr<BufferConsumer>& buffer, int* error); // Move constructor. Behaves similarly to the move assignment operator below. - AcquiredBuffer(AcquiredBuffer&& other); + AcquiredBuffer(AcquiredBuffer&& other) noexcept; ~AcquiredBuffer(); @@ -39,7 +39,7 @@ class AcquiredBuffer { // |other| into this instance after RELEASING the current BufferConsumer and // closing the acquire fence. After the move |other| is left in the empty // state. - AcquiredBuffer& operator=(AcquiredBuffer&& other); + AcquiredBuffer& operator=(AcquiredBuffer&& other) noexcept; // Accessors for the underlying BufferConsumer, the acquire fence, and the // use-case specific sequence value from the acquisition (see diff --git a/libs/vr/libvrflinger/hardware_composer.cpp b/libs/vr/libvrflinger/hardware_composer.cpp index 44ce78c854..b8d5e2ba97 100644 --- a/libs/vr/libvrflinger/hardware_composer.cpp +++ b/libs/vr/libvrflinger/hardware_composer.cpp @@ -1272,9 +1272,9 @@ Layer::Layer(Hwc2::Composer* composer, const DisplayParams& display_params, Layer::~Layer() { Reset(); } -Layer::Layer(Layer&& other) { *this = std::move(other); } +Layer::Layer(Layer&& other) noexcept { *this = std::move(other); } -Layer& Layer::operator=(Layer&& other) { +Layer& Layer::operator=(Layer&& other) noexcept { if (this != &other) { Reset(); using std::swap; diff --git a/libs/vr/libvrflinger/hardware_composer.h b/libs/vr/libvrflinger/hardware_composer.h index 1d8d46354d..539a7fb6d7 100644 --- a/libs/vr/libvrflinger/hardware_composer.h +++ b/libs/vr/libvrflinger/hardware_composer.h @@ -86,8 +86,8 @@ class Layer { const std::shared_ptr<IonBuffer>& buffer, HWC::BlendMode blending, HWC::Composition composition_type, size_t z_order); - Layer(Layer&&); - Layer& operator=(Layer&&); + Layer(Layer&&) noexcept; + Layer& operator=(Layer&&) noexcept; ~Layer(); diff --git a/vulkan/libvulkan/layers_extensions.cpp b/vulkan/libvulkan/layers_extensions.cpp index b32977a760..009b257029 100644 --- a/vulkan/libvulkan/layers_extensions.cpp +++ b/vulkan/libvulkan/layers_extensions.cpp @@ -78,7 +78,7 @@ class LayerLibrary { native_bridge_(false), refcount_(0) {} - LayerLibrary(LayerLibrary&& other) + LayerLibrary(LayerLibrary&& other) noexcept : path_(std::move(other.path_)), filename_(std::move(other.filename_)), dlhandle_(other.dlhandle_), @@ -545,7 +545,7 @@ LayerRef::~LayerRef() { } } -LayerRef::LayerRef(LayerRef&& other) : layer_(other.layer_) { +LayerRef::LayerRef(LayerRef&& other) noexcept : layer_(other.layer_) { other.layer_ = nullptr; } diff --git a/vulkan/libvulkan/layers_extensions.h b/vulkan/libvulkan/layers_extensions.h index 07ac1a3861..1dae4563cd 100644 --- a/vulkan/libvulkan/layers_extensions.h +++ b/vulkan/libvulkan/layers_extensions.h @@ -27,7 +27,7 @@ struct Layer; class LayerRef { public: explicit LayerRef(const Layer* layer); - LayerRef(LayerRef&& other); + LayerRef(LayerRef&& other) noexcept; ~LayerRef(); LayerRef(const LayerRef&) = delete; LayerRef& operator=(const LayerRef&) = delete; |