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
Whenever possible, use std::move() for parameters (mostly std::string).
[simgrid.git]
/
include
/
simgrid
/
smpi
/
replay.hpp
diff --git
a/include/simgrid/smpi/replay.hpp
b/include/simgrid/smpi/replay.hpp
index
46f5d86
..
045b936
100644
(file)
--- a/
include/simgrid/smpi/replay.hpp
+++ b/
include/simgrid/smpi/replay.hpp
@@
-175,7
+175,7
@@
protected:
T args;
public:
T args;
public:
- explicit ReplayAction(std::string name) : name(
name
), my_proc_id(simgrid::s4u::this_actor::get_pid()) {}
+ explicit ReplayAction(std::string name) : name(
std::move(name)
), my_proc_id(simgrid::s4u::this_actor::get_pid()) {}
virtual ~ReplayAction() = default;
void execute(simgrid::xbt::ReplayAction& action)
virtual ~ReplayAction() = default;
void execute(simgrid::xbt::ReplayAction& action)
@@
-207,7
+207,9
@@
private:
RequestStorage& req_storage;
public:
RequestStorage& req_storage;
public:
- explicit SendAction(std::string name, RequestStorage& storage) : ReplayAction(name), req_storage(storage) {}
+ explicit SendAction(std::string name, RequestStorage& storage) : ReplayAction(std::move(name)), req_storage(storage)
+ {
+ }
void kernel(simgrid::xbt::ReplayAction& action) override;
};
void kernel(simgrid::xbt::ReplayAction& action) override;
};
@@
-216,7
+218,9
@@
private:
RequestStorage& req_storage;
public:
RequestStorage& req_storage;
public:
- explicit RecvAction(std::string name, RequestStorage& storage) : ReplayAction(name), req_storage(storage) {}
+ explicit RecvAction(std::string name, RequestStorage& storage) : ReplayAction(std::move(name)), req_storage(storage)
+ {
+ }
void kernel(simgrid::xbt::ReplayAction& action) override;
};
void kernel(simgrid::xbt::ReplayAction& action) override;
};
@@
-288,13
+292,13
@@
public:
class GatherAction : public ReplayAction<GatherArgParser> {
public:
class GatherAction : public ReplayAction<GatherArgParser> {
public:
- explicit GatherAction(std::string name) : ReplayAction(
name
) {}
+ explicit GatherAction(std::string name) : ReplayAction(
std::move(name)
) {}
void kernel(simgrid::xbt::ReplayAction& action) override;
};
class GatherVAction : public ReplayAction<GatherVArgParser> {
public:
void kernel(simgrid::xbt::ReplayAction& action) override;
};
class GatherVAction : public ReplayAction<GatherVArgParser> {
public:
- explicit GatherVAction(std::string name) : ReplayAction(
name
) {}
+ explicit GatherVAction(std::string name) : ReplayAction(
std::move(name)
) {}
void kernel(simgrid::xbt::ReplayAction& action) override;
};
void kernel(simgrid::xbt::ReplayAction& action) override;
};