Run clang-tidy modernize-use-equals-{delete,default} on //pdf
See the bugs and cxx post for justification and details: https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8 This change was done using clang-tidy as described here: https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md In some cases the the tool leaves behind a string of commas where it replaced a member initializer list (https://bugs.llvm.org/show_bug.cgi?id=35051). They were cleaned up with: git diff --name-only | \ xargs sed -E -i 's/(^\s*|\)\s*):[ ,]*= default/\1 = default/' BUG=778959,778957 Change-Id: I0d5e3f40888d55b57aede103dad6345c1df99f7a Reviewed-on: https://chromium-review.googlesource.com/790011 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Chris Watkins <watk@chromium.org> Cr-Commit-Position: refs/heads/master@{#520422}
This commit is contained in:

committed by
Commit Bot

parent
19f5db9f5d
commit
da5476965f
@ -52,11 +52,11 @@ bool IsValidContentType(const std::string& type) {
|
||||
|
||||
} // namespace
|
||||
|
||||
DocumentLoader::Client::~Client() {}
|
||||
DocumentLoader::Client::~Client() = default;
|
||||
|
||||
DocumentLoader::Chunk::Chunk() {}
|
||||
DocumentLoader::Chunk::Chunk() = default;
|
||||
|
||||
DocumentLoader::Chunk::~Chunk() {}
|
||||
DocumentLoader::Chunk::~Chunk() = default;
|
||||
|
||||
void DocumentLoader::Chunk::Clear() {
|
||||
chunk_index = 0;
|
||||
@ -67,7 +67,7 @@ void DocumentLoader::Chunk::Clear() {
|
||||
DocumentLoader::DocumentLoader(Client* client)
|
||||
: client_(client), loader_factory_(this) {}
|
||||
|
||||
DocumentLoader::~DocumentLoader() {}
|
||||
DocumentLoader::~DocumentLoader() = default;
|
||||
|
||||
bool DocumentLoader::Init(std::unique_ptr<URLLoaderWrapper> loader,
|
||||
const std::string& url) {
|
||||
|
@ -27,7 +27,7 @@ class TestURLLoader : public URLLoaderWrapper {
|
||||
public:
|
||||
class LoaderData {
|
||||
public:
|
||||
LoaderData() {}
|
||||
LoaderData() = default;
|
||||
~LoaderData() {
|
||||
// We should call callbacks to prevent memory leaks.
|
||||
// The callbacks don't do anything, because the objects that created the
|
||||
@ -191,7 +191,7 @@ class TestURLLoader : public URLLoaderWrapper {
|
||||
class TestClient : public DocumentLoader::Client {
|
||||
public:
|
||||
TestClient() { full_page_loader_data()->set_content_type("application/pdf"); }
|
||||
~TestClient() override {}
|
||||
~TestClient() override = default;
|
||||
|
||||
// DocumentLoader::Client overrides:
|
||||
pp::Instance* GetPluginInstance() override { return nullptr; }
|
||||
@ -247,7 +247,7 @@ class TestClient : public DocumentLoader::Client {
|
||||
|
||||
class MockClient : public TestClient {
|
||||
public:
|
||||
MockClient() {}
|
||||
MockClient() = default;
|
||||
|
||||
MOCK_METHOD0(OnPendingRequestComplete, void());
|
||||
MOCK_METHOD0(OnNewDataReceived, void());
|
||||
|
@ -102,7 +102,7 @@ ShadowMatrix::ShadowMatrix(uint32_t depth, double factor, uint32_t background)
|
||||
}
|
||||
}
|
||||
|
||||
ShadowMatrix::~ShadowMatrix() {}
|
||||
ShadowMatrix::~ShadowMatrix() = default;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -43,7 +43,7 @@ PaintAggregator::PaintUpdate::~PaintUpdate() = default;
|
||||
PaintAggregator::InternalPaintUpdate::InternalPaintUpdate()
|
||||
: synthesized_scroll_damage_rect_(false) {}
|
||||
|
||||
PaintAggregator::InternalPaintUpdate::~InternalPaintUpdate() {}
|
||||
PaintAggregator::InternalPaintUpdate::~InternalPaintUpdate() = default;
|
||||
|
||||
pp::Rect PaintAggregator::InternalPaintUpdate::GetScrollDamage() const {
|
||||
// Should only be scrolling in one direction at a time.
|
||||
@ -81,7 +81,7 @@ pp::Rect PaintAggregator::InternalPaintUpdate::GetScrollDamage() const {
|
||||
return scroll_rect.Intersect(damaged_rect);
|
||||
}
|
||||
|
||||
PaintAggregator::PaintAggregator() {}
|
||||
PaintAggregator::PaintAggregator() = default;
|
||||
|
||||
bool PaintAggregator::HasPendingUpdate() const {
|
||||
return !update_.scroll_rect.IsEmpty() || !update_.paint_rects.empty();
|
||||
|
@ -48,7 +48,7 @@ PaintManager::PaintManager(pp::Instance* instance,
|
||||
DCHECK(client);
|
||||
}
|
||||
|
||||
PaintManager::~PaintManager() {}
|
||||
PaintManager::~PaintManager() = default;
|
||||
|
||||
// static
|
||||
pp::Size PaintManager::GetNewContextSize(const pp::Size& current_context_size,
|
||||
|
@ -26,7 +26,7 @@ bool g_sdk_initialized_via_pepper = false;
|
||||
|
||||
} // namespace
|
||||
|
||||
PDFModule::PDFModule() {}
|
||||
PDFModule::PDFModule() = default;
|
||||
|
||||
PDFModule::~PDFModule() {
|
||||
if (g_sdk_initialized_via_pepper) {
|
||||
|
@ -7,7 +7,7 @@
|
||||
class PDFiumFuzzer : public PDFiumFuzzerHelper {
|
||||
public:
|
||||
PDFiumFuzzer() : PDFiumFuzzerHelper() {}
|
||||
~PDFiumFuzzer() override {}
|
||||
~PDFiumFuzzer() override = default;
|
||||
|
||||
int GetFormCallbackVersion() const override { return 1; }
|
||||
};
|
||||
|
@ -110,9 +110,9 @@ std::string ProgramPath() {
|
||||
|
||||
} // namespace
|
||||
|
||||
PDFiumFuzzerHelper::PDFiumFuzzerHelper() {}
|
||||
PDFiumFuzzerHelper::PDFiumFuzzerHelper() = default;
|
||||
|
||||
PDFiumFuzzerHelper::~PDFiumFuzzerHelper() {}
|
||||
PDFiumFuzzerHelper::~PDFiumFuzzerHelper() = default;
|
||||
|
||||
bool PDFiumFuzzerHelper::OnFormFillEnvLoaded(FPDF_DOCUMENT doc) {
|
||||
return true;
|
||||
|
@ -3628,7 +3628,7 @@ PDFiumEngine::MouseDownState::MouseDownState(
|
||||
const PDFiumPage::LinkTarget& target)
|
||||
: area_(area), target_(target) {}
|
||||
|
||||
PDFiumEngine::MouseDownState::~MouseDownState() {}
|
||||
PDFiumEngine::MouseDownState::~MouseDownState() = default;
|
||||
|
||||
void PDFiumEngine::MouseDownState::Set(const PDFiumPage::Area& area,
|
||||
const PDFiumPage::LinkTarget& target) {
|
||||
@ -3658,7 +3658,7 @@ bool PDFiumEngine::MouseDownState::Matches(
|
||||
|
||||
PDFiumEngine::FindTextIndex::FindTextIndex() : valid_(false), index_(0) {}
|
||||
|
||||
PDFiumEngine::FindTextIndex::~FindTextIndex() {}
|
||||
PDFiumEngine::FindTextIndex::~FindTextIndex() = default;
|
||||
|
||||
void PDFiumEngine::FindTextIndex::Invalidate() {
|
||||
valid_ = false;
|
||||
|
@ -17,7 +17,7 @@ PDFiumMemBufferFileRead::PDFiumMemBufferFileRead(const void* data,
|
||||
data_ = reinterpret_cast<const unsigned char*>(data);
|
||||
}
|
||||
|
||||
PDFiumMemBufferFileRead::~PDFiumMemBufferFileRead() {}
|
||||
PDFiumMemBufferFileRead::~PDFiumMemBufferFileRead() = default;
|
||||
|
||||
int PDFiumMemBufferFileRead::GetBlock(void* param,
|
||||
unsigned long position,
|
||||
|
@ -11,7 +11,7 @@ PDFiumMemBufferFileWrite::PDFiumMemBufferFileWrite() {
|
||||
WriteBlock = &WriteBlockImpl;
|
||||
}
|
||||
|
||||
PDFiumMemBufferFileWrite::~PDFiumMemBufferFileWrite() {}
|
||||
PDFiumMemBufferFileWrite::~PDFiumMemBufferFileWrite() = default;
|
||||
|
||||
int PDFiumMemBufferFileWrite::WriteBlockImpl(FPDF_FILEWRITE* this_file_write,
|
||||
const void* data,
|
||||
|
@ -78,10 +78,9 @@ namespace chrome_pdf {
|
||||
|
||||
PDFiumPage::LinkTarget::LinkTarget() : page(-1) {}
|
||||
|
||||
PDFiumPage::LinkTarget::LinkTarget(const LinkTarget& other)
|
||||
: url(other.url), page(other.page), y_in_pixels(other.y_in_pixels) {}
|
||||
PDFiumPage::LinkTarget::LinkTarget(const LinkTarget& other) = default;
|
||||
|
||||
PDFiumPage::LinkTarget::~LinkTarget() {}
|
||||
PDFiumPage::LinkTarget::~LinkTarget() = default;
|
||||
|
||||
PDFiumPage::PDFiumPage(PDFiumEngine* engine,
|
||||
int i,
|
||||
|
@ -20,23 +20,20 @@ gfx::Range FixDirection(const gfx::Range& range) {
|
||||
|
||||
} // namespace
|
||||
|
||||
RangeSet::RangeSet() {}
|
||||
RangeSet::RangeSet() = default;
|
||||
|
||||
RangeSet::RangeSet(const gfx::Range& range) {
|
||||
Union(range);
|
||||
}
|
||||
|
||||
RangeSet::RangeSet(const RangeSet& range_set) : ranges_(range_set.ranges_) {}
|
||||
RangeSet::RangeSet(const RangeSet& range_set) = default;
|
||||
|
||||
RangeSet::RangeSet(RangeSet&& range_set)
|
||||
: ranges_(std::move(range_set.ranges_)) {}
|
||||
|
||||
RangeSet& RangeSet::operator=(const RangeSet& other) {
|
||||
ranges_ = other.ranges_;
|
||||
return *this;
|
||||
}
|
||||
RangeSet& RangeSet::operator=(const RangeSet& other) = default;
|
||||
|
||||
RangeSet::~RangeSet() {}
|
||||
RangeSet::~RangeSet() = default;
|
||||
|
||||
bool RangeSet::operator==(const RangeSet& other) const {
|
||||
return other.ranges_ == ranges_;
|
||||
|
@ -14,7 +14,7 @@ Timer::Timer(int delay_in_milliseconds)
|
||||
PostCallback();
|
||||
}
|
||||
|
||||
Timer::~Timer() {}
|
||||
Timer::~Timer() = default;
|
||||
|
||||
void Timer::PostCallback() {
|
||||
pp::CompletionCallback callback =
|
||||
|
@ -100,7 +100,7 @@ class URLLoaderWrapperImpl::ReadStarter : public Timer {
|
||||
public:
|
||||
explicit ReadStarter(URLLoaderWrapperImpl* owner)
|
||||
: Timer(kReadDelayMs), owner_(owner) {}
|
||||
~ReadStarter() override {}
|
||||
~ReadStarter() override = default;
|
||||
|
||||
// Timer overrides:
|
||||
void OnTimer() override { owner_->ReadResponseBodyImpl(); }
|
||||
|
Reference in New Issue
Block a user