Restore references (#5303)

This commit is contained in:
chrchr-github 2023-08-08 17:50:08 +02:00 committed by GitHub
parent 09962a6bcf
commit 47c9a941a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -4046,7 +4046,7 @@ struct LifetimeStore {
update = true;
}
if (update && forward)
forwardLifetime(tok, &tokenlist, errorLogger, settings);
forwardLifetime(tok, tokenlist, errorLogger, settings);
return update;
}
@ -4141,7 +4141,7 @@ struct LifetimeStore {
}
}
if (update && forward)
forwardLifetime(tok, &tokenlist, errorLogger, settings);
forwardLifetime(tok, tokenlist, errorLogger, settings);
return update;
}
@ -4218,14 +4218,14 @@ struct LifetimeStore {
private:
Context* mContext{};
void forwardLifetime(Token* tok, TokenList* tokenlist, ErrorLogger* errorLogger, const Settings* settings) const {
void forwardLifetime(Token* tok, TokenList& tokenlist, ErrorLogger* errorLogger, const Settings* settings) const {
if (mContext) {
mContext->tok = tok;
mContext->tokenlist = tokenlist;
mContext->tokenlist = &tokenlist;
mContext->errorLogger = errorLogger;
mContext->settings = settings;
}
valueFlowForwardLifetime(tok, *tokenlist, errorLogger, settings);
valueFlowForwardLifetime(tok, tokenlist, errorLogger, settings);
}
};