From 47623aabb4832d3d217faa1a9938bb7a6e4341c3 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 8 Jan 2021 13:23:17 +0100 Subject: lib: Use const-ref in for loops instead of const-copy This is potentially a performance issue, even though it doesn't have a big impact in this context. Clang will warn about it, and this fixes the compiler warning. --- host/lib/image_loader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/image_loader.cpp') diff --git a/host/lib/image_loader.cpp b/host/lib/image_loader.cpp index 38fed1c87..bb1fb3558 100644 --- a/host/lib/image_loader.cpp +++ b/host/lib/image_loader.cpp @@ -59,7 +59,7 @@ bool uhd::image_loader::load( } else return get_image_loaders().at(type)(image_loader_args); } else { - for (const loader_fcn_pair_t& loader_fcn_pair : get_image_loaders()) { + for (const auto& loader_fcn_pair : get_image_loaders()) { if (loader_fcn_pair.second(image_loader_args)) return true; } -- cgit v1.2.3