From: Holger Schemel Date: Mon, 19 Feb 2024 22:55:29 +0000 (+0100) Subject: replaced glib function calls to g_strv_length() X-Git-Tag: 4.4.0.0-test-1~335 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=c34246941dc24a3fb5cfa6cfea86d633d5ea2abc;p=rocksndiamonds.git replaced glib function calls to g_strv_length() --- diff --git a/src/game_bd/bd_bdcff.c b/src/game_bd/bd_bdcff.c index 9972b7f2..f7ed0d48 100644 --- a/src/game_bd/bd_bdcff.c +++ b/src/game_bd/bd_bdcff.c @@ -151,7 +151,7 @@ static boolean struct_set_property(gpointer str, const GdStructDescriptor *prop_ boolean was_string; params = getSplitStringArray(param, " ", -1); - paramcount = g_strv_length(params); + paramcount = getStringArrayLength(params); identifier_found = FALSE; /* check all known tags. do not exit this loop if identifier_found == true... @@ -676,7 +676,7 @@ boolean gd_caveset_load_from_bdcff(const char *contents) default_cave = gd_cave_new(); cave = default_cave; - linenum = g_strv_length(lines); + linenum = getStringArrayLength(lines); for (lineno = 0; lineno < linenum; lineno++) { @@ -1051,7 +1051,7 @@ boolean gd_caveset_load_from_bdcff(const char *contents) params = getSplitStringArray(param, " ", -1); /* an effect command has two parameters */ - if (g_strv_length(params) == 2) + if (getStringArrayLength(params) == 2) { int i; diff --git a/src/game_bd/bd_caveobject.c b/src/game_bd/bd_caveobject.c index 748de2be..69e88617 100644 --- a/src/game_bd/bd_caveobject.c +++ b/src/game_bd/bd_caveobject.c @@ -618,7 +618,7 @@ GdObject *gd_object_new_from_string(char *str) freeStringArray(words); words = getSplitStringArray(param, " ", -1); - l = g_strv_length(words); + l = getStringArrayLength(words); if (l < 10 || l > 19) return NULL;