Add missing default implementations (new_without_default)
This commit is contained in:
parent
9d88168d0e
commit
8fb5491e15
|
@ -203,6 +203,7 @@ impl Vars {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Console {
|
pub struct Console {
|
||||||
history: Vec<Component>,
|
history: Vec<Component>,
|
||||||
dirty: bool,
|
dirty: bool,
|
||||||
|
|
|
@ -53,6 +53,12 @@ pub struct Filter {
|
||||||
bits: BSet,
|
bits: BSet,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Filter {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Filter {
|
impl Filter {
|
||||||
/// Creates an empty filter which matches everything
|
/// Creates an empty filter which matches everything
|
||||||
pub fn new() -> Filter {
|
pub fn new() -> Filter {
|
||||||
|
@ -106,6 +112,7 @@ struct EntityState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Stores and manages a collection of entities.
|
/// Stores and manages a collection of entities.
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Manager {
|
pub struct Manager {
|
||||||
num_components: usize,
|
num_components: usize,
|
||||||
entities: Vec<(Option<EntityState>, u32)>,
|
entities: Vec<(Option<EntityState>, u32)>,
|
||||||
|
|
|
@ -264,6 +264,7 @@ pub const NEAREST_MIPMAP_LINEAR: TextureValue = gl::NEAREST_MIPMAP_LINEAR as Tex
|
||||||
pub const CLAMP_TO_EDGE: TextureValue = gl::CLAMP_TO_EDGE as TextureValue;
|
pub const CLAMP_TO_EDGE: TextureValue = gl::CLAMP_TO_EDGE as TextureValue;
|
||||||
|
|
||||||
/// `Texture` is a buffer of data used by fragment shaders.
|
/// `Texture` is a buffer of data used by fragment shaders.
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Texture(u32);
|
pub struct Texture(u32);
|
||||||
|
|
||||||
impl Texture {
|
impl Texture {
|
||||||
|
@ -510,6 +511,7 @@ pub type ShaderParameter = u32;
|
||||||
pub const COMPILE_STATUS: ShaderParameter = gl::COMPILE_STATUS;
|
pub const COMPILE_STATUS: ShaderParameter = gl::COMPILE_STATUS;
|
||||||
pub const INFO_LOG_LENGTH: ShaderParameter = gl::INFO_LOG_LENGTH;
|
pub const INFO_LOG_LENGTH: ShaderParameter = gl::INFO_LOG_LENGTH;
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Program(u32);
|
pub struct Program(u32);
|
||||||
|
|
||||||
impl Program {
|
impl Program {
|
||||||
|
@ -712,6 +714,7 @@ impl Attribute {
|
||||||
// VertexArray is used to store state needed to render vertices.
|
// VertexArray is used to store state needed to render vertices.
|
||||||
// This includes buffers, the format of the buffers and enabled
|
// This includes buffers, the format of the buffers and enabled
|
||||||
// attributes.
|
// attributes.
|
||||||
|
#[derive(Default)]
|
||||||
pub struct VertexArray(u32);
|
pub struct VertexArray(u32);
|
||||||
|
|
||||||
impl VertexArray {
|
impl VertexArray {
|
||||||
|
@ -772,6 +775,7 @@ pub const READ_ONLY: Access = gl::READ_ONLY;
|
||||||
pub const WRITE_ONLY: Access = gl::WRITE_ONLY;
|
pub const WRITE_ONLY: Access = gl::WRITE_ONLY;
|
||||||
|
|
||||||
/// `Buffer` is a storage for vertex data.
|
/// `Buffer` is a storage for vertex data.
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Buffer(u32);
|
pub struct Buffer(u32);
|
||||||
|
|
||||||
impl Buffer {
|
impl Buffer {
|
||||||
|
@ -871,6 +875,7 @@ pub const COLOR_ATTACHMENT_1: Attachment = gl::COLOR_ATTACHMENT1;
|
||||||
pub const COLOR_ATTACHMENT_2: Attachment = gl::COLOR_ATTACHMENT2;
|
pub const COLOR_ATTACHMENT_2: Attachment = gl::COLOR_ATTACHMENT2;
|
||||||
pub const DEPTH_ATTACHMENT: Attachment = gl::DEPTH_ATTACHMENT;
|
pub const DEPTH_ATTACHMENT: Attachment = gl::DEPTH_ATTACHMENT;
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
pub struct Framebuffer(u32);
|
pub struct Framebuffer(u32);
|
||||||
|
|
||||||
pub fn check_framebuffer_status() {
|
pub fn check_framebuffer_status() {
|
||||||
|
|
|
@ -11,6 +11,12 @@ pub struct Info {
|
||||||
last_pos: Position,
|
last_pos: Position,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Info {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Info {
|
impl Info {
|
||||||
pub fn new() -> Info {
|
pub fn new() -> Info {
|
||||||
Info {
|
Info {
|
||||||
|
|
|
@ -282,6 +282,12 @@ pub struct Container {
|
||||||
last_height: f64,
|
last_height: f64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Container {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Container {
|
impl Container {
|
||||||
pub fn new() -> Container {
|
pub fn new() -> Container {
|
||||||
Container {
|
Container {
|
||||||
|
@ -677,6 +683,7 @@ macro_rules! element {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
pub struct $builder {
|
pub struct $builder {
|
||||||
$(
|
$(
|
||||||
$sname: Option<$sty>,
|
$sname: Option<$sty>,
|
||||||
|
|
Loading…
Reference in New Issue