Don't copy callback values.
Bug: 32640345
Test: compiles, generated code compiles
Change-Id: I108211a14277d5499d290a8db146ad264cc0216f
diff --git a/generateCpp.cpp b/generateCpp.cpp
index f17025c..573a662 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -1718,7 +1718,7 @@
const Interface *iface = mRootScope->getInterface();
- out << "for (auto callback: mInstrumentationCallbacks) {\n";
+ out << "for (const auto &callback: mInstrumentationCallbacks) {\n";
out.indent();
out << "callback("
<< event_str