Searched defs:safe (Results 1 - 25 of 48) sorted by relevance

12

/external/skia/tests/
H A DSafeMathTest.cpp17 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 DSafeMathTest.cpp17 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 Dqueens.py23 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 Dqueens.py23 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 Dmain.c55 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 DFileFsFileTest.java40 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 Dxmlprinter.cc130 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 DNumberFormatterImpl.java38 /** 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 DScientificNotation.java113 // 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 Dnumber_compact.h78 UBool safe; member in class:number::impl::CompactHandler
80 /** Used by the safe code path */
H A Dnumber_formatimpl.cpp120 // The "safe" apply method uses a new MicroProps. In the MicroPropsGenerator, fMicros is copied into the new instance.
141 NumberFormatterImpl::NumberFormatterImpl(const MacroProps &macros, bool safe, UErrorCode &status) { argument
142 fMicroPropsGenerator = macrosToMicroGenerator(macros, safe, status);
148 NumberFormatterImpl::macrosToMicroGenerator(const MacroProps &macros, 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 DNumberFormatterImpl.java37 /** 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 DScientificNotation.java114 // 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.py75 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 DSkSafeMath.h64 SkSafeMath safe; local
65 return safe.alignUp(x, 4);
H A DSkImageInfo.cpp111 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 DSkPath_serial.cpp102 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 DSkVertices.cpp27 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 DSkString.cpp190 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 DSkSafeMath.h55 SkSafeMath safe; local
56 return safe.alignUp(x, 4);
H A DSkImageInfo.cpp71 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 DSkVertices.cpp27 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 Dprime.c365 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 DImmutableMap.java147 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 DGame.java530 public void setSafeMode(boolean safe) { argument
531 mSurfaceView.setSafeMode(safe);

Completed in 1150 milliseconds

12