cscore: Use Twine instead of StringRef in API (#1244)

This commit is contained in:
Peter Johnson
2018-07-29 12:53:41 -07:00
committed by GitHub
parent 97a8f8f47b
commit 195e101816
35 changed files with 365 additions and 350 deletions

View File

@@ -37,13 +37,13 @@ class WPILibCameraServerShared : public frc::CameraServerShared {
void ReportVideoServer(int id) override {
HAL_Report(HALUsageReporting::kResourceType_PCVideoServer, id);
}
void SetCameraServerError(wpi::StringRef error) override {
void SetCameraServerError(const wpi::Twine& error) override {
wpi_setGlobalWPIErrorWithContext(CameraServerError, error);
}
void SetVisionRunnerError(wpi::StringRef error) override {
void SetVisionRunnerError(const wpi::Twine& error) override {
wpi_setGlobalErrorWithContext(-1, error);
}
void ReportDriverStationError(wpi::StringRef error) override {
void ReportDriverStationError(const wpi::Twine& error) override {
DriverStation::ReportError(error);
}
std::pair<std::thread::id, bool> GetRobotMainThreadId() const override {