Commit 68290452 authored by berenger-bramas's avatar berenger-bramas
Browse files

Update custom memcmp function.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@213 2616d619-271b-44dc-8df4-d4a8f33a7222
parent a1daebe0
......@@ -18,7 +18,7 @@ namespace FMemUtils {
char* iterDest = static_cast<char*>(dest);
const char* iterSource = static_cast<const char*>(source);
for(FSize idx = 0 ; idx < nbBytes ; idx += MaxSize_t ){
for(FSize idx = 0 ; idx < nbBytes - MaxSize_t ; idx += MaxSize_t ){
::memcpy(iterDest, iterSource, size_t(MaxSize_t));
iterDest += MaxSize_t;
iterSource += MaxSize_t;
......@@ -34,9 +34,9 @@ namespace FMemUtils {
return ::memset(dest, val, size_t(nbBytes));
}
else{
char* iterDest = static_cast<char*>(dest);
char* iterDest = static_cast<char*>(dest);
for(FSize idx = 0 ; idx < nbBytes ; idx += MaxSize_t ){
for(FSize idx = 0 ; idx < nbBytes - MaxSize_t ; idx += MaxSize_t ){
::memset(iterDest, val, size_t(MaxSize_t));
iterDest += MaxSize_t;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment