Пример #1
0
void ChanneledJsonDecompressor::readChannels(folly::io::Cursor& cursor) {
  uint32_t length;
  try {
    for (int i = 0; i < NUM_OF_CHANNELS; ++i) {
      length = cursor.readBE<uint32_t>();
      channels_.push_back(ChannelState(cursor.readFixedString(length)));
    }
  } catch (std::logic_error& ex) {
    // something wrong has happened - probably malformed file
    Logger::Warning("Malformed input file");
    throw;
  }
}
Пример #2
0
 virtual void Reset()
 {
   std::fill(PlayerState.begin(), PlayerState.end(), ChannelState());
 }