1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-14 16:31:42 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-10-28 09:39:31 +09:00
parent 5a892728d2
commit 709d511a3d

11
mold.h
View File

@ -135,17 +135,10 @@ class ConcurrentMap {
public:
typedef tbb::concurrent_hash_map<StringRef, ValueT> MapT;
ValueT *lookup(StringRef key) {
typename MapT::accessor acc;
if (map.find(acc, key))
return &acc->second;
return nullptr;
}
ValueT *insert(StringRef key, const ValueT &val) {
typename MapT::accessor acc;
typename MapT::const_accessor acc;
map.insert(acc, std::make_pair(key, val));
return &acc->second;
return const_cast<ValueT *>(&acc->second);
}
private: