Cleanup: remove unused ID property string contamination functions
This commit is contained in:
@@ -86,8 +86,6 @@ struct IDProperty *IDP_NewString(const char *st, const char *name) ATTR_WARN_UNU
|
||||
*/
|
||||
void IDP_AssignStringMaxSize(struct IDProperty *prop, const char *st, int maxncpy) ATTR_NONNULL();
|
||||
void IDP_AssignString(struct IDProperty *prop, const char *st) ATTR_NONNULL();
|
||||
void IDP_ConcatStringC(struct IDProperty *prop, const char *st) ATTR_NONNULL();
|
||||
void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append) ATTR_NONNULL();
|
||||
void IDP_FreeString(struct IDProperty *prop) ATTR_NONNULL();
|
||||
|
||||
/*-------- ID Type -------*/
|
||||
|
||||
@@ -416,28 +416,6 @@ void IDP_AssignString(IDProperty *prop, const char *st)
|
||||
IDP_AssignStringMaxSize(prop, st, 0);
|
||||
}
|
||||
|
||||
void IDP_ConcatStringC(IDProperty *prop, const char *st)
|
||||
{
|
||||
BLI_assert(prop->type == IDP_STRING);
|
||||
|
||||
int newlen = prop->len + (int)strlen(st);
|
||||
/* We have to remember that prop->len includes the null byte for strings.
|
||||
* so there's no need to add +1 to the resize function. */
|
||||
IDP_ResizeArray(prop, newlen);
|
||||
strcat(prop->data.pointer, st);
|
||||
}
|
||||
|
||||
void IDP_ConcatString(IDProperty *str1, IDProperty *append)
|
||||
{
|
||||
BLI_assert(append->type == IDP_STRING);
|
||||
|
||||
/* Since ->len for strings includes the NULL byte, we have to subtract one or
|
||||
* we'll get an extra null byte after each concatenation operation. */
|
||||
int newlen = str1->len + append->len - 1;
|
||||
IDP_ResizeArray(str1, newlen);
|
||||
strcat(str1->data.pointer, append->data.pointer);
|
||||
}
|
||||
|
||||
void IDP_FreeString(IDProperty *prop)
|
||||
{
|
||||
BLI_assert(prop->type == IDP_STRING);
|
||||
|
||||
Reference in New Issue
Block a user