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
 1609: Create Declaration Offered when it shouldn't
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rhummer
Tomato Guru

USA
527 Posts

Posted - Oct 05 2007 :  12:06:05 PM  Show Profile  Reply with Quote
Using the test code:

bool fooBar()
{
	return true;
}

int main()
{
	if ( fooBar() )
	{
		return 1;
	}
	
	fooBar();

	return 0;
}


If I hover over fooBar() when it is used in the if statement, and trigger the Refactor Menu, I am offered 'Create Declaration' when I should not be.

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Oct 05 2007 :  4:20:05 PM  Show Profile  Reply with Quote
Currently VA does not check to see if the declaration already exists, it just offers this refactoring anyway:

case=1120

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

rhummer
Tomato Guru

USA
527 Posts

Posted - Oct 05 2007 :  4:32:11 PM  Show Profile  Reply with Quote
Well, it doesn't offer it if you over over fooBar() below the if statement. So it's a bit inconsistent.

Tools Engineer - Raven Software
VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Oct 05 2007 :  6:02:28 PM  Show Profile  Reply with Quote
oops, my mistake, I missed that:

case=9227

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

support
Whole Tomato Software

5566 Posts

Posted - Aug 09 2012 :  01:47:00 AM  Show Profile  Reply with Quote
case=1120 is implemented in build 1912

Whole Tomato Software, Inc.
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