[beast/devel: 5/26] BSE: use memmove(), since g_memmove() was removed from GLib



commit 2b2c3e83c6210ecfac43f87bb1cff4ee8046cd25
Author: Tim Janik <timj gnu org>
Date:   Sat Oct 11 05:26:48 2014 +0200

    BSE: use memmove(), since g_memmove() was removed from GLib

 bse/bseenginemaster.cc  |    2 +-
 bse/bseengineutils.cc   |    4 ++--
 bse/bsenote.cc          |    2 +-
 bse/bseresamplerimpl.hh |    6 +++---
 bse/bsetrack.cc         |    4 ++--
 bse/bseutils.cc         |    2 +-
 bse/gsldatacache.cc     |    2 +-
 bse/gsldatautils.cc     |    2 +-
 8 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/bse/bseenginemaster.cc b/bse/bseenginemaster.cc
index bd577c6..cd3cf53 100644
--- a/bse/bseenginemaster.cc
+++ b/bse/bseenginemaster.cc
@@ -602,7 +602,7 @@ master_process_job (BseJob *job)
              for (poll = master_poll_list; poll; poll = poll->next)
                if (poll->fds > poll_last->fds)
                  poll->fds -= poll_last->n_fds;
-             g_memmove (poll_last->fds, poll_last->fds + poll_last->n_fds,
+             memmove (poll_last->fds, poll_last->fds + poll_last->n_fds,
                         ((guint8*) (master_pollfds + master_n_pollfds)) -
                         ((guint8*) (poll_last->fds + poll_last->n_fds)));
              master_n_pollfds -= poll_last->n_fds;
diff --git a/bse/bseengineutils.cc b/bse/bseengineutils.cc
index 8c8b419..2cbb526 100644
--- a/bse/bseengineutils.cc
+++ b/bse/bseengineutils.cc
@@ -731,8 +731,8 @@ const_values_insert (ConstValuesArray *array,
              array->nodes_used = (guint8*) g_realloc (array->nodes_used, new_size / sizeof (float*));
            }
        }
-      g_memmove (array->nodes + index + 1, array->nodes + index, (n_nodes - index) * sizeof 
(array->nodes[0]));
-      g_memmove (array->nodes_used + index + 1, array->nodes_used + index, (n_nodes - index) * sizeof 
(array->nodes_used[0]));
+      memmove (array->nodes + index + 1, array->nodes + index, (n_nodes - index) * sizeof (array->nodes[0]));
+      memmove (array->nodes_used + index + 1, array->nodes_used + index, (n_nodes - index) * sizeof 
(array->nodes_used[0]));
     }
   array->nodes[index] = value_block;
   array->nodes_used[index] = CONST_VALUES_EXPIRE;
diff --git a/bse/bsenote.cc b/bse/bsenote.cc
index 90445ad..41afe32 100644
--- a/bse/bsenote.cc
+++ b/bse/bsenote.cc
@@ -159,7 +159,7 @@ bse_freq_array_insert (BseFreqArray *farray,
       farray->n_prealloced = farray->n_values;
       farray->values = g_renew (gdouble, farray->values, farray->n_prealloced);
     }
-  g_memmove (farray->values + index + 1,
+  memmove (farray->values + index + 1,
              farray->values + index,
              i - index);
   farray->values[index] = value;
diff --git a/bse/bseresamplerimpl.hh b/bse/bseresamplerimpl.hh
index 1e9383a..b694356 100644
--- a/bse/bseresamplerimpl.hh
+++ b/bse/bseresamplerimpl.hh
@@ -315,7 +315,7 @@ public:
       {
        // build new history from end of old history
        // (very expensive if n_input_samples tends to be a lot smaller than ORDER often)
-       g_memmove (&history[0], &history[n_input_samples], sizeof (history[0]) * (ORDER - 1));
+       memmove (&history[0], &history[n_input_samples], sizeof (history[0]) * (ORDER - 1));
       }
   }
   /**
@@ -486,8 +486,8 @@ public:
          {
            // build new history from end of old history
            // (very expensive if n_output_todo tends to be a lot smaller than ORDER often)
-           g_memmove (&history_even[0], &history_even[n_output_todo], sizeof (history_even[0]) * (ORDER - 
1));
-           g_memmove (&history_odd[0], &history_odd[n_output_todo], sizeof (history_odd[0]) * (ORDER - 1));
+           memmove (&history_even[0], &history_even[n_output_todo], sizeof (history_even[0]) * (ORDER - 1));
+           memmove (&history_odd[0], &history_odd[n_output_todo], sizeof (history_odd[0]) * (ORDER - 1));
          }
 
        n_input_samples -= n_input_todo;
diff --git a/bse/bsetrack.cc b/bse/bsetrack.cc
index d5022d6..84677c6 100644
--- a/bse/bsetrack.cc
+++ b/bse/bsetrack.cc
@@ -170,7 +170,7 @@ track_add_entry (BseTrack *self,
   size = upper_power2 (self->n_entries_SL);
   if (size > upper_power2 (n))
     self->entries_SL = g_renew (BseTrackEntry, self->entries_SL, size);
-  g_memmove (self->entries_SL + index + 1, self->entries_SL + index, (n - index) * sizeof 
(self->entries_SL[0]));
+  memmove (self->entries_SL + index + 1, self->entries_SL + index, (n - index) * sizeof 
(self->entries_SL[0]));
   self->entries_SL[index].tick = tick;
   self->entries_SL[index].id = bse_id_alloc ();
   self->entries_SL[index].part = part;
@@ -197,7 +197,7 @@ track_delete_entry (BseTrack *self,
   BSE_SEQUENCER_LOCK ();
   self->n_entries_SL -= 1;
   bse_id_free (self->entries_SL[index].id);
-  g_memmove (self->entries_SL + index, self->entries_SL + index + 1, (self->n_entries_SL - index) * sizeof 
(self->entries_SL[0]));
+  memmove (self->entries_SL + index, self->entries_SL + index + 1, (self->n_entries_SL - index) * sizeof 
(self->entries_SL[0]));
   BSE_SEQUENCER_UNLOCK ();
 }
 
diff --git a/bse/bseutils.cc b/bse/bseutils.cc
index ddf31ee..a2132db 100644
--- a/bse/bseutils.cc
+++ b/bse/bseutils.cc
@@ -152,7 +152,7 @@ bse_item_seq_remove (BseItemSeq *iseq,
     if (iseq->items[i] == item)
       {
         iseq->n_items--;
-        g_memmove (iseq->items + i, iseq->items + i + 1, (iseq->n_items - i) * sizeof (iseq->items[0]));
+        memmove (iseq->items + i, iseq->items + i + 1, (iseq->n_items - i) * sizeof (iseq->items[0]));
         goto restart;
       }
 }
diff --git a/bse/gsldatacache.cc b/bse/gsldatacache.cc
index 2efb37f..95498df 100644
--- a/bse/gsldatacache.cc
+++ b/bse/gsldatacache.cc
@@ -255,7 +255,7 @@ data_cache_new_node_L (GslDataCache *dcache,
   if (old_node_array_size != new_node_array_size)
     dcache->nodes = g_renew (GslDataCacheNode*, dcache->nodes, new_node_array_size);
   node_p = dcache->nodes + pos;
-  g_memmove (node_p + 1, node_p, (i - pos) * sizeof (*node_p));
+  memmove (node_p + 1, node_p, (i - pos) * sizeof (*node_p));
   dnode = sfi_new_struct (GslDataCacheNode, 1);
   (*node_p) = dnode;
   dnode->offset = offset & ~(dcache->node_size - 1);
diff --git a/bse/gsldatautils.cc b/bse/gsldatautils.cc
index 377fdfe..b30458e 100644
--- a/bse/gsldatautils.cc
+++ b/bse/gsldatautils.cc
@@ -859,7 +859,7 @@ gsl_data_clip_sample (GslDataHandle     *dhandle,
       if (j > 0) /* shorten ramp by j values which are below threshold */
         {
           l -= j;
-          g_memmove (ramp, ramp + j, l * sizeof (ramp[0]));
+          memmove (ramp, ramp + j, l * sizeof (ramp[0]));
         }
 
       fade_handle = gsl_data_handle_new_insert (clip_handle, gsl_data_handle_bit_depth (clip_handle), 0, l, 
ramp, g_free);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]