Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 BUG: move to source file discards title comments

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
Mordachai Posted - Feb 15 2017 : 09:36:25 AM
If I have a small inline function definition in my header, that I decide to move to my source, that starts like:


	// check if there is an item for the alias 
	inline CDynamicMenuItem * CDynamicMenu::FindItem(const CString & name)
	{
		if (!this)
			return nullptr;

		// translates a given name to an nID, or returns false if not found
		auto it = m_aliases.find(name);
		if (it == m_aliases.end())
			return nullptr;

		return it->second;
	}


Then after using refactor - move to source - I'll end up with:

	DynamicMenu::CDynamicMenuItem * CDynamicMenu::FindItem(const CString & name)
	{
		if (!this)
			return nullptr;

		// translates a given name to an nID, or returns false if not found
		auto it = m_aliases.find(name);
		if (it == m_aliases.end())
			return nullptr;

		return it->second;
	}


The title comment - describing what this function is for - is gone from the header, and did not make it to the .cpp file.
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Feb 16 2017 : 6:42:50 PM
Yes, it should indeed include. Yes, I noticed that with your specific example, it was removed but with others, it's left in the header. Quite strange. This is definitely something we need to look into.
Mordachai Posted - Feb 16 2017 : 10:50:11 AM
note: occasionally it will leave the comment in the header - if I do several of these in a row. Not sure why or what distinguishes those form others - but either way - it should include the title comment with the moved code.

thanks :)
accord Posted - Feb 15 2017 : 9:52:58 PM
I'm seeing the same effect here. Thank you for the clear description.

case=56606

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