Lines Matching refs:payloads
79 static int FindPayloadIndexByUrl(const Payloads* payloads, in FindPayloadIndexByUrl() argument
81 if (payloads == nullptr) return -1; in FindPayloadIndexByUrl()
83 for (int i = 0; i < payloads->size(); ++i) { in FindPayloadIndexByUrl()
84 if ((*payloads)[i].type_url == type_url) return i; in FindPayloadIndexByUrl()
120 const auto* payloads = GetPayloads(); in GetPayload() local
121 int index = status_internal::FindPayloadIndexByUrl(payloads, type_url); in GetPayload()
122 if (index != -1) return (*payloads)[index].payload; in GetPayload()
133 if (!rep->payloads) { in SetPayload()
134 rep->payloads = absl::make_unique<status_internal::Payloads>(); in SetPayload()
138 status_internal::FindPayloadIndexByUrl(rep->payloads.get(), type_url); in SetPayload()
140 (*rep->payloads)[index].payload = std::move(payload); in SetPayload()
144 rep->payloads->push_back({std::string(type_url), std::move(payload)}); in SetPayload()
168 if (auto* payloads = GetPayloads()) { in ForEachPayload() local
170 payloads->size() > 1 && reinterpret_cast<uintptr_t>(payloads) % 13 > 6; in ForEachPayload()
172 for (int index = 0; index < payloads->size(); ++index) { in ForEachPayload()
174 (*payloads)[in_reverse ? payloads->size() - 1 - index : index]; in ForEachPayload()
213 std::unique_ptr<status_internal::Payloads> payloads) { in NewRep() argument
218 rep->payloads = std::move(payloads); in NewRep()
252 std::unique_ptr<status_internal::Payloads> payloads; in PrepareToModify() local
253 if (rep->payloads) { in PrepareToModify()
254 payloads = absl::make_unique<status_internal::Payloads>(*rep->payloads); in PrepareToModify()
256 rep_ = NewRep(rep->code, message(), std::move(payloads)); in PrepareToModify()