mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
cleanup: Don't use g_memmove()
Glib stopped providing any fallback implementations on systems without memmove() all the way back in 2013. Since then, the symbol is a simple macro around memmove(); use that function directly now that glib added a deprecation warning. https://gitlab.gnome.org/GNOME/mutter/merge_requests/689
This commit is contained in:
parent
5ca0ef078d
commit
4fdefb5b2e
@ -171,7 +171,7 @@ clutter_text_buffer_normal_insert_text (ClutterTextBuffer *buffer,
|
||||
|
||||
/* Actual text insertion */
|
||||
at = g_utf8_offset_to_pointer (pv->normal_text, position) - pv->normal_text;
|
||||
g_memmove (pv->normal_text + at + n_bytes, pv->normal_text + at, pv->normal_text_bytes - at);
|
||||
memmove (pv->normal_text + at + n_bytes, pv->normal_text + at, pv->normal_text_bytes - at);
|
||||
memcpy (pv->normal_text + at, chars, n_bytes);
|
||||
|
||||
/* Book keeping */
|
||||
@ -201,7 +201,7 @@ clutter_text_buffer_normal_delete_text (ClutterTextBuffer *buffer,
|
||||
start = g_utf8_offset_to_pointer (pv->normal_text, position) - pv->normal_text;
|
||||
end = g_utf8_offset_to_pointer (pv->normal_text, position + n_chars) - pv->normal_text;
|
||||
|
||||
g_memmove (pv->normal_text + start, pv->normal_text + end, pv->normal_text_bytes + 1 - end);
|
||||
memmove (pv->normal_text + start, pv->normal_text + end, pv->normal_text_bytes + 1 - end);
|
||||
pv->normal_text_chars -= n_chars;
|
||||
pv->normal_text_bytes -= (end - start);
|
||||
|
||||
|
@ -566,7 +566,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
|
||||
|
||||
}
|
||||
else
|
||||
g_memmove (&(rect->clickable), &(rect->visible), sizeof(rect->clickable));
|
||||
memmove (&(rect->clickable), &(rect->visible), sizeof (rect->clickable));
|
||||
|
||||
x = rect->visible.x - layout->button_margin.left * scale;
|
||||
|
||||
@ -613,7 +613,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
|
||||
rect->clickable.height = button_height + button_y;
|
||||
}
|
||||
else
|
||||
g_memmove (&(rect->clickable), &(rect->visible), sizeof(rect->clickable));
|
||||
memmove (&(rect->clickable), &(rect->visible), sizeof (rect->clickable));
|
||||
|
||||
x = rect->visible.x + rect->visible.width + layout->button_margin.right * scale;
|
||||
if (i < n_left - 1)
|
||||
|
Loading…
Reference in New Issue
Block a user