diff options
author | Rahul Chaudhry <rahulchaudhry@google.com> | 2016-11-09 01:06:13 +0100 |
---|---|---|
committer | Rahul Chaudhry <rahulchaudhry@google.com> | 2016-11-09 01:34:01 +0100 |
commit | 4f7faac8d705317271e1d6aa773f00f05ca70848 (patch) | |
tree | b1c1b9cd076b26723d7455b3880052250d270ac8 /minui/graphics_adf.cpp | |
parent | Merge "Make make_parent() to take const argument" am: 52e2a97aa7 am: 1fd9f0aff7 am: 260573b3c2 (diff) | |
download | android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.gz android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.bz2 android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.lz android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.xz android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.tar.zst android_bootable_recovery-4f7faac8d705317271e1d6aa773f00f05ca70848.zip |
Diffstat (limited to 'minui/graphics_adf.cpp')
-rw-r--r-- | minui/graphics_adf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/minui/graphics_adf.cpp b/minui/graphics_adf.cpp index 3c3541094..9e262b044 100644 --- a/minui/graphics_adf.cpp +++ b/minui/graphics_adf.cpp @@ -68,9 +68,9 @@ static int adf_surface_init(adf_pdata *pdata, drm_mode_modeinfo *mode, adf_surfa surf->base.row_bytes = surf->pitch; surf->base.pixel_bytes = (pdata->format == DRM_FORMAT_RGB565) ? 2 : 4; - surf->base.data = reinterpret_cast<uint8_t*>(mmap(NULL, - surf->pitch * surf->base.height, PROT_WRITE, - MAP_SHARED, surf->fd, surf->offset)); + surf->base.data = static_cast<uint8_t*>(mmap(NULL, + surf->pitch * surf->base.height, PROT_WRITE, + MAP_SHARED, surf->fd, surf->offset)); if (surf->base.data == MAP_FAILED) { close(surf->fd); return -errno; @@ -259,7 +259,7 @@ static void adf_exit(minui_backend *backend) minui_backend *open_adf() { - adf_pdata* pdata = reinterpret_cast<adf_pdata*>(calloc(1, sizeof(*pdata))); + adf_pdata* pdata = static_cast<adf_pdata*>(calloc(1, sizeof(*pdata))); if (!pdata) { perror("allocating adf backend failed"); return NULL; |