diff --git a/ReactCommon/react/renderer/.clang-tidy b/ReactCommon/react/renderer/.clang-tidy index f4da270c1a4..1f9babb38a9 100644 --- a/ReactCommon/react/renderer/.clang-tidy +++ b/ReactCommon/react/renderer/.clang-tidy @@ -20,5 +20,6 @@ modernize-replace-random-shuffle, modernize-unary-static-assert, modernize-use-emplace, modernize-shrink-to-fit, +modernize-use-equals-default, ' ... diff --git a/ReactCommon/react/renderer/core/Sealable.cpp b/ReactCommon/react/renderer/core/Sealable.cpp index 2326a4ed7b2..b1a1c91988b 100644 --- a/ReactCommon/react/renderer/core/Sealable.cpp +++ b/ReactCommon/react/renderer/core/Sealable.cpp @@ -35,7 +35,7 @@ Sealable::Sealable(Sealable &&other) noexcept : sealed_(false) { other.ensureUnsealed(); }; -Sealable::~Sealable() noexcept {}; +Sealable::~Sealable() noexcept = default; Sealable &Sealable::operator=(const Sealable &other) { ensureUnsealed(); diff --git a/ReactCommon/react/renderer/templateprocessor/tests/UITemplateProcessorTest.cpp b/ReactCommon/react/renderer/templateprocessor/tests/UITemplateProcessorTest.cpp index 8f2b2a068dc..3c9c2941f16 100644 --- a/ReactCommon/react/renderer/templateprocessor/tests/UITemplateProcessorTest.cpp +++ b/ReactCommon/react/renderer/templateprocessor/tests/UITemplateProcessorTest.cpp @@ -56,7 +56,7 @@ NativeModuleRegistry buildNativeModuleRegistry() { class MockReactNativeConfig : public ReactNativeConfig { public: - MockReactNativeConfig() {} + MockReactNativeConfig() = default; bool getBool(const std::string ¶m) const override { return mockSimpleTestValue_; } diff --git a/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp b/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp index f0502d5a28a..24db520f337 100644 --- a/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +++ b/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp @@ -20,7 +20,7 @@ using namespace facebook::jni; namespace facebook { namespace react { -TextLayoutManager::~TextLayoutManager() {} +TextLayoutManager::~TextLayoutManager() = default; void *TextLayoutManager::getNativeTextLayoutManager() const { return self_;