Mercurial > hg > octave-nkf
diff src/graphics.cc @ 7364:0e07f78369d1
[project @ 2008-01-12 08:38:17 by jwe]
author | jwe |
---|---|
date | Sat, 12 Jan 2008 08:38:17 +0000 |
parents | c31e5dab4f85 |
children | 2a2115742cb5 |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -267,7 +267,7 @@ bool array_property::validate (const octave_value& v) { - bool ok = false; + bool xok = false; // FIXME: should we always support []? if (v.is_empty () && v.is_double_type ()) @@ -277,41 +277,41 @@ if (type_constraints.size () > 0) { for (std::list<std::string>::const_iterator it = type_constraints.begin (); - ! ok && it != type_constraints.end (); ++it) + ! xok && it != type_constraints.end (); ++it) if ((*it) == v.type_name ()) - ok = true; + xok = true; } else - ok = v.is_double_type (); + xok = v.is_double_type (); - if (ok) + if (xok) { dim_vector vdims = v.dims (); int vlen = vdims.length (); - ok = false; + xok = false; // check value size if (size_constraints.size () > 0) for (std::list<dim_vector>::const_iterator it = size_constraints.begin (); - ! ok && it != size_constraints.end (); ++it) + ! xok && it != size_constraints.end (); ++it) { dim_vector itdims = (*it); if (itdims.length () == vlen) { - ok = true; + xok = true; - for (int i = 0; ok && i < vlen; i++) + for (int i = 0; xok && i < vlen; i++) if (itdims(i) >= 0 && itdims(i) != vdims(i)) - ok = false; + xok = false; } } else return true; } - return ok; + return xok; } void @@ -335,7 +335,7 @@ } bool -callback_property::validate (const octave_value& v) const +callback_property::validate (const octave_value&) const { // FIXME: implement this return true; @@ -1180,10 +1180,10 @@ xticklabelmode = "auto"; yticklabelmode = "auto"; zticklabelmode = "auto"; - color = octave_value (color_values (0, 0, 0)); - xcolor = octave_value (color_values ("black")); - ycolor = octave_value (color_values ("black")); - zcolor = octave_value (color_values ("black")); + color = color_values (0, 0, 0); + xcolor = color_values ("black"); + ycolor = color_values ("black"); + zcolor = color_values ("black"); xscale = "linear"; yscale = "linear"; zscale = "linear";