mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 10:08:41 +00:00
Bug 646597 - Remove unneeded #ifdef DEBUG: use DebugOnly instead; r=bhackett
Assignment to a DebugOnly variable results in a call to either the empty 'operator =' or to an empty implicit 1-arg constructor and empty copy constructor when in non-debug mode. Either of these get inlined and eliminated as dead code above -00, so there is no benefit to skipping this assignment for non-debug builds.
This commit is contained in:
parent
9cc503bb3d
commit
7e5208b4e8
@ -905,9 +905,7 @@ ScriptAnalysis::analyzeLifetimes(JSContext *cx)
|
||||
ensureVariable(lifetimes[i], startOffset - 1);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
found = true;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ struct DebugOnly
|
||||
#else
|
||||
DebugOnly() {}
|
||||
DebugOnly(const T&) {}
|
||||
DebugOnly& operator=(const T&) {}
|
||||
DebugOnly& operator=(const T&) { return *this; }
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user