2021-04-18 14:51:52 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_VERSION_H
|
|
|
|
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_VERSION_H
|
|
|
|
|
|
|
|
#include <cstddef>
|
|
|
|
#include <tuple>
|
|
|
|
|
|
|
|
namespace DetourNavigator
|
|
|
|
{
|
|
|
|
struct Version
|
|
|
|
{
|
2021-11-01 19:21:27 +00:00
|
|
|
std::size_t mGeneration = 0;
|
|
|
|
std::size_t mRevision = 0;
|
|
|
|
|
|
|
|
friend inline auto tie(const Version& value)
|
|
|
|
{
|
|
|
|
return std::tie(value.mGeneration, value.mRevision);
|
|
|
|
}
|
2021-04-18 14:51:52 +00:00
|
|
|
|
|
|
|
friend inline bool operator<(const Version& lhs, const Version& rhs)
|
|
|
|
{
|
2021-11-01 19:21:27 +00:00
|
|
|
return tie(lhs) < tie(rhs);
|
|
|
|
}
|
|
|
|
|
|
|
|
friend inline bool operator<=(const Version& lhs, const Version& rhs)
|
|
|
|
{
|
|
|
|
return tie(lhs) <= tie(rhs);
|
|
|
|
}
|
|
|
|
|
|
|
|
friend inline bool operator==(const Version& lhs, const Version& rhs)
|
|
|
|
{
|
|
|
|
return tie(lhs) == tie(rhs);
|
|
|
|
}
|
|
|
|
|
|
|
|
friend inline bool operator!=(const Version& lhs, const Version& rhs)
|
|
|
|
{
|
|
|
|
return !(lhs == rhs);
|
2021-04-18 14:51:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|