summaryrefslogtreecommitdiff
path: root/base/HidlSupport.cpp
diff options
context:
space:
mode:
authorScott Randolph <randolphs@google.com>2017-04-06 22:36:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-04-06 22:36:59 +0000
commit40ccc88443a4c5854dcc6dbd557f3e5111f2cc49 (patch)
tree08c9fb7baa058d02b2e04828acc95e465e638125 /base/HidlSupport.cpp
parentc601c5f21808844e614015eabc03e9c71f5aae42 (diff)
parent0c84ab4192f9b0b03b9840b85fc430afa17f55f1 (diff)
downloadlibhidl-40ccc88443a4c5854dcc6dbd557f3e5111f2cc49.tar.gz
Merge "Implicit const char* cast removed, operator<< added to hidl_string." into oc-dev
Diffstat (limited to 'base/HidlSupport.cpp')
-rw-r--r--base/HidlSupport.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp
index 45dd8d1..8223599 100644
--- a/base/HidlSupport.cpp
+++ b/base/HidlSupport.cpp
@@ -209,8 +209,9 @@ hidl_string::operator std::string() const {
return std::string(mBuffer, mSize);
}
-hidl_string::operator const char *() const {
- return mBuffer;
+std::ostream& operator<<(std::ostream& os, const hidl_string& str) {
+ os << str.c_str();
+ return os;
}
void hidl_string::copyFrom(const char *data, size_t size) {