[Bf-blender-cvs] [18e0f741c81] master: GHOST/Wayland: improve code-comments
Campbell Barton
noreply at git.blender.org
Fri Oct 28 03:25:27 CEST 2022
Commit: 18e0f741c8194e4c87c58d874029c77c9a9f5ced
Author: Campbell Barton
Date: Fri Oct 28 12:16:25 2022 +1100
Branches: master
https://developer.blender.org/rB18e0f741c8194e4c87c58d874029c77c9a9f5ced
GHOST/Wayland: improve code-comments
===================================================================
M intern/ghost/intern/GHOST_SystemWayland.cpp
===================================================================
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index c4a98b672a4..eaf42bee683 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -786,8 +786,14 @@ struct GWL_Display {
struct zwp_primary_selection_device_manager_v1 *wp_primary_selection_device_manager = nullptr;
};
+/**
+ * Free the #GWL_Display and it's related members.
+ * \note This may run on a partially initialized struct, so it can't be assumed all mebers are set.
+ */
static void gwl_display_destroy(GWL_Display *display)
{
+ /* For typical WAYLAND use this will always be set.
+ * However when WAYLAND isn't running, this will early-exit and be null. */
if (display->wl_registry) {
wl_registry_destroy(display->wl_registry);
display->wl_registry = nullptr;
@@ -1037,7 +1043,7 @@ static void gwl_registry_entry_remove_all(GWL_Display *display)
* In practice this isn't a problem as so there are so few elements in `display->registry_entry`,
* so few use update functions and adding/removal at runtime is rarely called (plugging/unplugging)
* hardware for e.g. So while it's possible to store dependency links to avoid unnecessary
- * looping over data - so it ends up being a non issue.
+ * looping over data - it ends up being a non issue.
*/
static void gwl_registry_entry_update_all(GWL_Display *display, const int interface_slot_exclude)
{
More information about the Bf-blender-cvs
mailing list