From 4b58305c5ba179ee30cce2f9b6deb9b9fc564b21 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 10 Sep 2020 11:12:49 +0200 Subject: [PATCH] refactor regex constants --- include/villas/api/request.hpp | 2 +- lib/api/requests/path_action.cpp | 4 ++-- lib/api/requests/path_info.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/villas/api/request.hpp b/include/villas/api/request.hpp index 427be1535..fec01a9e5 100644 --- a/include/villas/api/request.hpp +++ b/include/villas/api/request.hpp @@ -31,7 +31,7 @@ #include #include -#define REGEX_UUID "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" +#define RE_UUID "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" namespace villas { namespace node { diff --git a/lib/api/requests/path_action.cpp b/lib/api/requests/path_action.cpp index 724e2a8c1..394eec7ee 100644 --- a/lib/api/requests/path_action.cpp +++ b/lib/api/requests/path_action.cpp @@ -58,12 +58,12 @@ public: /* Register API requests */ static char n1[] = "path/start"; -static char r1[] = "/path/(" REGEX_UUID ")/start"; +static char r1[] = "/path/(" RE_UUID ")/start"; static char d1[] = "start a path"; static RequestPlugin, n1, r1, d1> p1; static char n2[] = "path/stop"; -static char r2[] = "/path/(" REGEX_UUID ")/stop"; +static char r2[] = "/path/(" RE_UUID ")/stop"; static char d2[] = "stop a path"; static RequestPlugin, n2, r2, d2> p2; diff --git a/lib/api/requests/path_info.cpp b/lib/api/requests/path_info.cpp index f2a025079..b63e716b6 100644 --- a/lib/api/requests/path_info.cpp +++ b/lib/api/requests/path_info.cpp @@ -54,7 +54,7 @@ public: /* Register API request */ static char n[] = "path"; -static char r[] = "/path/(" REGEX_UUID ")"; +static char r[] = "/path/(" RE_UUID ")"; static char d[] = "retrieve info of a path"; static RequestPlugin p;