Daniel Marjamäki

Results 387 comments of Daniel Marjamäki

@kwin @AntonKrug I am not sure how to get the github pages working. But if you want I can provide a file area at either https://cppcheck.sourceforge.net or https://files.cppchecksolutions.com I just...

Imho the stl algorithms are not that readable. It depends on the reader. for (const std::string & p: suffixes) { if (isPrefixStringCharLiteral(str, q, p)) return true; } => return std::any_of(suffixes.begin(),...

> Do you think a range-based any_of is less readable? That is much better. I guess the readability for that code is similar to the readability of the for loop...

> Maybe rewriting it to use the ast instead of parsing the code directly will do the trick. imho that sounds like a better approach but I understand it's not...

doesn't `static_cast` mean that the type might change so it's less safe?

I do not feel our code is super elegant. An alternative would be to create a common private const function that is called both from the const and non-const method....

> I am looking into this (also as preparation for misc-const-correctness) and in some cases the non-const pointers might not be necessary at all which might clean up some things....

Sorry my review took so long. Please look at the CI failures. For instance: lib/checkassert.h:69:20: error: 'vector' in namespace 'std' does not name a template type const std::vector *arguments; ^~~~~~

> could you please have a look at my questions? sorry can you clarify which questions?

> Should I just comment out the tests and hope that in the future somebody will improve the code even more or how is the correct procedure? If the check...