mirror of
https://github.com/NGSolve/netgen.git
synced 2025-05-07 19:20:48 +05:00
fix version parsing (?)
This commit is contained in:
parent
a931afa7d0
commit
1d979cc16f
@ -23,7 +23,7 @@ namespace ngcore
|
||||
}
|
||||
|
||||
static bool dummy = [](){
|
||||
SetLibraryVersion("netgen", NETGEN_VERSION);
|
||||
SetLibraryVersion("netgen", VersionInfo(NETGEN_VERSION));
|
||||
return true;
|
||||
}();
|
||||
} // namespace ngcore
|
||||
|
@ -24,25 +24,25 @@ namespace ngcore
|
||||
vstring = vstring.substr(1,vstring.size()-1);
|
||||
auto dot = vstring.find('.');
|
||||
mayor_ = std::stoi(vstring.substr(0,dot));
|
||||
if(dot == size_t(-1)) vstring = "";
|
||||
if(dot == std::string::npos) vstring = "";
|
||||
else vstring = vstring.substr(dot+1, vstring.size()-dot-1);
|
||||
if(!vstring.empty())
|
||||
{
|
||||
dot = vstring.find('.');
|
||||
minor_ = std::stoi(vstring.substr(0,dot));
|
||||
if (dot == size_t(-1)) vstring = "";
|
||||
if (dot == std::string::npos) vstring = "";
|
||||
else vstring = vstring.substr(dot+1, vstring.size()-dot-1);
|
||||
if(!vstring.empty())
|
||||
{
|
||||
dot = vstring.find('-');
|
||||
release = std::stoi(vstring.substr(0,dot));
|
||||
if(dot == size_t(-1)) vstring = "";
|
||||
if(dot == std::string::npos) vstring = "";
|
||||
else vstring = vstring.substr(dot+1,vstring.size()-dot-1);
|
||||
if(!vstring.empty())
|
||||
{
|
||||
dot = vstring.find('-');
|
||||
patch = std::stoi(vstring.substr(0,dot));
|
||||
if(dot == size_t(-1)) vstring = "";
|
||||
if(dot == std::string::npos) vstring = "";
|
||||
else vstring = vstring.substr(dot+1, vstring.size()-dot-1);
|
||||
if(!vstring.empty())
|
||||
git_hash = vstring;
|
||||
|
Loading…
x
Reference in New Issue
Block a user