T O P I C R E V I E W |
Adequat |
Posted - Jun 26 2014 : 09:50:27 AM Les's say I have this code:
if (! x)
Print();
Now I use the VA function to put braces around it. I obtain:
{
if (!x)
Print;
}
The problem:
if (! x)
was transformed to:
if (!x)
VA should not change the programmer's code formatting! This is a recent bug, I used VA for long and only see this for a couple of weeks.
|
3 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Jun 26 2014 : 8:55:15 PM You are not the only person to have reported odd formatting behaviour, VS2013 formatting options is turning out to be an occasional theme. |
Adequat |
Posted - Jun 26 2014 : 4:26:39 PM You are fully right. Thanks for the hint. |
feline |
Posted - Jun 26 2014 : 10:38:08 AM Which IDE and version of VA are you using?
I cannot reproduce this in VA 2036 and VS2010, but I can reproduce it in VS2013. Since this is VS2013 specific for me, I don't think that this has anything to do with VA, at least not for me. VS2013 has added C++ formatting rules, and these rules are applied when code is edited or inserted, and the IDE will update the formatting of code VA touches. If this is what is happening to you, then you need to set the IDE C++ code formatting rules so they match the code formatting you are using.
Have a look at all of the settings under:
IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting
You probably want the Spacing rules. |