v1.2版本改为通过xbox系列手柄进行遥控,并增加智能模式和手动模式
This commit is contained in:
1 parent
76603d3c31
commit
1a97bc32c3
1839 files changed
+478852
-3
No files matched your search
@@ -0,0 +1,32 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "fl/hash_map.h"
|
||||
|
||||
namespace fl {
|
||||
|
||||
// just define a hashset to be a hashmap with a dummy value
|
||||
|
||||
template <typename Key, typename Hash = Hash<Key>,
|
||||
typename KeyEqual = EqualTo<Key>>
|
||||
class HashSet : public HashMap<Key, bool, Hash, KeyEqual> {
|
||||
public:
|
||||
using Base = HashMap<Key, bool, Hash, KeyEqual>;
|
||||
using iterator = typename Base::iterator;
|
||||
using const_iterator = typename Base::const_iterator;
|
||||
|
||||
HashSet(fl::size initial_capacity = 8, float max_load = 0.7f)
|
||||
: Base(initial_capacity, max_load) {}
|
||||
|
||||
void insert(const Key &key) { Base::insert(key, true); }
|
||||
|
||||
void erase(const Key &key) { Base::erase(key); }
|
||||
|
||||
iterator find(const Key &key) { return Base::find(key); }
|
||||
};
|
||||
|
||||
template <typename Key, typename Hash = Hash<Key>,
|
||||
typename KeyEqual = EqualTo<Key>>
|
||||
using hash_set = HashSet<Key, Hash, KeyEqual>;
|
||||
|
||||
} // namespace fl
|
||||
Reference in new issue
Block a user