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

Function VersionStringToInt

frmts/wms/wmsutils.cpp:65–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65int VersionStringToInt(const char *version)
66{
67 if (version == nullptr)
68 return -1;
69 const char *p = version;
70 int v = 0;
71 for (int i = 3; i >= 0; --i)
72 {
73 int n = atoi(p);
74 if (n < 0 || n >= 100)
75 return -1;
76 v += (1 << (i * 8)) * n;
77 for (; (*p != '\0') && (*p != '.'); ++p)
78 ;
79 if (*p != '\0')
80 ++p;
81 }
82 return v;
83}
84
85int StrToBool(const char *p)
86{

Callers 5

AddSubDatasetMethod · 0.85
AddWMSCSubDatasetMethod · 0.85
ExploreLayerMethod · 0.85
InitializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected