aboutsummaryrefslogtreecommitdiff
path: root/generateCppImpl.cpp
diff options
context:
space:
mode:
authorTimur Iskhakov <iskhakovt@google.com>2017-08-09 11:04:54 -0700
committerTimur Iskhakov <iskhakovt@google.com>2017-08-10 20:59:53 +0000
commit7fa79f6ab1ded82691094bc6337bb8be39fae58d (patch)
treec001263b3227957e770afb1ada15d003f670ea23 /generateCppImpl.cpp
parent7296af19687b1c90dfd238398cd2c8ccb6bcd232 (diff)
downloadhidl-7fa79f6ab1ded82691094bc6337bb8be39fae58d.tar.gz
Merge structures with duplication features
TypedVar (function argument) and CompoundField (struct/union field) have exactly same features: they store Reference<Type> type and string name, so they are merged into one "Named Reference" type. Test: compiles, hidl_test Change-Id: I6135075e5a4e2d19589af16581ceac8ab430ecc9
Diffstat (limited to 'generateCppImpl.cpp')
-rw-r--r--generateCppImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/generateCppImpl.cpp b/generateCppImpl.cpp
index ae955904..90331b6a 100644
--- a/generateCppImpl.cpp
+++ b/generateCppImpl.cpp
@@ -20,6 +20,7 @@
#include "EnumType.h"
#include "Interface.h"
#include "Method.h"
+#include "Reference.h"
#include "ScalarType.h"
#include "Scope.h"
@@ -62,7 +63,7 @@ status_t AST::generateStubImplMethod(Formatter &out,
out.indent();
out << "// TODO implement\n";
- const TypedVar *elidedReturn = method->canElideCallback();
+ const NamedReference<Type>* elidedReturn = method->canElideCallback();
if (elidedReturn == nullptr) {
out << "return Void();\n";