mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 11:47:56 +08:00
Remove unnecessary comparisons from regular expression matching and change version to 0.9.28
This commit is contained in:
parent
4b4e8c56d2
commit
1e1bcbf781
@ -3,7 +3,7 @@
|
||||
GIT_VER=$(git log|grep ^commit|wc -l|sed -e "s/^ *//")
|
||||
MD5=$(git log|head -1|awk '{printf $2}')
|
||||
TMP_FILE=/tmp/version
|
||||
echo "#define VERSION \"0.9.27.$GIT_VER\"" > ${TMP_FILE}
|
||||
echo "#define VERSION \"0.9.28.$GIT_VER\"" > ${TMP_FILE}
|
||||
echo "#define VERSION_MD5 \"$MD5\"" >> ${TMP_FILE}
|
||||
if [ ! -f $1 ];then
|
||||
mv -f ${TMP_FILE} $1
|
||||
|
@ -164,7 +164,7 @@ void HttpControllersRouter::route(const HttpRequestImplPtr &req,
|
||||
//TODO: Is there any better way to find the sub-match index without using loop?
|
||||
if (!result[i].matched)
|
||||
continue;
|
||||
if (result[i].str() == req->path() && i <= _ctrlVector.size())
|
||||
if (i <= _ctrlVector.size())
|
||||
{
|
||||
size_t ctlIndex = i - 1;
|
||||
auto &routerItem = _ctrlVector[ctlIndex];
|
||||
|
Loading…
Reference in New Issue
Block a user