changeset 25952:12d4271aed87

maint: Merge stable to default.
author John W. Eaton <jwe@octave.org>
date Fri, 19 Oct 2018 12:41:19 -0400
parents 52ff6e691e49 (current diff) 7a507e71d922 (diff)
children 526b51129c06
files libgui/graphics/Figure.cc libgui/src/dialog.cc libgui/src/m-editor/octave-qscintilla.cc libgui/src/variable-editor.cc libinterp/corefcn/gl-render.cc libinterp/corefcn/graphics.cc libinterp/corefcn/load-path.cc libinterp/corefcn/oct-stream.cc libinterp/corefcn/variables.cc libinterp/parse-tree/jit-typeinfo.cc
diffstat 11 files changed, 47 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libgui/graphics/Canvas.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -523,8 +523,8 @@
           {
             graphics_object figObj (obj.get_ancestor ("figure"));
 
-            if (figObj.valid_object () &&
-                ! figObj.get ("windowbuttonmotionfcn").isempty ())
+            if (figObj.valid_object ()
+                && ! figObj.get ("windowbuttonmotionfcn").isempty ())
               {
                 updateCurrentPoint (figObj, obj, event);
                 gh_manager::post_callback (figObj.get_handle (),
--- a/libgui/graphics/Figure.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libgui/graphics/Figure.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -131,9 +131,9 @@
     createFigureToolBarAndMenuBar ();
     int toffset = 0;
 
-    if (fp.toolbar_is ("figure") ||
-        (fp.toolbar_is ("auto") && fp.menubar_is ("figure") &&
-         ! hasUiControlChildren (fp)))
+    if (fp.toolbar_is ("figure")
+        || (fp.toolbar_is ("auto") && fp.menubar_is ("figure")
+            && ! hasUiControlChildren (fp)))
       {
         toffset += m_figureToolBar->sizeHint ().height ();
         boffset += m_statusBar->sizeHint ().height ();
@@ -502,8 +502,8 @@
         else if (fp.toolbar_is ("figure"))
           showFigureToolBar (true);
         else // "auto"
-          showFigureToolBar (! hasUiControlChildren (fp) &&
-                             fp.menubar_is ("figure"));
+          showFigureToolBar (! hasUiControlChildren (fp)
+                             && fp.menubar_is ("figure"));
         break;
 
       case figure::properties::ID_MENUBAR:
--- a/libgui/src/dialog.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libgui/src/dialog.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -515,15 +515,10 @@
 
     string_result = selectedFiles ();
 
-    if (testOption (QFileDialog::ShowDirsOnly)  == true &&
-        string_result.size () > 0)
-      {
-        path = string_result[0];
-      }
+    if (testOption (QFileDialog::ShowDirsOnly) && string_result.size () > 0)
+      path = string_result[0];
     else
-      {
-        path = directory ().absolutePath ();
-      }
+      path = directory ().absolutePath ();
 
     // Matlab expects just the filename, whereas the file dialog gave us
     // full path names, so fix it.
--- a/libgui/src/m-editor/octave-qscintilla.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libgui/src/m-editor/octave-qscintilla.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -185,8 +185,8 @@
         // Primary key
         int key = cmd_list_mac.at (i)->key ();
 
-        if (static_cast<int> (key | Qt::META) == key &&
-            static_cast<int> (key | Qt::CTRL) != key)
+        if (static_cast<int> (key | Qt::META) == key
+            && static_cast<int> (key | Qt::CTRL) != key)
           key = (key ^ Qt::META) | Qt::CTRL;
         else if (static_cast<int> (key | Qt::CTRL) == key)
           key = (key ^ Qt::CTRL) | Qt::META;
@@ -196,8 +196,8 @@
         // Alternate key
         key = cmd_list_mac.at (i)->alternateKey ();
 
-        if (static_cast<int> (key | Qt::META) == key &&
-            static_cast<int> (key | Qt::CTRL) != key)
+        if (static_cast<int> (key | Qt::META) == key
+            && static_cast<int> (key | Qt::CTRL) != key)
           key = (key ^ Qt::META) | Qt::CTRL;
         else if (static_cast<int> (key | Qt::CTRL) == key)
           key = (key ^ Qt::CTRL) | Qt::META;
--- a/libgui/src/tab-bar.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libgui/src/tab-bar.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -112,10 +112,10 @@
       {
         int current_idx = currentIndex ();
         // detect the mouse click
-        if ((me->type () == QEvent::MouseButtonDblClick &&
-             me->button() == Qt::LeftButton) ||
-            (me->type () != QEvent::MouseButtonDblClick &&
-             me->button() == Qt::MidButton))
+        if ((me->type () == QEvent::MouseButtonDblClick
+             && me->button() == Qt::LeftButton)
+            || (me->type () != QEvent::MouseButtonDblClick
+                && me->button() == Qt::MidButton))
           {
             // Middle click or double click -> close the tab
             // Make the clicked tab the current one and close it
@@ -128,8 +128,8 @@
             else if (current_idx - clicked_idx < 0)
               setCurrentIndex (current_idx);
           }
-        else if (me->type () != QEvent::MouseButtonDblClick &&
-                 me->button() == Qt::RightButton)
+        else if (me->type () != QEvent::MouseButtonDblClick
+                 && me->button() == Qt::RightButton)
           {
             // Right click, show context menu
             setCurrentIndex (clicked_idx);
--- a/libinterp/corefcn/gl-render.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libinterp/corefcn/gl-render.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -3623,8 +3623,8 @@
     Matrix pos = xform.scale (props.get_data_position ());
 
     // Handle clipping manually when drawing text background
-    if (! props.is_clipping () ||
-        (clip_code (pos(0), pos(1), pos.numel () > 2 ? pos(2) : 0.0) == 0x40))
+    if (! props.is_clipping ()
+        || (clip_code (pos(0), pos(1), pos.numel () > 2 ? pos(2) : 0.0) == 0x40))
       {
         set_clipping (false);
         draw_text_background (props);
--- a/libinterp/corefcn/graphics.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libinterp/corefcn/graphics.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -1098,8 +1098,8 @@
                                 {
                                   pfx = name.substr (0, 13);
 
-                                  if (pfx.compare ("uicontextmenu") ||
-                                      pfx.compare ("uibuttongroup"))
+                                  if (pfx.compare ("uicontextmenu")
+                                      || pfx.compare ("uibuttongroup"))
                                     offset = 13;
                                 }
                             }
@@ -6019,9 +6019,9 @@
   if (xstate == AXE_HORZ_DIR && ystate == AXE_VERT_DIR)
     {
       Matrix ylimits = get_ylim ().matrix_value ();
-      if (xaxislocation_is ("top") ||
-          (yscale_is ("log") && xaxislocation_is ("origin")
-           && (ylimits(1) < 0.)))
+      if (xaxislocation_is ("top")
+          || (yscale_is ("log") && xaxislocation_is ("origin")
+              && (ylimits(1) < 0.)))
         {
           std::swap (yPlane, yPlaneN);
           x2Dtop = true;
@@ -6029,9 +6029,9 @@
       ypTick = yPlaneN;
       ypTickN = yPlane;
       Matrix xlimits = get_xlim ().matrix_value ();
-      if (yaxislocation_is ("right") ||
-          (xscale_is ("log") && yaxislocation_is ("origin")
-           && (xlimits(1) < 0.)))
+      if (yaxislocation_is ("right")
+          || (xscale_is ("log") && yaxislocation_is ("origin")
+              && (xlimits(1) < 0.)))
         {
           std::swap (xPlane, xPlaneN);
           y2Dright = true;
@@ -7336,8 +7336,8 @@
   bool have_children_limits = false;
 
   // check whether we need to get children limits
-  if (! octave::math::isfinite (limits(0)) ||
-      ! octave::math::isfinite (limits(1)))
+  if (! octave::math::isfinite (limits(0))
+      || ! octave::math::isfinite (limits(1)))
     {
       get_children_limits (min_val, max_val, min_pos, max_neg, kids,
                            update_type);
@@ -10041,8 +10041,8 @@
     {
       graphics_object go = gh_manager::get_object (*it);
 
-      if (go.valid_object () &&
-          go.get ("uicontextmenu") == xproperties.get___myhandle__ ())
+      if (go.valid_object ()
+          && go.get ("uicontextmenu") == xproperties.get___myhandle__ ())
         go.set ("uicontextmenu", Matrix ());
     }
 }
--- a/libinterp/corefcn/load-path.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libinterp/corefcn/load-path.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -2446,12 +2446,12 @@
           // In Windows, start check at second character (for UNC paths).
           it_start++;
 #endif
-          dir.erase (std::unique (it_start, dir.end (),
-                                  [](char l, char r)
-                                  {
-                                    return l == r &&
-                                           octave::sys::file_ops::is_dir_sep (l);
-                                  }),
+          dir.erase (std::unique
+                     (it_start, dir.end (),
+                      [] (char l, char r)
+                      {
+                        return l == r && octave::sys::file_ops::is_dir_sep (l);
+                      }),
                      dir.end ());
 
           auto pos = dir.find_last_of (octave::sys::file_ops::dir_sep_chars ());
--- a/libinterp/corefcn/oct-stream.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libinterp/corefcn/oct-stream.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -3766,9 +3766,9 @@
 
             std::string tmp (comment_len, '\0');
             char *look = is.read (&tmp[0], comment_len-1, pos); // already read first char
-            if (is && comment_style.numel () > 0 &&
-                ! strncmp (comment_style(0).string_value ().substr (1).c_str (),
-                           look, comment_len-1))
+            if (is && comment_style.numel () > 0
+                && ! strncmp (comment_style(0).string_value ().substr (1).c_str (),
+                              look, comment_len-1))
               {
                 found_comment = true;
 
--- a/libinterp/corefcn/variables.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libinterp/corefcn/variables.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -222,8 +222,8 @@
   bool search_builtin = type == "builtin";
   bool search_class = type == "class";
 
-  if (! (search_any || search_var || search_dir || search_file ||
-         search_builtin || search_class))
+  if (! (search_any || search_var || search_dir || search_file
+         || search_builtin || search_class))
     error (R"(exist: unrecognized type argument "%s")", type.c_str ());
 
   octave::symbol_table& symtab = interp.get_symbol_table ();
--- a/libinterp/parse-tree/jit-typeinfo.cc	Fri Oct 19 12:28:29 2018 -0400
+++ b/libinterp/parse-tree/jit-typeinfo.cc	Fri Oct 19 12:41:19 2018 -0400
@@ -2017,8 +2017,8 @@
                                       bool skip_paren)
   {
     // FIXME: Currently our types do *not* form a lattice
-    assert ((name == "any") || (name == "any_ptr") ||
-            (name == "scalar_ptr") || (parent != nullptr));
+    assert ((name == "any") || (name == "any_ptr")
+            || (name == "scalar_ptr") || (parent != nullptr));
 
     jit_type *ret = new jit_type (name, parent, llvm_type, skip_paren,
                                   m_next_id++);