Mercurial > hg > octave-lojdl
changeset 10294:816b91eebe79
remove redundant test in bsxfun
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 10 Feb 2010 07:58:13 +0100 |
parents | ba373aea03d9 |
children | 13d382fc758b |
files | src/ChangeLog src/DLD-FUNCTIONS/bsxfun.cc |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-02-10 Jaroslav Hajek <highegg@gmail.com> + + * DLD-FUNCTIONS/bsxfun.cc (Fbsxfun): Remove redundant test. Add + explanation. + 2010-02-10 Jaroslav Hajek <highegg@gmail.com> * ov-base.h (octave_base_value::is_list): Remove.
--- a/src/DLD-FUNCTIONS/bsxfun.cc +++ b/src/DLD-FUNCTIONS/bsxfun.cc @@ -347,10 +347,12 @@ const octave_value B = args (2); if (func.is_builtin_function () - || (func.is_function_handle () - && ! func.fcn_handle_value ()->is_overloaded () - && ! A.is_object () && ! B.is_object ())) + || (func.is_function_handle () && ! A.is_object () && ! B.is_object ())) { + // This may break if the default behavior is overriden. But if you override + // arithmetic operators for builtin classes, you should expect mayhem + // anyway (constant folding etc). Querying is_overloaded may not be + // exactly what we need here. octave_function *fcn_val = func.function_value (); if (fcn_val) {