diff options
author | Matthias Huetsch <mhu@openoffice.org> | 2001-08-09 15:12:28 +0000 |
---|---|---|
committer | Matthias Huetsch <mhu@openoffice.org> | 2001-08-09 15:12:28 +0000 |
commit | af5f691aa125c3a0b7fb590d988988b15e9c31d5 (patch) | |
tree | f7c5cac8c324281075d095e2b3892746f94f03f3 /store | |
parent | e6b23bf410455bdb5a4b8fead3a773ffdf541a23 (diff) |
#90643# Exchanged 'OStorePageGuard::crc32()' while-loop against faster for-loop.
Diffstat (limited to 'store')
-rw-r--r-- | store/source/storbase.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/store/source/storbase.cxx b/store/source/storbase.cxx index 5be3bb71d19b..1efc8e1bb2fc 100644 --- a/store/source/storbase.cxx +++ b/store/source/storbase.cxx @@ -2,9 +2,9 @@ * * $RCSfile: storbase.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: mhu $ $Date: 2001-03-13 20:54:25 $ + * last change: $Author: mhu $ $Date: 2001-08-09 16:12:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,7 +59,7 @@ * ************************************************************************/ -#define _STORE_STORBASE_CXX_ "$Revision: 1.2 $" +#define _STORE_STORBASE_CXX_ "$Revision: 1.3 $" #ifndef __ALGORITHM__ #include <algorithm> @@ -227,10 +227,10 @@ sal_uInt32 OStorePageGuard::crc32 ( if (pData) { register const sal_uInt8 *p = (const sal_uInt8*)pData; - register const sal_uInt8 *q = p + nSize; + register sal_uInt32 n; nCRC32 = ~nCRC32; - while (p < q) + for (n = nSize; n > 0; n--) nCRC32 = updcrc32 (nCRC32, *(p++)); nCRC32 = ~nCRC32; } |