|
From: <ob...@us...> - 2013-06-22 10:09:56
|
Revision: 1828
http://sourceforge.net/p/scstudio/code/1828
Author: obouda
Date: 2013-06-22 10:09:51 +0000 (Sat, 22 Jun 2013)
Log Message:
-----------
EventArea::get_next_area() not returning reference now (was reported as erroneous
Modified Paths:
--------------
trunk/src/data/msc/EventArea.cpp
trunk/src/data/msc/EventArea.h
Modified: trunk/src/data/msc/EventArea.cpp
===================================================================
--- trunk/src/data/msc/EventArea.cpp 2013-06-17 10:18:59 UTC (rev 1827)
+++ trunk/src/data/msc/EventArea.cpp 2013-06-22 10:09:51 UTC (rev 1828)
@@ -19,14 +19,13 @@
#include "data/msc.h"
#include "data/msc/EventArea.h"
-const EventAreaPtr& EventArea::get_next_area() const
+EventAreaPtr EventArea::get_next_area() const
{
- static const EventAreaPtr null_ptr;
const EventAreaPtrList event_areas = get_instance()->get_areas();
for (EventAreaPtrList::const_iterator i = event_areas.begin(); i != event_areas.end(); ++i) {
if (i->get() == this) {
++i;
- return (i == event_areas.end() ? null_ptr : *i); // NULL if this is the last event area on the instance
+ return (i == event_areas.end() ? NULL : *i); // NULL if this is the last event area on the instance
}
}
throw std::runtime_error("the event area is not present in its instance area list");
Modified: trunk/src/data/msc/EventArea.h
===================================================================
--- trunk/src/data/msc/EventArea.h 2013-06-17 10:18:59 UTC (rev 1827)
+++ trunk/src/data/msc/EventArea.h 2013-06-22 10:09:51 UTC (rev 1828)
@@ -71,7 +71,7 @@
* Returns the next event area on the same instance, or intrusive NULL-pointer if this is the last one.
* TODO: refactor out usages of this method where possible, use iteration instead
*/
- const EventAreaPtr& get_next_area() const;
+ EventAreaPtr get_next_area() const;
/**
* Returns the previous event area on the same instance, or intrusive NULL-pointer if this is the first one.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|