Skip to content
Snippets Groups Projects
Commit 27951665 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gen_zaxis_height: change type of units to std::string.

parent 387e41b9
No related branches found
No related tags found
1 merge request!29M214003/develop
......@@ -304,19 +304,19 @@ gen_zaxis_height(ZaxisDesciption &zaxis, const char *pline)
if (*pline == '_') pline++;
if (*pline == 0) return;
const char *units = pline;
std::string units = pline;
zaxis.type = zaxistype;
zaxis.size = 1;
// zaxis.scalar = true;
zaxis.vals.resize(1);
zaxis.vals[0] = value;
strcpy(zaxis.units, units);
zaxis.units = units;
auto len = strlen(units);
auto len = units.size();
if (len > 2 && units[len - 2] == '_' && units[len - 1] == 's')
{
zaxis.units[len - 2] = 0;
zaxis.units.resize(len - 2);
zaxis.scalar = true;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment