From e554e6ff67561d934fc56d0f1f65a389c846adcc Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 7 Jan 2010 19:50:00 +0100 Subject: [PATCH] If we want a function to change the object, we need to pass it by reference --- src/ccurl_thread.cc | 2 +- src/ccurl_thread.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ccurl_thread.cc b/src/ccurl_thread.cc index bd95f943..33417146 100644 --- a/src/ccurl_thread.cc +++ b/src/ccurl_thread.cc @@ -49,7 +49,7 @@ typedef struct _ccurl_memory_t { } ccurl_memory_t; /* finds a location based on uri in the list provided */ -ccurl_location_ptr ccurl_find_location(ccurl_location_list locations, char *uri) +ccurl_location_ptr ccurl_find_location(ccurl_location_list &locations, char *uri) { for (ccurl_location_list::iterator i = locations.begin(); i != locations.end(); i++) { diff --git a/src/ccurl_thread.h b/src/ccurl_thread.h index e2e14855..da237389 100644 --- a/src/ccurl_thread.h +++ b/src/ccurl_thread.h @@ -50,7 +50,7 @@ typedef std::shared_ptr ccurl_location_ptr; typedef std::list ccurl_location_list; /* find an existing location for the uri specified */ -ccurl_location_ptr ccurl_find_location(ccurl_location_list locations, char *uri); +ccurl_location_ptr ccurl_find_location(ccurl_location_list &locations, char *uri); /* free all locations (as well as location->uri and location->result if * non-null) */ void ccurl_free_locations(ccurl_location_list &locations);