diff --git a/toolkit/taglib.h b/toolkit/taglib.h index 56e85c9c..1176b4a2 100644 --- a/toolkit/taglib.h +++ b/toolkit/taglib.h @@ -71,18 +71,6 @@ namespace TagLib { uint refCount; }; - /*! - * A simple strdup implementation since the standard one creates some wierdness - * with delete. - */ - static inline char *strdup(const char *s) - { - const int l = ::strlen(s); - char *buffer = new char[l]; - ::memcpy(buffer, s, l); - return buffer; - } - #endif // DO_NOT_DOCUMENT } diff --git a/toolkit/tfile.cpp b/toolkit/tfile.cpp index 1768469d..69db7895 100644 --- a/toolkit/tfile.cpp +++ b/toolkit/tfile.cpp @@ -41,7 +41,7 @@ public: ~FilePrivate() { - delete [] name; + free((void *)name); } FILE *file; @@ -57,7 +57,7 @@ public: File::File(const char *file) { - d = new FilePrivate(strdup(file)); + d = new FilePrivate(::strdup(file)); d->readOnly = !isWritable(file); d->file = fopen(file, d->readOnly ? "r" : "r+");