FFstrbuf: avoid redundant checks (#881)

This commit is contained in:
Nour1248
2024-05-05 13:40:59 +03:00
committed by GitHub
parent 6bb748869e
commit e98e2a3d52
-6
View File
@@ -275,22 +275,16 @@ FF_C_NODISCARD static inline FFstrbuf ffStrbufCreateS(const char* str)
static inline void ffStrbufAppend(FFstrbuf* __restrict strbuf, const FFstrbuf* __restrict value)
{
assert(value != strbuf);
if(value == NULL)
return;
ffStrbufAppendNS(strbuf, value->length, value->chars);
}
static inline void ffStrbufPrepend(FFstrbuf* strbuf, FFstrbuf* value)
{
if(value == NULL)
return;
ffStrbufPrependNS(strbuf, value->length, value->chars);
}
static inline void ffStrbufPrependS(FFstrbuf* strbuf, const char* value)
{
if(value == NULL)
return;
ffStrbufPrependNS(strbuf, (uint32_t) strlen(value), value);
}