mirror of https://github.com/aria2/aria2
MessageDigestImpl.h: Simplify hash_info_t access
parent
6f6a17bff7
commit
40e53de908
|
@ -75,9 +75,7 @@ public:
|
||||||
if (i == hashes.end()) {
|
if (i == hashes.end()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
factory_t factory;
|
return std::get<0>(i->second)();
|
||||||
std::tie(factory, std::ignore) = i->second;
|
|
||||||
return factory();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static bool supports(const std::string& hashType) {
|
inline static bool supports(const std::string& hashType) {
|
||||||
|
@ -90,9 +88,7 @@ public:
|
||||||
if (i == hashes.end()) {
|
if (i == hashes.end()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
size_t len;
|
return std::get<1>(i->second);
|
||||||
std::tie(std::ignore, len) = i->second;
|
|
||||||
return len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue