Why are you changing declarations everywhere to use auto?

Different issue, if your code is too far away from your variable declaration, then your function is probably too long!