Bug 1680257 - Use default initialization for qcms_modular_transform. r=aosmond

Differential Revision: https://phabricator.services.mozilla.com/D98467
This commit is contained in:
Jeff Muizelaar 2020-12-02 16:01:00 +00:00
Родитель 96ee4b6e22
Коммит c949054c94
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -35,8 +35,7 @@ use crate::{
}; };
use ::libc::{self, free, malloc, memcpy}; use ::libc::{self, free, malloc, memcpy};
#[repr(C)] #[derive(Clone, Default)]
#[derive(Clone)]
pub struct qcms_modular_transform { pub struct qcms_modular_transform {
pub matrix: matrix, pub matrix: matrix,
pub tx: f32, pub tx: f32,
@ -688,8 +687,8 @@ unsafe extern "C" fn qcms_transform_module_matrix(
i = i + 1 i = i + 1
} }
} }
unsafe extern "C" fn qcms_modular_transform_alloc() -> Option<Box<qcms_modular_transform>> { fn qcms_modular_transform_alloc() -> Option<Box<qcms_modular_transform>> {
return Some(Box::new(std::mem::zeroed())) return Some(Box::new(Default::default()))
} }
fn qcms_modular_transform_release(mut t: Option<Box<qcms_modular_transform>>) { fn qcms_modular_transform_release(mut t: Option<Box<qcms_modular_transform>>) {
// destroy a list of transforms non-recursively // destroy a list of transforms non-recursively