Skip to content

Commit

Permalink
clang-tidy: fix missing special member func
Browse files Browse the repository at this point in the history
Found with: cppcoreguidelines-special-member-functions

Replaced several functions with using declarations and added missing
stuff elsewhere.

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Feb 2, 2024
1 parent 3e98251 commit c9b80c7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions matroska/KaxBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class MATROSKA_DLL_API SimpleDataBuffer : public DataBuffer {
}

SimpleDataBuffer(const SimpleDataBuffer & ToClone);
SimpleDataBuffer& operator=(const SimpleDataBuffer &) = delete;
};

/*!
Expand Down Expand Up @@ -179,10 +180,9 @@ DECLARE_MKX_MASTER(KaxBlockGroup)

class MATROSKA_DLL_API KaxInternalBlock : public libebml::EbmlBinary {
public:
KaxInternalBlock(const libebml::EbmlCallbacks & classInfo)
:libebml::EbmlBinary(classInfo)
{}
using EbmlBinary::EbmlBinary;
KaxInternalBlock(const KaxInternalBlock & ElementToClone);
KaxInternalBlock& operator=(const KaxInternalBlock &) = delete;
~KaxInternalBlock() override;
bool SizeIsValid(std::uint64_t size) const override
{
Expand Down Expand Up @@ -311,6 +311,9 @@ class MATROSKA_DLL_API KaxBlockBlob {
delete Block.group;
}

KaxBlockBlob(const KaxBlockBlob&) = delete;
KaxBlockBlob& operator=(const KaxBlockBlob&) = delete;

operator KaxBlockGroup &() const;
operator KaxSimpleBlock &() const;
operator KaxInternalBlock &() const;
Expand All @@ -337,8 +340,6 @@ class MATROSKA_DLL_API KaxBlockBlob {

DECLARE_MKX_BINARY_CONS(KaxBlockVirtual)
public:
~KaxBlockVirtual() override;

/*!
\note override this function to generate the Data/Size on the fly, unlike the usual binary elements
*/
Expand Down
1 change: 0 additions & 1 deletion matroska/KaxBlockData.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace libmatroska {
*/
DECLARE_MKX_SINTEGER_CONS(KaxReferenceBlock)
public:
~KaxReferenceBlock() override;
/*!
\brief override this method to compute the timestamp value
*/
Expand Down
3 changes: 3 additions & 0 deletions matroska/KaxCues.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ DECLARE_MKX_MASTER(KaxCues)
public:
~KaxCues() override;

KaxCues(const KaxCues&) = default;
KaxCues& operator=(const KaxCues&) = delete;

//bool AddBlockGroup(const KaxBlockGroup & BlockReference); // deprecated
bool AddBlockBlob(const KaxBlockBlob & BlockReference);

Expand Down

0 comments on commit c9b80c7

Please sign in to comment.