Mercurial > hg > octave-lyh
changeset 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 | f5e801eee0d1 |
files | src/graphics.cc src/graphics.h.in |
diffstat | 2 files changed, 49 insertions(+), 49 deletions(-) [+] |
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";
--- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -214,7 +214,7 @@ void set_hidden (bool flag) { hidden = flag; } - virtual void set (const octave_value& val) + virtual void set (const octave_value&) { error ("set: invalid property \"%s\"", name.c_str ()); } virtual octave_value get (void) const @@ -322,19 +322,19 @@ class radio_property : public base_property { public: - radio_property (const std::string& name, const graphics_handle& h, + radio_property (const std::string& nm, const graphics_handle& h, const radio_values& v = radio_values ()) - : base_property (name, h), + : base_property (nm, h), vals (v), current_val (v.default_value ()) { } - radio_property (const std::string& name, const graphics_handle& h, + radio_property (const std::string& nm, const graphics_handle& h, const std::string& v) - : base_property (name, h), + : base_property (nm, h), vals (v), current_val (vals.default_value ()) { } - radio_property (const std::string& name, const graphics_handle& h, + radio_property (const std::string& nm, const graphics_handle& h, const radio_values& v, const std::string& def) - : base_property (name, h), + : base_property (nm, h), vals (v), current_val (def) { } radio_property (const radio_property& p) @@ -439,31 +439,31 @@ current_val (v.default_value ()) { } - color_property (const std::string& name, const graphics_handle& h, + color_property (const std::string& nm, const graphics_handle& h, const color_values& c = color_values (), const radio_values& v = radio_values ()) - : base_property (name, h), + : base_property (nm, h), current_type (color_t), color_val (c), radio_val (v), current_val (v.default_value ()) { } - color_property (const std::string& name, const graphics_handle& h, + color_property (const std::string& nm, const graphics_handle& h, const radio_values& v) - : base_property (name, h), + : base_property (nm, h), current_type (radio_t), color_val (color_values ()), radio_val (v), current_val (v.default_value ()) { } - color_property (const std::string& name, const graphics_handle& h, + color_property (const std::string& nm, const graphics_handle& h, const std::string& v) - : base_property (name, h), + : base_property (nm, h), current_type (radio_t), color_val (color_values ()), radio_val (v), current_val (radio_val.default_value ()) { } - color_property (const std::string& name, const graphics_handle& h, + color_property (const std::string& nm, const graphics_handle& h, const color_property& v) - : base_property (name, h), + : base_property (nm, h), current_type (v.current_type), color_val (v.color_val), radio_val (v.radio_val), current_val (v.current_val) { } @@ -526,9 +526,9 @@ class double_property : public base_property { public: - double_property (const std::string& name, const graphics_handle& h, + double_property (const std::string& nm, const graphics_handle& h, double d = 0) - : base_property (name, h), + : base_property (nm, h), current_val (d) { } double_property (const double_property& p) @@ -562,9 +562,9 @@ class array_property : public base_property { public: - array_property (const std::string& name, const graphics_handle& h, + array_property (const std::string& nm, const graphics_handle& h, const octave_value& m) - : base_property (), data (m) { } + : base_property (nm, h), data (m) { } octave_value get (void) const { return data; } @@ -606,17 +606,17 @@ data_property (void) : base_property ("", graphics_handle ()) { } - data_property (const std::string& name, const graphics_handle& h, + data_property (const std::string& nm, const graphics_handle& h, const NDArray& m = NDArray ()) - : base_property (name, h), + : base_property (nm, h), data (m), xmin (octave_Inf), xmax (-octave_Inf), xminp (octave_Inf) { get_data_limits (); } - data_property (const std::string& name, const graphics_handle& h, + data_property (const std::string& nm, const graphics_handle& h, const Matrix& m) - : base_property (name, h), + : base_property (nm, h), data (m), xmin (octave_Inf), xmax (-octave_Inf), xminp (octave_Inf) { get_data_limits (); @@ -688,14 +688,14 @@ class bool_property : public radio_property { public: - bool_property (const std::string& name, const graphics_handle& h, + bool_property (const std::string& nm, const graphics_handle& h, bool val) - : radio_property (name, h, radio_values (val ? "{on}|off" : "on|{off}")) + : radio_property (nm, h, radio_values (val ? "{on}|off" : "on|{off}")) { } - bool_property (const std::string& name, const graphics_handle& h, + bool_property (const std::string& nm, const graphics_handle& h, const char* val) - : radio_property (name, h, radio_values ("on|off"), val) + : radio_property (nm, h, radio_values ("on|off"), val) { } bool_property (const bool_property& p) @@ -723,9 +723,9 @@ class handle_property : public base_property { public: - handle_property (const std::string& name, const graphics_handle& h, + handle_property (const std::string& nm, const graphics_handle& h, const graphics_handle& val = graphics_handle ()) - : base_property (name, h), + : base_property (nm, h), current_val (val) { } handle_property (const handle_property& p) @@ -758,9 +758,9 @@ class any_property : public base_property { public: - any_property (const std::string& name, const graphics_handle& h, + any_property (const std::string& nm, const graphics_handle& h, const octave_value& m = Matrix ()) - : base_property (), data (m) { } + : base_property (nm, h), data (m) { } octave_value get (void) const { return data; } @@ -781,9 +781,9 @@ class callback_property : public base_property { public: - callback_property (const std::string& name, const graphics_handle& h, + callback_property (const std::string& nm, const graphics_handle& h, const octave_value& m) - : base_property (), callback (m) { } + : base_property (nm, h), callback (m) { } octave_value get (void) const { return callback; }