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
 1638:Refactor change signature misbehaviour
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xMRi
Tomato Guru

Germany
315 Posts

Posted - May 21 2008 :  06:15:35 AM  Show Profile  Reply with Quote
Think about a class and implementation designed as:

// Header file class CXTest
{
	void Test(void *p);
};

// Implementation
void CXTest::Test(void *p)
{
	DoSometing(p);   
	return;
}


The evolution process of tis code causes some changes and a developer chnage the code to this to make it more readable:


// NOCHANGE Header file class CXTest
{
	void Test(void *p);
};

// CHANGED Implementation 
void CXTest::Test(void *pMyDataPtr)
{
	DoSometing(pMyDataPtr);   
	return;
}


Now the programmer want to change the signatur to add an int via refactoring. He enters void Test(void *p, int myInt);

The resulting changes don't compile anymore:


// CHANGE TO SIGNATURE Header file class CXTest
{
	void Test(void *p, int myInt);
};

// WRONG CHANGE Implementation 
void CXTest::Test(void *p, int myInt)
{
	DoSometing(pMyDataPtr);   
	return;
}


Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - May 21 2008 :  12:00:25 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=9327

zen is the art of being at one with the two'ness
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 18 2013 :  3:17:41 PM  Show Profile  Reply with Quote
Change Signature was overhauled in build 2007.
case=9327 is fixed in build 2007.
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