Mercurial > hg > octave-jordi
comparison liboctave/system/file-ops.cc @ 21016:93748bcaec17
maint: Replace emtpy 'std::string ()' calls with "".
* Backend.cc, comment-list.h, debug.cc, defaults.in.h, dynamic-ld.h, error.cc,
graphics.cc, graphics.in.h, help.cc, hook-fcn.h, load-path.cc, load-path.h,
ls-ascii-helper.cc, ls-mat-ascii.cc, ls-mat5.cc, ls-mat5.h, ls-oct-text.cc,
oct-iostrm.h, oct-lvalue.h, oct-stream.cc, oct-stream.h, oct-strstrm.h,
regexp.cc, schur.cc, sqrtm.cc, strfns.cc, symtab.cc, symtab.h, sysdep.cc,
toplev.cc, urlwrite.cc, variables.cc, variables.h, ov-builtin.h, ov-cell.cc,
ov-class.cc, ov-classdef.cc, ov-classdef.h, ov-dld-fcn.h, ov-fcn-handle.cc,
ov-fcn-inline.cc, ov-fcn-inline.h, ov-fcn.h, ov-lazy-idx.cc, ov-mex-fcn.h,
ov-struct.cc, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov.h,
ovl.h, octave.cc, lex.h, parse.h, pt-classdef.h, pt-exp.cc, pt-pr-code.h,
token.h, version.cc, version.in.h, oct-rand.h, dir-ops.h, file-ops.cc,
file-ops.h, file-stat.h, oct-env.cc, oct-group.cc, oct-passwd.cc,
oct-syscalls.cc, cmd-edit.cc, cmd-edit.h, cmd-hist.cc, cmd-hist.h, kpse.cc,
lo-array-gripes.h, pathsearch.cc, pathsearch.h, str-vec.h, url-transfer.h:
Replace emtpy 'std::string ()' calls with "".
author | Rik <rik@octave.org> |
---|---|
date | Wed, 30 Dec 2015 12:33:33 -0800 |
parents | 3aea4200da40 |
children | a5b99b09f8fd |
comparison
equal
deleted
inserted
replaced
21015:c22219b8a6a6 | 21016:93748bcaec17 |
---|---|
400 } | 400 } |
401 | 401 |
402 int | 402 int |
403 octave_mkdir (const std::string& name, mode_t mode, std::string& msg) | 403 octave_mkdir (const std::string& name, mode_t mode, std::string& msg) |
404 { | 404 { |
405 msg = std::string (); | 405 msg = ""; |
406 | 406 |
407 int status = -1; | 407 int status = -1; |
408 | 408 |
409 status = gnulib::mkdir (name.c_str (), mode); | 409 status = gnulib::mkdir (name.c_str (), mode); |
410 | 410 |
422 } | 422 } |
423 | 423 |
424 int | 424 int |
425 octave_mkfifo (const std::string& name, mode_t mode, std::string& msg) | 425 octave_mkfifo (const std::string& name, mode_t mode, std::string& msg) |
426 { | 426 { |
427 msg = std::string (); | 427 msg = ""; |
428 | 428 |
429 int status = -1; | 429 int status = -1; |
430 | 430 |
431 // With gnulib we will always have mkfifo, but some systems like MinGW | 431 // With gnulib we will always have mkfifo, but some systems like MinGW |
432 // don't have working mkfifo functions. On those systems, mkfifo will | 432 // don't have working mkfifo functions. On those systems, mkfifo will |
449 | 449 |
450 int | 450 int |
451 octave_link (const std::string& old_name, | 451 octave_link (const std::string& old_name, |
452 const std::string& new_name, std::string& msg) | 452 const std::string& new_name, std::string& msg) |
453 { | 453 { |
454 msg = std::string (); | 454 msg = ""; |
455 | 455 |
456 int status = -1; | 456 int status = -1; |
457 | 457 |
458 status = gnulib::link (old_name.c_str (), new_name.c_str ()); | 458 status = gnulib::link (old_name.c_str (), new_name.c_str ()); |
459 | 459 |
472 | 472 |
473 int | 473 int |
474 octave_symlink (const std::string& old_name, | 474 octave_symlink (const std::string& old_name, |
475 const std::string& new_name, std::string& msg) | 475 const std::string& new_name, std::string& msg) |
476 { | 476 { |
477 msg = std::string (); | 477 msg = ""; |
478 | 478 |
479 int status = -1; | 479 int status = -1; |
480 | 480 |
481 status = gnulib::symlink (old_name.c_str (), new_name.c_str ()); | 481 status = gnulib::symlink (old_name.c_str (), new_name.c_str ()); |
482 | 482 |
497 octave_readlink (const std::string& path, std::string& result, | 497 octave_readlink (const std::string& path, std::string& result, |
498 std::string& msg) | 498 std::string& msg) |
499 { | 499 { |
500 int status = -1; | 500 int status = -1; |
501 | 501 |
502 msg = std::string (); | 502 msg = ""; |
503 | 503 |
504 char buf[MAXPATHLEN+1]; | 504 char buf[MAXPATHLEN+1]; |
505 | 505 |
506 status = gnulib::readlink (path.c_str (), buf, MAXPATHLEN); | 506 status = gnulib::readlink (path.c_str (), buf, MAXPATHLEN); |
507 | 507 |
528 octave_rename (const std::string& from, const std::string& to, | 528 octave_rename (const std::string& from, const std::string& to, |
529 std::string& msg) | 529 std::string& msg) |
530 { | 530 { |
531 int status = -1; | 531 int status = -1; |
532 | 532 |
533 msg = std::string (); | 533 msg = ""; |
534 | 534 |
535 status = gnulib::rename (from.c_str (), to.c_str ()); | 535 status = gnulib::rename (from.c_str (), to.c_str ()); |
536 | 536 |
537 if (status < 0) | 537 if (status < 0) |
538 msg = gnulib::strerror (errno); | 538 msg = gnulib::strerror (errno); |
548 } | 548 } |
549 | 549 |
550 int | 550 int |
551 octave_rmdir (const std::string& name, std::string& msg) | 551 octave_rmdir (const std::string& name, std::string& msg) |
552 { | 552 { |
553 msg = std::string (); | 553 msg = ""; |
554 | 554 |
555 int status = -1; | 555 int status = -1; |
556 | 556 |
557 status = gnulib::rmdir (name.c_str ()); | 557 status = gnulib::rmdir (name.c_str ()); |
558 | 558 |
572 } | 572 } |
573 | 573 |
574 int | 574 int |
575 octave_recursive_rmdir (const std::string& name, std::string& msg) | 575 octave_recursive_rmdir (const std::string& name, std::string& msg) |
576 { | 576 { |
577 msg = std::string (); | 577 msg = ""; |
578 | 578 |
579 int status = 0; | 579 int status = 0; |
580 | 580 |
581 dir_entry dir (name); | 581 dir_entry dir (name); |
582 | 582 |
657 } | 657 } |
658 | 658 |
659 int | 659 int |
660 octave_unlink (const std::string& name, std::string& msg) | 660 octave_unlink (const std::string& name, std::string& msg) |
661 { | 661 { |
662 msg = std::string (); | 662 msg = ""; |
663 | 663 |
664 int status = -1; | 664 int status = -1; |
665 | 665 |
666 status = gnulib::unlink (name.c_str ()); | 666 status = gnulib::unlink (name.c_str ()); |
667 | 667 |
680 | 680 |
681 std::string | 681 std::string |
682 octave_tempnam (const std::string& dir, const std::string& pfx, | 682 octave_tempnam (const std::string& dir, const std::string& pfx, |
683 std::string& msg) | 683 std::string& msg) |
684 { | 684 { |
685 msg = std::string (); | 685 msg = ""; |
686 | 686 |
687 std::string retval; | 687 std::string retval; |
688 | 688 |
689 // get dir path to use for template | 689 // get dir path to use for template |
690 std::string templatename; | 690 std::string templatename; |
728 } | 728 } |
729 | 729 |
730 std::string | 730 std::string |
731 octave_canonicalize_file_name (const std::string& name, std::string& msg) | 731 octave_canonicalize_file_name (const std::string& name, std::string& msg) |
732 { | 732 { |
733 msg = std::string (); | 733 msg = ""; |
734 | 734 |
735 std::string retval; | 735 std::string retval; |
736 | 736 |
737 char *tmp = gnulib::canonicalize_file_name (name.c_str ()); | 737 char *tmp = gnulib::canonicalize_file_name (name.c_str ()); |
738 | 738 |