changeset 24120:0d446e938f1f

maint: clean up code formatting in generated graphics.h * genprops.awk: Fix indentation of emitted member functions. * graphics.in.h: Use space between class name and opening parenthesis.
author Mike Miller <mtmiller@octave.org>
date Mon, 02 Oct 2017 10:36:28 -0700
parents 3cdd0705745b
children e2dc75c661ac
files libinterp/corefcn/genprops.awk libinterp/corefcn/graphics.in.h
diffstat 2 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/genprops.awk	Sun Oct 01 15:36:06 2017 -0700
+++ b/libinterp/corefcn/genprops.awk	Mon Oct 02 10:36:28 2017 -0700
@@ -147,7 +147,7 @@
   printf ("  %s get_%s (void) const", rtype, name[i]);
 
   if (emit_get[i] == "definition" && deprecated[i])
-    printf ("\n{\n  warning_with_id (\"Octave:deprecated-property\",\"'%s' is deprecated and will be removed from a future version of Octave\");\n  return %s.%s ();\n}\n", name[i], name[i], faccess);
+    printf ("\n  {\n    warning_with_id (\"Octave:deprecated-property\",\"'%s' is deprecated and will be removed from a future version of Octave\");\n    return %s.%s ();\n  }\n", name[i], name[i], faccess);
   else if (emit_get[i] == "definition")
     printf (" { return %s.%s (); }\n", name[i], faccess);
   else
@@ -386,24 +386,24 @@
         else
           has_builtin_listeners = 0;
 
-        printf ("\n  {\n      {\n        if (%s.set (val, %s))\n          {\n",
+        printf ("\n  {\n    if (%s.set (val, %s))\n      {\n",
           name[i], (has_builtin_listeners ? "false" : "true"));
         if (mode[i])
-          printf ("            set_%smode (\"manual\");\n", name[i]);
+          printf ("        set_%smode (\"manual\");\n", name[i]);
         if (updater[i])
-          printf ("            update_%s ();\n", name[i]);
+          printf ("        update_%s ();\n", name[i]);
         if (deprecated[i])
-          printf ("            warning_with_id (\"Octave:deprecated-property\",\"'%s' is deprecated and will be removed from a future version of Octave\");\n", name[i]);
+          printf ("        warning_with_id (\"Octave:deprecated-property\",\"'%s' is deprecated and will be removed from a future version of Octave\");\n", name[i]);
         if (limits[i])
-          printf ("            update_axis_limits (\"%s\");\n", name[i]);
+          printf ("        update_axis_limits (\"%s\");\n", name[i]);
         if (has_builtin_listeners)
-          printf ("            %s.run_listeners (POSTSET);\n", name[i]);
+          printf ("        %s.run_listeners (POSTSET);\n", name[i]);
         if (! mutable[i])
-          printf ("            mark_modified ();\n");
-        printf ("          }\n");
+          printf ("        mark_modified ();\n");
+        printf ("      }\n");
         if (mode[i])
-          printf ("        else\n          set_%smode (\"manual\");\n", name[i]);
-        printf ("      }\n  }\n\n");
+          printf ("    else\n      set_%smode (\"manual\");\n", name[i]);
+        printf ("  }\n\n");
       }
       else
         printf (";\n\n");
--- a/libinterp/corefcn/graphics.in.h	Sun Oct 01 15:36:06 2017 -0700
+++ b/libinterp/corefcn/graphics.in.h	Mon Oct 02 10:36:28 2017 -0700
@@ -5555,8 +5555,8 @@
       color_property highlightcolor , color_values (1, 1, 1)
       array_property position , default_panel_position ()
       callback_property resizefcn , Matrix ()
-      handle_property selectedobject S , graphics_handle()
-      callback_property selectionchangedfcn , Matrix()
+      handle_property selectedobject S , graphics_handle ()
+      callback_property selectionchangedfcn , Matrix ()
       color_property shadowcolor , color_values (0, 0, 0)
       callback_property sizechangedfcn , Matrix ()
       radio_property units S , "{normalized}|inches|centimeters|points|pixels|characters"