/external/skia/tests/ |
H A D | SafeMathTest.cpp | 17 SkSafeMath safe; local 18 REPORTER_ASSERT(r, safe.add(halfMax, halfMax) == 2 * halfMax); 19 REPORTER_ASSERT(r, safe); 20 REPORTER_ASSERT(r, safe.add(halfMax, halfMaxPlus1) == max); 21 REPORTER_ASSERT(r, safe); 22 REPORTER_ASSERT(r, safe.add(max, 1) == 0); 23 REPORTER_ASSERT(r, !safe); 27 SkSafeMath safe; local 28 (void) safe.add(max, max); 29 REPORTER_ASSERT(r, !safe); 37 SkSafeMath safe; local 47 SkSafeMath safe; local [all...] |
/external/skqp/tests/ |
H A D | SafeMathTest.cpp | 17 SkSafeMath safe; local 18 REPORTER_ASSERT(r, safe.add(halfMax, halfMax) == 2 * halfMax); 19 REPORTER_ASSERT(r, safe); 20 REPORTER_ASSERT(r, safe.add(halfMax, halfMaxPlus1) == max); 21 REPORTER_ASSERT(r, safe); 22 REPORTER_ASSERT(r, safe.add(max, 1) == 0); 23 REPORTER_ASSERT(r, !safe); 27 SkSafeMath safe; local 28 (void) safe.add(max, max); 29 REPORTER_ASSERT(r, !safe); 37 SkSafeMath safe; local 47 SkSafeMath safe; local [all...] |
/external/python/cpython2/Demo/scripts/ |
H A D | queens.py | 23 self.row = [0] * n # Is row[y] safe? 24 self.up = [0] * (2*n-1) # Is upward diagonal[x-y] safe? 25 self.down = [0] * (2*n-1) # Is downward diagonal[x+y] safe? 30 if self.safe(x, y): 38 def safe(self, x, y): member in class:Queens
|
/external/python/cpython3/Tools/demo/ |
H A D | queens.py | 23 self.row = [0] * n # Is row[y] safe? 24 self.up = [0] * (2*n-1) # Is upward diagonal[x-y] safe? 25 self.down = [0] * (2*n-1) # Is downward diagonal[x+y] safe? 30 if self.safe(x, y): 38 def safe(self, x, y): member in class:Queens
|
/external/one-true-awk/ |
H A D | main.c | 55 int safe = 0; /* 1 => "safe" mode */ variable 90 if (strcmp(argv[1], "-safe") == 0) 91 safe = 1; 170 if (!safe)
|
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/res/ |
H A D | FileFsFileTest.java | 40 assertThat(path).isEqualTo(safe("foo/bar")); 49 final String path = FileFsFile.from(safe("/some/path")).getPath(); 50 assertThat(path).isEqualTo(safe("/some/path")); 55 final String path = FileFsFile.from(safe("/some/path/./to/here")).getPath(); 56 assertThat(path).isEqualTo(safe("/some/path/to/here")); 61 final String path = FileFsFile.from(".").join(safe("some/./path"), ".", safe("to/here")).getPath(); 62 assertThat(path).isEqualTo(safe("./some/path/to/here")); 92 private String safe(String path) { method in class:FileFsFileTest
|
/external/webrtc/webrtc/libjingle/xmllite/ |
H A D | xmlprinter.cc | 130 size_t safe = 0; local 132 size_t unsafe = text.find_first_of("<>&\"", safe); 135 *pout_ << text.substr(safe, unsafe - safe); 144 safe = unsafe + 1; 145 if (safe == text.length()) 151 size_t safe = 0; local 153 size_t unsafe = text.find_first_of("<>&", safe); 156 *pout_ << text.substr(safe, unsafe - safe); [all...] |
/external/icu/android_icu4j/src/main/java/android/icu/number/ |
H A D | NumberFormatterImpl.java | 38 /** Builds a "safe" MicroPropsGenerator, which is thread-safe and can be used repeatedly. */ 95 * @param safe 96 * If true, the returned MicroPropsGenerator will be thread-safe. If false, the returned value will 97 * <em>not</em> be thread-safe, intended for a single "one-shot" use only. Building the thread-safe 100 private static MicroPropsGenerator macrosToMicroGenerator(MacroProps macros, boolean safe) { argument 101 MicroProps micros = new MicroProps(safe); 219 chain = ((ScientificNotation) macros.notation).withLocaleData(micros.symbols, safe, chain); 239 if (safe) { [all...] |
H A D | ScientificNotation.java | 113 // ScientificHandler as a ScientificModifier, and the safe code path pre-computes 25 ScientificModifier 114 // instances. This scheme reduces the number of object creations by 1 in both safe and unsafe. 117 // the state (the exponent) into that ScientificModifier. There is no difference between safe and unsafe. 127 private ScientificHandler(ScientificNotation notation, DecimalFormatSymbols symbols, boolean safe, argument 133 if (safe) {
|
/external/icu/icu4c/source/i18n/ |
H A D | number_compact.h | 78 UBool safe; member in class:number::impl::CompactHandler 80 /** Used by the safe code path */
|
H A D | number_formatimpl.cpp | 120 // The "safe" apply method uses a new MicroProps. In the MicroPropsGenerator, fMicros is copied into the new instance. 141 NumberFormatterImpl::NumberFormatterImpl(const MacroProps ¯os, bool safe, UErrorCode &status) { argument 142 fMicroPropsGenerator = macrosToMicroGenerator(macros, safe, status); 148 NumberFormatterImpl::macrosToMicroGenerator(const MacroProps ¯os, bool safe, UErrorCode &status) { argument 296 if (safe) { 344 safe ? patternModifier : nullptr,
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/number/ |
H A D | NumberFormatterImpl.java | 37 /** Builds a "safe" MicroPropsGenerator, which is thread-safe and can be used repeatedly. */ 94 * @param safe 95 * If true, the returned MicroPropsGenerator will be thread-safe. If false, the returned value will 96 * <em>not</em> be thread-safe, intended for a single "one-shot" use only. Building the thread-safe 99 private static MicroPropsGenerator macrosToMicroGenerator(MacroProps macros, boolean safe) { argument 100 MicroProps micros = new MicroProps(safe); 218 chain = ((ScientificNotation) macros.notation).withLocaleData(micros.symbols, safe, chain); 238 if (safe) { [all...] |
H A D | ScientificNotation.java | 114 // ScientificHandler as a ScientificModifier, and the safe code path pre-computes 25 ScientificModifier 115 // instances. This scheme reduces the number of object creations by 1 in both safe and unsafe. 118 // the state (the exponent) into that ScientificModifier. There is no difference between safe and unsafe. 128 private ScientificHandler(ScientificNotation notation, DecimalFormatSymbols symbols, boolean safe, argument 134 if (safe) {
|
/external/python/cpython3/Lib/email/ |
H A D | _encoded_words.py | 75 safe = b'-!*+/' + ascii_letters.encode('ascii') + digits.encode('ascii') variable in class:_QByteMap 78 if key in self.safe:
|
/external/skia/src/core/ |
H A D | SkSafeMath.h | 64 SkSafeMath safe; local 65 return safe.alignUp(x, 4);
|
H A D | SkImageInfo.cpp | 111 SkSafeMath safe; local 112 size_t bytes = safe.add(safe.mul(fHeight - 1, rowBytes), 113 safe.mul(fWidth, this->bytesPerPixel())); 114 return safe ? bytes : SK_MaxSizeT;
|
H A D | SkPath_serial.cpp | 102 SkSafeMath safe; local 104 size = safe.add(size, safe.mul(pts, sizeof(SkPoint))); 105 size = safe.add(size, safe.mul(cnx, sizeof(SkScalar))); 106 size = safe.add(size, safe.mul(vbs, sizeof(uint8_t))); 107 size = safe.alignUp(size, 4); 108 if (!safe) {
|
H A D | SkVertices.cpp | 27 SkSafeMath safe; local 29 fVSize = safe.mul(vertexCount, sizeof(SkPoint)); 30 fTSize = hasTexs ? safe.mul(vertexCount, sizeof(SkPoint)) : 0; 31 fCSize = hasColors ? safe.mul(vertexCount, sizeof(SkColor)) : 0; 32 fISize = safe.mul(indexCount, sizeof(uint16_t)); 33 fTotal = safe.add(sizeof(SkVertices), 34 safe.add(fVSize, 35 safe.add(fTSize, 36 safe.add(fCSize, 39 if (safe 199 SkSafeRange safe; local [all...] |
H A D | SkString.cpp | 190 SkSafeMath safe; local 192 uint32_t stringLen = safe.castTo<uint32_t>(len); 194 size_t allocationSize = safe.add(len, SizeOfRec() + sizeof(char)); 196 allocationSize = safe.alignUp(allocationSize, 4); 198 SkASSERT_RELEASE(safe.ok()); 410 /* Seems we should use realloc here, since that is safe if it fails
|
/external/skqp/src/core/ |
H A D | SkSafeMath.h | 55 SkSafeMath safe; local 56 return safe.alignUp(x, 4);
|
H A D | SkImageInfo.cpp | 71 SkSafeMath safe; local 72 size_t bytes = safe.add(safe.mul(fHeight - 1, rowBytes), 73 safe.mul(fWidth, this->bytesPerPixel())); 74 return safe ? bytes : SK_MaxSizeT;
|
H A D | SkVertices.cpp | 27 SkSafeMath safe; local 29 fVSize = safe.mul(vertexCount, sizeof(SkPoint)); 30 fTSize = hasTexs ? safe.mul(vertexCount, sizeof(SkPoint)) : 0; 31 fCSize = hasColors ? safe.mul(vertexCount, sizeof(SkColor)) : 0; 32 fISize = safe.mul(indexCount, sizeof(uint16_t)); 33 fTotal = safe.add(sizeof(SkVertices), 34 safe.add(fVSize, 35 safe.add(fTSize, 36 safe.add(fCSize, 39 if (safe 199 SkSafeRange safe; local [all...] |
/external/boringssl/src/crypto/fipsmodule/bn/ |
H A D | prime.c | 365 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add, argument 377 } else if (bits == 2 && safe) { 378 // The smallest safe prime (7) is three bits. 400 if (safe) { 416 if (!safe) { 424 // for "safe prime" generation, check that (p-1)/2 is prime. Since a prime 448 // We have a safe prime test pass
|
/external/guava/guava/src/com/google/common/collect/ |
H A D | ImmutableMap.java | 147 static void checkNoConflict(boolean safe, String conflictDescription, argument 149 if (!safe) { 169 * <p>Builder instances can be reused - it is safe to call {@link #build} 266 * the data when it is safe to do so. The exact circumstances under which a 277 @SuppressWarnings("unchecked") // safe since map is not writable
|
/external/replicaisland/src/com/replica/replicaisland/ |
H A D | Game.java | 530 public void setSafeMode(boolean safe) { argument 531 mSurfaceView.setSafeMode(safe);
|