From 993f65b3bda53e2b22ee9e94efd11cbddd7b73cb Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 20 May 2014 17:46:06 +0200 Subject: Rename "index" variable as it shadows global declaration on older systems --- src/Array.cpp | 4 ++-- src/plist.c | 4 ++-- src/ptrarray.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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() return new Array(*this); } -Node* Array::operator[](unsigned int index) +Node* Array::operator[](unsigned int array_index) { - return _array.at(index); + return _array.at(array_index); } void 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) static int plist_free_node(node_t* node) { plist_data_t data = NULL; - int index = node_detach(node->parent, node); + int node_index = node_detach(node->parent, node); data = plist_get_data(node); plist_free_data(data); node->data = NULL; @@ -84,7 +84,7 @@ static int plist_free_node(node_t* node) node_destroy(node); - return index; + return node_index; } plist_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) pa->len++; } -void* ptr_array_index(ptrarray_t *pa, size_t index) +void* ptr_array_index(ptrarray_t *pa, size_t array_index) { if (!pa) return NULL; - if (index >= pa->len) { + if (array_index >= pa->len) { return NULL; } - return pa->pdata[index]; + return pa->pdata[array_index]; } -- cgit v1.1-32-gdbae