Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1638:Refactor change signature misbehaviour

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
xMRi Posted - May 21 2008 : 06:15:35 AM
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;
}

2   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Nov 18 2013 : 3:17:41 PM
Change Signature was overhauled in build 2007.
case=9327 is fixed in build 2007.
feline Posted - May 21 2008 : 12:00:25 PM
I am seeing the same effect here. Thank you for the clear description.

case=9327

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000