util/ConcatString: use std::copy_n() instead of memcpy()

This commit is contained in:
Max Kellermann 2017-05-16 11:56:19 +02:00
parent fea211a109
commit a4b1633e11
1 changed files with 3 additions and 1 deletions

View File

@ -30,6 +30,8 @@
#ifndef CONCAT_STRING_HXX
#define CONCAT_STRING_HXX
#include <algorithm>
#include <string.h>
template<typename... Args>
@ -58,7 +60,7 @@ template<>
void
StringCat(char *p, const size_t *lengths, const char *a)
{
memcpy(p, a, *lengths);
std::copy_n(a, *lengths, p);
}
#endif