MCPcopy Create free account
hub / github.com/acl-dev/acl / ByteSize

Method ByteSize

lib_rpc/samples/test.pb.cpp:249–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249int Person_PhoneNumber::ByteSize() const {
250 int total_size = 0;
251
252 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
253 // required string number = 1;
254 if (has_number()) {
255 total_size += 1 +
256 ::google::protobuf::internal::WireFormatLite::StringSize(
257 this->number());
258 }
259
260 // optional .tutorial.Person.PhoneType type = 2 [default = HOME];
261 if (has_type()) {
262 total_size += 1 +
263 ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
264 }
265
266 }
267 total_size += unknown_fields().size();
268
269 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
270 _cached_size_ = total_size;
271 GOOGLE_SAFE_CONCURRENT_WRITES_END();
272 return total_size;
273}
274
275void Person_PhoneNumber::CheckTypeAndMergeFrom(
276 const ::google::protobuf::MessageLite& from) {

Callers 2

GroupSizeMethod · 0.80
MessageSizeMethod · 0.80

Calls 7

typeMethod · 0.95
idMethod · 0.95
phone_sizeMethod · 0.95
person_sizeMethod · 0.95
nameMethod · 0.80
numberMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected