From ec78e35733d8a8d2088cd8387d578116e328a8a2 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Tue, 17 Mar 2026 15:38:38 +0000 Subject: [PATCH] cleanup: Remove unused code --- src/lib_spark/spark/persistence/IDGenerator.cpp | 14 -------------- src/lib_spark/spark/persistence/IDGenerator.h | 4 ---- 2 files changed, 18 deletions(-) diff --git a/src/lib_spark/spark/persistence/IDGenerator.cpp b/src/lib_spark/spark/persistence/IDGenerator.cpp index b8412b134..402a9a1f5 100644 --- a/src/lib_spark/spark/persistence/IDGenerator.cpp +++ b/src/lib_spark/spark/persistence/IDGenerator.cpp @@ -39,20 +39,6 @@ inline uint64_t str_to_id(const std::string id_str) { return std::stoull(id_str); } -uint64_t get_next_id( - const std::map> &all) { - uint64_t rv = 0; - for (const auto &kv1 : all) { - for (const auto &kv2 : kv1.second) { - uint64_t v = str_to_id(kv2.second); - if (v > rv) { - rv = v; - } - } - } - return rv + 1; -} - std::optional IDGenerator::get_id( const Venue &venue, SecurityType type, diff --git a/src/lib_spark/spark/persistence/IDGenerator.h b/src/lib_spark/spark/persistence/IDGenerator.h index 20eec2393..33a4921bd 100644 --- a/src/lib_spark/spark/persistence/IDGenerator.h +++ b/src/lib_spark/spark/persistence/IDGenerator.h @@ -40,10 +40,6 @@ class IDGenerator { struct PImpl; std::unique_ptr me; - - // These methods are private to force callers to use the [public] overloads with venue, type and - // name params, to ensure consistent formatting. - std::uint64_t get_or_add(const std::string &ns, const std::string &key); }; } // namespace bts::persistence