Explorar el Código

MessageDigestImpl.h: Simplify hash_info_t access

Tatsuhiro Tsujikawa hace 12 años
padre
commit
40e53de908
Se han modificado 1 ficheros con 2 adiciones y 6 borrados
  1. 2 6
      src/MessageDigestImpl.h

+ 2 - 6
src/MessageDigestImpl.h

@@ -75,9 +75,7 @@ public:
     if (i == hashes.end()) {
       return nullptr;
     }
-    factory_t factory;
-    std::tie(factory, std::ignore) = i->second;
-    return factory();
+    return std::get<0>(i->second)();
   }
 
   inline static bool supports(const std::string& hashType) {
@@ -90,9 +88,7 @@ public:
     if (i == hashes.end()) {
       return 0;
     }
-    size_t len;
-    std::tie(std::ignore, len) = i->second;
-    return len;
+    return std::get<1>(i->second);
   }
 
 public: