From 2f21e2a45071b925ce2285a656ebdd6ca9409318 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 5 Aug 2014 13:37:44 -0700 Subject: [PATCH] Remove duplicate 'strref_isempty' --- libobs/util/lexer.c | 5 ----- libobs/util/lexer.h | 9 ++------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/libobs/util/lexer.c b/libobs/util/lexer.c index d92a5bc03..f49627e57 100644 --- a/libobs/util/lexer.c +++ b/libobs/util/lexer.c @@ -19,11 +19,6 @@ static const char *astrblank = ""; -static inline bool strref_is_empty(const struct strref *str) -{ - return !str || !str->array || !str->len || !*str->array; -} - int strref_cmp(const struct strref *str1, const char *str2) { size_t i = 0; diff --git a/libobs/util/lexer.h b/libobs/util/lexer.h index f7ae79041..bd60bef3f 100644 --- a/libobs/util/lexer.h +++ b/libobs/util/lexer.h @@ -58,14 +58,9 @@ static inline void strref_add(struct strref *dst, const struct strref *t) dst->len += t->len; } -static inline bool strref_isempty(const struct strref *str) +static inline bool strref_is_empty(const struct strref *str) { - if (!str->array || !str->len) - return true; - if (!*str->array) - return true; - - return false; + return !str || !str->array || !str->len || !*str->array; } EXPORT int strref_cmp(const struct strref *str1, const char *str2);