MCPcopy Create free account
hub / github.com/Kitware/VTK / pj_clone_paralist

Function pj_clone_paralist

ThirdParty/libproj/vtklibproj/src/initcache.cpp:45–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

pj_search_initcacheFunction · 0.85
pj_insert_initcacheFunction · 0.85

Calls 1

assertFunction · 0.50

Tested by

no test coverage detected