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
 Initialization Lists indent following lines wrong
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

oliveri
New Member

Germany
2 Posts

Posted - Aug 25 2009 :  05:21:52 AM  Show Profile  Reply with Quote
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()
	{
	}

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 25 2009 :  1:41:32 PM  Show Profile  Reply with Quote
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 )
{

}

zen is the art of being at one with the two'ness
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