drm_hwcomposer: Add method GetOptionalConnectorProperty
Add conveniece method GetOptionalConnectorProperty to reduce boilerplate
/*true=*/ notation.
Change-Id: I888be527dfbecc5c7ccfdd7661e3aeb4a9af04c7
Signed-off-by: Sasha McIntosh <sashamcintosh@google.com>
diff --git a/drm/DrmConnector.h b/drm/DrmConnector.h
index be84ae3..e49cee0 100644
--- a/drm/DrmConnector.h
+++ b/drm/DrmConnector.h
@@ -147,6 +147,10 @@
auto Init() -> bool;
auto GetConnectorProperty(const char *prop_name, DrmProperty *property,
bool is_optional = false) -> bool;
+ auto GetOptionalConnectorProperty(const char *prop_name,
+ DrmProperty *property) -> bool {
+ return GetConnectorProperty(prop_name, property, /*is_optional=*/true);
+ }
const uint32_t index_in_res_array_;