Home
last modified time | relevance | path

Searched refs:kSafe (Results 1 – 4 of 4) sorted by relevance

/frameworks/native/libs/ftl/
Dcast_test.cpp53 static_assert(cast_safety<uint8_t>(0u) == CastSafety::kSafe);
54 static_assert(cast_safety<uint16_t>(max<uint8_t>) == CastSafety::kSafe);
55 static_assert(cast_safety<uint8_t>(static_cast<uint32_t>(max<uint8_t>)) == CastSafety::kSafe);
63 static_assert(cast_safety<int16_t>(0u) == CastSafety::kSafe);
64 static_assert(cast_safety<int16_t>(max<uint8_t>) == CastSafety::kSafe);
67 static_assert(cast_safety<int64_t>(static_cast<uint64_t>(max<int64_t>) - 1) == CastSafety::kSafe);
68 static_assert(cast_safety<int64_t>(static_cast<uint64_t>(max<int64_t>)) == CastSafety::kSafe);
74 static_assert(cast_safety<uint16_t>(0) == CastSafety::kSafe);
75 static_assert(cast_safety<uint16_t>(max<int8_t>) == CastSafety::kSafe);
76 static_assert(cast_safety<uint16_t>(max<int16_t>) == CastSafety::kSafe);
[all …]
/frameworks/native/include/ftl/
Dcast.h26 enum class CastSafety { kSafe, kUnderflow, kOverflow }; enumerator
52 return CastSafety::kSafe; in cast_safety()
63 return v <= L::max() ? CastSafety::kSafe : CastSafety::kOverflow; in cast_safety()
67 return static_cast<C>(v) <= static_cast<C>(L::max()) ? CastSafety::kSafe in cast_safety()
75 return static_cast<C>(v) <= static_cast<C>(L::max()) ? CastSafety::kSafe in cast_safety()
79 return v <= L::max() ? CastSafety::kSafe : CastSafety::kOverflow; in cast_safety()
/frameworks/av/media/module/foundation/tests/
DFlagged_test.cpp151 kSafe, in TEST_F() enumerator
152 kSafeMask = _Flagged_helper::minMask(kSafe), in TEST_F()
157 a.setFlags(kSafe); in TEST_F()
159 EXPECT_EQ(a.flags(), kSafe); in TEST_F()
177 trackedSafeInt32 b(kConst, kSafe, 1); in TEST_F()
179 EXPECT_EQ(b.get().flags(), kSafe); in TEST_F()
183 b.get().setFlags(overflow ? kUnsafe : kSafe); in TEST_F()
187 kSafeV = kSafe, in TEST_F()
188 kValidated = kSafe | 2, in TEST_F()
194 validatedInt32 v(kUnsafeV, kSafe, 10); in TEST_F()
[all …]
/frameworks/native/libs/ui/include/ui/
DLayerStack.h34 if (ftl::cast_safety<uint32_t>(v) == ftl::CastSafety::kSafe) { in fromValue()