2012-11-03 16:20:16 +00:00
|
|
|
#ifndef OPENMW_MWWORLD_RECORDCMP_H
|
|
|
|
#define OPENMW_MWWORLD_RECORDCMP_H
|
|
|
|
|
|
|
|
#include <components/esm/records.hpp>
|
|
|
|
|
2015-01-25 00:53:20 +00:00
|
|
|
#include <components/misc/stringops.hpp>
|
|
|
|
|
2012-11-03 16:20:16 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
struct RecordCmp
|
|
|
|
{
|
|
|
|
template <class T>
|
|
|
|
bool operator()(const T &x, const T& y) const {
|
|
|
|
return x.mId < y.mId;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
2012-11-06 11:10:57 +00:00
|
|
|
inline bool RecordCmp::operator()<ESM::Dialogue>(const ESM::Dialogue &x, const ESM::Dialogue &y) const {
|
2012-12-23 19:23:24 +00:00
|
|
|
return Misc::StringUtils::ciLess(x.mId, y.mId);
|
2012-11-03 16:20:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
2012-11-06 11:10:57 +00:00
|
|
|
inline bool RecordCmp::operator()<ESM::Cell>(const ESM::Cell &x, const ESM::Cell &y) const {
|
2012-12-23 19:23:24 +00:00
|
|
|
return Misc::StringUtils::ciLess(x.mName, y.mName);
|
2012-11-03 16:20:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
2012-11-06 11:10:57 +00:00
|
|
|
inline bool RecordCmp::operator()<ESM::Pathgrid>(const ESM::Pathgrid &x, const ESM::Pathgrid &y) const {
|
2012-12-23 19:23:24 +00:00
|
|
|
return Misc::StringUtils::ciLess(x.mCell, y.mCell);
|
2012-11-03 16:20:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // end namespace
|
|
|
|
#endif
|