gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/rtmp r9593: Use to_string instead of casti


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9593: Use to_string instead of casting the name.
Date: Tue, 26 Aug 2008 16:47:26 -0600
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9593
committer: address@hidden
branch nick: rtmp
timestamp: Tue 2008-08-26 16:47:26 -0600
message:
  Use to_string instead of casting the name.
modified:
  libamf/element.cpp
=== modified file 'libamf/element.cpp'
--- a/libamf/element.cpp        2008-08-13 19:21:46 +0000
+++ b/libamf/element.cpp        2008-08-26 22:47:26 +0000
@@ -74,15 +74,15 @@
 Element::~Element()
 {
 //    GNASH_REPORT_FUNCTION;
+//     if (_name) {
+//     cerr << "Deleting " << _name << endl;
+//     }
+    
     for (size_t i=0; i< _properties.size(); i++) {
        delete _properties[i];
     }
-    if (_buffer) {
-       delete _buffer;
-    }
-    if (_name) {
-       delete[] _name;
-    }
+    delete _buffer;
+    delete[] _name;
 }
 
 
@@ -944,15 +944,9 @@
       case Element::STRING_AMF0:
          cerr << "(" << getLength() << " bytes): ";
          if (getLength() > 0) {
-#ifdef HAVE_STRNDUP
-               char *term = strndup(to_string(), getLength());
-#else
-               char *term = const_cast<char *>(to_string());
-#endif       
-             cerr << "\t\"" << term << "\"" << endl;
-         } else {
-             cerr << endl;
+             cerr << "\t\"" << to_string() << "\"";
          }
+         cerr << endl;
          break;
       case Element::OBJECT_AMF0:
          break;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]