summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp15
-rw-r--r--src/pugixpath.cpp2
2 files changed, 2 insertions, 15 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 6dcdbf6..5b668b0 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -99,7 +99,6 @@ namespace pugi
namespace impl
{
size_t strlen(const char_t* s);
- void strcpy(char_t* dst, const char_t* src);
bool strequalrange(const char_t* lhs, const char_t* rhs, size_t count);
void widen_ascii(wchar_t* dest, const char* source);
}
@@ -120,16 +119,6 @@ namespace pugi
#endif
}
- // Copy one string into another
- void strcpy(char_t* dst, const char_t* src)
- {
- #ifdef PUGIXML_WCHAR_MODE
- wcscpy(dst, src);
- #else
- ::strcpy(dst, src);
- #endif
- }
-
// Compare two strings
bool PUGIXML_FUNCTION strequal(const char_t* src, const char_t* dst)
{
@@ -1336,7 +1325,7 @@ namespace
if (dest && impl::strlen(dest) >= source_length)
{
- impl::strcpy(dest, source);
+ memcpy(dest, source, (source_length + 1) * sizeof(char_t));
return true;
}
@@ -1347,7 +1336,7 @@ namespace
char_t* buf = alloc->allocate_string(source_length + 1);
if (!buf) return false;
- impl::strcpy(buf, source);
+ memcpy(buf, source, (source_length + 1) * sizeof(char_t));
if (header & header_mask) alloc->deallocate_string(dest);
diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp
index 77d1e71..8e35478 100644
--- a/src/pugixpath.cpp
+++ b/src/pugixpath.cpp
@@ -52,8 +52,6 @@ namespace pugi
{
namespace impl
{
- size_t strlen(const char_t* s);
- void strcpy(char_t* dst, const char_t* src);
bool strequalrange(const char_t* lhs, const char_t* rhs, size_t count);
void widen_ascii(wchar_t* dest, const char* source);
}