From 4ac76ba414ecb94f086d73621775d8b38b6f0a43 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 11 Dec 2020 18:11:52 +0100 Subject: qobject: Make QString immutable The functions to modify a QString's string are all unused now. Drop them, and make the string immutable. Saves 16 bytes per QString on my system. Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-21-armbru@redhat.com> --- tests/check-qstring.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'tests/check-qstring.c') diff --git a/tests/check-qstring.c b/tests/check-qstring.c index 2d079921e3..4bf9772093 100644 --- a/tests/check-qstring.c +++ b/tests/check-qstring.c @@ -47,21 +47,6 @@ static void qstring_get_str_test(void) qobject_unref(qstring); } -static void qstring_append_chr_test(void) -{ - int i; - QString *qstring; - const char *str = "qstring append char unit-test"; - - qstring = qstring_new(); - - for (i = 0; str[i]; i++) - qstring_append_chr(qstring, str[i]); - - g_assert(strcmp(str, qstring_get_str(qstring)) == 0); - qobject_unref(qstring); -} - static void qstring_from_substr_test(void) { QString *qs; @@ -90,7 +75,6 @@ int main(int argc, char **argv) g_test_add_func("/public/from_str", qstring_from_str_test); g_test_add_func("/public/get_str", qstring_get_str_test); - g_test_add_func("/public/append_chr", qstring_append_chr_test); g_test_add_func("/public/from_substr", qstring_from_substr_test); g_test_add_func("/public/to_qstring", qobject_to_qstring_test); -- cgit v1.2.3