changeset 26371:87f11da73b19 stable

graphics.h: Fix static analyzer detected issues (bug #55347). * graphics.in.h (update_titlefontsizemultiplier, update_titlefontweight): Add a comment that calling update_font() will also update the title text object so it is clear that there hasn't been an accidental code duplication. * graphics.cc (axes::properties::update_font): Remove spurious newline.
author Rik <rik@octave.org>
date Wed, 02 Jan 2019 10:54:48 -0800
parents 190702f4a075
children 2d9ae06f621b
files libinterp/corefcn/graphics.cc libinterp/corefcn/graphics.in.h
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Wed Jan 02 10:34:39 2019 -0800
+++ b/libinterp/corefcn/graphics.cc	Wed Jan 02 10:54:48 2019 -0800
@@ -6767,7 +6767,6 @@
       gh_manager::get_object (get_ylabel ()).set (prop, val);
       gh_manager::get_object (get_zlabel ()).set (prop, val);
       gh_manager::get_object (get_title ()).set (prop, tval);
-
     }
 
   double dpr = device_pixel_ratio (get___myhandle__ ());
--- a/libinterp/corefcn/graphics.in.h	Wed Jan 02 10:34:39 2019 -0800
+++ b/libinterp/corefcn/graphics.in.h	Wed Jan 02 10:54:48 2019 -0800
@@ -3991,6 +3991,7 @@
 
     void update_titlefontsizemultiplier (void)
     {
+      // update_font handles title and axis labels
       update_font ("fontsize");
       sync_positions ();
     }
@@ -4003,6 +4004,7 @@
 
     void update_titlefontweight (void)
     {
+      // update_font handles title and axis labels
       update_font ("fontweight");
       sync_positions ();
     }