From 29b63cf270f0584d7cd7e0bcd5a33dab6c06be9b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 11 Apr 2021 14:06:29 -0400 Subject: [PATCH] compose: Remove unused helper functions No longer needed. --- src/app/rpmostree-composeutil.cxx | 20 -------------------- src/libpriv/rpmostree-core.cxx | 14 -------------- 2 files changed, 34 deletions(-) diff --git a/src/app/rpmostree-composeutil.cxx b/src/app/rpmostree-composeutil.cxx index 198cb156..1eb7b87a 100644 --- a/src/app/rpmostree-composeutil.cxx +++ b/src/app/rpmostree-composeutil.cxx @@ -166,26 +166,6 @@ treespec_bind_array (JsonObject *treedata, return set_keyfile_string_array_from_json (ts, "tree", dest_name ?: src_name, a, error); } -/* Given a boolean value in JSON, add it to treespec - * if it's not the default. - */ -static gboolean -treespec_bind_bool (JsonObject *treedata, - GKeyFile *ts, - const char *name, - gboolean default_value, - GError **error) -{ - gboolean v = default_value; - if (!_rpmostree_jsonutil_object_get_optional_boolean_member (treedata, name, &v, error)) - return FALSE; - - if (v != default_value) - g_key_file_set_boolean (ts, "tree", name, v); - - return TRUE; -} - /* Convert a treefile into a "treespec" understood by the core. */ RpmOstreeTreespec * diff --git a/src/libpriv/rpmostree-core.cxx b/src/libpriv/rpmostree-core.cxx index def693a4..2dc9a9c4 100644 --- a/src/libpriv/rpmostree-core.cxx +++ b/src/libpriv/rpmostree-core.cxx @@ -217,20 +217,6 @@ add_canonicalized_string_array (GVariantBuilder *builder, g_variant_new_strv ((const char*const*)sorted, count)); } -/* Get a bool from @keyfile, adding it to @builder */ -static void -tf_bind_boolean (GKeyFile *keyfile, - GVariantBuilder *builder, - const char *name, - gboolean default_value) -{ - gboolean v = default_value; - if (g_key_file_has_key (keyfile, "tree", name, NULL)) - v = g_key_file_get_boolean (keyfile, "tree", name, NULL); - - g_variant_builder_add (builder, "{sv}", name, g_variant_new_boolean (v)); -} - RpmOstreeTreespec * rpmostree_treespec_new_from_keyfile (GKeyFile *keyfile, GError **error)