changeset 20714:7b6d8c19dab0

Cuddle increment (++) and decrement (--) operators with variable in question. * help.cc, oct-stream.cc, Array-util.cc, oct-norm.cc, fsolve.m, fzero.m, annotation.m, rectangle.m, __gnuplot_draw_axes__.m, struct2hdl.m: Cuddle increment (++) and decrement (--) operators with variable in question.
author Rik <rik@octave.org>
date Wed, 18 Nov 2015 16:12:41 -0800
parents 2469d78a1d8b
children 5b7643257978
files libinterp/corefcn/help.cc libinterp/corefcn/oct-stream.cc liboctave/array/Array-util.cc liboctave/numeric/oct-norm.cc scripts/optimization/fsolve.m scripts/optimization/fzero.m scripts/plot/appearance/annotation.m scripts/plot/draw/rectangle.m scripts/plot/util/private/__gnuplot_draw_axes__.m scripts/plot/util/struct2hdl.m
diffstat 10 files changed, 28 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/help.cc	Wed Nov 18 15:48:27 2015 -0800
+++ b/libinterp/corefcn/help.cc	Wed Nov 18 16:12:41 2015 -0800
@@ -783,7 +783,7 @@
 {
   string_vector retval (lst.size ());
   int j = 0;
-  for (map_iter iter = lst.begin (); iter != lst.end (); iter ++)
+  for (map_iter iter = lst.begin (); iter != lst.end (); iter++)
     retval[j++] = iter->first;
   return retval;
 }
@@ -1341,7 +1341,7 @@
       int num_seps = 0;
       for (int i = dir_len; i < filename_len; i++)
         if (file_ops::is_dir_sep (filename[i]))
-          num_seps ++;
+          num_seps++;
 
       return (num_seps <= max_allowed_seps);
     }
--- a/libinterp/corefcn/oct-stream.cc	Wed Nov 18 15:48:27 2015 -0800
+++ b/libinterp/corefcn/oct-stream.cc	Wed Nov 18 16:12:41 2015 -0800
@@ -3499,7 +3499,7 @@
                       nc = count / nr;
 
                       if (count % nr != 0)
-                        nc ++;
+                        nc++;
                     }
                   else
                     nr = count;
--- a/liboctave/array/Array-util.cc	Wed Nov 18 15:48:27 2015 -0800
+++ b/liboctave/array/Array-util.cc	Wed Nov 18 16:12:41 2015 -0800
@@ -124,7 +124,7 @@
     }
   else
     {
-      for (int i = 0; i < n; i ++)
+      for (int i = 0; i < n; i++)
         {
           if (dim(i) != 1)
             {
@@ -147,7 +147,7 @@
     m = 2;
   else
     {
-      for (int i = 0; i < n; i ++)
+      for (int i = 0; i < n; i++)
         if (dim(i) > 1)
           m++;
         else if (dim(i) < 1)
--- a/liboctave/numeric/oct-norm.cc	Wed Nov 18 15:48:27 2015 -0800
+++ b/liboctave/numeric/oct-norm.cc	Wed Nov 18 16:12:41 2015 -0800
@@ -459,7 +459,7 @@
 
       z = z.hermitian ();
       x = dual_p (z, q, p);
-      iter ++;
+      iter++;
     }
 
   return gamma;
--- a/scripts/optimization/fsolve.m	Wed Nov 18 15:48:27 2015 -0800
+++ b/scripts/optimization/fsolve.m	Wed Nov 18 16:12:41 2015 -0800
@@ -236,7 +236,7 @@
         updating = false;
       endif
       fvec = fvec(:);
-      nfev ++;
+      nfev++;
     else
       fjac = __fdjac__ (fcn, reshape (x, xsiz), fvec, typicalx, cdif);
       nfev += (1 + cdif) * length (x);
@@ -311,7 +311,7 @@
 
       fvec1 = fcn (reshape (x + s, xsiz)) (:);
       fn1 = norm (fvec1);
-      nfev ++;
+      nfev++;
 
       if (fn1 < fn)
         ## Scaled actual reduction.
@@ -333,7 +333,7 @@
       ## Update delta.
       if (ratio < min (max (0.1, 0.8*lastratio), 0.9))
         nsuc = 0;
-        nfail ++;
+        nfail++;
         delta *= decfac;
         decfac ^= 1.4142;
         if (delta <= 1e1*macheps*xn)
@@ -345,7 +345,7 @@
         lastratio = ratio;
         decfac = 0.5;
         nfail = 0;
-        nsuc ++;
+        nsuc++;
         if (abs (1-ratio) <= 0.1)
           delta = 1.4142*sn;
         elseif (ratio >= 0.5 || nsuc > 1)
@@ -359,10 +359,10 @@
         xn = norm (dg .* x);
         fvec = fvec1;
         fn = fn1;
-        nsuciter ++;
+        nsuciter++;
       endif
 
-      niter ++;
+      niter++;
 
       ## FIXME: should outputfcn be only called after a successful iteration?
       if (! isempty (outfcn))
--- a/scripts/optimization/fzero.m	Wed Nov 18 15:48:27 2015 -0800
+++ b/scripts/optimization/fzero.m	Wed Nov 18 16:12:41 2015 -0800
@@ -276,7 +276,7 @@
     ## Calculate new point.
     x = c;
     fval = fc = fun (c);
-    niter ++; nfev ++;
+    niter++; nfev++;
 
     ## Modification 2: skip inverse cubic interpolation if
     ## nonmonotonicity is detected.
--- a/scripts/plot/appearance/annotation.m	Wed Nov 18 15:48:27 2015 -0800
+++ b/scripts/plot/appearance/annotation.m	Wed Nov 18 16:12:41 2015 -0800
@@ -161,7 +161,7 @@
   if (isfigure (varargin{1}))
     hf = varargin{1};
     varargin = varargin(2:end);
-    nargin --;
+    nargin--;
   endif
 
   ## Annotation type
@@ -170,7 +170,7 @@
   if (ischar (varargin{1}))
     objtype = varargin{1};
     varargin(1) = [];
-    nargin --;
+    nargin--;
   else
     print_usage ();
   endif
--- a/scripts/plot/draw/rectangle.m	Wed Nov 18 15:48:27 2015 -0800
+++ b/scripts/plot/draw/rectangle.m	Wed Nov 18 16:12:41 2015 -0800
@@ -119,10 +119,10 @@
         parent = varargin{iarg+1};
         varargin(iarg:iarg+1) = [];
       else
-        iarg ++;
+        iarg++;
       endif
     else
-      iarg ++;
+      iarg++;
     endif
   endwhile
 
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m	Wed Nov 18 15:48:27 2015 -0800
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m	Wed Nov 18 16:12:41 2015 -0800
@@ -964,7 +964,7 @@
                  tmpwith{sidx} = sprintf ("with %s %s %s %s",
                                           style, lw, lt,
                                           colorspec);
-                 sidx ++;
+                 sidx++;
                endif
                if (isnumeric (obj.markerfacecolor) && ! mono)
                  colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"",
@@ -1019,7 +1019,7 @@
                                             style, lw, lt,
                                             colorspec);
                  endif
-                 sidx ++;
+                 sidx++;
                endif
 
                if (! isempty (pt))
@@ -1879,8 +1879,8 @@
         endif
         fputs (plot_stream, ";\n");
         if (! isempty (style{sidx}))
-          sidx ++;
-          idx ++;
+          sidx++;
+          idx++;
         else
           fputs (plot_stream, ";\n");
         endif
@@ -1922,8 +1922,8 @@
         endif
         fputs (plot_stream, ";\n");
         if (! isempty (style{sidx}))
-          sidx ++;
-          idx ++;
+          sidx++;
+          idx++;
         else
           fputs (plot_stream, ";\n");
         endif
@@ -2477,7 +2477,7 @@
                    str(s(i)+p:s(i)+p+l1), str(s(i+1)+p+2:end)];
           endif
           i += 2;
-          p ++;
+          p++;
         else
           i++;
         endif
@@ -2485,14 +2485,14 @@
         if (s(i+1) == s(i) + 2)
           ## Shortest already first!
           str = [str(1:s(i)+p-1) "@" str(s(i)+p:end)];
-          p ++;
+          p++;
           i += 2;
         else
-          i ++;
+          i++;
         endif
       endif
     else
-      i ++;
+      i++;
     endif
   endwhile
 
--- a/scripts/plot/util/struct2hdl.m	Wed Nov 18 15:48:27 2015 -0800
+++ b/scripts/plot/util/struct2hdl.m	Wed Nov 18 16:12:41 2015 -0800
@@ -607,7 +607,7 @@
               catch
                 sprintf ("struct2hdl: couldn't set hggroup children #%d props.", ii);
               end_try_catch
-              ii ++;
+              ii++;
             endwhile
 
           else