Home
last modified time | relevance | path

Searched refs:value_or (Results 1 – 25 of 58) sorted by relevance

123

/external/perfetto/src/trace_processor/
Djson_trace_utils_unittest.cc30 ASSERT_EQ(CoerceToUint32(Json::Value(42)).value_or(0), 42); in TEST()
31 ASSERT_EQ(CoerceToUint32(Json::Value("42")).value_or(0), 42); in TEST()
32 ASSERT_EQ(CoerceToInt64(Json::Value(42.1)).value_or(-1), 42); in TEST()
36 ASSERT_EQ(CoerceToInt64(Json::Value(42)).value_or(-1), 42); in TEST()
37 ASSERT_EQ(CoerceToInt64(Json::Value("42")).value_or(-1), 42); in TEST()
38 ASSERT_EQ(CoerceToInt64(Json::Value(42.1)).value_or(-1), 42); in TEST()
44 ASSERT_EQ(CoerceToNs(Json::Value(42)).value_or(-1), 42000); in TEST()
45 ASSERT_EQ(CoerceToNs(Json::Value("42")).value_or(-1), 42000); in TEST()
46 ASSERT_EQ(CoerceToNs(Json::Value(42.1)).value_or(-1), 42100); in TEST()
Djson_trace_parser.cc75 uint32_t pid = opt_pid.value_or(0); in ParseTracePacket()
76 uint32_t tid = opt_tid.value_or(pid); in ParseTracePacket()
Devent_tracker.cc215 UniquePid upid = thread.upid.value_or(0); in FlushPendingEvents()
227 UniquePid upid = thread.upid.value_or(0); in FlushPendingEvents()
/external/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/
Dvalue_or_const.pass.cpp44 static_assert(opt.value_or(y) == 2, ""); in main()
48 static_assert(opt.value_or(Y(3)) == 2, ""); in main()
53 static_assert(opt.value_or(y) == 3, ""); in main()
57 static_assert(opt.value_or(Y(3)) == 4, ""); in main()
62 assert(opt.value_or(y) == 2); in main()
66 assert(opt.value_or(Y(3)) == 2); in main()
71 assert(opt.value_or(y) == 3); in main()
75 assert(opt.value_or(Y(3)) == 4); in main()
Dvalue_or.pass.cpp49 assert(std::move(opt).value_or(y) == 2); in test()
54 assert(std::move(opt).value_or(Y(3)) == 2); in test()
60 assert(std::move(opt).value_or(y) == 3); in test()
65 assert(std::move(opt).value_or(Y(3)) == 4); in test()
/external/pdfium/xfa/fxfa/parser/
Dcxfa_margin.cpp44 return TryLeftInset().value_or(0); in GetLeftInset()
48 return TryTopInset().value_or(0); in GetTopInset()
52 return TryRightInset().value_or(0); in GetRightInset()
56 return TryBottomInset().value_or(0); in GetBottomInset()
Dcxfa_caption.cpp53 .value_or(XFA_AttributeEnum::Visible) == in IsVisible()
60 .value_or(XFA_AttributeEnum::Visible) == XFA_AttributeEnum::Hidden; in IsHidden()
66 .value_or(XFA_AttributeEnum::Left); in GetPlacementType()
Dcxfa_image.cpp48 return JSObject()->TryCData(XFA_Attribute::ContentType, true).value_or(L""); in GetContentType()
52 return JSObject()->TryCData(XFA_Attribute::Href, true).value_or(L""); in GetHref()
61 return JSObject()->TryContent(false, true).value_or(L""); in GetContent()
Dcxfa_para.cpp60 .value_or(XFA_AttributeEnum::Left); in GetHorizontalAlign()
66 .value_or(XFA_AttributeEnum::Top); in GetVerticalAlign()
Dcxfa_stroke.cpp88 .value_or(XFA_AttributeEnum::Visible); in IsVisible()
148 .value_or(CXFA_Measurement(0, XFA_Unit::In)) in GetRadius()
Dcxfa_box.cpp88 .value_or(XFA_AttributeEnum::Visible); in GetPresence()
267 -startAngle.value_or(0) * FX_PI / 180.0f, in GetPathArcOrRounded()
268 -sweepAngle.value_or(360) * FX_PI / 180.0f); in GetPathArcOrRounded()
Dcxfa_calculate.cpp49 .value_or(XFA_AttributeEnum::Error); in GetOverride()
Dcxfa_stipple.cpp49 .value_or(GetDefaultRate()); in GetRate()
Dcxfa_radial.cpp49 .value_or(XFA_AttributeEnum::ToEdge) == XFA_AttributeEnum::ToEdge; in IsToEdge()
Dcxfa_linear.cpp47 .value_or(XFA_AttributeEnum::ToRight); in GetType()
/external/libchrome/base/
Doptional_unittest.cc1035 EXPECT_EQ(0.0f, a.value_or(0.0f)); in TEST()
1038 EXPECT_EQ(0.1f, a.value_or(0.0f)); in TEST()
1041 EXPECT_EQ(0.0f, a.value_or(0.0f)); in TEST()
1047 constexpr int value = a.value_or(10); in TEST()
1052 constexpr int value = a.value_or(10); in TEST()
1058 EXPECT_EQ("bar", a.value_or("bar")); in TEST()
1061 EXPECT_EQ(std::string("foo"), a.value_or("bar")); in TEST()
1064 EXPECT_EQ(std::string("bar"), a.value_or("bar")); in TEST()
1069 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(1, 0.3)); in TEST()
1072 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(3, 0.1)); in TEST()
[all …]
/external/perfetto/src/base/
Doptional_unittest.cc1049 EXPECT_EQ(0.0f, a.value_or(0.0f)); in TEST()
1052 EXPECT_EQ(0.1f, a.value_or(0.0f)); in TEST()
1055 EXPECT_EQ(0.0f, a.value_or(0.0f)); in TEST()
1061 constexpr int value = a.value_or(10); in TEST()
1066 constexpr int value = a.value_or(10); in TEST()
1072 EXPECT_EQ("bar", a.value_or("bar")); in TEST()
1075 EXPECT_EQ(std::string("foo"), a.value_or("bar")); in TEST()
1078 EXPECT_EQ(std::string("bar"), a.value_or("bar")); in TEST()
1083 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(1, 0.3)); in TEST()
1086 EXPECT_TRUE(a.value_or(TestObject(1, 0.3)) == TestObject(3, 0.1)); in TEST()
[all …]
/external/webrtc/webrtc/base/
Doptional_unittest.cc417 EXPECT_EQ(a, x.value_or(Logger(42))); in TEST()
419 EXPECT_EQ(b, y.value_or(Logger(42))); in TEST()
421 EXPECT_EQ(a, Optional<Logger>(Logger(17)).value_or(b)); in TEST()
423 EXPECT_EQ(b, Optional<Logger>().value_or(b)); in TEST()
Doptional.h114 const T& value_or(const T& default_val) const { in value_or() function
/external/webrtc/webrtc/modules/audio_coding/acm2/
Dcodec_manager.cc50 .value_or(false)) { in IsValidSendCodec()
56 return RentACodec::CodecIndexFromId(*maybe_codec_id).value_or(-1); in IsValidSendCodec()
/external/libtextclassifier/utils/
Doptional.h65 T const& value_or(T&& default_value) { in value_or() function
/external/bcc/src/cc/vendor/
Doptional.hpp567 constexpr T value_or(V&& v) const& in value_or() function in std::experimental::optional
575 OPTIONAL_MUTABLE_CONSTEXPR T value_or(V&& v) && in value_or() function in std::experimental::optional
583 T value_or(V&& v) && in value_or() function in std::experimental::optional
593 constexpr T value_or(V&& v) const in value_or() function in std::experimental::optional
696 constexpr typename decay<T>::type value_or(V&& v) const in value_or() function in std::experimental::optional
/external/pdfium/fxjs/xfa/
Dcjx_object.cpp266 return TryAttribute(attr, true).value_or(WideString()); in GetAttribute()
270 return TryAttribute(attr, true).value_or(WideString()); in GetAttribute()
351 return TryBoolean(eAttr, true).value_or(false); in GetBoolean()
365 return TryInteger(eAttr, true).value_or(0); in GetInteger()
407 return TryEnum(eAttr, true).value_or(XFA_AttributeEnum::Unknown); in GetEnum()
443 return TryMeasure(eAttr, true).value_or(CXFA_Measurement()); in GetMeasure()
447 return TryCData(eAttr, true).value_or(WideString()); in GetCData()
801 return TryContent(bScriptModify, true).value_or(WideString()); in GetContent()
Dcjx_model.cpp83 runtime->NewBoolean(TryNamespace().value_or(WideString()) == nameSpace)); in isCompatibleNS()
/external/libchrome/mojo/core/
Dmessage_pipe_dispatcher.cc230 *limit = receive_queue_length_limit_.value_or(MOJO_QUOTA_LIMIT_NONE); in QueryQuota()
235 *limit = receive_queue_memory_size_limit_.value_or(MOJO_QUOTA_LIMIT_NONE); in QueryQuota()

123