X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b4ac8fd04e749d0737479e3b02074be4ad3f2ab..adbdcbddadcbd685b72259874d1ebfd9cbbcc497:/src/simgrid/util.hpp diff --git a/src/simgrid/util.hpp b/src/simgrid/util.hpp index 2d28f9dbd1..734b80b1ce 100644 --- a/src/simgrid/util.hpp +++ b/src/simgrid/util.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2019. 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 @@ -9,15 +9,14 @@ #include -namespace simgrid { -namespace util { +namespace simgrid::util { /** Find a pointer to a value stores in a map (or nullptr) */ template 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 @@ -35,7 +34,6 @@ typename C::mapped_type const* find_map_ptr(C const& c, K const& k) return &i->second; } -} // namespace util -} // namespace simgrid +} // namespace simgrid::util #endif