diff --git a/unified-runtime/source/adapters/opencl/command_buffer.cpp b/unified-runtime/source/adapters/opencl/command_buffer.cpp index 7eaed4ec8bbc7..69c4d34f09e21 100644 --- a/unified-runtime/source/adapters/opencl/command_buffer.cpp +++ b/unified-runtime/source/adapters/opencl/command_buffer.cpp @@ -36,8 +36,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferCreateExp( ur_queue_handle_t Queue = nullptr; ur_queue_properties_t QueueProperties = {UR_STRUCTURE_TYPE_QUEUE_PROPERTIES, nullptr, 0}; - const bool IsInOrder = - pCommandBufferDesc ? pCommandBufferDesc->isInOrder : false; + const bool IsInOrder = pCommandBufferDesc->isInOrder; if (!IsInOrder) { QueueProperties.flags = UR_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE; } diff --git a/unified-runtime/source/common/ur_util.hpp b/unified-runtime/source/common/ur_util.hpp index a60e601b78ab3..281524244de16 100644 --- a/unified-runtime/source/common/ur_util.hpp +++ b/unified-runtime/source/common/ur_util.hpp @@ -270,7 +270,7 @@ inline std::optional getenv_to_map(const char *env_var_name, if (map.find(key) != map.end()) { map[key].insert(map[key].end(), values_vec.begin(), values_vec.end()); } else { - map[key] = values_vec; + map[key] = std::move(values_vec); } } return map; diff --git a/unified-runtime/source/loader/ur_adapter_registry.hpp b/unified-runtime/source/loader/ur_adapter_registry.hpp index 4ec315fc723bc..f716de1c487b0 100644 --- a/unified-runtime/source/loader/ur_adapter_registry.hpp +++ b/unified-runtime/source/loader/ur_adapter_registry.hpp @@ -277,9 +277,9 @@ class AdapterRegistry { [](unsigned char c) { return std::tolower(c); }); if (PositiveFilter) { - positiveFilters.push_back({backend, termPair.second}); + positiveFilters.push_back({std::move(backend), termPair.second}); } else { - negativeFilters.push_back({backend, termPair.second}); + negativeFilters.push_back({std::move(backend), termPair.second}); } } @@ -294,7 +294,8 @@ class AdapterRegistry { for (const auto &device : manifest.device_types) { ur_device_tuple single_device = {manifest.backend, device}; - auto matchesFilter = [single_device](const FilterTerm &f) -> bool { + const auto matchesFilter = + [single_device](const FilterTerm &f) -> bool { return f.matches(single_device); };