~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/binary_log.cc

  • Committer: Joe Daly
  • Date: 2009-09-09 19:20:53 UTC
  • mto: This revision was merged to the branch mainline in revision 1138.
  • Revision ID: skinny.moey@gmail.com-20090909192053-gkffnpuydivun0rh
Fix up spacing in various files, also had new style casts in several places

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
  char cs[4] = { 0 };                           // !!! No checksum yet
20
20
#if GOOGLE_PROTOBUF_VERSION >= 2001000
21
 
  out->WriteRaw(buf, static_cast<int> (end - buf)); // Length + Type
 
21
  out->WriteRaw(buf, static_cast<int>(end - buf)); // Length + Type
22
22
  if (out->HadError()
23
23
    || !m_message->SerializeToCodedStream(out)) // Event body
24
24
    return false;
47
47
 
48
48
  // Read in the rest of the length bytes plus the type
49
49
  size_t bytes= length_decode_bytes(*buf);
50
 
  if (!in->ReadRaw(buf + 1, static_cast<int> (bytes)))
 
50
  if (! in->ReadRaw(buf + 1, static_cast<int>(bytes)))
51
51
    return false;
52
52
 
53
53
  size_t length;
91
91
  // Read the event body as length bytes. It is necessary to limit the
92
92
  // stream since otherwise ParseFromCodedStream reads all bytes of
93
93
  // the stream.
94
 
  protobuf::io::CodedInputStream::Limit limit= in->PushLimit(static_cast<int> (length));
 
94
  protobuf::io::CodedInputStream::Limit limit= in->PushLimit(static_cast<int>(length));
95
95
  if (!message->ParseFromCodedStream(in))
96
96
    return false;
97
97
  in->PopLimit(limit);