# HG changeset patch # User Rik # Date 1454362393 28800 # Node ID 40051830f89b57806e20d164e8022661f4b9a1f4 # Parent 26f85aa072de4c00a3c48e090a099a3b854cb370 maint: Replace more instances of goto in liboctave with other constructs. *dMatrix.cc: (operator >>): Replace "goto done;" with "return is;". *dNDArray.cc: (operator >>): Replace "goto done;" with "return is;". *fCMatrix.cc: (operator >>): Replace "goto done;" with "return is;". *fCNDArray.cc: (operator >>): Replace "goto done;" with "return is;". *fMatrix.cc: (operator >>): Replace "goto done;" with "return is;". *fNDArray.cc: (operator >>): Replace "goto done;" with "return is;". *intNDArray.cc: (operator >>): Replace "goto done;" with "return is;". diff -r 26f85aa072de -r 40051830f89b liboctave/array/dMatrix.cc --- a/liboctave/array/dMatrix.cc Mon Feb 01 13:29:21 2016 -0800 +++ b/liboctave/array/dMatrix.cc Mon Feb 01 13:33:13 2016 -0800 @@ -2920,12 +2920,10 @@ if (is) a.elem (i, j) = tmp; else - goto done; + return is; } } -done: - return is; } diff -r 26f85aa072de -r 40051830f89b liboctave/array/dNDArray.cc --- a/liboctave/array/dNDArray.cc Mon Feb 01 13:29:21 2016 -0800 +++ b/liboctave/array/dNDArray.cc Mon Feb 01 13:33:13 2016 -0800 @@ -892,12 +892,10 @@ if (is) a.elem (i) = tmp; else - goto done; + return is; } } -done: - return is; } diff -r 26f85aa072de -r 40051830f89b liboctave/array/fCMatrix.cc --- a/liboctave/array/fCMatrix.cc Mon Feb 01 13:29:21 2016 -0800 +++ b/liboctave/array/fCMatrix.cc Mon Feb 01 13:33:13 2016 -0800 @@ -3465,12 +3465,10 @@ if (is) a.elem (i, j) = tmp; else - goto done; + return is; } } -done: - return is; } diff -r 26f85aa072de -r 40051830f89b liboctave/array/fCNDArray.cc --- a/liboctave/array/fCNDArray.cc Mon Feb 01 13:29:21 2016 -0800 +++ b/liboctave/array/fCNDArray.cc Mon Feb 01 13:33:13 2016 -0800 @@ -878,12 +878,10 @@ if (is) a.elem (i) = tmp; else - goto done; + return is; } } -done: - return is; } diff -r 26f85aa072de -r 40051830f89b liboctave/array/fMatrix.cc --- a/liboctave/array/fMatrix.cc Mon Feb 01 13:29:21 2016 -0800 +++ b/liboctave/array/fMatrix.cc Mon Feb 01 13:33:13 2016 -0800 @@ -2937,12 +2937,10 @@ if (is) a.elem (i, j) = tmp; else - goto done; + return is; } } -done: - return is; } diff -r 26f85aa072de -r 40051830f89b liboctave/array/fNDArray.cc --- a/liboctave/array/fNDArray.cc Mon Feb 01 13:29:21 2016 -0800 +++ b/liboctave/array/fNDArray.cc Mon Feb 01 13:33:13 2016 -0800 @@ -863,12 +863,10 @@ if (is) a.elem (i) = tmp; else - goto done; + return is; } } -done: - return is; } diff -r 26f85aa072de -r 40051830f89b liboctave/array/intNDArray.cc --- a/liboctave/array/intNDArray.cc Mon Feb 01 13:29:21 2016 -0800 +++ b/liboctave/array/intNDArray.cc Mon Feb 01 13:33:13 2016 -0800 @@ -168,12 +168,10 @@ if (is) a.elem (i) = tmp; else - goto done; + return is; } } -done: - return is; }