[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/scene
Jens-Michael Hoffmann
jensmh at gmx.de
Tue Jul 21 23:50:10 CEST 2009
SVN commit 1000730 by jmhoffmann:
Use only one return statement.
M +3 -5 GeoSceneLegend.cpp
M +6 -10 GeoSceneMap.cpp
M +3 -5 GeoSceneSection.cpp
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneLegend.cpp #1000729:1000730
@@ -85,13 +85,11 @@
}
}
- if ( section ) {
- return section;
+ if ( !section ) {
+ section = new GeoSceneSection( name );
+ addSection( section );
}
- section = new GeoSceneSection( name );
- addSection( section );
-
return section;
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneMap.cpp #1000729:1000730
@@ -101,13 +101,11 @@
}
}
- if ( layer ) {
- return layer;
+ if ( !layer ) {
+ layer = new GeoSceneLayer( name );
+ addLayer( layer );
}
- layer = new GeoSceneLayer( name );
- addLayer( layer );
-
return layer;
}
@@ -150,13 +148,11 @@
}
}
- if ( filter ) {
- return filter;
+ if ( !filter ) {
+ filter = new GeoSceneFilter( name );
+ addFilter( filter );
}
- filter = new GeoSceneFilter( name );
- addFilter( filter );
-
return filter;
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneSection.cpp #1000729:1000730
@@ -76,13 +76,11 @@
}
}
- if ( item ) {
- return item;
+ if ( !item ) {
+ item = new GeoSceneItem( name );
+ addItem( item );
}
- item = new GeoSceneItem( name );
- addItem( item );
-
return item;
}
More information about the Marble-commits
mailing list