Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Initialization Lists indent following lines wrong

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
oliveri Posted - Aug 25 2009 : 05:21:52 AM
I've got the problem that the current VA beta does not like initialization lists spanning lines and being indented for better readability. VA then tries (forcefully) to indent the following lines by one more tab:

Expected:

Class::Class() :
	my_member( 0 )
{

}

Class::~Class()
{
}


Actual Result:

Class::Class() :
	my_member( 0 )
	{

	}

	Class::~Class()
	{
	}


This is happening also when I reindent the c-tor body and then add new methods below the c-tor

I reindented the C-Tor body manually:

Class::Class() :
	my_member( 0 )
{

}


and then add a d-tor (or any other thing, it will try to indent up to the column where the initialization list is idented):

Class::Class() :
	my_member( 0 )
{

}

	Class::~Class()
	{
	}
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 25 2009 : 1:41:32 PM
I don't think this is VA. VA does very little indenting / code formatting. If you turn on:

VA Options -> Advanced -> Correction -> Format after paste

then VA asks the IDE to format the code.

I often indent initialisers like this without a problem. Try putting the colon onto the same line as the initaliser and see if this helps:

Class::Class()
    : my_member( 0 )
{

}

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