Merge "Prevent errors in compilation of c++-impl."
am: ab099dd0da

Change-Id: Ibd7a034ea6bbbfb9c4360c28a9d3d5bd5fd13dc8
diff --git a/generateCppImpl.cpp b/generateCppImpl.cpp
index bfd8950..939bcc2 100644
--- a/generateCppImpl.cpp
+++ b/generateCppImpl.cpp
@@ -148,10 +148,11 @@
         out << "using " << name.cppName() << ";\n";
     }
 
+    out << "using ::android::hardware::hidl_array;\n";
+    out << "using ::android::hardware::hidl_string;\n";
+    out << "using ::android::hardware::hidl_vec;\n";
     out << "using ::android::hardware::Return;\n";
     out << "using ::android::hardware::Void;\n";
-    out << "using ::android::hardware::hidl_vec;\n";
-    out << "using ::android::hardware::hidl_string;\n";
     out << "using ::android::sp;\n";
 
     out << "\n";
diff --git a/main.cpp b/main.cpp
index 29de12c..a4f5dc0 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1171,14 +1171,14 @@
 
             case 'L':
             {
-                CHECK(outputFormat == nullptr); // only one -L option
+                CHECK(outputFormat == nullptr) << "Only one -L option allowed.";
                 for (auto &e : formats) {
                     if (e.mKey == optarg) {
                         outputFormat = &e;
                         break;
                     }
                 }
-                CHECK(outputFormat != nullptr);
+                CHECK(outputFormat != nullptr) << "Output format not recognized.";
                 break;
             }