summaryrefslogtreecommitdiff
path: root/libs/binder/TextOutput.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2022-09-29 22:38:49 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-09-29 22:38:49 +0000
commit58864fd37f16478dc9519ef71cc4d5e4b1f32aac (patch)
tree5f4cc80f1bb23e74a47c4092633988bf859c4ff3 /libs/binder/TextOutput.cpp
parent90d6f65f5552e4ac7bdb278c6ce5618bfe1c2f65 (diff)
parent7063b526b67f1e4ba122abcabcbd5f2093515d0a (diff)
Merge "libbinder : Use logging from liblog"
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);