Skip to content

Commit 5ea27b6

Browse files
committed
Fixed convert_old_db after synchronisation with master
1 parent 89b0b75 commit 5ea27b6

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

convert_old_db/convert.cc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,18 @@ std::string GenericUpdate(const std::chrono::microseconds timestamp, const std::
7171
}
7272

7373
template <>
74-
std::string GenericUpdate<new_ctfo::Card, Persisted_CardUpdated>(const std::chrono::microseconds timestamp,
75-
const std::vector<std::string>& tsv) {
74+
std::string GenericUpdate<CTFO::Card, Persisted_CardUpdated>(const std::chrono::microseconds timestamp,
75+
const std::vector<std::string>& tsv) {
7676
assert(tsv.size() == 3u);
7777

7878
current::storage::Transaction<T_PERSISTED_VARIANT> transaction;
7979

8080
transaction.meta.timestamp = timestamp;
81-
transaction.mutations.emplace_back(Persisted_CardUpdated());
81+
Persisted_CardUpdated template_record;
82+
transaction.mutations.emplace_back(template_record);
8283

8384
std::string json = JSON(transaction);
84-
std::string subjson = "{\"data\":" + JSON(new_ctfo::Card()) + "}";
85+
std::string subjson = "{\"data\":" + JSON(template_record.data) + "}";
8586
const size_t offset = json.find(subjson);
8687
assert(offset != std::string::npos);
8788

@@ -103,9 +104,9 @@ std::string GenericUpdate<new_ctfo::Card, Persisted_CardUpdated>(const std::chro
103104
auto& data = Value<Persisted_CardUpdated>(result.mutations[0]).data;
104105
auto cid = data.cid;
105106

106-
static std::map<CID, size_t> ctfo_count_map;
107-
static std::map<CID, size_t> tfu_count_map;
108-
static std::map<CID, size_t> skip_count_map;
107+
static std::map<CTFO::CID, size_t> ctfo_count_map;
108+
static std::map<CTFO::CID, size_t> tfu_count_map;
109+
static std::map<CTFO::CID, size_t> skip_count_map;
109110

110111
size_t& ctfo_count = ctfo_count_map[cid];
111112
size_t& tfu_count = tfu_count_map[cid];

0 commit comments

Comments
 (0)