From 47c9a941a0b62039cfb7a8e2cfd6b91a29db4b62 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Tue, 8 Aug 2023 17:50:08 +0200 Subject: [PATCH] Restore references (#5303) --- lib/valueflow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 2b2b7423e..6f04d7ff6 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -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); } };