comparison libinterp/corefcn/__isprimelarge__.cc @ 31603:23520a50d74d stable

maint: Review C++ files for style and coding conventions. * __ftp__.cc (F__ftp_cwd__, F__ftp_mget__), __isprimelarge__.cc (F__isprimelarge__, F__pollardrho__), debug.cc (Fdbclear), file-io.cc (Ftempdir): Don't bother to define nargin if it is used only once in function. Instead, just call args.length () for the one instance. * data.cc (fill_matrix): Eliminate useless break statement after error() which throws exception. * qr.cc (Fqr), __ode15__.cc (IDA::integrate, IDA::event, IDA::interpolate, IDA::outputfun): Use true or false rather than 0 or 1 when assigning to bool variables. maint: Review C++ files for style and coding conventions.
author Rik <rik@octave.org>
date Wed, 30 Nov 2022 20:27:16 -0800
parents 88d2395500e7
children e88a07dec498
comparison
equal deleted inserted replaced
31601:132547cc1ab2 31603:23520a50d74d
153 You should call isprime(N) instead of directly calling this function. 153 You should call isprime(N) instead of directly calling this function.
154 154
155 @seealso{isprime, factor} 155 @seealso{isprime, factor}
156 @end deftypefn */) 156 @end deftypefn */)
157 { 157 {
158 int nargin = args.length (); 158 if (args.length () != 1)
159 if (nargin != 1)
160 print_usage (); 159 print_usage ();
161 160
162 // This function is intended for internal use by isprime.m, 161 // This function is intended for internal use by isprime.m,
163 // so the following error handling should not be necessary. But it is 162 // so the following error handling should not be necessary. But it is
164 // probably good practice for any curious users calling it directly. 163 // probably good practice for any curious users calling it directly.
258 of directly calling this function. 257 of directly calling this function.
259 258
260 @seealso{isprime, factor} 259 @seealso{isprime, factor}
261 @end deftypefn */) 260 @end deftypefn */)
262 { 261 {
263 int nargin = args.length (); 262 if (args.length () != 1)
264 if (nargin != 1)
265 print_usage (); 263 print_usage ();
266 264
267 octave_uint64 inp = args(0).xuint64_scalar_value 265 octave_uint64 inp = args(0).xuint64_scalar_value
268 ("__pollardrho__: unable to convert input. Call factor() instead."); 266 ("__pollardrho__: unable to convert input. Call factor() instead.");
269 267