uint32_t CompactProtocolWriter::writeBool(bool value) {
  uint32_t wsize = 0;

  if (booleanField_.name != NULL) {
    // we haven't written the field header yet
    wsize += writeFieldBeginInternal(
        booleanField_.name,
        booleanField_.fieldType,
        booleanField_.fieldId,
        value ? detail::compact::CT_BOOLEAN_TRUE
              : detail::compact::CT_BOOLEAN_FALSE);
    booleanField_.name = NULL;
  } else {
    // we're not part of a field, so just write the value
    wsize += writeByte(
        value ? detail::compact::CT_BOOLEAN_TRUE
              : detail::compact::CT_BOOLEAN_FALSE);
  }
  return wsize;
}
uint32_t CompactProtocolWriter::writeBool(bool value) {
  uint32_t wsize = 0;

  if (booleanField_.name != NULL) {
     
    wsize += writeFieldBeginInternal(
        booleanField_.name,
        booleanField_.fieldType,
        booleanField_.fieldId,
        value ? detail::compact::CT_BOOLEAN_TRUE
              : detail::compact::CT_BOOLEAN_FALSE);
    booleanField_.name = NULL;
  } else {
     
    wsize += writeByte(
        value ? detail::compact::CT_BOOLEAN_TRUE
              : detail::compact::CT_BOOLEAN_FALSE);
  }
  return wsize;
}