diff --git a/PlatformSupport/ClangCommon.hpp b/PlatformSupport/ClangCommon.hpp index 7b37eab..14e3d11 100644 --- a/PlatformSupport/ClangCommon.hpp +++ b/PlatformSupport/ClangCommon.hpp @@ -1,15 +1,4 @@ #pragma once #include "ClangBsearch.hpp" - -static int memcpy_s(void * dest, size_t destsz, - const void * src, size_t count) -{ - size_t minVal = std::min(destsz, count); - if (count > destsz) - { - return 1; - } - std::memcpy(dest, src, minVal); - return 0; -} +#include "ClangMemCpy_s.hpp" \ No newline at end of file diff --git a/PlatformSupport/ClangMemCpy_s.hpp b/PlatformSupport/ClangMemCpy_s.hpp new file mode 100644 index 0000000..943319c --- /dev/null +++ b/PlatformSupport/ClangMemCpy_s.hpp @@ -0,0 +1,13 @@ +#pragma once + +static int memcpy_s(void * dest, size_t destsz, + const void * src, size_t count) +{ + size_t minVal = std::min(destsz, count); + if (count > destsz) + { + return 1; + } + std::memcpy(dest, src, minVal); + return 0; +} \ No newline at end of file