Skip to content

Commit e2d3d57

Browse files
committed
hello_xr: Silence warnings
1 parent 612277a commit e2d3d57

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/tests/hello_xr/common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ template <typename T>
4343
struct ScopeGuard {
4444
// Needs C++17: static_assert(std::is_invocable_v<T>, "Type must be invocable function.");
4545

46-
ScopeGuard(T&& guard) : m_guard(std::move(guard)) {}
46+
ScopeGuard(T&& guard) noexcept : m_guard(std::move(guard)) {}
4747

48-
ScopeGuard(ScopeGuard&&) = default;
49-
ScopeGuard& operator=(ScopeGuard&&) = default;
48+
ScopeGuard(ScopeGuard&&) noexcept = default;
49+
ScopeGuard& operator=(ScopeGuard&&) noexcept = default;
5050

5151
ScopeGuard(ScopeGuard&) = delete;
5252
ScopeGuard& operator=(ScopeGuard&) = delete;

src/tests/hello_xr/graphicsplugin_vulkan.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ struct RenderTarget {
610610
m_vkDevice = nullptr;
611611
}
612612

613-
RenderTarget(RenderTarget&& other) : RenderTarget() {
613+
RenderTarget(RenderTarget&& other) noexcept : RenderTarget() {
614614
using std::swap;
615615
swap(colorImage, other.colorImage);
616616
swap(depthImage, other.depthImage);
@@ -619,7 +619,7 @@ struct RenderTarget {
619619
swap(fb, other.fb);
620620
swap(m_vkDevice, other.m_vkDevice);
621621
}
622-
RenderTarget& operator=(RenderTarget&& other) {
622+
RenderTarget& operator=(RenderTarget&& other) noexcept {
623623
if (&other == this) {
624624
return *this;
625625
}
@@ -884,14 +884,14 @@ struct DepthBuffer {
884884
m_vkDevice = nullptr;
885885
}
886886

887-
DepthBuffer(DepthBuffer&& other) : DepthBuffer() {
887+
DepthBuffer(DepthBuffer&& other) noexcept : DepthBuffer() {
888888
using std::swap;
889889

890890
swap(depthImage, other.depthImage);
891891
swap(depthMemory, other.depthMemory);
892892
swap(m_vkDevice, other.m_vkDevice);
893893
}
894-
DepthBuffer& operator=(DepthBuffer&& other) {
894+
DepthBuffer& operator=(DepthBuffer&& other) noexcept {
895895
if (&other == this) {
896896
return *this;
897897
}

0 commit comments

Comments
 (0)