Remove unneeded ObjectSubclass::new() functions where not needed

This commit is contained in:
Sebastian Dröge 2018-12-19 13:23:02 +02:00
parent a8215ad711
commit f374d7fedf
7 changed files with 0 additions and 30 deletions

View file

@ -532,10 +532,6 @@ impl ObjectSubclass for AppSrc {
});
}
fn new() -> Self {
unreachable!()
}
fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self {
let templ = klass.get_pad_template("src").unwrap();
let src_pad = gst::Pad::new_from_template(&templ, "src");

View file

@ -661,10 +661,6 @@ impl ObjectSubclass for ProxySink {
klass.install_properties(&PROPERTIES_SINK);
}
fn new() -> Self {
unreachable!()
}
fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self {
let templ = klass.get_pad_template("sink").unwrap();
let sink_pad = gst::Pad::new_from_template(&templ, "sink");

View file

@ -793,10 +793,6 @@ impl ObjectSubclass for Queue {
klass.install_properties(&PROPERTIES);
}
fn new() -> Self {
unreachable!()
}
fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self {
let templ = klass.get_pad_template("sink").unwrap();
let sink_pad = gst::Pad::new_from_template(&templ, "sink");

View file

@ -592,10 +592,6 @@ impl ObjectSubclass for TcpClientSrc {
klass.install_properties(&PROPERTIES);
}
fn new() -> Self {
unreachable!()
}
fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self {
let templ = klass.get_pad_template("src").unwrap();
let src_pad = gst::Pad::new_from_template(&templ, "src");

View file

@ -878,10 +878,6 @@ impl ObjectSubclass for UdpSrc {
klass.install_properties(&PROPERTIES);
}
fn new() -> Self {
unreachable!()
}
fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self {
let templ = klass.get_pad_template("src").unwrap();
let src_pad = gst::Pad::new_from_template(&templ, "src");

View file

@ -1143,10 +1143,6 @@ impl ObjectSubclass for ToggleRecord {
glib_object_subclass!();
fn new() -> Self {
unreachable!();
}
fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self {
let templ = klass.get_pad_template("sink").unwrap();
let sinkpad = gst::Pad::new_from_template(&templ, "sink");

View file

@ -162,12 +162,6 @@ impl ObjectSubclass for Identity {
// This macro provides some boilerplate.
glib_object_subclass!();
// By default this would be called for creating a new instance but we
// want access to the class struct below so this function is unreachable
fn new() -> Self {
unreachable!();
}
// Called when a new instance is to be created. We need to return an instance
// of our struct here and also get the class struct passed in case it's needed
fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self {