Skip to content

Commit

Permalink
Merge pull request #247 from ItsBasi/patch-1
Browse files Browse the repository at this point in the history
Avoid using pointers to temporary copies of desired extensions.
  • Loading branch information
axsaucedo authored Sep 19, 2021
2 parents 9815031 + c181654 commit c4b3e6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ Manager::createDevice(const std::vector<uint32_t>& familyQueueIndices,
KP_LOG_DEBUG("Kompute Manager available extensions {}",
uniqueExtensionNames);
std::vector<const char*> validExtensions;
for (std::string ext : desiredExtensions) {
for (const std::string& ext : desiredExtensions) {
if (uniqueExtensionNames.count(ext) != 0) {
validExtensions.push_back(ext.c_str());
}
Expand Down

0 comments on commit c4b3e6e

Please sign in to comment.