You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "bneradt (via GitHub)" <gi...@apache.org> on 2023/06/21 18:40:52 UTC

[GitHub] [trafficserver] bneradt commented on a diff in pull request #9875: libswoc: Update WCCP use of Errata.

bneradt commented on code in PR #9875:
URL: https://github.com/apache/trafficserver/pull/9875#discussion_r1237433233


##########
src/wccp/WccpConfig.cc:
##########
@@ -40,28 +75,28 @@ using namespace wccp;
 std::vector<uint32_t> Seed_Router;
 
 // Names used for various elements and properties.
-static const char *const SVC_NAME = "service";
+static constexpr TextView SVC_NAME = "service";
 
 const std::string SVCS_NAME = "services";
 const std::string WCCP_NAME = "wccp";
 
-static const char *const SVC_PROP_ID           = "id";
-static const char *const SVC_PROP_TYPE         = "type";
-static const char *const SVC_PROP_PRIORITY     = "priority";
-static const char *const SVC_PROP_PROTOCOL     = "protocol";
-static const char *const SVC_PROP_PRIMARY_HASH = "primary-hash";
-static const char *const SVC_PROP_ALT_HASH     = "alt-hash";
-static const char *const SVC_PROP_PORTS        = "ports";
-static const char *const SVC_PROP_PORT_TYPE    = "port-type";
-static const char *const SVC_PROP_SECURITY     = "security";
-static const char *const SVC_PROP_ROUTERS      = "routers";
-static const char *const SVC_PROP_FORWARD      = "forward";
-static const char *const SVC_PROP_RETURN       = "return";
-static const char *const SVC_PROP_ASSIGN       = "assignment";
-static const char *const SVC_PROP_PROC         = "proc-name";
-
-static const char *const SECURITY_PROP_OPTION = "option";
-static const char *const SECURITY_PROP_KEY    = "key";
+static constexpr TextView SVC_PROP_ID           = "id";
+static const char *const SVC_PROP_TYPE          = "type";
+static constexpr TextView SVC_PROP_PRIORITY     = "priority";

Review Comment:
   Why can't all of these be TextViews?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org