Mercurial > hg > octave-nkf
diff libinterp/octave-value/ov-classdef.cc @ 20638:7ac907da9fba
Use error() rather than ::error() unless explicitly required.
* resource-manager.cc (instance_ok), shortcut-manager.cc (instance_ok),
daspk.cc (DASPK_ABORT, DASPK_ABORT2), dasrt.cc (DASRT_ABORT, DASRT_ABORT2),
dassl.cc (DASSL_ABORT, DASSL_ABORT2), debug.cc (instance_ok),
display.cc (instance_ok), dynamic-ld.cc (octave_shlib_list::instance_ok,
octave_dynamic_loader::instance_ok, do_load_oct, do_load_mex), file-io.cc
(fopen_mode_to_ios_mode, do_stream_open, Ffprintf, Fsprintf, Fscanf, Ffscanf,
get_sscanf_data, Fsscanf, do_fread, do_fwrite, Fpopen, Ftempname, convert,
Fumask), graphics.in.h (graphics_toolkit::instance_ok,
gh_manager::instance_ok), load-path.cc (instance_ok),
ls-oct-ascii.cc (save_three_d), lsode.cc (LSODE_ABORT, LSODE_ABORT2),
oct-errno.in.cc (instance_ok), octave-link.cc (connect_link),
pager.cc (octave_pager_stream::instance_ok, octave_diary_stream::instance_ok),
quad.cc (QUAD_ABORT, QUAD_ABORT2),
sighandlers.cc (w32_interrupt_manager::instance_ok,
octave_child_list::instance_ok), symtab.cc (do_update_nest),
symtab.h (instance_ok), syscalls.cc (convert), toplev.h (instance_ok),
txt-eng-ft.cc (instance_ok, set_mode), urlwrite.cc (instance_ok),
__init_fltk__.cc (instance_ok), ov-builtin.cc (do_multi_index_op),
ov-classdef.cc (class_fevalStatic, make_class, octave_classdef::subsasgn,
do_multi_index_op, cdef_object_array::subsref, cdef_object_array::subsasgn,
install_meth, meta_subsref, run_constructor, make_meta_class, get_value,
set_value, check_method), ov-classdef.h (meta_subsref, instance_ok),
ov-fcn-handle.cc (octave_fcn_handle), ov-mex-fcn.cc (do_multi_index_op),
ov-range.h (octave_range), ov-typeinfo.cc (instance_ok),
ov-usr-fcn.cc (subsref, do_multi_index_op), pt-arg-list.cc (Fend,
convert_to_const_vector), pt-cell.cc (rvalue1), pt-colon.cc (append, rvalue1),
pt-eval.cc (visit_simple_for_command, visit_switch_command),
pt-exp.cc (is_logically_true, rvalue), pt-id.cc (eval_undefined_error),
pt-id.h (workspace_error), pt-mat.cc (get_concat_class):
Use error() rather than ::error().
author | Rik <rik@octave.org> |
---|---|
date | Thu, 06 Aug 2015 08:09:01 -0700 |
parents | 88efded31037 |
children | a142b62527ef |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-classdef.cc +++ b/libinterp/octave-value/ov-classdef.cc @@ -578,8 +578,7 @@ meth_name.c_str ()); } else - error ("fevalStatic: method not found: %s", - meth_name.c_str ()); + error ("fevalStatic: method not found: %s", meth_name.c_str ()); } else error ("fevalStatic: invalid method name, expected a string value"); @@ -740,8 +739,8 @@ } if (has_handle_class && ! all_handle_compatible) - ::error ("%s: cannot mix handle and non-HandleCompatible classes", - name.c_str ()); + error ("%s: cannot mix handle and non-HandleCompatible classes", + name.c_str ()); else { cls.put ("HandleCompatible", all_handle_compatible); @@ -993,7 +992,7 @@ if (retlist.length () > 0) retval = retlist(0); else - ::error ("overloaded method `subsasgn' did not return any value"); + error ("overloaded method `subsasgn' did not return any value"); } } } @@ -1256,12 +1255,12 @@ retval(0) = sym; } else - ::error ("cannot call superclass constructor with " - "variable `%s'", mname.c_str ()); + error ("cannot call superclass constructor with " + "variable `%s'", mname.c_str ()); } else - ::error ("`%s' is not a direct superclass of `%s'", - cname.c_str (), ctx.get_name ().c_str ()); + error ("`%s' is not a direct superclass of `%s'", + cname.c_str (), ctx.get_name ().c_str ()); } else { @@ -1286,21 +1285,21 @@ retval = meth.execute (idx, nargout, true, meth_name); else - ::error ("no method `%s' found in superclass `%s'", - meth_name.c_str (), cname.c_str ()); + error ("no method `%s' found in superclass `%s'", + meth_name.c_str (), cname.c_str ()); } else - ::error ("`%s' is not a superclass of `%s'", - cname.c_str (), ctx.get_name ().c_str ()); + error ("`%s' is not a superclass of `%s'", + cname.c_str (), ctx.get_name ().c_str ()); } else - ::error ("method name mismatch (`%s' != `%s')", - mname.c_str (), meth_name.c_str ()); + error ("method name mismatch (`%s' != `%s')", + mname.c_str (), meth_name.c_str ()); } } } else if (! error_state) - ::error ("superclass calls can only occur in methods or constructors"); + error ("superclass calls can only occur in methods or constructors"); return retval; } @@ -1714,8 +1713,8 @@ // fall through "default" default: - ::error ("can't perform indexing operation on array of %s objects", - class_name ().c_str ()); + error ("can't perform indexing operation on array of %s objects", + class_name ().c_str ()); break; } @@ -1784,9 +1783,9 @@ } } else - ::error ("can't assign %s object into array of %s objects.", - rhs_obj.class_name ().c_str (), - class_name ().c_str ()); + error ("can't assign %s object into array of %s objects.", + rhs_obj.class_name ().c_str (), + class_name ().c_str ()); } } else @@ -1884,8 +1883,8 @@ break; default: - ::error ("can't perform indexing operation on array of %s objects", - class_name ().c_str ()); + error ("can't perform indexing operation on array of %s objects", + class_name ().c_str ()); break; } @@ -2177,8 +2176,8 @@ } } else - ::error ("%s: invalid constructor output arguments", - meth.get_name ().c_str ()); + error ("%s: invalid constructor output arguments", + meth.get_name ().c_str ()); } } } @@ -2543,7 +2542,7 @@ "meta.class"); } else - ::error ("method `%s' is not static", nm.c_str ()); + error ("method `%s' is not static", nm.c_str ()); } else { @@ -2554,22 +2553,21 @@ if (prop.is_constant ()) retval(0) = prop.get_value (true, "meta.class"); else - ::error ("property `%s' is not constant", - nm.c_str ()); + error ("property `%s' is not constant", nm.c_str ()); } else - ::error ("no such method or property `%s'", nm.c_str ()); + error ("no such method or property `%s'", nm.c_str ()); } } else - ::error ("invalid meta.class indexing, expected a method or property name"); + error ("invalid meta.class indexing, expected a method or property name"); } else - ::error ("invalid meta.class indexing"); + error ("invalid meta.class indexing"); break; default: - ::error ("invalid meta.class indexing"); + error ("invalid meta.class indexing"); break; } @@ -2664,8 +2662,8 @@ obj = to_cdef (ctor_retval(0)); else { - ::error ("%s: invalid number of output arguments for classdef constructor", - ctor_name.c_str ()); + error ("%s: invalid number of output arguments for classdef constructor", + ctor_name.c_str ()); return; } } @@ -2839,8 +2837,8 @@ slist.push_back (sclass); else { - ::error ("`%s' cannot inherit from `%s', because it is sealed", - full_class_name.c_str (), sclass_name.c_str ()); + error ("`%s' cannot inherit from `%s', because it is sealed", + full_class_name.c_str (), sclass_name.c_str ()); return retval; } } @@ -3152,8 +3150,8 @@ if (! obj.is_partially_constructed_for (cls)) { - ::error ("cannot reference properties of class `%s' for non-constructed object", - cls.get_name ().c_str ()); + error ("cannot reference properties of class `%s' for non-constructed object", + cls.get_name ().c_str ()); return retval; } } @@ -3219,8 +3217,8 @@ if (! obj.is_partially_constructed_for (cls)) { - ::error ("cannot reference properties of class `%s' for non-constructed object", - cls.get_name ().c_str ()); + error ("cannot reference properties of class `%s' for non-constructed object", + cls.get_name ().c_str ()); return; } } @@ -3324,8 +3322,8 @@ } if (is_dummy_method (function)) - ::error ("no definition found for method `%s' of class `%s'", - get_name ().c_str (), dispatch_type.c_str ()); + error ("no definition found for method `%s' of class `%s'", + get_name ().c_str (), dispatch_type.c_str ()); } }