From ef3e60a71bd0debb3bd5a84378494835b7e1e37b Mon Sep 17 00:00:00 2001 From: wienans <40465543+wienans@users.noreply.github.com> Date: Mon, 12 Feb 2024 09:16:07 +0100 Subject: [PATCH] Fix Pointer to Const --- test/testsimplifytypedef.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testsimplifytypedef.cpp b/test/testsimplifytypedef.cpp index 59fa3f3b7cae..a63538f346b8 100644 --- a/test/testsimplifytypedef.cpp +++ b/test/testsimplifytypedef.cpp @@ -4167,9 +4167,9 @@ class TestSimplifyTypedef : public TestFixture { ASSERT_EQUALS_MSG(false, true, "Validation of Tokenizer failed"); } - Token* token; + const Token* token; // Get the Token which is at the end of all the Typedef's in this case i placed a variable - Token* endOfTypeDef = Token::findsimplematch(tokenizer.list.front(), "endOfTypeDef", tokenizer.list.back()); + const Token* endOfTypeDef = Token::findsimplematch(tokenizer.list.front(), "endOfTypeDef", tokenizer.list.back()); // Search for the simplified char token and check its original Name token = Token::findsimplematch(endOfTypeDef, "char", tokenizer.list.back()); ASSERT_EQUALS("uint8_t", token->originalName());