Skip to content

Commit 25360b6

Browse files
committed
Fixed coverity issue in acl_context.cpp: Type: AUTO_CAUSES_COPY (AUTO_CAUSES_COPY)
Changed to `auto &_context` since the previous code `auto _context` would only make a copy of the contexts in acl_platform.contexts_set and the subsequent `acl_update_context(_context)` would not have done anything to the contexts in acl_platform.contexts_set.
1 parent 7de03cb commit 25360b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/acl_context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ void acl_idle_update(cl_context context) {
12021202
// firstly update the current context
12031203
acl_update_context(context);
12041204
// update the other contexts from the platform
1205-
for (auto _context : acl_platform.contexts_set) {
1205+
for (const cl_context _context : acl_platform.contexts_set) {
12061206
if (context != _context)
12071207
acl_update_context(_context);
12081208
}

0 commit comments

Comments
 (0)