Mercurial > hg > octave-lyh
diff src/ov.h @ 9521:e08d72bb988e
simplify cloning
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 13 Aug 2009 11:52:07 +0200 |
parents | d9716e3ee0dd |
children | 1be3c73ed7b5 |
line wrap: on
line diff
--- a/src/ov.h +++ b/src/ov.h @@ -303,8 +303,7 @@ if (rep->count > 1) { --rep->count; - rep = rep->clone (); - rep->count = 1; + rep = rep->unique_clone (); } } @@ -316,8 +315,7 @@ if (rep->count > obsolete_copies + 1) { --rep->count; - rep = rep->clone (); - rep->count = 1; + rep = rep->unique_clone (); } } @@ -1142,6 +1140,10 @@ binary_op op_eq_to_binary_op (assign_op op); + // This declaration protects against constructing octave_value from + // const octave_base_value* which actually silently calls octave_value (bool). + octave_value (const octave_base_value *); + DECLARE_OCTAVE_ALLOCATOR };