inputflinger: Use #pragma once instead of explicit define guards
The #pragma once directive is commonly used by modern cpp code, and
support for its use in Andorid is proposed in go/droidcppstyle.
Bug: 245989146
Test: Build, Presubmit
Change-Id: Id257f056972b753f505afe1d253d306bb1824098
diff --git a/services/inputflinger/tests/TestInputListener.h b/services/inputflinger/tests/TestInputListener.h
index 0bdfc6b..cad698f 100644
--- a/services/inputflinger/tests/TestInputListener.h
+++ b/services/inputflinger/tests/TestInputListener.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef _UI_TEST_INPUT_LISTENER_H
-#define _UI_TEST_INPUT_LISTENER_H
+#pragma once
#include <android-base/thread_annotations.h>
#include <gmock/gmock.h>
@@ -103,4 +102,3 @@
};
} // namespace android
-#endif
diff --git a/services/inputflinger/tests/TestInputListenerMatchers.h b/services/inputflinger/tests/TestInputListenerMatchers.h
index 6c783a7..03736a3 100644
--- a/services/inputflinger/tests/TestInputListenerMatchers.h
+++ b/services/inputflinger/tests/TestInputListenerMatchers.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef _UI_TEST_INPUT_LISTENER_MATCHERS_H
-#define _UI_TEST_INPUT_LISTENER_MATCHERS_H
+#pragma once
#include <android/input.h>
#include <gmock/gmock.h>
@@ -57,4 +56,3 @@
}
} // namespace android
-#endif
diff --git a/services/inputflinger/tests/UinputDevice.h b/services/inputflinger/tests/UinputDevice.h
index a37fc2b..e0ff8c3 100644
--- a/services/inputflinger/tests/UinputDevice.h
+++ b/services/inputflinger/tests/UinputDevice.h
@@ -14,8 +14,7 @@
* limitations under the License.
*/
-#ifndef _UI_TEST_INPUT_UINPUT_INJECTOR_H
-#define _UI_TEST_INPUT_UINPUT_INJECTOR_H
+#pragma once
#include <android-base/unique_fd.h>
#include <gtest/gtest.h>
@@ -155,5 +154,3 @@
};
} // namespace android
-
-#endif // _UI_TEST_INPUT_UINPUT_INJECTOR_H