diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-06-27 10:15:48 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-06-27 14:50:01 +0000 |
commit | 44dd818b4df46ca9a6b6aae96b20b606253196eb (patch) | |
tree | 5c4f065955df6cfff29dcab6e652e3c67ac43af0 /core/fxcrt/cfx_bytestring.cpp | |
parent | 3bcabf323f096156545d279c6381317fbc7fbd5a (diff) | |
download | pdfium-44dd818b4df46ca9a6b6aae96b20b606253196eb.tar.xz |
Adding overload for ostream << CFX_ByteString
Bug: pdfium:731
Change-Id: I285332c8f9d988327e8633cb0746af2b76c401e5
Reviewed-on: https://pdfium-review.googlesource.com/6911
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_bytestring.cpp')
-rw-r--r-- | core/fxcrt/cfx_bytestring.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_bytestring.cpp b/core/fxcrt/cfx_bytestring.cpp index b83c59ffeb..967bcce0eb 100644 --- a/core/fxcrt/cfx_bytestring.cpp +++ b/core/fxcrt/cfx_bytestring.cpp @@ -867,8 +867,13 @@ FX_STRSIZE FX_ftoa(float d, char* buf) { } return buf_size; } + CFX_ByteString CFX_ByteString::FormatFloat(float d, int precision) { char buf[32]; FX_STRSIZE len = FX_ftoa(d, buf); return CFX_ByteString(buf, len); } + +std::ostream& operator<<(std::ostream& os, const CFX_ByteString& str) { + return os.write(str.c_str(), str.GetLength()); +} |