// First, build the device's full name. It always contains all
// possible information.
vector<string> parts = {device->vendor(), device->model(),
// First, build the device's full name. It always contains all
// possible information.
vector<string> parts = {device->vendor(), device->model(),
- for (size_t i = 0; i < parts.size(); i++)
- {
- if (parts[i].length() > 0)
- {
- if (i != 0)
- s << " ";
- s << parts[i];
- }
- }
-
- full_names_[device] = s.str();
+ full_names_[device] = join(parts, " ");
// Next, build the display name. It only contains fields as required.
bool multiple_dev = false;
// Next, build the display name. It only contains fields as required.
bool multiple_dev = false;
- for (size_t i = 0; i < parts.size(); i++)
- {
- if (parts[i].length() > 0)
- {
- if (i != 0)
- s << " ";
- s << parts[i];
- }
- }
-
- display_names_[device] = s.str();
+ display_names_[device] = join(parts, " ");