> 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.
> 1) gwd_settings_ button_ layout_ changed and gwd_settings_ font_changed is only get_string always returns newly allocated string, it might be
> called with values from GSettings. Reason to remove NULL checks are simple -
> because button_layout and titlebar_font will be never NULL.
> g_settings_
> 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.