summaryrefslogtreecommitdiffstats
path: root/src/Structure.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Structure.cpp')
-rw-r--r--src/Structure.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Structure.cpp b/src/Structure.cpp
index 70150c2..670cce6 100644
--- a/src/Structure.cpp
+++ b/src/Structure.cpp
@@ -18,7 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <stdlib.h>
+#include <cstdlib>
+#include "plist.h"
#include <plist/Structure.h>
namespace PList
@@ -56,7 +57,7 @@ std::string Structure::ToXml() const
uint32_t length = 0;
plist_to_xml(_node, &xml, &length);
std::string ret(xml, xml+length);
- free(xml);
+ delete xml;
return ret;
}
@@ -66,7 +67,7 @@ std::vector<char> Structure::ToBin() const
uint32_t length = 0;
plist_to_bin(_node, &bin, &length);
std::vector<char> ret(bin, bin+length);
- free(bin);
+ delete bin;
return ret;
}
@@ -119,5 +120,5 @@ Structure* Structure::FromBin(const std::vector<char>& bin)
}
-};
+} // namespace PList