mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-15 12:18: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)) {}
|
model_name_(std::move(model_name)) {}
|
||||||
|
|
||||||
FilterRealcugan::~FilterRealcugan() {
|
FilterRealcugan::~FilterRealcugan() {
|
||||||
if (realcugan_) {
|
delete realcugan_;
|
||||||
delete realcugan_;
|
|
||||||
realcugan_ = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int FilterRealcugan::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {
|
int FilterRealcugan::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {
|
||||||
|
@ -26,10 +26,7 @@ FilterRealesrgan::FilterRealesrgan(
|
|||||||
model_name_(std::move(model_name)) {}
|
model_name_(std::move(model_name)) {}
|
||||||
|
|
||||||
FilterRealesrgan::~FilterRealesrgan() {
|
FilterRealesrgan::~FilterRealesrgan() {
|
||||||
if (realesrgan_) {
|
delete realesrgan_;
|
||||||
delete realesrgan_;
|
|
||||||
realesrgan_ = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int FilterRealesrgan::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {
|
int FilterRealesrgan::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {
|
||||||
|
@ -29,10 +29,7 @@ InterpolatorRIFE::InterpolatorRIFE(
|
|||||||
model_name_(std::move(model_name)) {}
|
model_name_(std::move(model_name)) {}
|
||||||
|
|
||||||
InterpolatorRIFE::~InterpolatorRIFE() {
|
InterpolatorRIFE::~InterpolatorRIFE() {
|
||||||
if (rife_) {
|
delete rife_;
|
||||||
delete rife_;
|
|
||||||
rife_ = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int InterpolatorRIFE::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {
|
int InterpolatorRIFE::init(AVCodecContext* dec_ctx, AVCodecContext* enc_ctx, AVBufferRef*) {
|
||||||
|
Loading…
Reference in New Issue
Block a user