Internals: Eliminate extra constructor call in FileLine warn off, and commentary.

This commit is contained in:
Wilson Snyder
2010-01-19 21:30:12 -05:00
parent bb20331f9e
commit 28eb5b9bc4
6 changed files with 21 additions and 12 deletions
+2 -2
View File
@@ -174,11 +174,11 @@ bool FileLine::warnIsOff(V3ErrorCode code) const {
return false;
}
void FileLine::warnStateInherit(const FileLine& from) {
void FileLine::modifyStateInherit(const FileLine* fromp) {
// Any warnings that are off in "from", become off in "this".
for (int codei=V3ErrorCode::FIRST_WARN; codei<V3ErrorCode::MAX; codei++) {
V3ErrorCode code = (V3ErrorCode)codei;
if (from.warnIsOff(code)) {
if (fromp->warnIsOff(code)) {
this->warnOff(code, true);
}
}