From b0865423942fc54c3a08bf690e6f6cc5f42cf1b1 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 28 Aug 2024 15:39:20 -0700 Subject: [PATCH] Minor code review (#150) --- DirectXMesh/DirectXMeshVBReader.cpp | 6 ++++++ DirectXMesh/DirectXMeshVBWriter.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/DirectXMesh/DirectXMeshVBReader.cpp b/DirectXMesh/DirectXMeshVBReader.cpp index 3633a13..71b1d3c 100644 --- a/DirectXMesh/DirectXMeshVBReader.cpp +++ b/DirectXMesh/DirectXMeshVBReader.cpp @@ -67,6 +67,12 @@ public: mDefaultStrides{}, mTempSize(0) {} + Impl(const Impl&) = delete; + Impl& operator=(const Impl&) = delete; + + Impl(Impl&&) = default; + Impl& operator=(Impl&&) = default; + HRESULT Initialize(_In_reads_(nDecl) const InputElementDesc* vbDecl, size_t nDecl); HRESULT AddStream(_In_reads_bytes_(stride*nVerts) const void* vb, size_t nVerts, size_t inputSlot, size_t stride) noexcept; HRESULT Read(_Out_writes_(count) XMVECTOR* buffer, _In_z_ const char* semanticName, unsigned int semanticIndex, size_t count, bool x2bias) const; diff --git a/DirectXMesh/DirectXMeshVBWriter.cpp b/DirectXMesh/DirectXMeshVBWriter.cpp index 4a218f0..d490ef4 100644 --- a/DirectXMesh/DirectXMeshVBWriter.cpp +++ b/DirectXMesh/DirectXMeshVBWriter.cpp @@ -67,6 +67,12 @@ public: mDefaultStrides{}, mTempSize(0) {} + Impl(const Impl&) = delete; + Impl& operator=(const Impl&) = delete; + + Impl(Impl&&) = default; + Impl& operator=(Impl&&) = default; + HRESULT Initialize(_In_reads_(nDecl) const InputElementDesc* vbDecl, size_t nDecl); HRESULT AddStream(_Out_writes_bytes_(stride*nVerts) void* vb, size_t nVerts, size_t inputSlot, size_t stride) noexcept; HRESULT Write(_In_reads_(count) const XMVECTOR* buffer, _In_z_ const char* semanticName, unsigned int semanticIndex, size_t count, bool x2bias) const;