mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +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:
@@ -63,7 +63,7 @@ class VideoProperty {
|
||||
|
||||
// String-specific functions
|
||||
std::string GetString() const;
|
||||
void GetString(llvm::SmallVectorImpl<char>& value) const;
|
||||
llvm::StringRef GetString(llvm::SmallVectorImpl<char>& buf) const;
|
||||
void SetString(llvm::StringRef value);
|
||||
|
||||
// Enum-specific functions
|
||||
|
||||
Reference in New Issue
Block a user