Update for locking gBn/sConstructorMap.

Test: builds
Test: hidl_test

Bug: 35041785
Change-Id: If513a5d901bb365bdb2725363c51a9f4606b4a4e
diff --git a/generateCpp.cpp b/generateCpp.cpp
index 2ea14ba..1302d81 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -1011,11 +1011,11 @@
         out << "__attribute__((constructor))";
         out << "static void static_constructor() {\n";
         out.indent([&] {
-            out << "::android::hardware::gBnConstructorMap["
+            out << "::android::hardware::gBnConstructorMap.set("
                 << iface->localName()
-                << "::descriptor]\n";
+                << "::descriptor,\n";
             out.indent(2, [&] {
-                out << "= [](void *iIntf) -> ::android::sp<::android::hardware::IBinder> {\n";
+                out << "[](void *iIntf) -> ::android::sp<::android::hardware::IBinder> {\n";
                 out.indent([&] {
                     out << "return new "
                         << iface->getStubName()
@@ -1023,13 +1023,13 @@
                         << iface->localName()
                         << " *>(iIntf));\n";
                 });
-                out << "};\n";
+                out << "});\n";
             });
-            out << "::android::hardware::gBsConstructorMap["
+            out << "::android::hardware::gBsConstructorMap.set("
                 << iface->localName()
-                << "::descriptor]\n";
+                << "::descriptor,\n";
             out.indent(2, [&] {
-                out << "= [](void *iIntf) -> ::android::sp<"
+                out << "[](void *iIntf) -> ::android::sp<"
                     << gIBaseFqName.cppName()
                     << "> {\n";
                 out.indent([&] {
@@ -1039,7 +1039,7 @@
                         << iface->localName()
                         << " *>(iIntf));\n";
                 });
-                out << "};\n";
+                out << "});\n";
             });
         });
         out << "};\n\n";