Changeset 10919 for code/branches/cpp11_v2/src/libraries/core/command
- Timestamp:
- Dec 5, 2015, 10:47:51 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/core/command
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc
r10918 r10919 334 334 ArgumentCompletionList threads; 335 335 336 for ( std::list<unsigned int>::const_iterator it = threadnumbers.begin(); it != threadnumbers.end(); ++it)337 threads.emplace_back(multi_cast<std::string>( *it));336 for (unsigned int threadnumber : threadnumbers) 337 threads.emplace_back(multi_cast<std::string>(threadnumber)); 338 338 339 339 return threads; -
code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc
r10916 r10919 328 328 329 329 // iterate through all groups and their commands and calculate the distance to the current command. keep the best. 330 for (const auto& mapEntry : ConsoleCommandManager::getInstance().getCommandsLC())331 { 332 if (mapEntry .first != "")333 { 334 for ( std::map<std::string, ConsoleCommand*>::const_iterator it_name = mapEntry.second.begin(); it_name != mapEntry.second.end(); ++it_name)335 { 336 std::string command = mapEntry .first + " " + it_name->first;330 for (const auto& mapEntryGroup : ConsoleCommandManager::getInstance().getCommandsLC()) 331 { 332 if (mapEntryGroup.first != "") 333 { 334 for (const auto& mapEntryName : mapEntryGroup.second) 335 { 336 std::string command = mapEntryGroup.first + " " + mapEntryName.first; 337 337 unsigned int distance = getLevenshteinDistance(command, token0_LC + " " + token1_LC); 338 338 if (distance < nearestDistance) -
code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc
r10916 r10919 145 145 { 146 146 boost::shared_lock<boost::shared_mutex> lock(*this->interpreterBundlesMutex_); 147 for ( std::map<unsigned int, TclInterpreterBundle*>::const_iterator it = this->interpreterBundles_.begin(); it != this->interpreterBundles_.end(); ++it)147 for (const auto& mapEntry : this->interpreterBundles_) 148 148 { 149 if ( it->first == 0)149 if (mapEntry.first == 0) 150 150 continue; // We'll handle the default interpreter later (and without threads of course) 151 151 152 TclInterpreterBundle* bundle = it->second;152 TclInterpreterBundle* bundle = mapEntry.second; 153 153 if (!bundle->queue_.empty()) 154 154 {
Note: See TracChangeset
for help on using the changeset viewer.