- Fix sigsegv when editing an entity

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@972 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-08-31 00:31:14 +00:00
parent c797bf97ae
commit 323ab51210
1 changed files with 5 additions and 16 deletions

View File

@ -344,8 +344,6 @@ ConcreteHistory::edit_resource(Resource& resource,
size_t places,
size_t availability)
{
reset(false);
// And preemptable and availability?? FIXME!
DynamicResource* res = dynamic_cast<DynamicResource*>(&resource);
@ -353,8 +351,7 @@ ConcreteHistory::edit_resource(Resource& resource,
core.set_name(name);
core.set_places(places);
notify_change();
reset(true);
}
@ -382,15 +379,13 @@ ConcreteHistory::edit_process(Process& process,
time_t arrival_time,
prio_t base_priority)
{
reset(false);
DynamicProcess* proc = dynamic_cast<DynamicProcess*>(&process);
StaticProcess& core = proc->get_core();
core.set_name(name);
core.set_arrival_time(arrival_time);
core.set_priority(base_priority);
notify_change();
reset(true);
}
@ -421,8 +416,6 @@ ConcreteHistory::edit_thread(Thread& thread,
time_t arrival_time,
prio_t base_priority)
{
reset(false);
DynamicThread* thre = dynamic_cast<DynamicThread*>(&thread);
StaticThread& core = thre->get_core();
core.set_name(name);
@ -430,7 +423,7 @@ ConcreteHistory::edit_thread(Thread& thread,
core.set_arrival_time(arrival_time);
core.set_priority(base_priority);
notify_change();
reset(true);
}
DynamicRequest&
@ -455,13 +448,11 @@ void
ConcreteHistory::edit_request(Request& request,
time_t instant)
{
reset(false);
DynamicRequest* req = dynamic_cast<DynamicRequest*>(&request);
StaticRequest& core = req->get_core();
core.set_instant(instant);
notify_change();
reset(true);
}
@ -488,14 +479,12 @@ ConcreteHistory::edit_subrequest(SubRequest& subrequest,
resource_key_t resource_key,
time_t duration)
{
reset(false);
DynamicSubRequest* sreq = dynamic_cast<DynamicSubRequest*>(&subrequest);
StaticSubRequest& core = sreq->get_core();
core.set_resource_key(resource_key);
core.set_length(duration);
notify_change();
reset(true);
}
void