Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Refactor help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Sep 12 2015 :  2:45:26 PM  Show Profile  Reply with Quote
Suppose I have this:

// forward declaration
int function(int x, int y = 2);


...and in my code some places I have this:

function(1);
function(2, 5);
function(3);
function(4);
function(5, 11);


...would it be possible to allow me to refactor the forward declaration into this? :

// forward declaration
int function(int x, int y);


...and have it automatically change the code to this? :

function(1, 2);
function(2, 5);
function(3, 2);
function(4, 2);
function(5, 11);


...so it inserts the parameters which were defined in the header?

Best regards,
Rick C. Hodgin

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 13 2015 :  6:49:46 PM  Show Profile  Reply with Quote
Yes, absolutely! Just run "Change Signature" refactoring command, remove the "= 2" and press OK.

Go to Top of Page

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Sep 14 2015 :  11:39:16 AM  Show Profile  Reply with Quote
Excellent. Thank you. I didn't know what to call it. I wound up doing this over 300 times manually this weekend. In the future... :-)

Best regards,
Rick C. Hodgin
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000