MCPcopy Create free account
hub / github.com/OSGeo/PROJ / pj_clone_paralist

Function pj_clone_paralist

src/initcache.cpp:45–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43/************************************************************************/
44
45paralist *pj_clone_paralist(const paralist *list) {
46 paralist *list_copy = nullptr, *next_copy = nullptr;
47
48 for (; list != nullptr; list = list->next) {
49 paralist *newitem =
50 (paralist *)malloc(sizeof(paralist) + strlen(list->param));
51 assert(newitem);
52
53 newitem->used = 0;
54 newitem->next = nullptr;
55 strcpy(newitem->param, list->param);
56
57 if (next_copy)
58 next_copy->next = newitem;
59 else
60 list_copy = newitem;
61
62 next_copy = newitem;
63 }
64
65 return list_copy;
66}
67
68/************************************************************************/
69/* pj_clear_initcache() */

Callers 2

pj_search_initcacheFunction · 0.85
pj_insert_initcacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected