OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-cog commits / fcc454d

Flip order of operation
fcc454d5ecaeac3da5bf95c56d1af163fa49f2e7
by Linas Vepštas <linasvepstas@gmail.com> · 2025-12-07T23:26:53.000Z

Changed files (1) +2 -1

opencog/persist/cog-storage/CogChannel.h +2 -1
……@@ -107,11 +107,12 @@ class CogChannel
107107 // If both sequence numbers are zero, compare by string content
108108 // (idempotent messages deduplicate). Otherwise compare by
109109 // sequence number (non-idempotent messages stay unique).
110 // Place `cog-update-value!` messages early in the set.
110111 bool operator<(const Msg& other) const
111112 {
112113 if (sequence == 0 and other.sequence == 0)
113114 return str_to_send < other.str_to_send;
114 return sequence < other.sequence;
115 return sequence > other.sequence;
115116 }
116117 };
117118