refactor(core/policy): 将接口返回类型从 bool 调整为 void
policy_route_event/policy_apply_command 两个函数的 out 参数中已经能包 含返回值所代表的意义了,因此直接将这两个函数的返回类型改为 void
This commit is contained in:
@@ -17,11 +17,8 @@ typedef struct policy_context_t {
|
||||
* @param ctx 策略上下文
|
||||
* @param event 需要翻译的事件
|
||||
* @param out 命令输出缓冲区,路由产生的命令追加到此处
|
||||
*
|
||||
* @return true 产生了至少一条需要执行的命令
|
||||
* @return false 产生了至少一条需要执行的命令
|
||||
*/
|
||||
bool policy_route_event(
|
||||
void policy_route_event(
|
||||
const policy_context_t *ctx,
|
||||
const event_t *event,
|
||||
command_buffer_t *out
|
||||
@@ -33,11 +30,8 @@ bool policy_route_event(
|
||||
* @param ctx 策略上下文
|
||||
* @param command_buffer 待应用的命令序列
|
||||
* @param plan 副作用累积器,记录后端需要执行的操作
|
||||
*
|
||||
* @return true 产生了至少一项后端副作用
|
||||
* @return false 无副作用产生
|
||||
*/
|
||||
bool policy_apply_command(
|
||||
void policy_apply_command(
|
||||
const policy_context_t *ctx,
|
||||
const command_buffer_t *command_buffer,
|
||||
plan_t *plan
|
||||
|
||||
Reference in New Issue
Block a user