neighbor/Info: add constructor

This commit is contained in:
Max Kellermann 2014-01-26 12:48:44 +01:00
parent 8c5ea7ec55
commit bd0cfffe23
2 changed files with 6 additions and 6 deletions

View File

@ -25,6 +25,11 @@
struct NeighborInfo {
std::string uri;
std::string display_name;
template<typename U, typename DN>
NeighborInfo(U &&_uri, DN &&_display_name)
:uri(std::forward<U>(_uri)),
display_name(std::forward<DN>(_display_name)) {}
};
#endif

View File

@ -122,12 +122,7 @@ ReadServer(NeighborExplorer::List &list, const smbc_dirent &e)
const std::string name(e.name, e.namelen);
const std::string comment(e.comment, e.commentlen);
NeighborInfo info{
"smb://" + name,
name + " (" + comment + ")",
};
list.emplace_front(std::move(info));
list.emplace_front("smb://" + name, name + " (" + comment + ")");
}
static void