Browse Source

Use implicit copy-constructor generated by compiler

This also suppresses the following clang warning:
warning: definition of implicit copy assignment operator for 'Version<unsigned short, 2>' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
e6f07a6fe4
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 1
      src/base/bittorrent/infohash.h
  2. 1
      src/base/digest32.h
  3. 9
      src/base/utils/version.h

1
src/base/bittorrent/infohash.h

@ -64,7 +64,6 @@ namespace BitTorrent @@ -64,7 +64,6 @@ namespace BitTorrent
#endif
InfoHash() = default;
InfoHash(const InfoHash &other) = default;
InfoHash(const WrappedType &nativeHash);
bool isValid() const;

1
src/base/digest32.h

@ -41,7 +41,6 @@ public: @@ -41,7 +41,6 @@ public:
using UnderlyingType = lt::digest32<N>;
Digest32() = default;
Digest32(const Digest32 &other) = default;
Digest32(const UnderlyingType &nativeDigest)
: m_valid {true}

9
src/base/utils/version.h

@ -48,12 +48,7 @@ namespace Utils @@ -48,12 +48,7 @@ namespace Utils
typedef T ComponentType;
typedef Version<T, N, Mandatory> ThisType;
constexpr Version()
: m_components {{}}
{
}
constexpr Version(const ThisType &other) = default;
constexpr Version() = default;
template <typename ... Other>
constexpr Version(Other ... components)
@ -187,7 +182,7 @@ namespace Utils @@ -187,7 +182,7 @@ namespace Utils
{
}
ComponentsArray m_components;
ComponentsArray m_components {{}};
};
template <typename T, std::size_t N, std::size_t Mandatory>

Loading…
Cancel
Save