aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@oath.com>2018-12-11 12:09:09 +0000
committerTor Brede Vekterli <vekterli@oath.com>2018-12-11 12:09:09 +0000
commit408cf769c06675b8bffffeeb3447db8ab3c7fc24 (patch)
tree121a3f28b1304e36006e5789209fe938a428e5b6
parent901c560875409bb3918b1b7d0338eb96baf69852 (diff)
Rename `to_string` -> `enum_name` to better match semantics
-rw-r--r--vespalib/src/vespa/vespalib/net/tls/authorization_mode.cpp4
-rw-r--r--vespalib/src/vespa/vespalib/net/tls/authorization_mode.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/vespalib/src/vespa/vespalib/net/tls/authorization_mode.cpp b/vespalib/src/vespa/vespalib/net/tls/authorization_mode.cpp
index e405ac8961b..05110db0571 100644
--- a/vespalib/src/vespa/vespalib/net/tls/authorization_mode.cpp
+++ b/vespalib/src/vespa/vespalib/net/tls/authorization_mode.cpp
@@ -6,7 +6,7 @@
namespace vespalib::net::tls {
-const char* to_string(AuthorizationMode mode) noexcept {
+const char* enum_name(AuthorizationMode mode) noexcept {
switch (mode) {
case AuthorizationMode::Disable: return "Disable";
case AuthorizationMode::LogOnly: return "LogOnly";
@@ -16,7 +16,7 @@ const char* to_string(AuthorizationMode mode) noexcept {
}
std::ostream& operator<<(std::ostream& os, AuthorizationMode mode) {
- os << to_string(mode);
+ os << enum_name(mode);
return os;
}
diff --git a/vespalib/src/vespa/vespalib/net/tls/authorization_mode.h b/vespalib/src/vespa/vespalib/net/tls/authorization_mode.h
index bc909b05a29..a4d33db7311 100644
--- a/vespalib/src/vespa/vespalib/net/tls/authorization_mode.h
+++ b/vespalib/src/vespa/vespalib/net/tls/authorization_mode.h
@@ -11,7 +11,7 @@ enum class AuthorizationMode {
Enforce
};
-const char* to_string(AuthorizationMode) noexcept;
+const char* enum_name(AuthorizationMode) noexcept;
std::ostream& operator<<(std::ostream&, AuthorizationMode);