mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Fix some build warnings
- Mark some instances of unused fields and variables as as allowed, when they are used for memory management. - Remove the use of some deprecated function.s Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
9a03911abf
commit
c021df027a
5 changed files with 11 additions and 12 deletions
|
@ -68,12 +68,15 @@ struct OS2Table {
|
|||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[allow(unused)]
|
||||
pub struct FontHandle {
|
||||
// The font binary. This must stay valid for the lifetime of the font,
|
||||
// if the font is created using FT_Memory_Face.
|
||||
font_data: Arc<FontTemplateData>,
|
||||
face: FT_Face,
|
||||
handle: FontContextHandle,
|
||||
// `context_handle` is unused, but here to ensure that the underlying
|
||||
// FreeTypeLibraryHandle is not dropped.
|
||||
context_handle: FontContextHandle,
|
||||
can_do_fast_shaping: bool,
|
||||
}
|
||||
|
||||
|
@ -144,7 +147,7 @@ impl FontHandleMethods for FontHandle {
|
|||
let mut handle = FontHandle {
|
||||
face: face,
|
||||
font_data: template,
|
||||
handle: fctx.clone(),
|
||||
context_handle: fctx.clone(),
|
||||
can_do_fast_shaping: false,
|
||||
};
|
||||
// TODO (#11310): Implement basic support for GPOS and GSUB.
|
||||
|
|
|
@ -75,6 +75,7 @@ pub struct FreeTypeLibraryHandle {
|
|||
}
|
||||
|
||||
impl Drop for FreeTypeLibraryHandle {
|
||||
#[allow(unused)]
|
||||
fn drop(&mut self) {
|
||||
assert!(!self.ctx.is_null());
|
||||
unsafe {
|
||||
|
@ -130,11 +131,7 @@ impl FontContextHandle {
|
|||
FT_Add_Default_Modules(ctx);
|
||||
|
||||
FontContextHandle {
|
||||
ctx: Rc::new(FreeTypeLibraryHandle {
|
||||
ctx: ctx,
|
||||
mem: mem,
|
||||
user: user,
|
||||
}),
|
||||
ctx: Rc::new(FreeTypeLibraryHandle { ctx, mem, user }),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue