-/* Copyright (c) 2015-2018. The SimGrid Team.
+/* Copyright (c) 2015-2023. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <xbt/base.h>
-namespace simgrid {
-namespace util {
+namespace simgrid::util {
/** Find a pointer to a value stores in a map (or nullptr) */
template<typename C, typename K>
inline XBT_PRIVATE
typename C::mapped_type* find_map_ptr(C& c, K const& k)
{
- typename C::iterator i = c.find(k);
+ auto i = c.find(k);
if (i == c.end())
return nullptr;
else
return &i->second;
}
-}
-}
+} // namespace simgrid::util
#endif