dmnks left a comment (rpm-software-management/rpm#4005)

Reworked with a friend function (as you suggested above). The patch itself is 
trivial (just extract the deletion code from the `import_key()` into something 
that `delete_key()` can call), the friend function just refactors the (almost) 
identical logic (which is really just a couple of lines, but it's a good way to 
practice C++, still :smile:).

This also uses the `auto` keyword to pass the third parameter (the newly added 
key's ID or header instance) down to the respective keystore object's 
`delete_key()`. AIUI, this is just syntactic sugar for function templates 
(where you'd declare something like `template <typename store> delete_key(store 
s, ...)` and then call it as `delete_key<keystore_fs>()`, etc.) but it does 
come in handy here.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4005#issuecomment-3410963777
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4005/[email protected]>
_______________________________________________
Rpm-maint mailing list
[email protected]
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to