Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: third_party/bigint/NumberlikeArray.hh

Issue 754743003: Modify big integer library (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add . Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/bigint/BigUnsignedInABase.hh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/bigint/BigUnsignedInABase.hh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698