capnp:Text::Reader: use implicit conversion from string (#21980)

pull/21981/head
Dean Lee 4 years ago committed by GitHub
parent e364ca2896
commit c6a34dd9f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/loggerd/bootlog.cc
  2. 2
      selfdrive/loggerd/logger.cc

@ -30,8 +30,7 @@ static kj::Array<capnp::word> build_boot_log() {
} }
} }
std::string launchLog = util::read_file("/tmp/launch_log"); boot.setLaunchLog(util::read_file("/tmp/launch_log"));
boot.setLaunchLog(capnp::Text::Reader(launchLog.data(), launchLog.size()));
return capnp::messageToFlatArray(msg); return capnp::messageToFlatArray(msg);
} }

@ -60,7 +60,7 @@ kj::Array<capnp::word> logger_build_init_data() {
init.setDeviceType(cereal::InitData::DeviceType::PC); init.setDeviceType(cereal::InitData::DeviceType::PC);
} }
init.setVersion(capnp::Text::Reader(COMMA_VERSION)); init.setVersion(COMMA_VERSION);
std::ifstream cmdline_stream("/proc/cmdline"); std::ifstream cmdline_stream("/proc/cmdline");
std::vector<std::string> kernel_args; std::vector<std::string> kernel_args;

Loading…
Cancel
Save