[GRASS-SVN] r47921 - grass/trunk/vector/v.select
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 28 13:07:12 EDT 2011
Author: martinl
Date: 2011-08-28 10:07:12 -0700 (Sun, 28 Aug 2011)
New Revision: 47921
Modified:
grass/trunk/vector/v.select/main.c
Log:
v.select: reuse IFi
Modified: grass/trunk/vector/v.select/main.c
===================================================================
--- grass/trunk/vector/v.select/main.c 2011-08-28 16:11:34 UTC (rev 47920)
+++ grass/trunk/vector/v.select/main.c 2011-08-28 17:07:12 UTC (rev 47921)
@@ -420,13 +420,11 @@
is_ogr = Vect_maptype(&Out) == GV_FORMAT_OGR_DIRECT;
if (!flag.table->answer && is_ogr) {
/* Copy attributes for OGR output */
- struct field_info *Fi;
- Fi = Vect_get_field2(&(In[0]), parm.field[0]->answer);
- if (!Fi)
+ if (!IFi)
G_fatal_error(_("Database connection not defined for layer <%s>"),
parm.field[0]->answer);
- Vect_map_add_dblink(&Out, Fi->number, Fi->name, Fi->table, Fi->key,
- Fi->database, Fi->driver);
+ Vect_map_add_dblink(&Out, IFi->number, IFi->name, IFi->table, IFi->key,
+ IFi->database, IFi->driver);
}
nfields = Vect_cidx_get_num_fields(&(In[0]));
More information about the grass-commit
mailing list