Oliver Stöneberg

Results 1140 comments of Oliver Stöneberg

Sorry for going off-topic but we really need to take a strong look at this check. We currently do not apply these findings to our code and if we are...

> Then maybe we should enable it? There are some pretty verbose and ugly loops in our code base... +1 We should also enable the clang-tidy checks and take a...

> `readability-use-anyofallof` just checks for escape and non-mutation, which can find loops that might not be straighforward to transform. Probably something to report upstream if we come across it in...

> > std::string::find_first_of(): - https://trac.cppcheck.net/ticket/10777 > > We dont suggest this. This was a list of examples where modern code is not an improvement. `std::regex` (unfortunately no simple C or...

> ``` > std::transform(v.begin(), v.end(), v.begin(), [](auto i) { > return i + 5; > }); > ``` > > doesn't seem to improve readability. This also seems prone to...

> I dont find it cringeworthy. It would be better to make it more explicit its doing a transform in-place, that could improve readability. However, it still makes the intention...

> It would be more readable if the replacement was more like: > > ``` > return any_of(suffixes, p, isPrefixStringCharLiteral(str,q,p)); > ``` LLVM has such helpers for many algorithms. Probably...

> If its very important to use `memcpy` or `strbk`, then it would be important to warn about raw loops like we do, so an advanced developer who understand the...

> Any more feedback on this? My opinion is still the same. Looking at the code I also wonder if this might impact the performance.

> doesn't `static_cast` mean that the type might change so it's less safe? I don't know. I was surprised that `const_cast` is actually working.