Code review comment for lp:~muktupavels/compiz/gwd-no-g-object-get-with-settings

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

> 1) gwd_settings_button_layout_changed and gwd_settings_font_changed is only
> called with values from GSettings. Reason to remove NULL checks are simple -
> because button_layout and titlebar_font will be never NULL.
> g_settings_get_string always returns newly allocated string, it might be
> empty, but not NULL.
>
> So removing these checks does not change function behaviour.

Makes sense - thanks for clarifying :)

>
> 2) get_*_shadow will never return NULL. Also how could I add assert if shadow
> is no longer pointer?

Ah, I missed the part where it was converted to return the structure itself as opposed to a pointer.

In that case, there's no need to assert as you mentioned.

LGTM.

review: Approve

« Back to merge proposal