Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
del macro
Browse files Browse the repository at this point in the history
GehaFearless committed Nov 17, 2023
1 parent 933cd0a commit e583cab
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/runtime/rpc/rpc_host_port.h
Original file line number Diff line number Diff line change
@@ -41,31 +41,6 @@ class TProtocol;
} // namespace thrift
} // namespace apache

#define FILL_HP_OPTIONAL_SECTION(OBJ_NAME, SECTION_NAME) \
do { \
host_port hp(OBJ_NAME.SECTION_NAME); \
OBJ_NAME.__set_hp_##SECTION_NAME(hp); \
} while (false)

#define FILL_HP_LIST_OPTIONAL_SECTION(OBJ_NAME, SECTION_NAME) \
do { \
std::vector<host_port> hps; \
dsn::host_port::fill_host_ports_from_addresses(OBJ_NAME.SECTION_NAME, hps); \
OBJ_NAME.__set_hp_##SECTION_NAME(hps); \
} while (false)

#define FILL_OPTIONAL_HP_IF_NEEDED(OBJ_NAME, SECTION_NAME) \
do { \
if (!OBJ_NAME.__isset.hp_##SECTION_NAME) \
FILL_HP_OPTIONAL_SECTION(OBJ_NAME, SECTION_NAME); \
} while (false)

#define FILL_OPTIONAL_HP_LIST_IF_NEEDED(OBJ_NAME, SECTION_NAME) \
do { \
if (!OBJ_NAME.__isset.hp_##SECTION_NAME) \
FILL_HP_LIST_OPTIONAL_SECTION(OBJ_NAME, SECTION_NAME); \
} while (false)

namespace dsn {

class rpc_group_host_port;

0 comments on commit e583cab

Please sign in to comment.