drm_hwcomposer: Enable performance-avoid-endl clang-tidy check
And fix every related warning.
Change-Id: I6afacef19ac04269245ef687762698be057d420b
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/.ci/Makefile b/.ci/Makefile
index 56d2488..ca0daca 100644
--- a/.ci/Makefile
+++ b/.ci/Makefile
@@ -56,7 +56,6 @@
-readability-math-missing-parentheses \
-readability-avoid-unconditional-preprocessor-if \
-modernize-type-traits \
- -performance-avoid-endl \
TIDY_CHECKS_NORMAL := \
$(TIDY_CHECKS_FINE) \
diff --git a/tests/uevent_print.cpp b/tests/uevent_print.cpp
index 6ffbbfb..cfe2191 100644
--- a/tests/uevent_print.cpp
+++ b/tests/uevent_print.cpp
@@ -7,7 +7,7 @@
int main() {
auto uevent = android::UEvent::CreateInstance();
if (!uevent) {
- std::cout << "Can't initialize UEvent class" << std::endl;
+ std::cout << "Can't initialize UEvent class\n";
return -ENODEV;
}
@@ -18,8 +18,8 @@
continue;
}
- std::cout << "New event #" << number++ << std::endl
- << *msg << std::endl
- << std::endl;
+ std::cout << "New event #" << number++ << '\n'
+ << *msg << '\n'
+ << std::flush;
}
}