summaryrefslogtreecommitdiff
path: root/libs/binder/TextOutput.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2022-09-30 00:05:31 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-09-30 00:05:31 +0000
commit4fc92733321eeb55519ce07ff5a20ed18f0c4faf (patch)
tree707fbdba0412b57460c1435aa0935f6bc58633ab /libs/binder/TextOutput.cpp
parent15775ed47c61fd931cbf6ed71115033cf51db8cd (diff)
parent57ae1ca8d4a6f82fb372d47c2ace6c0c7ad9f5a1 (diff)
Merge "libbinder : Use logging from liblog" am: 58864fd37f am: 424b87710b am: 57ae1ca8d4
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2235623 Change-Id: Ida9349c4c790d0d5625756dd925a978490a722f0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/binder/TextOutput.cpp')
-rw-r--r--libs/binder/TextOutput.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/binder/TextOutput.cpp b/libs/binder/TextOutput.cpp
index a0ade50efb..5dd1f902f8 100644
--- a/libs/binder/TextOutput.cpp
+++ b/libs/binder/TextOutput.cpp
@@ -39,11 +39,10 @@ TextOutput::~TextOutput() {
static void textOutputPrinter(void* cookie, const char* txt)
{
- ((TextOutput*)cookie)->print(txt, strlen(txt));
+ ((std::ostream*)cookie)->write(txt, strlen(txt));
}
-TextOutput& operator<<(TextOutput& to, const TypeCode& val)
-{
+std::ostream& operator<<(std::ostream& to, const TypeCode& val) {
printTypeCode(val.typeCode(), textOutputPrinter, (void*)&to);
return to;
}
@@ -61,8 +60,7 @@ HexDump::HexDump(const void *buf, size_t size, size_t bytesPerLine)
else mAlignment = 1;
}
-TextOutput& operator<<(TextOutput& to, const HexDump& val)
-{
+std::ostream& operator<<(std::ostream& to, const HexDump& val) {
printHexData(0, val.buffer(), val.size(), val.bytesPerLine(),
val.singleLineCutoff(), val.alignment(), val.carrayStyle(),
textOutputPrinter, (void*)&to);