aboutsummaryrefslogtreecommitdiff
path: root/VectorType.cpp
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2016-11-14 19:08:24 -0800
committerYifan Hong <elsk@google.com>2016-11-16 19:00:31 +0000
commit859e53f03cdbed35b0aa9faf60c9a13dc29b11c1 (patch)
tree646573fc302990f3c7e41b7107c83a433747fd1b /VectorType.cpp
parentf9dc1bd1b612af829fb6fae31dc11998c8c02351 (diff)
downloadhidl-859e53f03cdbed35b0aa9faf60c9a13dc29b11c1.tar.gz
Split into HidlSupport and HidlTransportSupport.
* move read/writeToParcel for Status and hidl_version. * move findInParcel for hidl_vec. Bug: 32756130 Test: hidl_test Change-Id: I9b0b5155cc1854575452fe3f15866694835fa996
Diffstat (limited to 'VectorType.cpp')
-rw-r--r--VectorType.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/VectorType.cpp b/VectorType.cpp
index b3e72359..da09884b 100644
--- a/VectorType.cpp
+++ b/VectorType.cpp
@@ -368,6 +368,7 @@ void VectorType::emitResolveReferencesEmbeddedHelper(
CHECK(needsResolveReferences() && mElementType->needsResolveReferences());
const std::string nameDeref = name + (nameIsPointer ? "->" : ".");
+ const std::string nameDerefed = (nameIsPointer ? "*" : "") + name;
std::string elementType = mElementType->getCppStackType();
std::string myChildName = childName, myChildOffset = childOffsetText;
@@ -377,7 +378,8 @@ void VectorType::emitResolveReferencesEmbeddedHelper(
myChildOffset = "0";
out << "size_t " << myChildName << ";\n";
- out << "_hidl_err = " << nameDeref << "findInParcel("
+ out << "_hidl_err = ::android::hardware::findInParcel("
+ << nameDerefed << ", "
<< (parcelObjIsPointer ? "*" : "") << parcelObj << ", "
<< "&" << myChildName
<< ");\n";