Skip to content

Commit

Permalink
Merge pull request #1394 from AtariDreams:constructors
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 511271203
Change-Id: I1ed352e06265b705b62d401a50b4699d01f7f1d7
  • Loading branch information
copybara-github committed Feb 21, 2023
2 parents e575e98 + ab92654 commit c3b5022
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions absl/crc/internal/crc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class CRCImpl : public CRC { // Implemention of the abstract class CRC
public:
using Uint32By256 = uint32_t[256];

CRCImpl() {}
CRCImpl() = default;
~CRCImpl() override = default;

// The internal version of CRC::New().
Expand Down Expand Up @@ -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.
class CRC32 : public CRCImpl {
public:
CRC32() {}
~CRC32() override {}
CRC32() = default;
~CRC32() override = default;

void Extend(uint32_t* crc, const void* bytes, size_t length) const override;
void ExtendByZeroes(uint32_t* crc, size_t length) const override;
Expand Down
4 changes: 2 additions & 2 deletions absl/debugging/leak_check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ bool LeakCheckerIsActive() { return false; }
void DoIgnoreLeak(const void*) { }
void RegisterLivePointers(const void*, size_t) { }
void UnRegisterLivePointers(const void*, size_t) { }
LeakCheckDisabler::LeakCheckDisabler() { }
LeakCheckDisabler::~LeakCheckDisabler() { }
LeakCheckDisabler::LeakCheckDisabler() = default;
LeakCheckDisabler::~LeakCheckDisabler() = default;
ABSL_NAMESPACE_END
} // namespace absl

Expand Down
2 changes: 1 addition & 1 deletion absl/flags/internal/commandlineflag.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace absl {
ABSL_NAMESPACE_BEGIN
namespace flags_internal {

FlagStateInterface::~FlagStateInterface() {}
FlagStateInterface::~FlagStateInterface() = default;

} // namespace flags_internal
ABSL_NAMESPACE_END
Expand Down
2 changes: 1 addition & 1 deletion absl/log/internal/nullstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class NullStreamMaybeFatal final : public NullStream {
// and expression-defined severity use `NullStreamMaybeFatal` above.
class NullStreamFatal final : public NullStream {
public:
NullStreamFatal() {}
NullStreamFatal() = default;
// ABSL_ATTRIBUTE_NORETURN doesn't seem to work on destructors with msvc, so
// disable msvc's warning about the d'tor never returning.
#if defined(_MSC_VER) && !defined(__clang__)
Expand Down
2 changes: 1 addition & 1 deletion absl/types/optional.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class optional : private optional_internal::optional_data<T>,

// Constructs an `optional` holding an empty value, NOT a default constructed
// `T`.
constexpr optional() noexcept {}
constexpr optional() noexcept = default;

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

0 comments on commit c3b5022

Please sign in to comment.