summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-05-20 17:46:06 +0200
committerGravatar Martin Szulecki2014-05-20 17:46:06 +0200
commit993f65b3bda53e2b22ee9e94efd11cbddd7b73cb (patch)
tree0c9b436ae656e36a84a937adf5f6cbfae07f28f1 /src
parent7b59a04d9406fde0847d1ce68c3bf2fde018c198 (diff)
downloadlibplist-993f65b3bda53e2b22ee9e94efd11cbddd7b73cb.tar.gz
libplist-993f65b3bda53e2b22ee9e94efd11cbddd7b73cb.tar.bz2
Rename "index" variable as it shadows global declaration on older systems
Diffstat (limited to 'src')
-rw-r--r--src/Array.cpp4
-rw-r--r--src/plist.c4
-rw-r--r--src/ptrarray.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Array.cpp b/src/Array.cpp
index 419249f..a4ea02a 100644
--- a/src/Array.cpp
+++ b/src/Array.cpp
@@ -90,9 +90,9 @@ Node* Array::Clone()
90 return new Array(*this); 90 return new Array(*this);
91} 91}
92 92
93Node* Array::operator[](unsigned int index) 93Node* Array::operator[](unsigned int array_index)
94{ 94{
95 return _array.at(index); 95 return _array.at(array_index);
96} 96}
97 97
98void Array::Append(Node* node) 98void Array::Append(Node* node)
diff --git a/src/plist.c b/src/plist.c
index 940362e..137188e 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -70,7 +70,7 @@ static void plist_free_data(plist_data_t data)
70static int plist_free_node(node_t* node) 70static int plist_free_node(node_t* node)
71{ 71{
72 plist_data_t data = NULL; 72 plist_data_t data = NULL;
73 int index = node_detach(node->parent, node); 73 int node_index = node_detach(node->parent, node);
74 data = plist_get_data(node); 74 data = plist_get_data(node);
75 plist_free_data(data); 75 plist_free_data(data);
76 node->data = NULL; 76 node->data = NULL;
@@ -84,7 +84,7 @@ static int plist_free_node(node_t* node)
84 84
85 node_destroy(node); 85 node_destroy(node);
86 86
87 return index; 87 return node_index;
88} 88}
89 89
90plist_t plist_new_dict(void) 90plist_t plist_new_dict(void)
diff --git a/src/ptrarray.c b/src/ptrarray.c
index 8567752..56d28cb 100644
--- a/src/ptrarray.c
+++ b/src/ptrarray.c
@@ -51,11 +51,11 @@ void ptr_array_add(ptrarray_t *pa, void *data)
51 pa->len++; 51 pa->len++;
52} 52}
53 53
54void* ptr_array_index(ptrarray_t *pa, size_t index) 54void* ptr_array_index(ptrarray_t *pa, size_t array_index)
55{ 55{
56 if (!pa) return NULL; 56 if (!pa) return NULL;
57 if (index >= pa->len) { 57 if (array_index >= pa->len) {
58 return NULL; 58 return NULL;
59 } 59 }
60 return pa->pdata[index]; 60 return pa->pdata[array_index];
61} 61}