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
 1614: Find References vs #define
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

accord
Whole Tomato Software

United Kingdom
3277 Posts

Posted - Nov 09 2007 :  6:35:24 PM  Show Profile  Reply with Quote
VAX 1614, VS2005 SP1, WinXP SP2, C++


class cTest {
public:
	void Update();
};

class cTest2 {
public:
	void Update();
};

#define TEST(x) x.Update()

class cTest3 {
	void Update()
	{
		cTest test;
		cTest2 test2;

		TEST(test);
		TEST(test2);
	}
};


Paste this into a cpp, it will compile. Now use rename refactor on Update() in cTest class. Try to compile again.

As you can see the problem is, find references will find Update() in the #define also.
I think, references in #defines should not show, or should be marked by "?" icon at least.

Edited by - accord on Nov 11 2007 09:56:14 AM

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Nov 12 2007 :  07:43:51 AM  Show Profile  Reply with Quote
I am seeing the same effect here. I agree, listing the #define entry with a question mark icon in Find References would be very sensible, and it should not be ticked by default in Rename:

case=9860

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

support
Whole Tomato Software

5566 Posts

Posted - Feb 25 2013 :  12:18:58 PM  Show Profile  Reply with Quote
case=9860 is fixed in build 1929
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000