Skip to content

Commit

Permalink
remove shadowing
Browse files Browse the repository at this point in the history
Signed-off-by: Lîm Tsú-thuàn <dannypsnl@secondstate.io>
  • Loading branch information
dannypsnl committed Oct 6, 2023
1 parent 65bcec5 commit 3d1eed9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/vm/vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ VM::unsafeRunWasmFile(const std::filesystem::path &Path, std::string_view Func,
// Load wasm unit.
if (auto Res = LoaderEngine.parseWasmUnit(Path)) {
if (std::holds_alternative<AST::Module>(*Res)) {
auto Mod = std::get<AST::Module>(*Res);
return unsafeRunWasmFile(Mod, Func, Params, ParamTypes);
return unsafeRunWasmFile(std::get<AST::Module>(*Res), Func, Params,
ParamTypes);
} else {
auto Comp = std::get<AST::Component>(*Res);
return unsafeRunWasmFile(Comp, Func, Params, ParamTypes);
return unsafeRunWasmFile(std::get<AST::Component>(*Res), Func, Params,
ParamTypes);
}
} else {
return Unexpect(Res);
Expand All @@ -232,11 +232,11 @@ VM::unsafeRunWasmFile(Span<const Byte> Code, std::string_view Func,
// Load wasm unit.
if (auto Res = LoaderEngine.parseWasmUnit(Code)) {
if (std::holds_alternative<AST::Module>(*Res)) {
auto Mod = std::get<AST::Module>(*Res);
return unsafeRunWasmFile(Mod, Func, Params, ParamTypes);
return unsafeRunWasmFile(std::get<AST::Module>(*Res), Func, Params,
ParamTypes);
} else {
auto Comp = std::get<AST::Component>(*Res);
return unsafeRunWasmFile(Comp, Func, Params, ParamTypes);
return unsafeRunWasmFile(std::get<AST::Component>(*Res), Func, Params,
ParamTypes);
}
} else {
return Unexpect(Res);
Expand Down

0 comments on commit 3d1eed9

Please sign in to comment.