Commit 752833ae90e21d98096e051e1379c7634ae1f130
Make GcovImporter::setRunner() return old value
This way runner can be restored.
Author: xaizek
Author date (UTC): 2021-06-06 16:30
Committer name: xaizek
Committer date (UTC): 2021-06-06 16:30
Parent(s): 698981648ebc0f0f8faefd6e5e1febcedf28997d
Signing key: 99DC5E4DB05F6BE2
Tree: a6cf92726d2c931ee3461110f91a294e774b693f
File src/GcovImporter.cpp changed (mode: 100644) (index dfec389..d0f4907) |
... |
... |
GcovInfo::GcovInfo() |
138 |
138 |
} |
} |
139 |
139 |
} |
} |
140 |
140 |
|
|
141 |
|
void |
|
|
141 |
|
std::function<GcovImporter::runner_f> |
142 |
142 |
GcovImporter::setRunner(std::function<runner_f> runner) |
GcovImporter::setRunner(std::function<runner_f> runner) |
143 |
143 |
{ |
{ |
|
144 |
|
std::function<runner_f> previous = std::move(getRunner()); |
144 |
145 |
getRunner() = std::move(runner); |
getRunner() = std::move(runner); |
|
146 |
|
return previous; |
145 |
147 |
} |
} |
146 |
148 |
|
|
147 |
149 |
GcovImporter::GcovImporter(const std::string &root, |
GcovImporter::GcovImporter(const std::string &root, |
File src/GcovImporter.hpp changed (mode: 100644) (index 8a8145a..1df01ff) |
... |
... |
public: |
85 |
85 |
* There is no runner by default. |
* There is no runner by default. |
86 |
86 |
* |
* |
87 |
87 |
* @param runner New runner. |
* @param runner New runner. |
|
88 |
|
* |
|
89 |
|
* @returns Previous runner. |
88 |
90 |
*/ |
*/ |
89 |
|
static void setRunner(std::function<runner_f> runner); |
|
|
91 |
|
static std::function<runner_f> setRunner(std::function<runner_f> runner); |
90 |
92 |
|
|
91 |
93 |
public: |
public: |
92 |
94 |
/** |
/** |