Commit ab92654a by Rose

Convert empty constructors to default ones

These make the changed constructors match closer to the other ones that are default.
parent ed37a45a
...@@ -64,7 +64,7 @@ class CRCImpl : public CRC { // Implemention of the abstract class CRC ...@@ -64,7 +64,7 @@ class CRCImpl : public CRC { // Implemention of the abstract class CRC
public: public:
using Uint32By256 = uint32_t[256]; using Uint32By256 = uint32_t[256];
CRCImpl() {} CRCImpl() = default;
~CRCImpl() override = default; ~CRCImpl() override = default;
// The internal version of CRC::New(). // The internal version of CRC::New().
...@@ -96,8 +96,8 @@ class CRCImpl : public CRC { // Implemention of the abstract class CRC ...@@ -96,8 +96,8 @@ class CRCImpl : public CRC { // Implemention of the abstract class CRC
// This is the 32-bit implementation. It handles all sizes from 8 to 32. // This is the 32-bit implementation. It handles all sizes from 8 to 32.
class CRC32 : public CRCImpl { class CRC32 : public CRCImpl {
public: public:
CRC32() {} CRC32() = default;
~CRC32() override {} ~CRC32() override = default;
void Extend(uint32_t* crc, const void* bytes, size_t length) const override; void Extend(uint32_t* crc, const void* bytes, size_t length) const override;
void ExtendByZeroes(uint32_t* crc, size_t length) const override; void ExtendByZeroes(uint32_t* crc, size_t length) const override;
......
...@@ -65,8 +65,8 @@ bool LeakCheckerIsActive() { return false; } ...@@ -65,8 +65,8 @@ bool LeakCheckerIsActive() { return false; }
void DoIgnoreLeak(const void*) { } void DoIgnoreLeak(const void*) { }
void RegisterLivePointers(const void*, size_t) { } void RegisterLivePointers(const void*, size_t) { }
void UnRegisterLivePointers(const void*, size_t) { } void UnRegisterLivePointers(const void*, size_t) { }
LeakCheckDisabler::LeakCheckDisabler() { } LeakCheckDisabler::LeakCheckDisabler() = default;
LeakCheckDisabler::~LeakCheckDisabler() { } LeakCheckDisabler::~LeakCheckDisabler() = default;
ABSL_NAMESPACE_END ABSL_NAMESPACE_END
} // namespace absl } // namespace absl
......
...@@ -19,7 +19,7 @@ namespace absl { ...@@ -19,7 +19,7 @@ namespace absl {
ABSL_NAMESPACE_BEGIN ABSL_NAMESPACE_BEGIN
namespace flags_internal { namespace flags_internal {
FlagStateInterface::~FlagStateInterface() {} FlagStateInterface::~FlagStateInterface() = default;
} // namespace flags_internal } // namespace flags_internal
ABSL_NAMESPACE_END ABSL_NAMESPACE_END
......
...@@ -114,7 +114,7 @@ class NullStreamMaybeFatal final : public NullStream { ...@@ -114,7 +114,7 @@ class NullStreamMaybeFatal final : public NullStream {
// and expression-defined severity use `NullStreamMaybeFatal` above. // and expression-defined severity use `NullStreamMaybeFatal` above.
class NullStreamFatal final : public NullStream { class NullStreamFatal final : public NullStream {
public: public:
NullStreamFatal() {} NullStreamFatal() = default;
// ABSL_ATTRIBUTE_NORETURN doesn't seem to work on destructors with msvc, so // ABSL_ATTRIBUTE_NORETURN doesn't seem to work on destructors with msvc, so
// disable msvc's warning about the d'tor never returning. // disable msvc's warning about the d'tor never returning.
#if defined(_MSC_VER) && !defined(__clang__) #if defined(_MSC_VER) && !defined(__clang__)
......
...@@ -130,7 +130,7 @@ class optional : private optional_internal::optional_data<T>, ...@@ -130,7 +130,7 @@ class optional : private optional_internal::optional_data<T>,
// Constructs an `optional` holding an empty value, NOT a default constructed // Constructs an `optional` holding an empty value, NOT a default constructed
// `T`. // `T`.
constexpr optional() noexcept {} constexpr optional() noexcept = default;
// Constructs an `optional` initialized with `nullopt` to hold an empty value. // Constructs an `optional` initialized with `nullopt` to hold an empty value.
constexpr optional(nullopt_t) noexcept {} // NOLINT(runtime/explicit) constexpr optional(nullopt_t) noexcept {} // NOLINT(runtime/explicit)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment