[wpilibc] MotorSafety::GetDescription(): Return std::string (#3390)

This is only called in an error condition, so it's not necessary to over
optimize it.
This commit is contained in:
Peter Johnson
2021-05-26 07:25:32 -07:00
committed by GitHub
parent f4e2d26d58
commit 50915cb7ed
15 changed files with 35 additions and 44 deletions

View File

@@ -4,14 +4,12 @@
#pragma once
#include <string>
#include <wpi/mutex.h>
#include "frc/Timer.h"
namespace wpi {
class raw_ostream;
} // namespace wpi
namespace frc {
/**
@@ -92,7 +90,7 @@ class MotorSafety {
static void CheckMotors();
virtual void StopMotor() = 0;
virtual void GetDescription(wpi::raw_ostream& desc) const = 0;
virtual std::string GetDescription() const = 0;
private:
static constexpr double kDefaultSafetyExpiration = 0.1;