From dc9b2e70c2fa059e1e22758317d8dffd97e9c809 Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Mon, 19 Jul 2021 23:35:04 -0700 Subject: [PATCH] :fire: removed legacy code --- include/log.h | 2 -- include/user.h | 3 --- src/log.cpp | 19 +------------------ 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/include/log.h b/include/log.h index e2d9ace..11f828e 100644 --- a/include/log.h +++ b/include/log.h @@ -1,5 +1,4 @@ #pragma once -#include // to be removed later #include #include "ccash_config.hpp" #include "change_flag.h" @@ -19,5 +18,4 @@ public: std::string GetLogs() noexcept; void AddTrans(const std::string &from, const std::string &to, uint32_t amount, time_t time) noexcept; - Json::Value Serialize() const; // to be removed later }; diff --git a/include/user.h b/include/user.h index dcb0040..4cea02c 100644 --- a/include/user.h +++ b/include/user.h @@ -1,5 +1,4 @@ #pragma once -#include //to be removed later #include "xxhash_str.h" #include "bank_dom_final_models.h" #include "log.h" @@ -19,6 +18,4 @@ struct User #endif User(const bank_dom::User &u) noexcept; bank_dom::User Encode() const noexcept; - - Json::Value Serialize() const; //to be removed later }; diff --git a/src/log.cpp b/src/log.cpp index e3b26b5..12e1dfb 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -38,21 +38,4 @@ std::string Log::GetLogs() noexcept log_flag.SetChangesOff(); } return log_snapshot; -} - -Json::Value Log::Serialize() const -{ - Json::Value res; - for (uint32_t i = 0; i < data.size(); ++i) - { - res[i]["to"] = data[i].to; - res[i]["from"] = data[i].from; - res[i]["amount"] = (Json::UInt)data[i].amount; -#ifdef _USE_32BIT_TIME_T - res[i]["time"] = (Json::Int)data[i].time; -#else - res[i]["time"] = (Json::Int64)data[i].time; -#endif - } - return res; -} +} \ No newline at end of file