| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Original code by Matt McCutchen, see the LICENSE file. |
| 6 |
| 1 #ifndef NUMBERLIKEARRAY_H | 7 #ifndef NUMBERLIKEARRAY_H |
| 2 #define NUMBERLIKEARRAY_H | 8 #define NUMBERLIKEARRAY_H |
| 3 | 9 |
| 10 #include <stdlib.h> // abort() |
| 4 // Make sure we have NULL. | 11 // Make sure we have NULL. |
| 5 #ifndef NULL | 12 #ifndef NULL |
| 6 #define NULL 0 | 13 #define NULL 0 |
| 7 #endif | 14 #endif |
| 8 | 15 |
| 9 /* A NumberlikeArray<Blk> object holds a heap-allocated array of Blk with a | 16 /* A NumberlikeArray<Blk> object holds a heap-allocated array of Blk with a |
| 10 * length and a capacity and provides basic memory management features. | 17 * length and a capacity and provides basic memory management features. |
| 11 * BigUnsigned and BigUnsignedInABase both subclass it. | 18 * BigUnsigned and BigUnsignedInABase both subclass it. |
| 12 * | 19 * |
| 13 * NumberlikeArray provides no information hiding. Subclasses should use | 20 * NumberlikeArray provides no information hiding. Subclasses should use |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 Index i; | 175 Index i; |
| 169 for (i = 0; i < len; i++) | 176 for (i = 0; i < len; i++) |
| 170 if (blk[i] != x.blk[i]) | 177 if (blk[i] != x.blk[i]) |
| 171 return false; | 178 return false; |
| 172 // No blocks differed, so the objects are equal. | 179 // No blocks differed, so the objects are equal. |
| 173 return true; | 180 return true; |
| 174 } | 181 } |
| 175 } | 182 } |
| 176 | 183 |
| 177 #endif | 184 #endif |
| OLD | NEW |