Skip to content

Commit c3b5022

Browse files
Merge pull request #1394 from AtariDreams:constructors
PiperOrigin-RevId: 511271203 Change-Id: I1ed352e06265b705b62d401a50b4699d01f7f1d7
2 parents e575e98 + ab92654 commit c3b5022

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

absl/crc/internal/crc_internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CRCImpl : public CRC { // Implemention of the abstract class CRC
6464
public:
6565
using Uint32By256 = uint32_t[256];
6666

67-
CRCImpl() {}
67+
CRCImpl() = default;
6868
~CRCImpl() override = default;
6969

7070
// The internal version of CRC::New().
@@ -96,8 +96,8 @@ class CRCImpl : public CRC { // Implemention of the abstract class CRC
9696
// This is the 32-bit implementation. It handles all sizes from 8 to 32.
9797
class CRC32 : public CRCImpl {
9898
public:
99-
CRC32() {}
100-
~CRC32() override {}
99+
CRC32() = default;
100+
~CRC32() override = default;
101101

102102
void Extend(uint32_t* crc, const void* bytes, size_t length) const override;
103103
void ExtendByZeroes(uint32_t* crc, size_t length) const override;

absl/debugging/leak_check.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ bool LeakCheckerIsActive() { return false; }
6565
void DoIgnoreLeak(const void*) { }
6666
void RegisterLivePointers(const void*, size_t) { }
6767
void UnRegisterLivePointers(const void*, size_t) { }
68-
LeakCheckDisabler::LeakCheckDisabler() { }
69-
LeakCheckDisabler::~LeakCheckDisabler() { }
68+
LeakCheckDisabler::LeakCheckDisabler() = default;
69+
LeakCheckDisabler::~LeakCheckDisabler() = default;
7070
ABSL_NAMESPACE_END
7171
} // namespace absl
7272

absl/flags/internal/commandlineflag.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace absl {
1919
ABSL_NAMESPACE_BEGIN
2020
namespace flags_internal {
2121

22-
FlagStateInterface::~FlagStateInterface() {}
22+
FlagStateInterface::~FlagStateInterface() = default;
2323

2424
} // namespace flags_internal
2525
ABSL_NAMESPACE_END

absl/log/internal/nullstream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class NullStreamMaybeFatal final : public NullStream {
114114
// and expression-defined severity use `NullStreamMaybeFatal` above.
115115
class NullStreamFatal final : public NullStream {
116116
public:
117-
NullStreamFatal() {}
117+
NullStreamFatal() = default;
118118
// ABSL_ATTRIBUTE_NORETURN doesn't seem to work on destructors with msvc, so
119119
// disable msvc's warning about the d'tor never returning.
120120
#if defined(_MSC_VER) && !defined(__clang__)

absl/types/optional.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class optional : private optional_internal::optional_data<T>,
130130

131131
// Constructs an `optional` holding an empty value, NOT a default constructed
132132
// `T`.
133-
constexpr optional() noexcept {}
133+
constexpr optional() noexcept = default;
134134

135135
// Constructs an `optional` initialized with `nullopt` to hold an empty value.
136136
constexpr optional(nullopt_t) noexcept {} // NOLINT(runtime/explicit)

0 commit comments

Comments
 (0)