const-y-ness and move-y-ness

pull/1116/head
Thomas Winget 4 years ago
parent fc56a018e5
commit 893ef2b874

@ -23,7 +23,7 @@ namespace llarp
namespace path
{
Path::Path(const std::vector< RouterContact >& h, PathSet* parent,
PathRole startingRoles, const std::string& shortName)
PathRole startingRoles, std::string&& shortName)
: m_PathSet(parent), _role(startingRoles), m_shortName(shortName)
{
@ -122,7 +122,7 @@ namespace llarp
return hops[0].rc.pubkey;
}
std::string
const std::string&
Path::ShortName() const
{
return m_shortName;

@ -100,7 +100,7 @@ namespace llarp
llarp_time_t buildStarted = 0;
Path(const std::vector< RouterContact >& routers, PathSet* parent,
PathRole startingRoles, const std::string& shortName);
PathRole startingRoles, std::string&& shortName);
util::StatusObject
ExtractStatus() const;
@ -205,7 +205,7 @@ namespace llarp
return _status;
}
std::string
const std::string&
ShortName() const;
std::string
@ -441,7 +441,7 @@ namespace llarp
uint64_t m_LastTXRate = 0;
uint64_t m_TXRate = 0;
std::string m_shortName;
const std::string m_shortName;
};
} // namespace path
} // namespace llarp

@ -443,7 +443,7 @@ namespace llarp
std::string path_shortName = "[" + m_router->ShortName() + "-";
path_shortName += m_router->PathBuildNumber() + "]";
auto path = std::make_shared< path::Path >(hops, self.get(), roles,
path_shortName);
std::move(path_shortName));
LogInfo(Name(), " build ", path->ShortName(), ": ", path->HopsString());
path->SetBuildResultHook(
[self](Path_ptr p) { self->HandlePathBuilt(p); });

Loading…
Cancel
Save