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::value<std::string>
{
explicit operator const std::string &() const
{
return _value;
}
operator string_view() const
{
return _value;

View file

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