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

Unified Diff: src/IceGlobalContext.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/IceFixups.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index ff3b8b3a7a03725be5185993bb96f866b60df35d..7adde9fae2c33dd1e367eb75c5a351dbaecee960 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -139,7 +139,7 @@ class GlobalContext {
ThreadContext &operator=(const ThreadContext &) = delete;
public:
- ThreadContext() {}
+ ThreadContext() = default;
CodeStats StatsFunction;
CodeStats StatsCumulative;
TimerList Timers;
@@ -466,7 +466,7 @@ private:
// If !HasEmittedCode, SubZero will accumulate all Globals (which are "true"
// program global variables) until the first code WorkItem is seen.
// TODO(jpp): move to EmitterContext.
- bool HasSeenCode;
+ bool HasSeenCode = false;
// TODO(jpp): move to EmitterContext.
VariableDeclarationList Globals;
// TODO(jpp): move to EmitterContext.
@@ -512,7 +512,7 @@ private:
// Randomization Cookie
// Managed by getRandomizationCookie()
GlobalLockType RandomizationCookieLock;
- uint32_t RandomizationCookie;
+ uint32_t RandomizationCookie = 0;
public:
static void TlsInit() { ICE_TLS_INIT_FIELD(TLS); }
@@ -529,13 +529,13 @@ class TimerMarker {
public:
TimerMarker(TimerIdT ID, GlobalContext *Ctx,
TimerStackIdT StackID = GlobalContext::TSK_Default)
- : ID(ID), Ctx(Ctx), StackID(StackID), Active(false) {
+ : ID(ID), Ctx(Ctx), StackID(StackID) {
if (ALLOW_DUMP)
push();
}
TimerMarker(TimerIdT ID, const Cfg *Func,
TimerStackIdT StackID = GlobalContext::TSK_Default)
- : ID(ID), Ctx(nullptr), StackID(StackID), Active(false) {
+ : ID(ID), Ctx(nullptr), StackID(StackID) {
// Ctx gets set at the beginning of pushCfg().
if (ALLOW_DUMP)
pushCfg(Func);
@@ -552,7 +552,7 @@ private:
const TimerIdT ID;
GlobalContext *Ctx;
const TimerStackIdT StackID;
- bool Active;
+ bool Active = false;
};
// Helper class for locking the streams and then automatically
« no previous file with comments | « src/IceFixups.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698