Rename SimpleReturn --> Return
b/30518487 Optimize out lamdas from HIDL C++ auto-generated code in
common cases
Change-Id: I1c5e61d47904b1b70dc03560796654b98d3f3212
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/generateCpp.cpp b/generateCpp.cpp
index 7e5af7d..ab524d0 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -248,7 +248,7 @@
const TypedVar *elidedReturn = method->canElideCallback();
if (elidedReturn) {
std::string extra;
- out << "virtual ::android::hardware::SimpleReturn<";
+ out << "virtual ::android::hardware::Return<";
out << elidedReturn->type().getCppResultType(&extra) << "> ";
} else {
out << "virtual ::android::hardware::Status ";
@@ -314,7 +314,7 @@
out << "::android::hardware::Status ";
} else {
std::string extra;
- out << "::android::hardware::SimpleReturn<";
+ out << "::android::hardware::Return<";
out << elidedReturn->type().getCppResultType(&extra) << "> ";
}
out << method->name()
@@ -640,7 +640,7 @@
const TypedVar *elidedReturn = method->canElideCallback();
if (elidedReturn) {
std::string extra;
- out << "::android::hardware::SimpleReturn<";
+ out << "::android::hardware::Return<";
out << elidedReturn->type().getCppResultType(&extra) << "> ";
} else {
out << "::android::hardware::Status ";
@@ -743,7 +743,7 @@
std::string extra;
out << "_hidl_status.setFromStatusT(_hidl_err);\n";
- out << "return ::android::hardware::SimpleReturn<";
+ out << "return ::android::hardware::Return<";
out << elidedReturn->type().getCppResultType(&extra)
<< ">(" << elidedReturn->name() << ");\n\n";
@@ -751,7 +751,7 @@
out << "_hidl_error:\n";
out.indent();
out << "_hidl_status.setFromStatusT(_hidl_err);\n";
- out << "return ::android::hardware::SimpleReturn<";
+ out << "return ::android::hardware::Return<";
out << method->results().at(0)->type().getCppResultType(&extra)
<< ">(_hidl_status);\n";
} else {