Replace inefficient use of strstr with STRPREFIX macro
This commit is contained in:
parent
c3a3664e8c
commit
78918995a4
Notes:
blender-bot
2023-02-14 10:41:16 +01:00
Referenced by issue #44421, Set the viewport to wire while texture painting crash blender Referenced by issue #40131, Color ramp values limited to 4.875 maximum Referenced by issue #40101, Can't bake combine, shadows, to active
|
@ -386,10 +386,10 @@ void BKE_relink_animdata(AnimData *adt)
|
|||
* < basepath: (str) shorter path fragment to look for
|
||||
* > returns (bool) whether there is a match
|
||||
*/
|
||||
static short animpath_matches_basepath(const char path[], const char basepath[])
|
||||
static bool animpath_matches_basepath(const char path[], const char basepath[])
|
||||
{
|
||||
/* we need start of path to be basepath */
|
||||
return (path && basepath) && (strstr(path, basepath) == path);
|
||||
return (path && basepath) && STRPREFIX(path, basepath);
|
||||
}
|
||||
|
||||
/* Move F-Curves in src action to dst action, setting up all the necessary groups
|
||||
|
|
Loading…
Reference in New Issue