Merge pull request 'Removed memcpy and <cstring>' (#3) from feature/no_cstring into master
Reviewed-on: http://git.mercurial-manifold.eu/an.tsouchlos/const_fmt/pulls/3
This commit is contained in:
commit
fc080a8ba0
@ -2,8 +2,6 @@
|
|||||||
#define LOGGER_FORMAT_H
|
#define LOGGER_FORMAT_H
|
||||||
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#include "format_impl.h"
|
#include "format_impl.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
|
|||||||
@ -96,10 +96,6 @@ constexpr inline const char* digits2_base(size_t value) {
|
|||||||
|
|
||||||
|
|
||||||
constexpr inline void copy2(char* dst, const char* src) {
|
constexpr inline void copy2(char* dst, const char* src) {
|
||||||
if (!std::is_constant_evaluated()) {
|
|
||||||
std::memcpy(dst, src, 2);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
*dst++ = static_cast<char>(*src++);
|
*dst++ = static_cast<char>(*src++);
|
||||||
*dst = static_cast<char>(*src);
|
*dst = static_cast<char>(*src);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user