[vte] [ring] Const correctness
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] [ring] Const correctness
- Date: Tue, 8 Sep 2009 07:30:05 +0000 (UTC)
commit 1db31d7d1168294f830b5b0ad0c57a56cf679dc1
Author: Behdad Esfahbod <behdad behdad org>
Date: Tue Sep 8 02:50:05 2009 -0400
[ring] Const correctness
src/ring.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/ring.c b/src/ring.c
index 6afe016..9e2e5b7 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -202,7 +202,7 @@ static VteRowStorage
_vte_row_storage_compute (const VteCell *cells, guint len)
{
guint i;
- guint32 *c = (guint32 *) cells;
+ const guint32 *c = (const guint32 *) cells;
guint32 basic_attrs = basic_cell.i.attr;
guint32 chars = 0, attrs = 0;
VteRowStorage storage;
@@ -210,7 +210,7 @@ _vte_row_storage_compute (const VteCell *cells, guint len)
for (i = 0; i < len; i++) {
chars |= *c;
c++;
- attrs |= (*c ^ basic_attrs);
+ attrs |= *c ^ basic_attrs;
c++;
}
@@ -232,7 +232,7 @@ _vte_row_storage_get_size (VteRowStorage storage, guint len)
}
static char *
-_store (char *to, guint32 *from, guint xor, guint width, guint len)
+_store (char *to, const guint32 *from, guint32 xor, guint width, guint len)
{
guint i;
@@ -269,7 +269,7 @@ _store (char *to, guint32 *from, guint xor, guint width, guint len)
}
static const char *
-_fetch (const char *from, guint32 *to, guint xor, guint width, guint len)
+_fetch (const char *from, guint32 *to, guint32 xor, guint width, guint len)
{
guint i;
@@ -327,8 +327,8 @@ _vte_row_storage_compact (VteRowStorage storage, char *to, const VteCell *cells,
return;
}
- to = _store (to, (guint32 *) cells, 0, storage.flags.charbytes, len);
- to = _store (to, 1 + (guint32 *) cells, basic_attrs, storage.flags.attrbytes, len);
+ to = _store (to, (const guint32 *) cells, 0, storage.flags.charbytes, len);
+ to = _store (to, 1 + (const guint32 *) cells, basic_attrs, storage.flags.attrbytes, len);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]