Skip to content

Commit

Permalink
ecell#331 Modify enum path
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizu committed Mar 11, 2019
1 parent 115df23 commit 7ed3367
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ecell4/core/extras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,28 +105,28 @@ std::pair<VersionInformation::prerelease_type, unsigned int> parse_prerelease(co
{
if (prestr.size() == 0)
{
return std::make_pair(VersionInformation::prerelease_type::FINAL, 0);
return std::make_pair(VersionInformation::FINAL, 0);
}
else if (prestr[0] == 'a')
{
return std::make_pair(VersionInformation::prerelease_type::ALPHA, mystoi<unsigned int>(prestr.substr(1)));
return std::make_pair(VersionInformation::ALPHA, mystoi<unsigned int>(prestr.substr(1)));
}
else if (prestr[0] == 'b')
{
return std::make_pair(VersionInformation::prerelease_type::BETA, mystoi<unsigned int>(prestr.substr(1)));
return std::make_pair(VersionInformation::BETA, mystoi<unsigned int>(prestr.substr(1)));
}
else if (prestr[0] == 'c')
{
return std::make_pair(VersionInformation::prerelease_type::RC, mystoi<unsigned int>(prestr.substr(1)));
return std::make_pair(VersionInformation::RC, mystoi<unsigned int>(prestr.substr(1)));
}
else if (prestr.size() >= 2 && prestr[0] == 'r' && prestr[1] == 'c')
{
return std::make_pair(VersionInformation::prerelease_type::RC, mystoi<unsigned int>(prestr.substr(2)));
return std::make_pair(VersionInformation::RC, mystoi<unsigned int>(prestr.substr(2)));
}
else
{
throw NotSupported("Unknown pre-release was given.");
return std::make_pair(VersionInformation::prerelease_type::NONE, 0);
return std::make_pair(VersionInformation::NONE, 0);
}
}

Expand All @@ -153,7 +153,7 @@ VersionInformation parse_version_information(const std::string& version)
const std::pair<VersionInformation::prerelease_type, unsigned int> pre = parse_prerelease(result.str(5));
const int devno = (result.str(6).size() > 4 ? mystoi<int>(result.str(6).substr(4)) : -1);

return VersionInformation(header, majorno, minorno, patchno, pre, pre.no, devno);
return VersionInformation(header, majorno, minorno, patchno, pre.first, pre.second, devno);
#else /* regex.h */
regex_t reg;
int errcode = regcomp(
Expand Down

0 comments on commit 7ed3367

Please sign in to comment.