A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Prefer using "try_emplace" (sonar, c++17).
[simgrid.git]
/
src
/
smpi
/
internals
/
smpi_shared.cpp
diff --git
a/src/smpi/internals/smpi_shared.cpp
b/src/smpi/internals/smpi_shared.cpp
index
4f9658b
..
4edd30f
100644
(file)
--- a/
src/smpi/internals/smpi_shared.cpp
+++ b/
src/smpi/internals/smpi_shared.cpp
@@
-126,7
+126,7
@@
static void *smpi_shared_malloc_local(size_t size, const char *file, int line)
{
void* mem;
smpi_source_location loc(file, line);
- auto res
= allocs.insert(std::make_pair(loc, shared_data_t()
));
+ auto res
= allocs.try_emplace(loc, shared_data_t(
));
auto data = res.first;
if (res.second) {
// The new element was inserted.