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

Second try #340

Closed
wants to merge 6 commits into from
Closed

Second try #340

wants to merge 6 commits into from

Conversation

spacemoose
Copy link
Contributor

I saw that my previous pull request failed to build for OSX. I was able to reproduce and fix the problem using clang to compile, so I'm trying again.

I put the PrintfArgFormatting changes into one commit, and make the clang error fixes in another. Clang gave undefined symbol errors for the BasicData on the header only tests, so I stopped defining those externally.

I will admit to being unsure of the fixes, so please make any improvements/corrections, or let me know what you need me to change.

  • printf.h created and placed PrintfArgFormat ting classes in this file.
  • Created a DefaultPrintfArgFormatter, analagous to the ArgFormatter class for the python-style formatter.
  • Added another template parameter to PrintfArgFormatter, enabling customisation of the PrintfArgFormatter through subclassing, as with the BasicArgFormatter.
  • Created a very simple unit test for the new functionality in custom-formatterer-test.cc

I hope the changes are acceptable. Once we wrap up this issue, I think PrintfArgFormatter should probably come out of internal, but I thought I'd leave that for a next step.

Looking forward to your feedback.

@spacemoose
Copy link
Contributor Author

Okay, I figured out the windows build issue. Please let me know what you think of the changes.

@@ -26,336 +26,19 @@
*/

#include "fmt/format.h"
#include "printf.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest including "fmt/printf.h" for consistency.

@vitaut
Copy link
Contributor

vitaut commented Jun 8, 2016

Looks great, thanks for working on this. Just a few minor comments above.

@spacemoose
Copy link
Contributor Author

Awesome, I'll get the changes done tonight.

@vitaut
Copy link
Contributor

vitaut commented Jun 9, 2016

Squashed commits and merged with some changes in 72d51e0. Thanks!

@vitaut vitaut closed this Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants