// executing it later:
continuation_ = std::move(continuation);
break;
+ default:
+ DIE_IMPOSSIBLE;
}
}
}
protected:
- FutureStateBase() {}
- ~FutureStateBase() {};
+ FutureStateBase() = default;
+ ~FutureStateBase() = default;
/** Set the future as ready and trigger the continuation */
void set_ready()
template<class T>
class Future {
public:
- Future() {}
+ Future() = default;
Future(std::shared_ptr<FutureState<T>> state): state_(std::move(state)) {}
// Move type:
{
int i;
if (xbt_action_fp) { // A unique trace file
- char **evt;
- while ((evt = action_get_action(argv[0]))) {
+ while (true) {
+ char **evt = action_get_action(argv[0]);
+ if (evt == nullptr)
+ break;
+
char* lowername = str_tolower (evt[1]);
action_fun function = (action_fun)xbt_dict_get(xbt_action_funs, lowername);
xbt_free(lowername);
is_sep[0] = 1; /* End of string is also separator */
/* Do the job */
- p = q = s;
+ p = s;
+ q = s;
done = 0;
if (s[0] == '\0')
int done;
const char *p, *q;
- p = q = s;
+ p = s;
+ q = s;
done = 0;
if (s[0] == '\0')
len += strlen(sep) * amount_strings;
/* Do the job */
- q = res = (char*) xbt_malloc(len);
+ res = (char*) xbt_malloc(len);
+ q = res;
for (i=0;strs[i];i++) {
if (i!=0) { // not first loop
q += snprintf(q,len, "%s%s", sep, strs[i]);