Commit Graph

198 Commits

Author SHA1 Message Date
Dan Oconnor
76e1440d85 Further changes from PVS-Studio, submitted without modification, reviewed with owners where I was unsure of the change
[CL 2500334 by Dan Oconnor in Main branch]
2015-04-02 16:31:18 -04:00
Maciej Mroz
3ed5ae4cf6 UE-12214 Calling a function that returns TWeakObjectPtr in blueprints causes crash
Only a simple pointer to UObjects can be a parameter of BlueprintCallable (or BlueprintImplementableEvent.. etc) function. No WeakObjPtr or AssetSubclassOf is accepted. Strict check in UHT.

#codereview Steve.Robb, Richard.Hinckley

[CL 2499396 by Maciej Mroz in Main branch]
2015-04-01 20:59:46 -04:00
Mike Fricker
114458bf0f Clang warning fixes: Fixed missing 'override' specifiers
- Also removed some unreferenced functions that adding 'override' revealed

PR #1002 -- Thank you, Omar007!

[CL 2498415 by Mike Fricker in Main branch]
2015-04-01 07:20:55 -04:00
PaulEremeeff
3d878d5a79 PR #996: Fixing PVS-Studio warnings (Contributed by PaulEremeeff)
I have reviewed each change carefully, but it is a large change and I could have missed something! Here is a summary of the types of changes in this CL:
 * Made nullptr checks consistent (the plurality of the changes are of this type)
 * Completed switch statements (IE, switch did not explicitly handle default case, but had unhandled enum entries - this is the second most popular type of fix)
 * Removed unused variables
 * Removed redundant initializations
 * WidgetNavigationCustomization.cpp was fixed by the owner
 * integers converted to floats where result was stored in a float
 * Removed redundent null checks (e.g. before delete statements)
 * Renamed variables to prevent non-obvious shadowing
 * Fixed use of bitwise & when checking for equality to an enum entry (which is often 0)
 * Fixes for some copy paste errors (e.g. FoliageEdMode.cpp)

[CL 2498053 by Dan Oconnor in Main branch]
2015-03-31 20:12:31 -04:00
Steve Robb
31548a8951 Delete old generated .cpp files when generating less code.
Provided by Robert Milllar at Black Tusk.

#codereview robert.manuszewski

[CL 2497133 by Steve Robb in Main branch]
2015-03-31 09:33:11 -04:00
Steve Robb
983796dc35 ValidateMetaDataFormat overloads and AddMetaDataToClassData moved out of FHeaderParser.
#codereview robert.manuszewski

[CL 2497048 by Steve Robb in Main branch]
2015-03-31 07:20:11 -04:00
Steve Robb
0ad5c735f2 Property creation moved to its own function.
DoesAnythingInHierarchyHaveDefaultToInstanced moved out of FHeaderParser.

#codereview robert.manuszewski

[CL 2497043 by Steve Robb in Main branch]
2015-03-31 07:03:34 -04:00
Steve Robb
36a973206c UHT can skip inline function declarations.
#codereview robert.manuszewski

[CL 2495922 by Steve Robb in Main branch]
2015-03-30 14:13:41 -04:00
Michael Noland
6ef30e720a Optimized UnrealHeaderTool
- Optimized Tabify and Macroize
- Replaced various %s Spc(constant) calls with direct string literals
- Replaced injected indentation spaces with tabs (avoiding some of the work in Tabify; they were ultimately being replaced anyways)
- Replaced various %s of LINE_TERMINATOR with compile-time string literal concatenation
- Avoided case-insensitive work in various places
- Replaced direct references to FStringOutputDevice with a typedef to facilitate future optimizations
- Used Reset() instead of Empty() on various string builders and strings to reduce reallocations
[INTEGRATE] Change 2494450 by Michael.Noland@mnoland-T2784-HDepot on 2015/03/27 16:48:25

[CL 2494606 by Michael Noland in Main branch]
2015-03-27 18:10:52 -04:00
Michael Noland
9e64d67053 UnrealHeaderTool: Added time logging for various phases and clarified code/comments surrounding the phases
[INTEGRATE] Change 2493166 by Michael.Noland@mnoland-T2784-HDepot on 2015/03/26 23:49:36

[CL 2494507 by Michael Noland in Main branch]
2015-03-27 17:16:51 -04:00
Dan Oconnor
195086b1a5 Changes from PVS-Studio, these could introduce small behavior change.
Consistent null checks, fixes for copy/pasted conditions, copy pasted LOCTEXT identifiers, comparisons against literals of the wrong type, missing return statements, dead code, and some system calls that were ignoring their return value

[CL 2494390 by Dan Oconnor in Main branch]
2015-03-27 16:11:50 -04:00
Maciej Mroz
1a22ee9081 UHT error when an property/parameter exposed to BP is not supported by blueprint.
#codereview Robert.Manuszewski, Steve.Robb

[CL 2494269 by Maciej Mroz in Main branch]
2015-03-27 15:02:56 -04:00
Robert Manuszewski
30c9c30f7a ScriptGeneratorPlugin will now be disabled by default. Projects can opt-in by enabling it in their uproject file.
[CL 2493289 by Robert Manuszewski in Main branch]
2015-03-27 03:51:19 -04:00
Max Preussner
97d1b77e1e UHT: Fixed a large number of missing 'override' warnings on Linux
This will not fix warnings for UObject classes that implement legacy C++ interfaces for which we generate code (GENERATED_IINTERFACE_BODY), because, as far as I can tell, the code generator is currently not able to detect those cases. For example: class UFont : public UObject, public IFontProviderInterface --- IFontProviderInterface gets a _getUObject() injected, but we cannot detect this in the code generation for UFont. Some more work is needed here. It might be better to simply always generate _getUObject() for all classes, so that there are no weird special cases.

#CodeReview: steve.robb, dmitry.rekman

[CL 2492772 by Max Preussner in Main branch]
2015-03-26 18:31:15 -04:00
Jaroslaw Palczynski
82a72ea4d2 UE-11425: GitHub 896 : Update UnrealSourceFile Macros to work correctly for project files.
GitHub PR #896

[CL 2487551 by Jaroslaw Palczynski in Main branch]
2015-03-23 03:55:53 -04:00
Steve Robb
90ea7283f0 Nested switch broken up.
#codereview robert.manuszewski

[CL 2486563 by Steve Robb in Main branch]
2015-03-20 15:14:52 -04:00
Steve Robb
0fd156ad2a NoArrays parameter removed from GetVarNameAndDim.
#codereview robert.manuszewski

[CL 2486377 by Steve Robb in Main branch]
2015-03-20 13:26:37 -04:00
Steve Robb
89d426db24 IsFunction parameter removed from GetVarNameAndDim.
#codereview robert.manuszewski

[CL 2486354 by Steve Robb in Main branch]
2015-03-20 13:11:34 -04:00
Steve Robb
2443964b1a GetVarAndDim's HardcodedName parameter removed.
#codereview robert.manuszewski

[CL 2486324 by Steve Robb in Main branch]
2015-03-20 12:52:40 -04:00
Steve Robb
b1f4463491 Redundant GetVarType return value removed.
#codereview robert.manuszewski

[CL 2484783 by Steve Robb in Main branch]
2015-03-19 13:42:08 -04:00
Steve Robb
4f14c1c278 Error contexts determined from EVariableCategory.
HintText/Thing parameters removed from GetVarNameAndDim/GetVarType.

#codereview robert.manuszewski

[CL 2484763 by Steve Robb in Main branch]
2015-03-19 13:27:48 -04:00
Steve Robb
a7f92019fb GetVarType and GetVarNameAndDim no longer take ObjectFlags.
#codereview robert.manuszewski

[CL 2484601 by Steve Robb in Main branch]
2015-03-19 11:33:15 -04:00
Dmitry Rekman
b7afabb59a Fix && and || being in the same scope.
#codereview Jaroslaw.Palczynski

[CL 2481965 by Dmitry Rekman in Main branch]
2015-03-17 14:48:41 -04:00
Steve Robb
175b44a665 .generated.inl headers removed.
#codereview robert.manuszewski

[CL 2481705 by Steve Robb in Main branch]
2015-03-17 12:02:56 -04:00
Jaroslaw Palczynski
6c305898e0 UE-8578: Slate Widget fails to compile once added to a new project
Slate Widget was failing, because of missing Slate dependencies. Testing introduced a couple of problems which all was fixed by this CL:
1. I introduced AdditionalDependencies in .uproject file and change "Add Code To Project..." procedure to fill this array if needed. UBT reads this field and builds the project with required modules. Needed for Slate classes.
2. Changed UHT to #include missing headers in generated.h files if it was missing an include for it's super class. It was causing problems if we were trying to add a subclass of BrushShape -- BrushShape.h didn't have #include "Brush.h" and UBrushShape was inheriting from UBrush.
3. Above problems also occured for Slate classes, but not all of them was UCLASSes, so I had to fixed that manually.
4. "Add Code To Project..." functionality was not invalidating UBT makefiles, which lead to omitting new source files during hot-reloading (even thought it was reporting a success). This change also should improve a bit performance, cause right now there is no "gathering" step -- there is only invalidate step which is a lot quicker.
5. Fixed "Selected Class Source" link to source class in Slate Widget and Slate Widget Style class.

#codereview Robert.Manuszewski

[CL 2481488 by Jaroslaw Palczynski in Main branch]
2015-03-17 09:34:18 -04:00