From 2ada9808ecfef63a97b09ac31fc3fa44b927dd44 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 21 Dec 2020 16:08:51 +0000 Subject: [PATCH] Port rpmostree-db-builtin-version to C++ Prep for using https://cxx.rs/ --- Makefile-rpm-ostree.am | 2 +- ...ee-db-builtin-version.c => rpmostree-db-builtin-version.cxx} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/app/{rpmostree-db-builtin-version.c => rpmostree-db-builtin-version.cxx} (97%) diff --git a/Makefile-rpm-ostree.am b/Makefile-rpm-ostree.am index 613dfd68..e96c3863 100644 --- a/Makefile-rpm-ostree.am +++ b/Makefile-rpm-ostree.am @@ -46,7 +46,7 @@ rpm_ostree_SOURCES = src/app/main.cxx \ src/app/rpmostree-builtin-finalize-deployment.cxx \ src/app/rpmostree-db-builtin-diff.cxx \ src/app/rpmostree-db-builtin-list.cxx \ - src/app/rpmostree-db-builtin-version.c \ + src/app/rpmostree-db-builtin-version.cxx \ src/app/rpmostree-dbus-helpers.cxx \ src/app/rpmostree-dbus-helpers.h \ src/app/rpmostree-override-builtins.h \ diff --git a/src/app/rpmostree-db-builtin-version.c b/src/app/rpmostree-db-builtin-version.cxx similarity index 97% rename from src/app/rpmostree-db-builtin-version.c rename to src/app/rpmostree-db-builtin-version.cxx index d5ca0c62..f25899e8 100644 --- a/src/app/rpmostree-db-builtin-version.c +++ b/src/app/rpmostree-db-builtin-version.cxx @@ -34,7 +34,7 @@ _builtin_db_version (OstreeRepo *repo, GPtrArray *revs, { for (guint num = 0; num < revs->len; num++) { - const char *rev = revs->pdata[num]; + auto rev = static_cast(revs->pdata[num]); g_autoptr(RpmRevisionData) rpmrev = rpmrev_new (repo, rev, NULL, cancellable, error); if (!rpmrev)