Skip to content

Commit

Permalink
Merge pull request RemedyIT#270 from jwillemsen/jwi-eachwithindex
Browse files Browse the repository at this point in the history
Make use of each.with_index
  • Loading branch information
jwillemsen committed Mar 13, 2023
2 parents 6b6479d + 43f0705 commit e787014
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ridlbe/c++11/templates/srv/src/operation.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ void <%= interface.scoped_srvproxy_cxxname %>::<%= name %>_skel (
_taox11_retval.arg ();
% end
% end
% arguments.each_with_index do |_arg, _ix|
% arguments.each.with_index(1) do |_arg, _ix|
% if generate_thrupoa_collocation?
% case _arg.direction
% when :in
PS::SArg_Traits<<%= _arg.scoped_cxx_arg_type %>>::in_arg_type <%= _arg.cxxname %> =
std::move (PS::get_in_arg<<%= _arg.scoped_cxx_arg_type %>> (server_request.operation_details (), args, <%= _ix+1 %>));
std::move (PS::get_in_arg<<%= _arg.scoped_cxx_arg_type %>> (server_request.operation_details (), args, <%= _ix %>));
% when :out
PS::SArg_Traits<<%= _arg.scoped_cxx_arg_type %>>::out_arg_type <%= _arg.cxxname %> =
PS::get_out_arg<<%= _arg.scoped_cxx_arg_type %>> (server_request.operation_details (), args, <%= _ix+1 %>);
PS::get_out_arg<<%= _arg.scoped_cxx_arg_type %>> (server_request.operation_details (), args, <%= _ix %>);
% when :inout
PS::SArg_Traits<<%= _arg.scoped_cxx_arg_type %>>::inout_arg_type <%= _arg.cxxname %> =
PS::get_inout_arg<<%= _arg.scoped_cxx_arg_type %>> (server_request.operation_details (), args, <%= _ix+1 %>);
PS::get_inout_arg<<%= _arg.scoped_cxx_arg_type %>> (server_request.operation_details (), args, <%= _ix %>);
% end
% else
% case _arg.direction
Expand Down

0 comments on commit e787014

Please sign in to comment.