[QGIS-trac] [Quantum GIS] #1236: Invalid use of stream operator
dxf2shp converter
Quantum GIS
qgis at qgis.org
Thu Aug 21 18:51:44 EDT 2008
#1236: Invalid use of stream operator dxf2shp converter
------------------------------------------------+---------------------------
Reporter: mloskot | Owner: nobody
Type: bug | Status: new
Priority: major: does not work as expected | Milestone:
Component: Plugins | Version: HEAD
Keywords: dxf2shp ostream | Platform_version: 10.5
Platform: OS X | Must_fix: No
Status_info: 0 |
------------------------------------------------+---------------------------
logfile object below is of std::ostream type:
{{{
logfile << "(Add Circle (%6.3f, %6.3f, %6.3f) %6.3f\n", data.cx, data.cy,
data.cz, data.radius;
}}}
For ostream, printf-like formating is not defined, colon operator between
data variables has no effect, so the statement above outputs this:
{{{
(Add Circle (%6.3f, %6.3f, %6.3f) %6.3f
}}}
Generally, the logfile usage above does not make much sense.
BTW, it is really a '''bad''' idea to load the whole std namespace in a
header file. ''using namespace std'' directive should never be used in a
header file. See
[source:trunk/qgis/src/plugins/dxf2shp_converter/builder.h at 9036#L28
builder.h], line 28
--
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1236>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list