mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-15 04:08:52 +00:00
style(*): remove redundant nullptr checks on object deletion (#1288)
Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
parent
8ffe1b84bd
commit
e7096887ed
@ -32,10 +32,7 @@ FilterRealcugan::FilterRealcugan(
|
||||
model_name_(std::move(model_name)) {}
|
||||
|
||||
FilterRealcugan::~FilterRealcugan() {
|
||||
if (realcugan_) {
|
||||
delete realcugan_;
|
||||
realcugan_ = nullptr;
|
||||
}
|
||||
delete realcugan_;
|
||||
}
|
||||
|
||||
int FilterRealcugan::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {
|
||||
|
@ -26,10 +26,7 @@ FilterRealesrgan::FilterRealesrgan(
|
||||
model_name_(std::move(model_name)) {}
|
||||
|
||||
FilterRealesrgan::~FilterRealesrgan() {
|
||||
if (realesrgan_) {
|
||||
delete realesrgan_;
|
||||
realesrgan_ = nullptr;
|
||||
}
|
||||
delete realesrgan_;
|
||||
}
|
||||
|
||||
int FilterRealesrgan::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {
|
||||
|
@ -29,10 +29,7 @@ InterpolatorRIFE::InterpolatorRIFE(
|
||||
model_name_(std::move(model_name)) {}
|
||||
|
||||
InterpolatorRIFE::~InterpolatorRIFE() {
|
||||
if (rife_) {
|
||||
delete rife_;
|
||||
rife_ = nullptr;
|
||||
}
|
||||
delete rife_;
|
||||
}
|
||||
|
||||
int InterpolatorRIFE::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {
|
||||
|
Loading…
Reference in New Issue
Block a user