diff --git a/libobs-d3d11/d3d11-shaderprocessor.cpp b/libobs-d3d11/d3d11-shaderprocessor.cpp index bbf5b52bd..300a774fa 100644 --- a/libobs-d3d11/d3d11-shaderprocessor.cpp +++ b/libobs-d3d11/d3d11-shaderprocessor.cpp @@ -197,7 +197,7 @@ void ShaderProcessor::BuildSamplers(vector &samplers) void ShaderProcessor::BuildString(string &outputString) { stringstream output; - cf_token *token = cf_preprocessor_gettokens(&parser.cfp.pp); + cf_token *token = cf_preprocessor_get_tokens(&parser.cfp.pp); while (token->type != CFTOKEN_NONE) { /* cheaply just replace specific tokens */ if (strref_cmp(&token->str, "POSITION") == 0) diff --git a/libobs-opengl/gl-shaderparser.c b/libobs-opengl/gl-shaderparser.c index 47875676b..e7487dac0 100644 --- a/libobs-opengl/gl-shaderparser.c +++ b/libobs-opengl/gl-shaderparser.c @@ -515,7 +515,7 @@ static void gl_write_main_storage_assign(struct gl_shader_parser *glsp, dstr_free(&src_copy); } else { - if (!dstr_isempty(&dst_copy)) + if (!dstr_is_empty(&dst_copy)) dstr_cat_dstr(&glsp->gl_string, &dst_copy); dstr_cat(&glsp->gl_string, " = "); if (src) diff --git a/libobs/graphics/effect-parser.c b/libobs/graphics/effect-parser.c index d75702d32..7e1d6d4dc 100644 --- a/libobs/graphics/effect-parser.c +++ b/libobs/graphics/effect-parser.c @@ -1165,7 +1165,7 @@ static void ep_write_main_params(struct effect_parser *ep, struct ep_func *func) { size_t i; - bool empty_params = dstr_isempty(param_str); + bool empty_params = dstr_is_empty(param_str); for (i = 0; i < func->param_vars.num; i++) { struct ep_var *var = func->param_vars.array+i; @@ -1188,7 +1188,7 @@ static void ep_write_main_params(struct effect_parser *ep, dstr_cat(shader, var->mapping); } - if (!dstr_isempty(param_str)) + if (!dstr_is_empty(param_str)) dstr_cat(param_str, ", "); dstr_cat(param_str, var->name); } diff --git a/libobs/obs-module.c b/libobs/obs-module.c index e6e373303..84b2848c0 100644 --- a/libobs/obs-module.c +++ b/libobs/obs-module.c @@ -134,7 +134,7 @@ char *obs_find_module_file(obs_module_t module, const char *file) return NULL; dstr_copy(&output, module->data_path); - if (!dstr_isempty(&output) && dstr_end(&output) != '/') + if (!dstr_is_empty(&output) && dstr_end(&output) != '/') dstr_cat_ch(&output, '/'); dstr_cat(&output, file); @@ -292,7 +292,7 @@ static void find_modules_in_path(struct obs_module_path *omp, search_directories = true; } - if (!dstr_isempty(&search_path) && dstr_end(&search_path) != '/') + if (!dstr_is_empty(&search_path) && dstr_end(&search_path) != '/') dstr_cat_ch(&search_path, '/'); dstr_cat_ch(&search_path, '*'); diff --git a/libobs/util/cf-lexer.c b/libobs/util/cf-lexer.c index 60e301a07..e031a965a 100644 --- a/libobs/util/cf-lexer.c +++ b/libobs/util/cf-lexer.c @@ -621,7 +621,7 @@ static void cf_include_file(struct cf_preprocessor *pp, struct cf_lexer *dep = pp->dependencies.array+i; if (strcmp(dep->file, str_file.array) == 0) { - tokens = cf_lexer_gettokens(dep); + tokens = cf_lexer_get_tokens(dep); cf_preprocess_tokens(pp, false, &tokens); goto exit; } @@ -639,7 +639,7 @@ static void cf_include_file(struct cf_preprocessor *pp, cf_lexer_init(&new_lex); cf_lexer_lex(&new_lex, file_data, str_file.array); - tokens = cf_lexer_gettokens(&new_lex); + tokens = cf_lexer_get_tokens(&new_lex); cf_preprocess_tokens(pp, false, &tokens); bfree(file_data); @@ -1267,7 +1267,7 @@ void cf_preprocessor_free(struct cf_preprocessor *pp) bool cf_preprocess(struct cf_preprocessor *pp, struct cf_lexer *lex, struct error_data *ed) { - struct cf_token *token = cf_lexer_gettokens(lex); + struct cf_token *token = cf_lexer_get_tokens(lex); if (!token) return false; diff --git a/libobs/util/cf-lexer.h b/libobs/util/cf-lexer.h index fc2cc5553..66de27f28 100644 --- a/libobs/util/cf-lexer.h +++ b/libobs/util/cf-lexer.h @@ -93,7 +93,7 @@ struct cf_lexer { EXPORT void cf_lexer_init(struct cf_lexer *lex); EXPORT void cf_lexer_free(struct cf_lexer *lex); -static inline struct cf_token *cf_lexer_gettokens(struct cf_lexer *lex) +static inline struct cf_token *cf_lexer_get_tokens(struct cf_lexer *lex) { return lex->tokens.array; } @@ -195,7 +195,7 @@ EXPORT void cf_preprocessor_add_def(struct cf_preprocessor *pp, EXPORT void cf_preprocessor_remove_def(struct cf_preprocessor *pp, const char *def_name); -static inline struct cf_token *cf_preprocessor_gettokens( +static inline struct cf_token *cf_preprocessor_get_tokens( struct cf_preprocessor *pp) { return pp->tokens.array; diff --git a/libobs/util/cf-parser.h b/libobs/util/cf-parser.h index 9fab1af7e..05b2482c7 100644 --- a/libobs/util/cf-parser.h +++ b/libobs/util/cf-parser.h @@ -72,7 +72,7 @@ static inline bool cf_parser_parse(struct cf_parser *parser, if (!cf_preprocess(&parser->pp, &parser->lex, &parser->error_list)) return false; - parser->cur_token = cf_preprocessor_gettokens(&parser->pp); + parser->cur_token = cf_preprocessor_get_tokens(&parser->pp); return true; } diff --git a/libobs/util/dstr.c b/libobs/util/dstr.c index 5e833d2ec..e67012017 100644 --- a/libobs/util/dstr.c +++ b/libobs/util/dstr.c @@ -528,7 +528,7 @@ void dstr_replace(struct dstr *str, const char *find, size_t find_len, replace_len; char *temp; - if (dstr_isempty(str)) + if (dstr_is_empty(str)) return; if (!replace) diff --git a/libobs/util/dstr.h b/libobs/util/dstr.h index d448d83ac..adfefffbd 100644 --- a/libobs/util/dstr.h +++ b/libobs/util/dstr.h @@ -80,7 +80,7 @@ EXPORT void dstr_ncopy_dstr(struct dstr *dst, const struct dstr *src, static inline void dstr_resize(struct dstr *dst, const size_t num); static inline void dstr_reserve(struct dstr *dst, const size_t num); -static inline bool dstr_isempty(const struct dstr *str); +static inline bool dstr_is_empty(const struct dstr *str); static inline void dstr_cat(struct dstr *dst, const char *array); EXPORT void dstr_cat_dstr(struct dstr *dst, const struct dstr *str); @@ -249,7 +249,7 @@ static inline void dstr_resize(struct dstr *dst, const size_t num) dst->len = num; } -static inline bool dstr_isempty(const struct dstr *str) +static inline bool dstr_is_empty(const struct dstr *str) { if (!str->array || !str->len) return true; @@ -310,7 +310,7 @@ static inline int dstr_ncmpi(const struct dstr *str1, const char *str2, static inline char dstr_end(const struct dstr *str) { - if (dstr_isempty(str)) + if (dstr_is_empty(str)) return 0; return str->array[str->len - 1]; diff --git a/libobs/util/text-lookup.c b/libobs/util/text-lookup.c index b46d93eae..ef8ed3dd1 100644 --- a/libobs/util/text-lookup.c +++ b/libobs/util/text-lookup.c @@ -70,7 +70,8 @@ static struct text_node *text_node_bychar(struct text_node *node, char ch) struct text_node *subnode = node->first_subnode; while (subnode) { - if (!dstr_isempty(&subnode->str) && subnode->str.array[0] == ch) + if (!dstr_is_empty(&subnode->str) && + subnode->str.array[0] == ch) return subnode; subnode = subnode->next; diff --git a/plugins/obs-outputs/rtmp-stream.c b/plugins/obs-outputs/rtmp-stream.c index 6ff8bf4eb..996f511ad 100644 --- a/plugins/obs-outputs/rtmp-stream.c +++ b/plugins/obs-outputs/rtmp-stream.c @@ -166,7 +166,7 @@ static inline void set_rtmp_str(AVal *val, const char *str) static inline void set_rtmp_dstr(AVal *val, struct dstr *str) { - bool valid = !dstr_isempty(str); + bool valid = !dstr_is_empty(str); val->av_val = valid ? str->array : NULL; val->av_len = valid ? (int)str->len : 0; } @@ -359,12 +359,12 @@ static int init_send(struct rtmp_stream *stream) static int try_connect(struct rtmp_stream *stream) { - if (dstr_isempty(&stream->path)) { + if (dstr_is_empty(&stream->path)) { warn("URL is empty"); return OBS_OUTPUT_BAD_PATH; } - if (dstr_isempty(&stream->key)) { + if (dstr_is_empty(&stream->key)) { warn("Stream key is empty"); return OBS_OUTPUT_BAD_PATH; } diff --git a/plugins/win-dshow/win-dshow.cpp b/plugins/win-dshow/win-dshow.cpp index c19701f73..8eb7d63f7 100644 --- a/plugins/win-dshow/win-dshow.cpp +++ b/plugins/win-dshow/win-dshow.cpp @@ -206,7 +206,7 @@ static bool DecodeDeviceId(DeviceId &out, const char *device_id) BPtr wname = dstr_to_wcs(name); out.name = wname; - if (!dstr_isempty(path)) { + if (!dstr_is_empty(path)) { BPtr wpath = dstr_to_wcs(path); out.path = wpath; }