From 5101243c643b7a4a711888679b6b45ddafb8038c Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 29 Sep 2012 13:59:07 +0300 Subject: [PATCH] use const_cast instead of c cast --- test/testsimplifytokens.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index be1bf53ce..8053b37a3 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -7206,7 +7206,7 @@ private: Tokenizer tokenizer(&settings, NULL); std::istringstream istr("x ; return a not_eq x;"); tokenizer.tokenize(istr, "test.c"); - Token *x_token = (Token *)(tokenizer.tokens()->tokAt(5)); + Token *x_token = const_cast(tokenizer.tokens()->tokAt(5)); ASSERT_EQUALS(false, tokenizer.duplicateDefinition(&x_token, tokenizer.tokens())); }