Marked String(string_view) explicit
Change-Id: I56cc7477860a76059f60e78c658622a8daa65441 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416699 Reviewed-by: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
parent
0d1e2ca1e6
commit
eaa9e07e1c
@ -78,7 +78,7 @@ public:
|
||||
|
||||
explicit String(std::string s) : INHERITED(std::move(s)) {}
|
||||
String(StringFragment s) : INHERITED(s.fChars, s.fLength) {}
|
||||
String(skstd::string_view s) : INHERITED(s.data(), s.length()) {}
|
||||
explicit String(skstd::string_view s) : INHERITED(s.data(), s.length()) {}
|
||||
// TODO(johnstiles): add operator skstd::string_view
|
||||
|
||||
static String printf(const char* fmt, ...) SK_PRINTF_LIKE(1, 2);
|
||||
|
@ -200,7 +200,7 @@ DSLType Struct(skstd::string_view name, SkTArray<DSLField> fields) {
|
||||
skslFields.emplace_back(field.fModifiers.fModifiers, field.fName, &field.fType.skslType());
|
||||
}
|
||||
const SkSL::Type* result = DSLWriter::SymbolTable()->add(Type::MakeStructType(/*offset=*/-1,
|
||||
name,
|
||||
String(name),
|
||||
skslFields));
|
||||
DSLWriter::ProgramElements().push_back(std::make_unique<SkSL::StructDefinition>(/*offset=*/-1,
|
||||
*result));
|
||||
|
Loading…
Reference in New Issue
Block a user