Skip to content

Commit

Permalink
Improved swig RVO optimization to handle rvalues
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-calmejane committed Oct 26, 2023
1 parent f7b2d22 commit 55ee7d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/la/avdecc/avdecc.i
Expand Up @@ -35,10 +35,10 @@
#include <la/avdecc/internals/endStation.hpp>
%}

// Optimize code generation be enabling RVO
// Optimize code generation by enabling RVO
%typemap(out, optimal="1") SWIGTYPE
%{
$result = new $1_ltype((const $1_ltype &)$1);
$result = new $1_ltype($1);
%}

#define LA_AVDECC_API
Expand Down
4 changes: 2 additions & 2 deletions include/la/avdecc/controller/avdeccController.i
Expand Up @@ -22,10 +22,10 @@
#include <la/avdecc/controller/avdeccController.hpp>
%}

// Optimize code generation be enabling RVO
// Optimize code generation by enabling RVO
%typemap(out, optimal="1") SWIGTYPE
%{
$result = new $1_ltype((const $1_ltype &)$1);
$result = new $1_ltype($1);
%}

#define LA_AVDECC_CONTROLLER_API
Expand Down

0 comments on commit 55ee7d0

Please sign in to comment.