From cc79d603c90e3b4768e7f7bd6a6d9289fbf7f6d1 Mon Sep 17 00:00:00 2001 From: Adrian Kuegel Date: Fri, 14 Jan 2022 11:58:52 +0100 Subject: [PATCH] [mlir] Use .empty() instead of checking size() == 0. Based on a finding by ClangTidy readability-container-size-empty check. --- mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp b/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp index 8f1d23811063..0c41fd274229 100644 --- a/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp +++ b/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp @@ -104,7 +104,7 @@ LogicalResult VulkanRuntime::countDeviceMemorySize() { } LogicalResult VulkanRuntime::initRuntime() { - if (!resourceData.size()) { + if (resourceData.empty()) { std::cerr << "Vulkan runtime needs at least one resource"; return failure(); }