merged string function cleanup from RC_0_16

This commit is contained in:
Arvid Norberg
2012-08-26 15:26:17 +00:00
parent 2665d2a4e1
commit fdc25967c2
15 changed files with 206 additions and 118 deletions

View File

@@ -33,6 +33,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/pch.hpp"
#include "libtorrent/file_storage.hpp"
#include "libtorrent/string_util.hpp" // for allocate_string_copy
#include "libtorrent/file.hpp"
#include "libtorrent/utf8.hpp"
#include <boost/bind.hpp>
@@ -147,7 +148,7 @@ namespace libtorrent
}
else
{
name = borrow_chars ? n : strdup(n);
name = borrow_chars ? n : allocate_string_copy(n);
}
name_len = borrow_chars;
}