OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // A wrapper around ZLib's CRC functions to put them in the rlz_lib namespace | 5 // A wrapper around ZLib's CRC functions to put them in the rlz_lib namespace |
6 // and use our types. | 6 // and use our types. |
7 | 7 |
8 #include "rlz/lib/assert.h" | 8 #include "rlz/lib/assert.h" |
9 #include "rlz/lib/crc32.h" | 9 #include "rlz/lib/crc32.h" |
10 #include "rlz/lib/string_utils.h" | 10 #include "rlz/lib/string_utils.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 if (!IsAscii(text[i])) | 27 if (!IsAscii(text[i])) |
28 return false; | 28 return false; |
29 | 29 |
30 *crc = crc32(*crc, reinterpret_cast<const unsigned char*>(text + i), 1); | 30 *crc = crc32(*crc, reinterpret_cast<const unsigned char*>(text + i), 1); |
31 } | 31 } |
32 | 32 |
33 return true; | 33 return true; |
34 } | 34 } |
35 | 35 |
36 } // namespace rlz_lib | 36 } // namespace rlz_lib |
OLD | NEW |