Is there a way to control where Create From Usage places the declaration of a local variable?
I would expect/like it (in C++) to create it as close as possible as the usage, not at the beginning of the enclosing function. At least, it should be in the same code block where the usage is, to conform with most modern coding standards.
int Baz()
{
//myvar is created here
if (Foo()) {
// It should be created here
int b = Bar (myvar);
}
return 0;
}
In this small example it is quite straightforward to place it correctly afterwards, but with lengthy functions (I know, I know...), I have to go search for the declaration and move it to its correct place...
Maybe I'm missing some configuration...