summaryrefslogtreecommitdiff
path: root/drmmode.h
diff options
context:
space:
mode:
authorZach Reizner <zachr@google.com>2015-10-28 19:08:45 -0700
committerZach Reizner <zachr@google.com>2015-10-29 09:59:39 -0700
commitff30b52303cdbeb9cbfb054e2a12da1135ea49c9 (patch)
treed6b9dbc08f43ae2c4814c23c653e632b4180bae1 /drmmode.h
parent7cd2643b0de900e00e5b0cc0bd6dbbc649840b02 (diff)
downloaddrm_hwcomposer-ff30b52303cdbeb9cbfb054e2a12da1135ea49c9.tar.gz
drm_hwcomposer-ff30b52303cdbeb9cbfb054e2a12da1135ea49c9.tar.xz
drm_hwcomposer: polish for old DRM wrapper code
- deleted private copy constructors - replace delete with unique_ptr - use in-class assignment - remove default constructors/destructors when no longer needed - remove most iterators used in for loops - move UniqueFd to its own header so drmresources can use it Change-Id: Ib20cc0949cf4d381a58548b8156c5cb368ca3efe
Diffstat (limited to 'drmmode.h')
-rw-r--r--drmmode.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/drmmode.h b/drmmode.h
index 1110ce8..b383168 100644
--- a/drmmode.h
+++ b/drmmode.h
@@ -25,9 +25,8 @@ namespace android {
class DrmMode {
public:
+ DrmMode() = default;
DrmMode(drmModeModeInfoPtr m);
- DrmMode();
- ~DrmMode();
bool operator==(const drmModeModeInfo &m) const;
void ToDrmModeModeInfo(drm_mode_modeinfo *m) const;
@@ -56,25 +55,25 @@ class DrmMode {
std::string name() const;
private:
- uint32_t id_;
+ uint32_t id_ = 0;
- uint32_t clock_;
+ uint32_t clock_ = 0;
- uint32_t h_display_;
- uint32_t h_sync_start_;
- uint32_t h_sync_end_;
- uint32_t h_total_;
- uint32_t h_skew_;
+ uint32_t h_display_ = 0;
+ uint32_t h_sync_start_ = 0;
+ uint32_t h_sync_end_ = 0;
+ uint32_t h_total_ = 0;
+ uint32_t h_skew_ = 0;
- uint32_t v_display_;
- uint32_t v_sync_start_;
- uint32_t v_sync_end_;
- uint32_t v_total_;
- uint32_t v_scan_;
- uint32_t v_refresh_;
+ uint32_t v_display_ = 0;
+ uint32_t v_sync_start_ = 0;
+ uint32_t v_sync_end_ = 0;
+ uint32_t v_total_ = 0;
+ uint32_t v_scan_ = 0;
+ uint32_t v_refresh_ = 0;
- uint32_t flags_;
- uint32_t type_;
+ uint32_t flags_ = 0;
+ uint32_t type_ = 0;
std::string name_;
};