Skip to content

Commit

Permalink
capi: Simplify unwrap function for FizzyImportedFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
gumb0 committed Jan 27, 2021
1 parent 01cfd53 commit 00aeaa4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/fizzy/capi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ inline std::vector<fizzy::ExternalFunction> unwrap(
inline fizzy::ImportedFunction unwrap(const FizzyImportedFunction& c_imported_func)
{
fizzy::ImportedFunction imported_func;
imported_func.module =
c_imported_func.module ? std::string{c_imported_func.module} : std::string{};
imported_func.name = c_imported_func.name ? std::string{c_imported_func.name} : std::string{};
imported_func.module = c_imported_func.module;
imported_func.name = c_imported_func.name;

const auto& c_type = c_imported_func.external_function.type;
imported_func.inputs.resize(c_type.inputs_size);
Expand Down

0 comments on commit 00aeaa4

Please sign in to comment.