Commit f374d7fe authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

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

parent a8215ad7
......@@ -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");
......
......@@ -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");
......
......@@ -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");
......
......@@ -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");
......
......@@ -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");
......
......@@ -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");
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment