changeset 27167:ec6d31ef6bb6

* file-io.cc: Declare local constant "who" names "static const".
author John W. Eaton <jwe@octave.org>
date Mon, 10 Jun 2019 12:59:54 -0500
parents 92ba3434f0b0
children 031a3c85ddb7
files libinterp/corefcn/file-io.cc
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc	Mon Jun 10 12:44:39 2019 -0500
+++ b/libinterp/corefcn/file-io.cc	Mon Jun 10 12:59:54 2019 -0500
@@ -297,7 +297,7 @@
 @seealso{fgets, fscanf, fread, fopen}
 @end deftypefn */)
 {
-  static std::string who = "fgetl";
+  static const std::string who = "fgetl";
 
   int nargin = args.length ();
 
@@ -339,7 +339,7 @@
 @seealso{fputs, fgetl, fscanf, fread, fopen}
 @end deftypefn */)
 {
-  static std::string who = "fgets";
+  static const std::string who = "fgets";
 
   int nargin = args.length ();
 
@@ -381,7 +381,7 @@
 @seealso{fgetl, fgets, fscanf, fopen}
 @end deftypefn */)
 {
-  static std::string who = "fskipl";
+  static const std::string who = "fskipl";
 
   int nargin = args.length ();
 
@@ -852,7 +852,7 @@
 @seealso{fputs, fdisp, fwrite, fscanf, printf, sprintf, fopen}
 @end deftypefn */)
 {
-  static std::string who = "fprintf";
+  static const std::string who = "fprintf";
 
   return printf_internal (interp, who, args, nargout);
 }
@@ -875,7 +875,7 @@
 @seealso{fprintf, sprintf, scanf}
 @end deftypefn */)
 {
-  static std::string who = "printf";
+  static const std::string who = "printf";
 
   octave_value_list tmp_args = args;
 
@@ -911,7 +911,7 @@
 @seealso{fdisp, fprintf, fwrite, fopen}
 @end deftypefn */)
 {
-  static std::string who = "fputs";
+  static const std::string who = "fputs";
 
   return puts_internal (interp, who, args);
 }
@@ -929,7 +929,7 @@
 @seealso{fputs, disp}
 @end deftypefn */)
 {
-  static std::string who = "puts";
+  static const std::string who = "puts";
 
   octave_value_list tmp_args = args;
 
@@ -952,7 +952,7 @@
 @seealso{printf, fprintf, sscanf}
 @end deftypefn */)
 {
-  static std::string who = "sprintf";
+  static const std::string who = "sprintf";
 
   int nargin = args.length ();
 
@@ -1088,7 +1088,7 @@
 @seealso{fgets, fgetl, fread, scanf, sscanf, fopen}
 @end deftypefn */)
 {
-  static std::string who = "fscanf";
+  static const std::string who = "fscanf";
 
   return scanf_internal (interp, who, args);
 }
@@ -1121,7 +1121,7 @@
 @seealso{fscanf, scanf, sprintf}
 @end deftypefn */)
 {
-  static std::string who = "sscanf";
+  static const std::string who = "sscanf";
 
   int nargin = args.length ();
 
@@ -1185,7 +1185,7 @@
 @seealso{fscanf, sscanf, printf}
 @end deftypefn */)
 {
-  static std::string who = "scanf";
+  static const std::string who = "scanf";
 
   octave_value_list tmp_args = args;
 
@@ -1530,7 +1530,7 @@
 @seealso{dlmread, fscanf, load, strread, textread}
 @end deftypefn */)
 {
-  static std::string who = "textscan";
+  static const std::string who = "textscan";
 
   return textscan_internal (interp, who, args);
 }