Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: src/IceAssemblerX8632.h

Issue 1197223002: Subzero: Use C++11 member initializers where practical. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceAssembler.cpp ('k') | src/IceBrowserCompileServer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceAssemblerX8632.h
diff --git a/src/IceAssemblerX8632.h b/src/IceAssemblerX8632.h
index 9d8c042d4ad52f9c72eb92ddbfcdcbd87a3af469..48a5f0a2f6e8c7f56e158ebe33df30c7efec2eb0 100644
--- a/src/IceAssemblerX8632.h
+++ b/src/IceAssemblerX8632.h
@@ -48,7 +48,7 @@ class Immediate {
Immediate &operator=(const Immediate &) = delete;
public:
- explicit Immediate(int32_t value) : value_(value), fixup_(nullptr) {}
+ explicit Immediate(int32_t value) : value_(value) {}
Immediate(RelocOffsetT offset, AssemblerFixup *fixup)
: value_(offset), fixup_(fixup) {
@@ -73,7 +73,7 @@ public:
private:
const int32_t value_;
- AssemblerFixup *fixup_;
+ AssemblerFixup *fixup_ = nullptr;
};
class Operand {
@@ -243,7 +243,7 @@ public:
static Address ofConstPool(Assembler *Asm, const Constant *Imm);
private:
- Address() {} // Needed by Address::Absolute.
+ Address() = default; // Needed by Address::Absolute.
};
class Label {
@@ -251,7 +251,7 @@ class Label {
Label &operator=(const Label &) = delete;
public:
- Label() : position_(0), num_unresolved_(0) {
+ Label() {
#ifndef NDEBUG
for (int i = 0; i < kMaxUnresolvedBranches; i++) {
unresolved_near_positions_[i] = -1;
@@ -259,7 +259,7 @@ public:
#endif // !NDEBUG
}
- ~Label() {}
+ ~Label() = default;
void FinalCheck() const {
// Assert if label is being destroyed with unresolved branches pending.
@@ -323,8 +323,8 @@ private:
static const int kMaxUnresolvedBranches = 20;
- intptr_t position_;
- intptr_t num_unresolved_;
+ intptr_t position_ = 0;
+ intptr_t num_unresolved_ = 0;
// TODO(stichnot,jvoung): Can this instead be
// llvm::SmallVector<intptr_t, kMaxUnresolvedBranches> ?
intptr_t unresolved_near_positions_[kMaxUnresolvedBranches];
« no previous file with comments | « src/IceAssembler.cpp ('k') | src/IceBrowserCompileServer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698