1

What tools do you use to refactor c++ code? For example, how do you rename a variable or function that is spread across files?


If the problem isn't language specific, there are text-based tools that can aid this process. For example projectile-replace and replacing words would be easy. But this can be a pain if there are functions that are named similarly, for example

  1. void foo();
  2. void fooFighter();
  3. void Fighterfoo();

If I want to rename foo to something like foo1, the projectile-replace would match with instances of the other functions and it's mildly time-consuming.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.