mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
Small build fixes.
This commit is contained in:
parent
9428fc53f6
commit
b3314cd34f
3 changed files with 5 additions and 5 deletions
|
@ -31,7 +31,7 @@ std::vector<uint8_t> &Dictionary::operator[](const char *k)
|
|||
const std::vector<uint8_t> &Dictionary::operator[](const char *k) const
|
||||
{
|
||||
static const std::vector<uint8_t> emptyEntry;
|
||||
std::map< uint64_t,std::vector<uint8_t> >::const_iterator e(_t.find(_toKey(k)));
|
||||
Map< uint64_t,std::vector<uint8_t> >::const_iterator e(_t.find(_toKey(k)));
|
||||
return (e == _t.end()) ? emptyEntry : e->second;
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ void Dictionary::encode(std::vector<uint8_t> &out) const
|
|||
|
||||
out.clear();
|
||||
|
||||
for(std::map< uint64_t,std::vector<uint8_t> >::const_iterator ti(_t.begin());ti!=_t.end();++ti) {
|
||||
for(Map< uint64_t,std::vector<uint8_t> >::const_iterator ti(_t.begin());ti!=_t.end();++ti) {
|
||||
str[0] = ti->first;
|
||||
const char *k = (const char *)str;
|
||||
for(;;) {
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
#include "Utils.hpp"
|
||||
#include "Address.hpp"
|
||||
#include "Buf.hpp"
|
||||
#include "Map.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
|
@ -180,7 +180,7 @@ private:
|
|||
return key;
|
||||
}
|
||||
|
||||
std::map< uint64_t,std::vector<uint8_t> > _t;
|
||||
Map< uint64_t,std::vector<uint8_t> > _t;
|
||||
};
|
||||
|
||||
} // namespace ZeroTier
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
|
||||
ZT_INLINE void set(const K &key,const V &value)
|
||||
{
|
||||
this->emplace(key,value);
|
||||
(*this)[key] = value;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue