mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
FFstrbuf: avoid redundant checks (#881)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user