Skip to content

Commit

Permalink
fix warning about hidden method overload
Browse files Browse the repository at this point in the history
  • Loading branch information
q66 committed Jan 8, 2025
1 parent aeb0fbd commit 9374cc9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/cs_ident.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void var_changed(thread_state &ts, builtin_var &id, any_value &oldval) {
val[0].set_ident(id);
val[1] = std::move(oldval);
val[2] = id.value();
cimp->call(ts, span_type<any_value>{
cimp->call_id(ts, span_type<any_value>{
static_cast<any_value *>(val), 3
}, val[0]);
}
Expand All @@ -245,7 +245,7 @@ command *var_impl::get_setter(thread_state &ts) const {
return nullptr; /* not reached */
}

void command_impl::call(
void command_impl::call_id(
thread_state &ts, span_type<any_value> args, any_value &ret
) const {
auto idstsz = ts.idstack.size();
Expand Down
2 changes: 1 addition & 1 deletion src/cs_ident.hh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ struct command_impl: ident_impl, command {
string_ref name, string_ref args, int numargs, command_func func
);

void call(
void call_id(
thread_state &ts, span_type<any_value> args, any_value &ret
) const;

Expand Down
8 changes: 4 additions & 4 deletions src/cs_vm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void exec_command(
break;
case '.':
i = std::max(i + 1, numargs);
id->call(ts, span_type<any_value>{args, std::size_t(i)}, res);
id->call_id(ts, span_type<any_value>{args, std::size_t(i)}, res);
return;
case '1':
case '2':
Expand All @@ -117,7 +117,7 @@ void exec_command(
}
}
++i;
id->call(ts, span_type<any_value>{args, std::size_t(i)}, res);
id->call_id(ts, span_type<any_value>{args, std::size_t(i)}, res);
res.force_plain();
}

Expand Down Expand Up @@ -772,7 +772,7 @@ std::uint32_t *vm_exec(
);
std::size_t offset = args.size() - id->arg_count();
result.force_none();
id->call(ts, span_type<any_value>{
id->call_id(ts, span_type<any_value>{
&args[offset], std::size_t(id->arg_count())
}, result);
args.resize(offset);
Expand All @@ -786,7 +786,7 @@ std::uint32_t *vm_exec(
std::size_t callargs = *code++;
std::size_t offset = args.size() - callargs;
result.force_none();
id->call(
id->call_id(
ts, span_type<any_value>{&args[offset], callargs}, result
);
args.resize(offset);
Expand Down

0 comments on commit 9374cc9

Please sign in to comment.