X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fada3b2a44977aca17ab9e8163df0795378ad129..bfa4e95e4538099a54c5afedd403264c8d99adb6:/src/kernel/resource/Action.cpp diff --git a/src/kernel/resource/Action.cpp b/src/kernel/resource/Action.cpp index 86f2e2a460..391ccd3b5b 100644 --- a/src/kernel/resource/Action.cpp +++ b/src/kernel/resource/Action.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2019. 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. */ @@ -42,8 +42,6 @@ Action::~Action() get_model()->get_action_heap().remove(this); if (modified_set_hook_.is_linked()) simgrid::xbt::intrusive_erase(*get_model()->get_modified_set(), *this); - - xbt_free(category_); } void Action::finish(Action::State state) @@ -111,11 +109,6 @@ void Action::set_bound(double bound) XBT_OUT(); } -void Action::set_category(const char* category) -{ - category_ = xbt_strdup(category); -} - void Action::ref() { refcount_++; @@ -149,14 +142,14 @@ void Action::cancel() } } -int Action::unref() +bool Action::unref() { refcount_--; if (not refcount_) { delete this; - return 1; + return true; } - return 0; + return false; } void Action::suspend() @@ -196,7 +189,7 @@ bool Action::is_suspended() double Action::get_remains() { XBT_IN("(%p)", this); - /* update remains before return it */ + /* update remains before returning it */ if (get_model()->get_update_algorithm() == Model::UpdateAlgo::LAZY) /* update remains before return it */ update_remains_lazy(surf_get_clock()); XBT_OUT(); @@ -252,5 +245,5 @@ Action* ActionHeap::pop() } } // namespace surf -} // namespace simgrid +} // namespace kernel } // namespace simgrid