~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to words.h

  • Committer: weidai
  • Date: 2011-01-07 01:30:24 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:522
fix for compiling with Clang from Marshall Clow

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
inline void CopyWords(word *r, const word *a, size_t n)
22
22
{
23
 
        for (size_t i=0; i<n; i++)
24
 
                r[i] = a[i];
 
23
        if (r != a)
 
24
                memcpy(r, a, n*WORD_SIZE);
25
25
}
26
26
 
27
27
inline void XorWords(word *r, const word *a, const word *b, size_t n)