use std::string instead of fs::path

This commit is contained in:
Jeff Becker 2019-07-14 07:25:33 -04:00
parent 8dab4b87bb
commit 750397d085
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
3 changed files with 11 additions and 15 deletions

View File

@ -110,16 +110,16 @@ namespace llarp
std::string m_netId;
std::string m_nickname;
fs::path m_encryptionKeyfile = "encryption.key";
std::string m_encryptionKeyfile = "encryption.key";
// path to write our self signed rc to
fs::path m_ourRcFile = "rc.signed";
std::string m_ourRcFile = "rc.signed";
// transient iwp encryption key
fs::path m_transportKeyfile = "transport.key";
std::string m_transportKeyfile = "transport.key";
// long term identity key
fs::path m_identKeyfile = "identity.key";
std::string m_identKeyfile = "identity.key";
bool m_publicOverride = false;
struct sockaddr_in m_ip4addr;
@ -132,10 +132,10 @@ namespace llarp
// clang-format off
size_t minConnectedRouters() const { return fromEnv(m_minConnectedRouters, "MIN_CONNECTED_ROUTERS"); }
size_t maxConnectedRouters() const { return fromEnv(m_maxConnectedRouters, "MAX_CONNECTED_ROUTERS"); }
fs::path encryptionKeyfile() const { return fromEnv(m_encryptionKeyfile, "ENCRYPTION_KEYFILE"); }
fs::path ourRcFile() const { return fromEnv(m_ourRcFile, "OUR_RC_FILE"); }
fs::path transportKeyfile() const { return fromEnv(m_transportKeyfile, "TRANSPORT_KEYFILE"); }
fs::path identKeyfile() const { return fromEnv(m_identKeyfile, "IDENT_KEYFILE"); }
std::string encryptionKeyfile() const { return fromEnv(m_encryptionKeyfile, "ENCRYPTION_KEYFILE"); }
std::string ourRcFile() const { return fromEnv(m_ourRcFile, "OUR_RC_FILE"); }
std::string transportKeyfile() const { return fromEnv(m_transportKeyfile, "TRANSPORT_KEYFILE"); }
std::string identKeyfile() const { return fromEnv(m_identKeyfile, "IDENT_KEYFILE"); }
std::string netId() const { return fromEnv(m_netId, "NETID"); }
std::string nickname() const { return fromEnv(m_nickname, "NICKNAME"); }
bool publicOverride() const { return fromEnv(m_publicOverride, "PUBLIC_OVERRIDE"); }

View File

@ -66,7 +66,7 @@ namespace cpp17
void
path::swap(path& p)
{
s.swap(p.s);
std::swap(p.s, s);
}
std::string

View File

@ -83,9 +83,7 @@ public:
template< typename Source >
path& assign(const Source& source)
{
path t(source);
swap(t);
s = string_type(source);
return *this;
}
@ -95,9 +93,7 @@ public:
Iterator last
)
{
path t(first, last);
swap(t);
s = string_type(first, last);
return *this;
}