diff libinterp/corefcn/graphics.in.h @ 19895:19755f4fc851

maint: Cleanup C++ code to follow Octave coding conventions. Try to wrap long lines to < 80 characters. Use GNU style and don't indent first brace of function definition. "case" statement is aligned flush left with brace of switch stmt. Remove trailing '\' line continuation from the end of #define macros. Use 2 spaces for indent. * files-dock-widget.cc, history-dock-widget.cc, main-window.cc, octave-cmd.cc, octave-dock-widget.cc, octave-gui.cc, resource-manager.cc, settings-dialog.cc, shortcut-manager.cc, welcome-wizard.cc, workspace-view.cc, cellfun.cc, data.cc, debug.cc, debug.h, dirfns.cc, error.h, file-io.cc, gl-render.cc, gl-render.h, gl2ps-renderer.h, graphics.cc, graphics.in.h, help.cc, input.cc, load-path.cc, load-path.h, lookup.cc, lu.cc, oct-stream.cc, octave-default-image.h, ordschur.cc, pr-output.cc, qz.cc, strfns.cc, symtab.cc, symtab.h, sysdep.cc, variables.cc, zfstream.h, __fltk_uigetfile__.cc, __init_fltk__.cc, __magick_read__.cc, __osmesa_print__.cc, audiodevinfo.cc, ov-classdef.cc, ov-classdef.h, ov-fcn.h, ov-float.cc, ov-flt-complex.cc, ov-java.cc, ov-range.cc, ov-re-mat.cc, ov-usr-fcn.h, ov.cc, op-int.h, options-usage.h, pt-eval.cc, Array-C.cc, Array-fC.cc, Array.cc, Array.h, PermMatrix.cc, Sparse.cc, chMatrix.h, dSparse.cc, dim-vector.h, bsxfun-decl.h, bsxfun-defs.cc, oct-norm.cc, Sparse-op-defs.h, oct-inttypes.cc, oct-inttypes.h, main.in.cc, mkoctfile.in.cc: Cleanup C++ code to follow Octave coding conventions.
author Rik <rik@octave.org>
date Wed, 25 Feb 2015 11:55:49 -0800
parents 426525fb3b9f
children f134ee404041
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.in.h	Wed Feb 25 16:23:45 2015 +0100
+++ b/libinterp/corefcn/graphics.in.h	Wed Feb 25 11:55:49 2015 -0800
@@ -1730,7 +1730,7 @@
 
             if (t1 != t2)
               is_ok = false;
-            
+
             if (t1 == t3)
               add_hidden = false;
           }
@@ -2001,7 +2001,7 @@
 
 class pval_vector : public std::vector <pval_pair>
 {
- public:
+public:
   const_iterator find (const std::string pname) const
   {
     const_iterator it;
@@ -2031,7 +2031,7 @@
     const_iterator it = find (pname);
 
     if (it != (*this).end ())
-     retval = (*it).second;
+      retval = (*it).second;
 
     return retval;
   }
@@ -2716,7 +2716,7 @@
     else
       error ("base_graphics_object::override_defaults: invalid graphics object");
   }
-  
+
   void build_user_defaults_map (property_list::pval_map_type &def,
                                 const std::string go_name) const;
 
@@ -2772,7 +2772,7 @@
     error ("base_graphics_object::get_defaults: invalid graphics object");
     return octave_value ();
   }
-  
+
   virtual property_list get_defaults_list (void) const
   {
     if (! valid_object ())
@@ -4094,24 +4094,24 @@
     }
 
     void update_font (void);
-    void update_fontname (void) 
-    { 
-      update_font (); 
+    void update_fontname (void)
+    {
+      update_font ();
       sync_positions ();
     }
-    void update_fontsize (void) 
-    { 
-      update_font (); 
+    void update_fontsize (void)
+    {
+      update_font ();
       sync_positions ();
     }
-    void update_fontangle (void) 
-    { 
-      update_font (); 
+    void update_fontangle (void)
+    {
+      update_font ();
       sync_positions ();
     }
-    void update_fontweight (void) 
-    { 
-      update_font (); 
+    void update_fontweight (void)
+    {
+      update_font ();
       sync_positions ();
     }
 
@@ -4684,22 +4684,22 @@
 
   protected:
     void init (void)
-      {
-        xdata.add_constraint (2);
-        ydata.add_constraint (2);
-        cdata.add_constraint ("double");
-        cdata.add_constraint ("single");
-        cdata.add_constraint ("logical");
-        cdata.add_constraint ("uint8");
-        cdata.add_constraint ("uint16");
-        cdata.add_constraint ("int16");
-        cdata.add_constraint ("real");
-        cdata.add_constraint (dim_vector (-1, -1));
-        cdata.add_constraint (dim_vector (-1, -1, 3));
-        alphadata.add_constraint (dim_vector (-1, -1));
-        alphadata.add_constraint ("double");
-        alphadata.add_constraint ("uint8");
-      }
+    {
+      xdata.add_constraint (2);
+      ydata.add_constraint (2);
+      cdata.add_constraint ("double");
+      cdata.add_constraint ("single");
+      cdata.add_constraint ("logical");
+      cdata.add_constraint ("uint8");
+      cdata.add_constraint ("uint16");
+      cdata.add_constraint ("int16");
+      cdata.add_constraint ("real");
+      cdata.add_constraint (dim_vector (-1, -1));
+      cdata.add_constraint (dim_vector (-1, -1, 3));
+      alphadata.add_constraint (dim_vector (-1, -1));
+      alphadata.add_constraint ("double");
+      alphadata.add_constraint ("uint8");
+    }
 
   private:
     void update_alphadata (void)
@@ -4856,10 +4856,10 @@
     // Matlab allows incoherent data to be stored into patch properties.
     // The patch should then be ignored by the renderer.
     bool has_bad_data (std::string &msg) const
-      {
-        msg = bad_data_msg;
-        return ! msg.empty ();
-      }
+    {
+      msg = bad_data_msg;
+      return ! msg.empty ();
+    }
 
     bool is_aliminclude (void) const
     { return (aliminclude.is_on () && alphadatamapping.is ("scaled")); }
@@ -5546,9 +5546,9 @@
 
   protected:
     void init (void)
-      {
-        position.add_constraint (dim_vector (1, 4));
-      }
+    {
+      position.add_constraint (dim_vector (1, 4));
+    }
 
     void update_units (const caseless_str& old_units);
     void update_fontunits (const caseless_str& old_units);