0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd::conf: Disambiguate string item access via cast conversion.

This commit is contained in:
Jason Volk 2018-10-02 15:51:45 -07:00
parent 88dfc8841d
commit fdb3f9bc4a
2 changed files with 10 additions and 5 deletions

View file

@ -141,6 +141,11 @@ struct ircd::conf::item<std::string>
:conf::item<> :conf::item<>
,conf::value<std::string> ,conf::value<std::string>
{ {
explicit operator const std::string &() const
{
return _value;
}
operator string_view() const operator string_view() const
{ {
return _value; return _value;

View file

@ -53,25 +53,25 @@ init_my_tls_crt()
const std::string private_key_path_parts[] const std::string private_key_path_parts[]
{ {
tls_key_dir, std::string{tls_key_dir},
m::self::origin + ".crt.key", m::self::origin + ".crt.key",
}; };
const std::string public_key_path_parts[] const std::string public_key_path_parts[]
{ {
tls_key_dir, std::string{tls_key_dir},
m::self::origin + ".crt.key.pub", m::self::origin + ".crt.key.pub",
}; };
const std::string dhparam_path_parts[] const std::string dhparam_path_parts[]
{ {
tls_key_dir, std::string{tls_key_dir},
m::self::origin + ".crt.dh", m::self::origin + ".crt.dh",
}; };
const std::string certificate_path_parts[] const std::string certificate_path_parts[]
{ {
tls_key_dir, std::string{tls_key_dir},
m::self::origin + ".crt", m::self::origin + ".crt",
}; };
@ -226,7 +226,7 @@ init_my_ed25519()
const std::string path_parts[] const std::string path_parts[]
{ {
ed25519_key_dir, std::string{ed25519_key_dir},
m::self::origin + ".ed25519", m::self::origin + ".ed25519",
}; };