comparison libinterp/corefcn/file-io.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 332a6ccac881
children e88a07dec498
comparison
equal deleted inserted replaced
31601:132547cc1ab2 31603:23520a50d74d
2901 checked. If none of those are set, the system default returned by 2901 checked. If none of those are set, the system default returned by
2902 @code{P_tmpdir} is used. 2902 @code{P_tmpdir} is used.
2903 @seealso{P_tmpdir, tempname, mkstemp, tmpfile} 2903 @seealso{P_tmpdir, tempname, mkstemp, tmpfile}
2904 @end deftypefn */) 2904 @end deftypefn */)
2905 { 2905 {
2906 int nargin = args.length (); 2906 if (args.length () > 0)
2907
2908 if (nargin > 0)
2909 print_usage (); 2907 print_usage ();
2910 2908
2911 std::string tmpdir = sys::env::get_temp_directory (); 2909 std::string tmpdir = sys::env::get_temp_directory ();
2912 2910
2913 if (! sys::file_ops::is_dir_sep (tmpdir.back ())) 2911 if (! sys::file_ops::is_dir_sep (tmpdir.back ()))