[Rpm-maint] [rpm-software-management/rpm] rpmte: Move dependencies into an unordered_map (PR #3538)

Panu Matilainen notifications at github.com
Tue Feb 4 11:58:04 UTC 2025


@pmatilai commented on this pull request.



> @@ -85,22 +77,22 @@ struct rpmte_s {
     rpmfs fs;
 };
 
+/* Does not include RPMTAG_NAME as it needs special handling */

No, the point is exactly that there IS a special case among these otherwise similar looking things, and the difference was far more obvious in the original code when all they're all next to each other. Looping the creation makes it actually worse for reading. Unless you put all the relevant into into a data structure where it's all again nicely next to each other. 

It just usually happens that when you have one such special case, more accumulate. If you haven't noticed, this is a common pattern I'm asking for pretty much anywhere it comes up: prefer data structures over code. 

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

Message ID: <rpm-software-management/rpm/pull/3538/review/2592607190 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250204/fe687bc1/attachment.htm>


More information about the Rpm-maint mailing list