Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adrien Plazas
libhandy
Commits
f42e6dd8
Commit
f42e6dd8
authored
Jan 29, 2020
by
Adrien Plazas
Browse files
swipe-tracker: Use g_clear_pointer() where possible
parent
19e3f20c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hdy-swipe-tracker.c
View file @
f42e6dd8
...
...
@@ -118,10 +118,7 @@ static GParamSpec *props[LAST_PROP];
static
void
reset
(
HdySwipeTracker
*
self
)
{
if
(
self
->
snap_points
)
{
g_free
(
self
->
snap_points
);
self
->
snap_points
=
NULL
;
}
g_clear_pointer
(
&
self
->
snap_points
,
g_free
);
self
->
state
=
HDY_SWIPE_TRACKER_STATE_NONE
;
...
...
@@ -950,8 +947,7 @@ hdy_swipe_tracker_confirm_swipe (HdySwipeTracker *self,
return
;
}
if
(
self
->
snap_points
)
g_free
(
self
->
snap_points
);
g_clear_pointer
(
&
self
->
snap_points
,
g_free
);
self
->
distance
=
distance
;
self
->
initial_progress
=
current_progress
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment