Mercurial > octave
changeset 20649:22296da09307
use pass by reference and default argument value
* lo-array-gripes.h (index_exception::set_var): Use pass by reference
and default argument value.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 21 Oct 2015 13:56:05 -0400 |
parents | 67cf25a6e11e |
children | a6a452346c42 |
files | liboctave/util/lo-array-gripes.h |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/util/lo-array-gripes.h Tue Oct 20 22:43:20 2015 -0400 +++ b/liboctave/util/lo-array-gripes.h Wed Oct 21 13:56:05 2015 -0400 @@ -73,7 +73,7 @@ } // Name of variable being indexed. eye(2)(1,1) gives "<unknown>". - void set_var (std::string var_in) { var = var_in; } + void set_var (const std::string& var_in = std::string ()) { var = var_in; } private: