Changeset 10918 for code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc
- Timestamp:
- Dec 5, 2015, 7:10:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc
r10916 r10918 102 102 for (const auto& mapEntry : commands) 103 103 if (groupIsVisible(mapEntry.second, bOnlyShowHidden) && mapEntry.first != "" && (fragmentLC == "" || getLowercase(mapEntry.first).find(fragmentLC) == 0)) 104 groupList. push_back(ArgumentCompletionListElement(mapEntry.first, getLowercase(mapEntry.first)));104 groupList.emplace_back(mapEntry.first, getLowercase(mapEntry.first)); 105 105 106 106 // now add all shortcuts (in group "") … … 110 110 // add a line-break if the list isn't empty 111 111 if (!groupList.empty()) 112 groupList. push_back(ArgumentCompletionListElement("", "", "\n"));112 groupList.emplace_back("", "", "\n"); 113 113 114 114 // add the shortcuts 115 115 for (const auto& mapEntry : it_group->second) 116 116 if (mapEntry.second->isActive() && mapEntry.second->hasAccess() && (!mapEntry.second->isHidden())^bOnlyShowHidden && (fragmentLC == "" || getLowercase(mapEntry.first).find(fragmentLC) == 0)) 117 groupList. push_back(ArgumentCompletionListElement(mapEntry.first, getLowercase(mapEntry.first)));117 groupList.emplace_back(mapEntry.first, getLowercase(mapEntry.first)); 118 118 } 119 119 … … 148 148 for (const auto& mapEntry : it_group->second) 149 149 if (mapEntry.second->isActive() && mapEntry.second->hasAccess() && (!mapEntry.second->isHidden())^bOnlyShowHidden) 150 commandList. push_back(ArgumentCompletionListElement(mapEntry.first, getLowercase(mapEntry.first)));150 commandList.emplace_back(mapEntry.first, getLowercase(mapEntry.first)); 151 151 } 152 152 … … 188 188 { 189 189 ArgumentCompletionList list; 190 list. push_back(ArgumentCompletionListElement("", "", hint));190 list.emplace_back("", "", hint); 191 191 return list; 192 192 } … … 261 261 { 262 262 if (boost::filesystem::is_directory(*file)) 263 dirlist. push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BF_DICTIONARY_ENTRY_NAME()) + '/', file->BF_LEAF() + '/'));263 dirlist.emplace_back(file->BF_DICTIONARY_ENTRY_NAME() + '/', getLowercase(file->BF_DICTIONARY_ENTRY_NAME()) + '/', file->BF_LEAF() + '/'); 264 264 else 265 filelist. push_back(ArgumentCompletionListElement(file->BF_DICTIONARY_ENTRY_NAME(), getLowercase(file->BF_DICTIONARY_ENTRY_NAME()), file->BF_LEAF()));265 filelist.emplace_back(file->BF_DICTIONARY_ENTRY_NAME(), getLowercase(file->BF_DICTIONARY_ENTRY_NAME()), file->BF_LEAF()); 266 266 ++file; 267 267 } … … 282 282 const std::set<std::string>& names = SettingsConfigFile::getInstance().getSectionNames(); 283 283 for (const std::string& name : names) 284 sectionList. push_back(ArgumentCompletionListElement(name, getLowercase(name)));284 sectionList.emplace_back(name, getLowercase(name)); 285 285 286 286 return sectionList; … … 298 298 SettingsConfigFile::ContainerMap::const_iterator upper = settings.getContainerUpperBound(sectionLC); 299 299 for (SettingsConfigFile::ContainerMap::const_iterator it = settings.getContainerLowerBound(sectionLC); it != upper; ++it) 300 entryList. push_back(ArgumentCompletionListElement(it->second.second->getName(), it->second.first));300 entryList.emplace_back(it->second.second->getName(), it->second.first); 301 301 302 302 return entryList; … … 319 319 { 320 320 const std::string& valuestring = it->second.second->toString(); 321 oldValue. push_back(ArgumentCompletionListElement(valuestring, getLowercase(valuestring), "Old value: " + valuestring));321 oldValue.emplace_back(valuestring, getLowercase(valuestring), "Old value: " + valuestring); 322 322 } 323 323 } … … 335 335 336 336 for (std::list<unsigned int>::const_iterator it = threadnumbers.begin(); it != threadnumbers.end(); ++it) 337 threads. push_back(ArgumentCompletionListElement(multi_cast<std::string>(*it)));337 threads.emplace_back(multi_cast<std::string>(*it)); 338 338 339 339 return threads;
Note: See TracChangeset
for help on using the changeset viewer.