From da4d26dfa313deea81f87c3cb005a272c5411fca Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sun, 29 Oct 2017 22:26:52 +0000 Subject: [PATCH] Initialize members not by assignment but by the member initializer list. llvm-svn: 316876 --- lld/ELF/InputSection.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index d86388375609..fea3dfc15f94 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -91,11 +91,9 @@ protected: SectionBase(Kind SectionKind, StringRef Name, uint64_t Flags, uint64_t Entsize, uint64_t Alignment, uint32_t Type, uint32_t Info, uint32_t Link) - : Name(Name), SectionKind(SectionKind), Alignment(Alignment), - Flags(Flags), Entsize(Entsize), Type(Type), Link(Link), Info(Info) { - Live = false; - Assigned = false; - } + : Name(Name), SectionKind(SectionKind), Live(false), Assigned(false), + Alignment(Alignment), Flags(Flags), Entsize(Entsize), Type(Type), + Link(Link), Info(Info) {} }; // This corresponds to a section of an input file. @@ -105,10 +103,7 @@ public: : SectionBase(Regular, "", /*Flags*/ 0, /*Entsize*/ 0, /*Alignment*/ 0, /*Type*/ 0, /*Info*/ 0, /*Link*/ 0), - Repl(this) { - NumRelocations = 0; - AreRelocsRela = false; - } + NumRelocations(0), AreRelocsRela(false), Repl(this) {} template InputSectionBase(ObjFile *File, const typename ELFT::Shdr *Header, -- 2.34.1