fbd9ca8420
Query and import works. Properties now use unordered_map. Reduced memory footprint of properties by more than half.
24 lines
453 B
C++
24 lines
453 B
C++
#pragma once
|
|
|
|
#include <cstring>
|
|
#include "utils/total_ordering.hpp"
|
|
|
|
class CharStr : public TotalOrdering<CharStr>
|
|
{
|
|
public:
|
|
CharStr(const char *str) : str(str) {}
|
|
|
|
friend bool operator==(const CharStr &lhs, const CharStr &rhs)
|
|
{
|
|
return strcmp(lhs.str, rhs.str) == 0;
|
|
}
|
|
|
|
friend bool operator<(const CharStr &lhs, const CharStr &rhs)
|
|
{
|
|
return strcmp(lhs.str, rhs.str) < 0;
|
|
}
|
|
|
|
private:
|
|
const char *str;
|
|
};
|