refactor: convert HashAlgorithm to enum class (#38233)

This commit is contained in:
Milan Burda 2023-05-12 15:23:42 +02:00 committed by GitHub
parent 3dbc0a365f
commit 88a9962e22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 12 deletions

View file

@ -89,10 +89,10 @@ class Archive : public node::ObjectWrap {
gin_helper::Dictionary integrity(isolate, v8::Object::New(isolate));
asar::HashAlgorithm algorithm = info.integrity.value().algorithm;
switch (algorithm) {
case asar::HashAlgorithm::SHA256:
case asar::HashAlgorithm::kSHA256:
integrity.Set("algorithm", "SHA256");
break;
case asar::HashAlgorithm::NONE:
case asar::HashAlgorithm::kNone:
CHECK(false);
break;
}