mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-26 00:28:25 +00:00
If we want a function to change the object, we need to pass it by reference
This commit is contained in:
parent
4c2d634f07
commit
e554e6ff67
@ -49,7 +49,7 @@ typedef struct _ccurl_memory_t {
|
|||||||
} ccurl_memory_t;
|
} ccurl_memory_t;
|
||||||
|
|
||||||
/* finds a location based on uri in the list provided */
|
/* 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();
|
for (ccurl_location_list::iterator i = locations.begin();
|
||||||
i != locations.end(); i++) {
|
i != locations.end(); i++) {
|
||||||
|
@ -50,7 +50,7 @@ typedef std::shared_ptr<ccurl_location_t> ccurl_location_ptr;
|
|||||||
typedef std::list<ccurl_location_ptr> ccurl_location_list;
|
typedef std::list<ccurl_location_ptr> ccurl_location_list;
|
||||||
|
|
||||||
/* find an existing location for the uri specified */
|
/* 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
|
/* free all locations (as well as location->uri and location->result if
|
||||||
* non-null) */
|
* non-null) */
|
||||||
void ccurl_free_locations(ccurl_location_list &locations);
|
void ccurl_free_locations(ccurl_location_list &locations);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user