mirror of
https://github.com/open-goal/jak-project
synced 2026-05-31 17:32:51 -04:00
de5aa7e5e4
* move things to the common library and remove next_dir * fix for windows * one last windows fix * last fix for real this time * debug listener test * fix listener threading bug
22 lines
521 B
C++
22 lines
521 B
C++
#ifndef JAK1_MATCHPARAM_H
|
|
#define JAK1_MATCHPARAM_H
|
|
|
|
template <typename T>
|
|
struct MatchParam {
|
|
MatchParam() { is_wildcard = true; }
|
|
|
|
// intentionally not explicit so you don't have to put MatchParam<whatever>(blah) everywhere
|
|
MatchParam(T x) {
|
|
value = x;
|
|
is_wildcard = false;
|
|
}
|
|
|
|
T value;
|
|
bool is_wildcard = true;
|
|
|
|
bool operator==(const T& other) const { return is_wildcard || (value == other); }
|
|
bool operator!=(const T& other) const { return !(*this == other); }
|
|
};
|
|
|
|
#endif // JAK1_MATCHPARAM_H
|