mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: Eliminate extra constructor call in FileLine warn off, and commentary.
This commit is contained in:
+2
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user