[Closed] Fix for GENERATED_BODY() causing "expected a ;"?
This has been bugging me quite a while, since normally all macros that don't have an effect on the following line should be terminated by a ; but this one isn't and it messes with Visual Studios automatic error detection, causing incorrect parsing and thus any plugins to mess up. Is there any fix for this?
I know that building will make it fix itself, but once you change code it comes back again, since IntelliSense is only overriden by the most recent build.
The question has been closed Jan 13 '17 at 07:13 AM by Xaymar for the following reason:
Too subjective and argumentative - only affects Visual Studio/Visual Assist X.
As you mentioned, Visual Studio reads the GENERATED_BODY() line the same way it reads the line of an if() statement and indents the following line since it expects the next line to be a continuation of the previous. This is also the case when using the UPROPERTY / UFUNCTION macros. Because this is inherent to how Visual Studio reads each line of code, there is no fix for the indention when returning from one of these lines. I believe Visual Studio has an option to disable automatic indention, however I have not used this as it would affect indention throughout Visual Studio which I would find to be more of a hindrance.
answered Oct 13 '16 at 05:27 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here