diff libinterp/corefcn/graphics.in.h @ 20893:384ff5aa9437

2015 Code Sprint: Eliminate useless return statements after error (). * data.cc, graphics.cc, graphics.in.h, ls-mat4.cc, ls-mat5.cc, oct-fstrm.cc, oct-stream.cc, oct-strstrm.cc, __delaunayn__.cc, ov-base-int.cc, ov-classdef.h, ov-complex.cc, ov-cx-sparse.cc, ov-fcn-inline.cc, ov-float.cc, ov-flt-complex.cc, ov-java.cc, ov-range.cc, ov-re-sparse.cc, ov-scalar.cc, ov-struct.cc, ov-usr-fcn.cc, ov.cc, op-cm-cm.cc, op-cm-m.cc, op-cm-scm.cc, op-cm-sm.cc, op-fcm-fcm.cc, op-fcm-fm.cc, op-fm-fcm.cc, op-fm-fm.cc, op-m-cm.cc, op-m-m.cc, op-m-scm.cc, op-m-sm.cc, op-scm-cm.cc, op-scm-m.cc, op-scm-scm.cc, op-scm-sm.cc, op-sm-cm.cc, op-sm-m.cc, op-sm-scm.cc, op-sm-sm.cc, pt-exp.cc: Eliminate useless return statements after error ().
author Rik <rik@octave.org>
date Mon, 14 Dec 2015 12:59:29 -0800
parents f7084eae3318
children 6eff66fb8a02
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.in.h	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/corefcn/graphics.in.h	Mon Dec 14 12:59:29 2015 -0800
@@ -64,28 +64,24 @@
 
   virtual ~base_scaler (void) { }
 
-  virtual Matrix scale (const Matrix& m) const
+  virtual Matrix scale (const Matrix&) const
   {
     error ("invalid axis scale");
-    return m;
-  }
-
-  virtual NDArray scale (const NDArray& m) const
+  }
+
+  virtual NDArray scale (const NDArray&) const
   {
     error ("invalid axis scale");
-    return m;
-  }
-
-  virtual double scale (double d) const
+  }
+
+  virtual double scale (double) const
   {
     error ("invalid axis scale");
-    return d;
-  }
-
-  virtual double unscale (double d) const
+  }
+
+  virtual double unscale (double) const
   {
     error ("invalid axis scale");
-    return d;
   }
 
   virtual base_scaler* clone () const
@@ -316,20 +312,17 @@
   virtual octave_value get (void) const
   {
     error ("get: invalid property \"%s\"", name.c_str ());
-    return octave_value ();
   }
 
 
   virtual std::string values_as_string (void) const
   {
     error ("values_as_string: invalid property \"%s\"", name.c_str ());
-    return std::string ();
   }
 
   virtual Cell values_as_cell (void) const
   {
     error ("values_as_cell: invalid property \"%s\"", name.c_str ());
-    return Cell ();
   }
 
   base_property& operator = (const octave_value& val)
@@ -404,7 +397,6 @@
   virtual bool do_set (const octave_value&)
   {
     error ("set: invalid property \"%s\"", name.c_str ());
-    return false;
   }
 
 private:
@@ -2736,7 +2728,6 @@
     else
       {
         error ("base_graphics_object::get: invalid graphics object");
-        return octave_value ();
       }
   }
 
@@ -2747,7 +2738,6 @@
     else
       {
         error ("base_graphics_object::get: invalid graphics object");
-        return octave_value ();
       }
   }
 
@@ -2758,7 +2748,6 @@
   virtual octave_value get_defaults (void) const
   {
     error ("base_graphics_object::get_defaults: invalid graphics object");
-    return octave_value ();
   }
 
   virtual property_list get_defaults_list (void) const
@@ -2771,13 +2760,11 @@
   virtual octave_value get_factory_defaults (void) const
   {
     error ("base_graphics_object::get_factory_defaults: invalid graphics object");
-    return octave_value ();
   }
 
   virtual property_list get_factory_defaults_list (void) const
   {
     error ("base_graphics_object::get_factory_defaults_list: invalid graphics object");
-    return property_list ();
   }
 
   virtual bool has_readonly_property (const caseless_str& pname) const
@@ -2798,7 +2785,6 @@
     else
       {
         error ("base_graphics_object::get_parent: invalid graphics object");
-        return graphics_handle ();
       }
   }
 
@@ -2809,7 +2795,6 @@
     else
       {
         error ("base_graphics_object::get_handle: invalid graphics object");
-        return graphics_handle ();
       }
   }
 
@@ -2852,14 +2837,12 @@
   {
     static base_properties properties;
     error ("base_graphics_object::get_properties: invalid graphics object");
-    return properties;
   }
 
   virtual const base_properties& get_properties (void) const
   {
     static base_properties properties;
     error ("base_graphics_object::get_properties: invalid graphics object");
-    return properties;
   }
 
   virtual void update_axis_limits (const std::string& axis_type);
@@ -2889,7 +2872,6 @@
     else
       {
         error ("base_graphics_object::get_toolkit: invalid graphics object");
-        return graphics_toolkit ();
       }
   }