-/* Copyright (c) 2015. The SimGrid Team.
+/* Copyright (c) 2015, 2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
static const std::size_t INVALID_ID = std::numeric_limits<std::size_t>::max();
std::size_t id_;
friend class Extendable<T>;
- constexpr Extension(std::size_t id) : id_(id) {}
+ explicit constexpr Extension(std::size_t id) : id_(id) {}
public:
explicit constexpr Extension() : id_(INVALID_ID) {}
std::size_t id() const { return id_; }
template<class U> static
Extension<T,U> extension_create()
{
- return extension_create([](void* p){ delete static_cast<U*>(p); });
+ return Extension<T, U>(extension_create([](void* p) { delete static_cast<U*>(p); }));
}
Extendable() : extensions_(deleters_.size(), nullptr) {}
~Extendable()
-/* Copyright (c) 2005-2016. The SimGrid Team.All rights reserved. */
+/* Copyright (c) 2005-2017. 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. */
public:
static_assert(not std::is_base_of<WithContextException, E>::value, "Trying to appli WithContext twice");
- WithContext(E exception) :
- E(std::move(exception)) {}
+ explicit WithContext(E exception) : E(std::move(exception)) {}
WithContext(E exception, ThrowPoint throwpoint, Backtrace backtrace) :
E(std::move(exception)),
WithContextException(throwpoint, std::move(backtrace)) {}
-/* Copyright (c) 2016. The SimGrid Team.
+/* Copyright (c) 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
public:
Range() : begin_(), end_() {}
Range(T begin, T end) : begin_(std::move(begin)), end_(std::move(end)) {}
- Range(T value) : begin_(value), end_(value + 1) {}
+ explicit Range(T value) : begin_(value), end_(value + 1) {}
T& begin() { return begin_; }
T& end() { return end_; }
const T& begin() const { return begin_; }
s.string_data::len = 0;
s.string_data::data = &NUL;
}
- string(std::string const& s) : string(s.c_str(), s.size()) {}
+ explicit string(std::string const& s) : string(s.c_str(), s.size()) {}
// Assign
void assign(const char* s, size_t size)
/** When an error happens in the execution of a DWARF expression */
class evaluation_error : std::runtime_error {
public:
- evaluation_error(const char* what): std::runtime_error(what) {}
+ explicit evaluation_error(const char* what) : std::runtime_error(what) {}
};
/** A stack for evaluating a DWARF expression
LocationListEntry(DwarfExpression expression, range_type range)
: expression_(std::move(expression)), range_(range)
{}
- LocationListEntry(DwarfExpression expression) : expression_(std::move(expression)), range_({0, UINT64_MAX}) {}
+ explicit LocationListEntry(DwarfExpression expression) : expression_(std::move(expression)), range_({0, UINT64_MAX})
+ {
+ }
DwarfExpression& expression()
{
variable->address = (void *) (base + offset);
} else
variable->location_list = {
- simgrid::dwarf::DwarfExpression(expr, expr + len) };
+ simgrid::dwarf::LocationListEntry(simgrid::dwarf::DwarfExpression(expr, expr + len))};
break;
}
std::vector<std::vector<simgrid::mc::PatternCommunication>> incomplete_comm_pattern;
std::vector<unsigned> communicationIndices;
- State(unsigned long state_number);
+ explicit State(unsigned long state_number);
std::size_t interleaveSize() const;
void addInterleavingSet(smx_actor_t actor) { this->actorStates[actor->pid].consider(); }