Constructor and curly braces for default initialization
Hello,
maybe somebody can help me here.
When I initialize variables in the ctor; I usually write something like this:
Class::Class() : mBool( false ), mInt( 1 ) { }
But everytime when I use the auto-complete for new variables, Resharper ( ? ) inserts me that:
Class::Class() : mBool( false ),
mInt( 1 ),
mFloat{ }
{ }
You see the curly braces for 'mFloat' ?
So I need to delete them everytime and replace them with () which is very annoying...
Any idea how to change that behaviour?
I'm using VS 2015 with the latest version of Resharper.
Best regards,
Alex
Please sign in to leave a comment.
Hello Alex,
You need to turn off the "Use uniform initialization in member initializers" setting in ReSharper | Options | Code Editing | C/C++ | Code style.
Regards,
Igor
Hello Igor,
Perfect!
I would propose to extend the 'visual help' on this page. Just like on the 'Formatting Style' pages.
Thank you,
Alex