]> git.donarmstrong.com Git - lilypond.git/commitdiff
(string_copy): use copy ()
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 24 Aug 2006 12:20:35 +0000 (12:20 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 24 Aug 2006 12:20:35 +0000 (12:20 +0000)
ChangeLog
flower/std-string.cc

index f51b12190a3ee542f3d8f91cfca477aa3487a1e2..7d555541f2098a32f654f1c49a9dbce49e66fb21 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2006-08-24  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * flower/std-string.cc (string_copy): use copy ()
+
        * lily/source-file.cc (Source_file): use copy(). Remove contents_str0()
 
 2006-08-24  Graham Percival  <gpermus@gmail.com>
index 304ddf33cf773076d1f43f3a70b1d30822a5b7ed..4069278cb20d35fc2cd5b15cc0e5b0ec25c86df8 100644 (file)
@@ -89,8 +89,9 @@ string_copy (string s)
 {
   ssize len = s.length ();
   char *dest = new char[len + 1];
-  //s.copy (dest, len + 1);
-  memcpy (dest, s.c_str (), len + 1);
+  copy (s.begin (), s.end (), dest);
+  dest[len] = 0;
+  
   return dest;
 }