Review: tinyformat fixes#328
Conversation
All varargs error() functions are replaced here by an equivalent function using tfm::format to do the formatting instead. An effort has been made to keep implementation details out of the headers by introducing private non-formatting functions like ImageInput::append_error() to be called by error(). tfm::format has been brought into the Strutil namespace to replace Strutil::format(). Strutil::vformat() remains as-is, because it is useful in certain circumstances where external libraries pass a va_list. The error formatters inside ErrorHandler have not been changed yet, since it's not quite clear what to replace the va_list functions like ErrorHandler::vError() with.
|
LGTM |
|
On Thu, Apr 19, 2012 at 8:03 AM, Larry Gritz
There's one thing I don't understand about your use of TINYFORMAT_WRAP_FORMAT (static std::string, format, /**/, Expands to a set of functions in which there is two distinct kinds of the verions with more than one argument are templates: What I'd like to understand is why these the static keyword is ~Chris |
|
Mistake? Chris Foster reply@reply.github.com wrote:
Larry Gritz |
|
I was assuming there was something very subtle concerning linkage which I didn't understand :) Ah, maybe I see what happened - did you copy the usage from ustring.h ? I made the same mistake there when I was converting the static ustring::format function. Hold on, I'll make a little patch to fix both occurrences of this oddity. |
|
Yes, that's exactly what happened. Chris Foster reply@reply.github.com wrote:
Larry Gritz |
Needed some other tweaks to work well with OSL (and presumably other clients).