Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid use of stream operator dxf2shp converter #11296

Closed
qgib opened this issue Aug 21, 2008 · 2 comments
Closed

Invalid use of stream operator dxf2shp converter #11296

qgib opened this issue Aug 21, 2008 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins

Comments

@qgib
Copy link
Contributor

qgib commented Aug 21, 2008

Author Name: Mateusz Loskot - (Mateusz Loskot -)
Original Redmine Issue: 1236

Redmine category:c++_plugins
Assignee: nobody -


logfile object below is of std::ostream type:

logfile << "(Add Circle  (%6.3f, %6.3f, %6.3f) %6.3f\
", 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@9036#L28 builder.h], line 28

@qgib
Copy link
Contributor Author

qgib commented Aug 22, 2008

Author Name: Mateusz Loskot - (Mateusz Loskot -)


I've forgot to tell where the buggy usage of stream occurs: [source:trunk/qgis/src/plugins/dxf2shp_converter/builder.cpp@9036#L398 builder.cpp], line 398

@qgib
Copy link
Contributor Author

qgib commented Aug 23, 2008

Author Name: Jürgen Fischer (@jef-n)


I cleaned up the dxf2shp plugin a bit in 07c905b (SVN r9133)


  • resolution was changed from to fixed
  • status_id was changed from Open to Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins
Projects
None yet
Development

No branches or pull requests

1 participant