mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Use StringRef and ArrayRef return values when buf passed.
For functions where a SmallVector is passed to be used as a stack buffer for the return value, have the return value be the appropriate StringRef or ArrayRef type. This allows for both more natural usage and enables directly returning (rather than copying) a permanently stored or constant string.
This commit is contained in:
@@ -28,7 +28,8 @@ class SinkImpl {
|
||||
SinkImpl& operator=(const SinkImpl& queue) = delete;
|
||||
|
||||
llvm::StringRef GetName() const { return m_name; }
|
||||
virtual void GetDescription(llvm::SmallVectorImpl<char>& desc) const = 0;
|
||||
virtual llvm::StringRef GetDescription(
|
||||
llvm::SmallVectorImpl<char>& buf) const = 0;
|
||||
|
||||
void Enable() {
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
|
||||
Reference in New Issue
Block a user