Easy part: no additional change needed.
class Promise {
public:
Promise() : state_(std::make_shared<FutureState<T>>()) {}
class Promise {
public:
Promise() : state_(std::make_shared<FutureState<T>>()) {}
- Promise(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
+ explicit Promise(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
// Move type
Promise(Promise const&) = delete;
// Move type
Promise(Promise const&) = delete;
class Promise<void> {
public:
Promise() : state_(std::make_shared<FutureState<void>>()) {}
class Promise<void> {
public:
Promise() : state_(std::make_shared<FutureState<void>>()) {}
- Promise(std::shared_ptr<FutureState<void>> state) : state_(std::move(state)) {}
+ explicit Promise(std::shared_ptr<FutureState<void>> state) : state_(std::move(state)) {}
~Promise()
{
if (state_ && state_->get_status() == FutureStatus::not_ready)
~Promise()
{
if (state_ && state_->get_status() == FutureStatus::not_ready)
void execute(double flops);
private:
void execute(double flops);
private:
- simgrid::xbt::string name_ = "noname";
+ simgrid::xbt::string name_{"noname"};
std::unordered_map<std::string, Storage*>* mounts = nullptr; // caching
public:
std::unordered_map<std::string, Storage*>* mounts = nullptr; // caching
public:
class Future {
public:
Future() { /* Nothing to do*/}
class Future {
public:
Future() { /* Nothing to do*/}
- Future(simgrid::kernel::Future<T> future) : future_(std::move(future)) {}
+ explicit Future(simgrid::kernel::Future<T> future) : future_(std::move(future)) {}
bool valid() const { return future_.valid(); }
T get()
bool valid() const { return future_.valid(); }
T get()
public:
Task() { /* Nothing to do */}
public:
Task() { /* Nothing to do */}
- Task(std::nullptr_t) { /* Nothing to do */}
+ explicit Task(std::nullptr_t) { /* Nothing to do */}
}
}
string() : string(&NUL, 0) {}
}
}
string() : string(&NUL, 0) {}
- string(const char* s) : string(s, strlen(s)) {}
+ explicit string(const char* s) : string(s, strlen(s)) {}
string(string const& s) : string(s.c_str(), s.size()) {}
string(string&& s)
{
string(string const& s) : string(s.c_str(), s.size()) {}
string(string&& s)
{