diff --git a/server/WebApi.cpp b/server/WebApi.cpp index e3cd1c99..31df7ae2 100644 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -176,17 +176,17 @@ static inline void addHttpListener(){ } template -bool checArgs(Args &&args,First &&first){ +bool checkArgs(Args &&args,First &&first){ return !args[first].empty(); } template -bool checArgs(Args &&args,First &&first,KeyTypes && ...keys){ - return !args[first].empty() && checArgs(args,keys...); +bool checkArgs(Args &&args,First &&first,KeyTypes && ...keys){ + return !args[first].empty() && checkArgs(std::forward(args),std::forward(keys)...); } #define CHECK_ARGS(...) \ - if(!checArgs(allArgs,##__VA_ARGS__)){ \ + if(!checkArgs(allArgs,##__VA_ARGS__)){ \ throw InvalidArgs("缺少必要参数:" #__VA_ARGS__); \ }