d3dx9: Simplify get_parameter_by_name().

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2019-02-20 16:58:33 +01:00 committed by Alexandre Julliard
parent eb0eaf7027
commit 4a9fe7a8a0
1 changed files with 3 additions and 5 deletions

View File

@ -918,7 +918,6 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base,
return NULL;
}
/* Pass / technique annotations are not in the parameters tree. */
if (parameter->full_name)
{
name_len = strlen(name);
@ -948,9 +947,11 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base,
return NULL;
}
/* Pass / technique annotations are not stored in the parameters tree,
* do a linear search. */
count = parameter->member_count;
length = strcspn( name, "[.@" );
length = strcspn( name, "[." );
part = name + length;
for (i = 0; i < count; i++)
@ -969,9 +970,6 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base,
case '.':
return get_parameter_by_name(base, temp_parameter, part);
case '@':
return NULL;
case '[':
return get_parameter_element_by_name(base, temp_parameter, part);