Make Binlog helper template functions non-static.
GitOrigin-RevId: db82e3468f8bf3e1bd0835721c57a72c97a0b859
This commit is contained in:
parent
ef7b70338e
commit
900eab129b
@ -7,9 +7,10 @@
|
|||||||
// Just for testing.
|
// Just for testing.
|
||||||
// Will be completly rewritten
|
// Will be completly rewritten
|
||||||
|
|
||||||
|
#include "td/actor/actor.h"
|
||||||
|
|
||||||
#include "td/telegram/td_json_client.h"
|
#include "td/telegram/td_json_client.h"
|
||||||
#include "td/telegram/td_log.h"
|
#include "td/telegram/td_log.h"
|
||||||
#include "td/actor/actor.h"
|
|
||||||
|
|
||||||
#include <emscripten.h>
|
#include <emscripten.h>
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
template <class BinlogT, class StorerT>
|
template <class BinlogT, class StorerT>
|
||||||
static uint64 binlog_add(const BinlogT &binlog_ptr, int32 type, const StorerT &storer,
|
uint64 binlog_add(const BinlogT &binlog_ptr, int32 type, const StorerT &storer,
|
||||||
Promise<> promise = Promise<>()) {
|
Promise<> promise = Promise<>()) {
|
||||||
auto logevent_id = binlog_ptr->next_id();
|
auto logevent_id = binlog_ptr->next_id();
|
||||||
binlog_ptr->add_raw_event(logevent_id, BinlogEvent::create_raw(logevent_id, type, 0, storer), std::move(promise));
|
binlog_ptr->add_raw_event(logevent_id, BinlogEvent::create_raw(logevent_id, type, 0, storer), std::move(promise));
|
||||||
@ -23,7 +23,7 @@ static uint64 binlog_add(const BinlogT &binlog_ptr, int32 type, const StorerT &s
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class BinlogT, class StorerT>
|
template <class BinlogT, class StorerT>
|
||||||
static uint64 binlog_rewrite(const BinlogT &binlog_ptr, uint64 logevent_id, int32 type, const StorerT &storer,
|
uint64 binlog_rewrite(const BinlogT &binlog_ptr, uint64 logevent_id, int32 type, const StorerT &storer,
|
||||||
Promise<> promise = Promise<>()) {
|
Promise<> promise = Promise<>()) {
|
||||||
auto seq_no = binlog_ptr->next_id();
|
auto seq_no = binlog_ptr->next_id();
|
||||||
binlog_ptr->add_raw_event(seq_no, BinlogEvent::create_raw(logevent_id, type, BinlogEvent::Flags::Rewrite, storer),
|
binlog_ptr->add_raw_event(seq_no, BinlogEvent::create_raw(logevent_id, type, BinlogEvent::Flags::Rewrite, storer),
|
||||||
@ -34,7 +34,7 @@ static uint64 binlog_rewrite(const BinlogT &binlog_ptr, uint64 logevent_id, int3
|
|||||||
#define binlog_erase(...) binlog_erase_impl({__FILE__, __LINE__}, __VA_ARGS__)
|
#define binlog_erase(...) binlog_erase_impl({__FILE__, __LINE__}, __VA_ARGS__)
|
||||||
|
|
||||||
template <class BinlogT>
|
template <class BinlogT>
|
||||||
static uint64 binlog_erase_impl(BinlogDebugInfo info, const BinlogT &binlog_ptr, uint64 logevent_id,
|
uint64 binlog_erase_impl(BinlogDebugInfo info, const BinlogT &binlog_ptr, uint64 logevent_id,
|
||||||
Promise<> promise = Promise<>()) {
|
Promise<> promise = Promise<>()) {
|
||||||
auto seq_no = binlog_ptr->next_id();
|
auto seq_no = binlog_ptr->next_id();
|
||||||
binlog_ptr->add_raw_event(info, seq_no,
|
binlog_ptr->add_raw_event(info, seq_no,
|
||||||
|
Loading…
Reference in New Issue
Block a user