Friday, February 26, 2016

Re: Replace c cast to c++ style cast

skeept <skeept@gmail.com> wrote:

> There is a switch in g++ that warns about c style casts.
> I will try to fix those but there are plenty in the project where I am working.
>
> Can someone recommend a function that would allow to do this in vim?
>
> Or outside vim, can anyone recommend a tool that would be useful in doing this?
>
> Thank you!

Doing it automatically seems more harmful than useful.

Ideally you should change the code to avoid the cast if possible.
And if the cast is really needed, then you need to chose the
correct c++ cast: static_cast, const_cast, reinterpret_case or dynamic_cast.
It requires thoughts to select the proper cast and so it should not
be automated.

Regards
Dominique

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment