X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/242fde5e8077f8193db4df5f262a9672085c8d8a..8344f32ee2339f2b53a6e79ac0e9aa3a93384f58:/src/simgrid/util.hpp diff --git a/src/simgrid/util.hpp b/src/simgrid/util.hpp index 944a895efe..734b80b1ce 100644 --- a/src/simgrid/util.hpp +++ b/src/simgrid/util.hpp @@ -1,20 +1,22 @@ -/* Copyright (c) 2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2015-2023. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ #ifndef SIMGRID_UTIL_HTPP #define SIMGRID_UTIL_HTPP -#include +#include -namespace simgrid { -namespace util { +namespace simgrid::util { /** Find a pointer to a value stores in a map (or nullptr) */ template -inline +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 @@ -22,7 +24,7 @@ typename C::mapped_type* find_map_ptr(C& c, K const& k) } template -inline +inline XBT_PRIVATE typename C::mapped_type const* find_map_ptr(C const& c, K const& k) { typename C::const_iterator i = c.find(k); @@ -32,7 +34,6 @@ typename C::mapped_type const* find_map_ptr(C const& c, K const& k) return &i->second; } -} -} +} // namespace simgrid::util #endif