mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🎨 for conformity, GetLogs always returns 64 bit time_t
This commit is contained in:
parent
bb0f3b642d
commit
7abca3126b
1 changed files with 4 additions and 8 deletions
12
src/log.cpp
12
src/log.cpp
|
|
@ -43,15 +43,11 @@ const Json::Value &Log::GetLog() noexcept
|
|||
res[i - 1]["to"] = data[data.size() - i].to;
|
||||
res[i - 1]["from"] = data[data.size() - i].from;
|
||||
res[i - 1]["amount"] = (Json::UInt)data[data.size() - i].amount;
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
res[i - 1]["time"] = (Json::UInt)data[data.size() - i].time;
|
||||
#else
|
||||
res[i - 1]["time"] = (Json::UInt64)data[data.size() - i].time;
|
||||
#endif
|
||||
res[i - 1]["time"] = (Json::Int64)data[data.size() - i].time;
|
||||
}
|
||||
#endif
|
||||
log_flag.SetChangesOff();
|
||||
log_snapshot = res;
|
||||
log_flag.SetChangesOff();
|
||||
}
|
||||
return log_snapshot;
|
||||
}
|
||||
|
|
@ -74,9 +70,9 @@ Json::Value Log::Serialize() const
|
|||
res[i]["from"] = data[i].from;
|
||||
res[i]["amount"] = (Json::UInt)data[i].amount;
|
||||
#ifdef _USE_32BIT_TIME_T
|
||||
res[i]["time"] = (Json::UInt)data[i].time;
|
||||
res[i]["time"] = (Json::Int)data[i].time;
|
||||
#else
|
||||
res[i]["time"] = (Json::UInt64)data[i].time;
|
||||
res[i]["time"] = (Json::Int64)data[i].time;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue