DNA: add alias version of DNA_struct_exists
This commit is contained in:
@@ -187,6 +187,10 @@ int DNA_struct_find_with_alias_ex(const struct SDNA *sdna,
|
||||
* \note requires #DNA_sdna_alias_data_ensure_structs_map to be called.
|
||||
*/
|
||||
int DNA_struct_find_with_alias(const struct SDNA *sdna, const char *str);
|
||||
/**
|
||||
* \note requires #DNA_sdna_alias_data_ensure_structs_map to be called.
|
||||
*/
|
||||
bool DNA_struct_exists_with_alias(const struct SDNA *sdna, const char *str);
|
||||
/**
|
||||
* \note requires #DNA_sdna_alias_data_ensure_structs_map to be called.
|
||||
*/
|
||||
|
||||
@@ -288,6 +288,11 @@ int DNA_struct_find_with_alias(const SDNA *sdna, const char *str)
|
||||
return DNA_struct_find_with_alias_ex(sdna, str, &index_last_dummy);
|
||||
}
|
||||
|
||||
bool DNA_struct_exists_with_alias(const SDNA *sdna, const char *str)
|
||||
{
|
||||
return DNA_struct_find_with_alias(sdna, str) != -1;
|
||||
}
|
||||
|
||||
/* ************************* END DIV ********************** */
|
||||
|
||||
/* ************************* READ DNA ********************** */
|
||||
|
||||
Reference in New Issue
Block a user