mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-01-29 19:08:40 +00:00
fix
This commit is contained in:
parent
8f6d9f213e
commit
6824816735
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
namespace Router
|
||||
{
|
||||
typedef void (*Fptr)(int, char **);
|
||||
typedef void (*RouterFunc)(int, char **);
|
||||
|
||||
typedef struct {
|
||||
Stdlib::HashTable::ht *routes;
|
||||
|
|
@ -41,9 +41,9 @@ namespace Router
|
|||
Stdlib::HashTable::set_entry(router->routes, route, endpoint);
|
||||
}
|
||||
|
||||
Fptr match_route(Router *router, const char *uri)
|
||||
RouterFunc match_route(Router *router, const char *uri)
|
||||
{
|
||||
Fptr ptr = NULL;
|
||||
RouterFunc ptr = NULL;
|
||||
Stdlib::HashTable::it itr = Stdlib::HashTable::table_iterator(router->routes);
|
||||
|
||||
std::regex regex;
|
||||
|
|
@ -54,7 +54,7 @@ namespace Router
|
|||
|
||||
bool status = std::regex_search(uri, match, regex);
|
||||
if (status) {
|
||||
ptr = (Fptr) itr.value;
|
||||
ptr = (RouterFunc) itr.value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user