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

Function CPLFetchBool

port/cpl_string.cpp:1607–1618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1605 */
1606
1607bool CPLFetchBool(CSLConstList papszStrList, const char *pszKey, bool bDefault)
1608
1609{
1610 if (CSLFindString(papszStrList, pszKey) != -1)
1611 return true;
1612
1613 const char *const pszValue = CSLFetchNameValue(papszStrList, pszKey);
1614 if (pszValue == nullptr)
1615 return bDefault;
1616
1617 return CPLTestBool(pszValue);
1618}
1619
1620/**********************************************************************
1621 * CSLFetchBoolean()

Callers 2

CSLLoad2Function · 0.70
CSLFetchBooleanFunction · 0.70

Calls 3

CSLFindStringFunction · 0.85
CSLFetchNameValueFunction · 0.85
CPLTestBoolFunction · 0.85

Tested by

no test coverage detected