clang-tidy: fix missing special member func#173
clang-tidy: fix missing special member func#173neheb wants to merge 4 commits intoMatroska-Org:masterfrom
Conversation
robUx4
left a comment
There was a problem hiding this comment.
There's way too many things happening in a single commit.
c9b80c7 to
6724dce
Compare
|
Split into three commits. Hopefully simpler now. |
4a1a8c4 to
263d990
Compare
|
|
||
| DECLARE_MKX_BINARY_CONS(KaxBlockVirtual) | ||
| public: | ||
| ~KaxBlockVirtual() override; |
There was a problem hiding this comment.
This should make no difference doing that here or in the DECLARE_MKX_BINARY_CONS macro above.
I don't understand the commit description.
There was a problem hiding this comment.
simpler to do it in the macro.
There was a problem hiding this comment.
It's not up to the macro to decide if the child class needs an overriden destructor or not. The macro is only to have a custom CONStructor. The form of the desctructor is up to each class.
It is currently possible to factorize this. But since this will be part of the new API, if ever need to move the destructor out of the macro, we'll be screwed.
Also this commit changes the desctructor and a copy constructor. They should be split. And I wonder why the copy contructor is not allowed.
Found with: cppcoreguidelines-special-member-functions A using declaration allows to get rid of the warning while avoiding implementing a bunch of stuff to satisfy it. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Some of these destructors are not default, so we can't do that here. We must change all functions to be out of line. Slightly simplifies macro users. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Found with: cppcoreguidelines-special-member-functions Mostly adding deleted functions. Added a using declaration in one case for simplicity. Signed-off-by: Rosen Penev <rosenp@gmail.com>
| {} | ||
| ~SimpleDataBuffer() override = default; | ||
|
|
||
| SimpleDataBuffer& operator=(const SimpleDataBuffer &) = delete; |
There was a problem hiding this comment.
Why is this forbidden ? Should it be mixed with the previous commit ?
There was a problem hiding this comment.
the error is that the operator is missing. I deleted it only because it does not cause a compile error.
robUx4
left a comment
There was a problem hiding this comment.
Still needs some more commit splitting and explanation.
I'm also against the API change in the CONS macros.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Found with: cppcoreguidelines-special-member-functions
Replaced several functions with using declarations and added missing stuff elsewhere.