MCPcopy Create free account
hub / github.com/OSGeo/gdal / CSLMerge

Function CSLMerge

port/cpl_string.cpp:258–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256 */
257
258char **CSLMerge(char **papszOrig, CSLConstList papszOverride)
259
260{
261 if (papszOrig == nullptr && papszOverride != nullptr)
262 return CSLDuplicate(papszOverride);
263
264 if (papszOverride == nullptr)
265 return papszOrig;
266
267 for (int i = 0; papszOverride[i] != nullptr; ++i)
268 {
269 char *pszKey = nullptr;
270 const char *pszValue = CPLParseNameValue(papszOverride[i], &pszKey);
271
272 papszOrig = CSLSetNameValue(papszOrig, pszKey, pszValue);
273 CPLFree(pszKey);
274 }
275
276 return papszOrig;
277}
278
279/************************************************************************/
280/* CSLLoad2() */

Callers 15

HTTPFetchMethod · 0.85
GetMetadataMethod · 0.85
LoadBandMetadataMethod · 0.85
GetMetadataMethod · 0.85
OpenMethod · 0.85
GetFileListMethod · 0.85
RunStepMethod · 0.85
LoadJP2MetadataMethod · 0.85
RefUnderlyingDatasetMethod · 0.85
TryLoadAuxMethod · 0.85
LoadMetadataMethod · 0.85
GetMetadataMethod · 0.85

Calls 3

CSLDuplicateFunction · 0.85
CPLParseNameValueFunction · 0.85
CSLSetNameValueFunction · 0.85

Tested by

no test coverage detected