-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Minor C++ improvements #3691
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
Minor C++ improvements #3691
Conversation
@@ -670,10 +670,7 @@ extern "C" { | |||
|
|||
struct module_state | |||
{ | |||
/* The Sun compiler can't handle empty structs */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes smell funny to me, but so do empty structs so...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest version of clang on OS-X Yosemite doesn't like empty structs. It's easiest just to put something in them for everyone than to try to detect the compilers that care. We can spare the extra 4 bytes.
5552584
to
913bf7f
Compare
These changes looks sensible to me. Not sure why Travis doesn't run on the latest version. |
Builds and passes the test both with gcc and locally for me with Clang so merging. |
I generally don't modify the external code unless absolutely necessary -- it makes it harder to update later. But we can also try to submit patches upstream to remove that problem... |
The warning is harmless so I should probably just forget about my obsession with warnings. If there is a clear upstream for Agg i guess that would be fine to submit it there. |
The current upstream for Agg is here (it's a fork of Agg 2.4, so still BSD-compatible): http://sourceforge.net/projects/agg/ I've been experimenting with upgrading to the SVN version there, but there are some regressions with alpha blending that are proving to be tricky. Once solved, though, the killer feature in the new versions is the floating-point image buffers. |
This is just some stuff found with clang-analyzer