mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Makes an empty stringref have a valid Data pointer (#28)
Now acts similar to std::string, where an empty construction string is valid.
This commit is contained in:
committed by
Peter Johnson
parent
8416b4e42c
commit
5d403a7b49
@@ -76,7 +76,9 @@ namespace llvm {
|
||||
/// @{
|
||||
|
||||
/// Construct an empty string ref.
|
||||
/*implicit*/ StringRef() : Data(nullptr), Length(0) {}
|
||||
/*implicit*/ StringRef() : Data(""), Length(0) {
|
||||
set_null_terminated(true);
|
||||
}
|
||||
|
||||
/// Construct a string ref from a cstring.
|
||||
/*implicit*/ StringRef(const char *Str)
|
||||
|
||||
Reference in New Issue
Block a user