Converted InterfaceBlock name to string_view
Change-Id: I1d64165b43bc956d0f965fe55f29eebb37a8dbd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/433002
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLRehydrator.cpp b/src/sksl/SkSLRehydrator.cpp
index c4679ef..37219d8 100644
--- a/src/sksl/SkSLRehydrator.cpp
+++ b/src/sksl/SkSLRehydrator.cpp
@@ -299,12 +299,11 @@
case Rehydrator::kInterfaceBlock_Command: {
const Symbol* var = this->symbol();
SkASSERT(var && var->is<Variable>());
- String typeName(this->readString());
- String instanceName(this->readString());
+ skstd::string_view typeName = this->readString();
+ skstd::string_view instanceName = this->readString();
int arraySize = this->readS8();
- return std::make_unique<InterfaceBlock>(/*offset=*/-1, &var->as<Variable>(),
- std::move(typeName), std::move(instanceName),
- arraySize, nullptr);
+ return std::make_unique<InterfaceBlock>(/*offset=*/-1, &var->as<Variable>(), typeName,
+ instanceName, arraySize, nullptr);
}
case Rehydrator::kVarDeclarations_Command: {
std::unique_ptr<Statement> decl = this->statement();