Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize fields in FCesiumSampleHeightResult. #1535

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Fixed a bug that caused incorrect lighting for tilesets using `KHR_materials_unlit`.
- Reduced the memory used by tiles with `KHR_materials_unlit`.
- `CesiumGlobeAnchor` properties are no longer shown on the main `CesiumSunSky` Details panel, because it is almost never necessary to set these. They can still be set on the component's own Details panel if needed.
- Fixed error messages in the Unreal log about uninitialized fields in `FCesiumSampleHeightResult`.

### v2.9.0 - 2024-10-01

Expand Down
4 changes: 2 additions & 2 deletions Source/CesiumRuntime/Public/CesiumSampleHeightResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct CESIUMRUNTIME_API FCesiumSampleHeightResult {
* is false.
*/
UPROPERTY(BlueprintReadWrite, Category = "Cesium")
FVector LongitudeLatitudeHeight;
FVector LongitudeLatitudeHeight{0.0, 0.0, 0.0};

/**
* True if the height as sampled from the tileset successfully. False if the
Expand All @@ -28,5 +28,5 @@ struct CESIUMRUNTIME_API FCesiumSampleHeightResult {
* will have more information about the problem.
*/
UPROPERTY(BlueprintReadWrite, Category = "Cesium")
bool SampleSuccess;
bool SampleSuccess{false};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the biggest nitpick of all time, but in other classes or structs we tend to use = to initialize the default values, so I would like to change this to bool SampleSuccess = false 😅 Hopefully it's not too bad if I do that before merging

};