mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Cleanup: GPU: Shader Tool: Pass string by reference when possible
This commit is contained in:
parent
9d7fb1f8fa
commit
5215fb5978
2 changed files with 6 additions and 6 deletions
|
|
@ -32,7 +32,7 @@ TemplateDefinition SourceProcessor::parse_template_definition(SourceProcessor::P
|
|||
Token template_tok,
|
||||
bool is_method,
|
||||
Scope ns_scope,
|
||||
std::string filepath)
|
||||
const std::string &filepath)
|
||||
{
|
||||
Token def_start = template_tok;
|
||||
Scope template_args = def_start.next().scope();
|
||||
|
|
@ -69,7 +69,7 @@ TemplateDefinition SourceProcessor::parse_template_definition(SourceProcessor::P
|
|||
void SourceProcessor::parse_namespace_symbols(SourceProcessor::Parser &parser,
|
||||
Scope ns,
|
||||
metadata::Source &metadata,
|
||||
std::string filepath)
|
||||
const std::string &filepath)
|
||||
{
|
||||
ns.foreach_scope(ScopeType::Namespace, [&](const Scope &ns) {
|
||||
parse_namespace_symbols(parser, ns, metadata, filepath);
|
||||
|
|
|
|||
|
|
@ -72,12 +72,12 @@ class SourceProcessor {
|
|||
parser::ErrorHandler error_handler = {
|
||||
.default_filename = filepath_.substr(filepath_.find_last_of('/') + 1)};
|
||||
|
||||
void report_error(Token tok, std::string message)
|
||||
void report_error(Token tok, const std::string &message)
|
||||
{
|
||||
error_handler.report(tok, message);
|
||||
}
|
||||
|
||||
void report_error(int row, int column, std::string line, std::string message)
|
||||
void report_error(int row, int column, const std::string &line, const std::string &message)
|
||||
{
|
||||
error_handler.report(row, column, line, message);
|
||||
}
|
||||
|
|
@ -376,12 +376,12 @@ class SourceProcessor {
|
|||
Token template_tok,
|
||||
bool is_method,
|
||||
Scope ns_scope,
|
||||
std::string filepath);
|
||||
const std::string &filepath);
|
||||
|
||||
void parse_namespace_symbols(SourceProcessor::Parser &parser,
|
||||
Scope ns,
|
||||
metadata::Source &metadata,
|
||||
std::string filepath);
|
||||
const std::string &filepath);
|
||||
|
||||
std::string template_full_specified_name(metadata::TemplateDefinition &template_def);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue