diff --git a/projects/clr/hipamd/api/hip/hip_platform.cpp b/projects/clr/hipamd/api/hip/hip_platform.cpp index db7939c9e7..f1c33dabde 100644 --- a/projects/clr/hipamd/api/hip/hip_platform.cpp +++ b/projects/clr/hipamd/api/hip/hip_platform.cpp @@ -243,8 +243,8 @@ extern "C" hipError_t hipLaunchByPtr(const void *hostFunction) { HIP_INIT_API(hostFunction); - std::map::iterator it; - if ((it = g_functions.find(hostFunction)) == g_functions.end()) + const auto it = g_functions.find(hostFunction); + if (it == g_functions.cend()) return hipErrorUnknown; // FIXME: should pop an entry from the execution stack