[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/scene
Jens-Michael Hoffmann
jensmh at gmx.de
Fri Jul 10 19:28:56 CEST 2009
SVN commit 994530 by jmhoffmann:
- Quit loops when items are found,
- remove unnecessary assertions.
M +4 -6 GeoSceneLayer.cpp
M +1 -1 GeoSceneLegend.cpp
M +2 -2 GeoSceneMap.cpp
M +1 -1 GeoSceneSection.cpp
M +2 -10 GeoSceneSettings.cpp
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneLayer.cpp #994529:994530
@@ -102,13 +102,9 @@
for (; it != m_datasets.constEnd(); ++it) {
if ( (*it)->name() == name )
dataset = *it;
+ break;
}
- if ( dataset ) {
- Q_ASSERT(dataset->name() == name);
- return dataset;
- }
-
// dataset = new GeoSceneAbstractDataset( name );
// addDataset( dataset );
@@ -175,7 +171,9 @@
void GeoSceneLayer::removeFilter( GeoSceneFilter * filter )
{
- if( filter == m_filter ) { m_filter = 0; }
+ if ( filter == m_filter ) {
+ m_filter = 0;
+ }
}
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneLegend.cpp #994529:994530
@@ -80,10 +80,10 @@
for (; it != end; ++it) {
if ( (*it)->name() == name )
section = *it;
+ break;
}
if ( section ) {
- Q_ASSERT(section->name() == name);
return section;
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneMap.cpp #994529:994530
@@ -96,10 +96,10 @@
for (; it != end; ++it) {
if ( (*it)->name() == name )
layer = *it;
+ break;
}
if ( layer ) {
- Q_ASSERT(layer->name() == name);
return layer;
}
@@ -143,10 +143,10 @@
for (; it != end; ++it) {
if ( (*it)->name() == name )
filter = *it;
+ break;
}
if ( filter ) {
- Q_ASSERT(filter->name() == name);
return filter;
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneSection.cpp #994529:994530
@@ -71,10 +71,10 @@
for (; it != end; ++it) {
if ( (*it)->name() == name )
item = *it;
+ break;
}
if ( item ) {
- Q_ASSERT(item->name() == name);
return item;
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneSettings.cpp #994529:994530
@@ -177,13 +177,9 @@
for (; it != groupEnd; ++it) {
if ( (*it)->name() == name )
group = *it;
+ break;
}
- if ( group ) {
- Q_ASSERT(group->name() == name);
- return group;
- }
-
return group;
}
@@ -221,13 +217,9 @@
for (; it != propEnd; ++it) {
if ( (*it)->name() == name )
property = *it;
+ break;
}
- if ( property ) {
- Q_ASSERT(property->name() == name);
- return property;
- }
-
return property;
}
More information about the Marble-commits
mailing list