mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
common: --unnecessary null check.
This commit is contained in:
parent
1c824ed191
commit
b7dfe661b5
7 changed files with 10 additions and 10 deletions
|
@ -355,7 +355,7 @@ SwRenderer::~SwRenderer()
|
||||||
{
|
{
|
||||||
clearCompositors();
|
clearCompositors();
|
||||||
|
|
||||||
if (surface) delete(surface);
|
delete(surface);
|
||||||
|
|
||||||
if (!sharedMpool) mpoolTerm(mpool);
|
if (!sharedMpool) mpoolTerm(mpool);
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ struct Fill::Impl
|
||||||
|
|
||||||
~Impl()
|
~Impl()
|
||||||
{
|
{
|
||||||
if (dup) delete(dup);
|
delete(dup);
|
||||||
free(colorStops);
|
free(colorStops);
|
||||||
free(transform);
|
free(transform);
|
||||||
}
|
}
|
||||||
|
|
|
@ -380,7 +380,7 @@ Result Paint::composite(std::unique_ptr<Paint> target, CompositeMethod method) n
|
||||||
{
|
{
|
||||||
auto p = target.release();
|
auto p = target.release();
|
||||||
if (pImpl->composite(this, p, method)) return Result::Success;
|
if (pImpl->composite(this, p, method)) return Result::Success;
|
||||||
if (p) delete(p);
|
delete(p);
|
||||||
return Result::InvalidArguments;
|
return Result::InvalidArguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,8 @@ namespace tvg
|
||||||
delete(compData->target);
|
delete(compData->target);
|
||||||
free(compData);
|
free(compData);
|
||||||
}
|
}
|
||||||
if (smethod) delete(smethod);
|
delete(smethod);
|
||||||
if (rTransform) delete(rTransform);
|
delete(rTransform);
|
||||||
}
|
}
|
||||||
|
|
||||||
void method(StrategyMethod* method)
|
void method(StrategyMethod* method)
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct Picture::Impl
|
||||||
|
|
||||||
~Impl()
|
~Impl()
|
||||||
{
|
{
|
||||||
if (paint) delete(paint);
|
delete(paint);
|
||||||
delete(surface);
|
delete(surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ struct RenderStroke
|
||||||
~RenderStroke()
|
~RenderStroke()
|
||||||
{
|
{
|
||||||
free(dashPattern);
|
free(dashPattern);
|
||||||
if (fill) delete(fill);
|
delete(fill);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -164,8 +164,8 @@ struct RenderShape
|
||||||
|
|
||||||
~RenderShape()
|
~RenderShape()
|
||||||
{
|
{
|
||||||
if (fill) delete(fill);
|
delete(fill);
|
||||||
if (stroke) delete(stroke);
|
delete(stroke);
|
||||||
}
|
}
|
||||||
|
|
||||||
void fillColor(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a) const
|
void fillColor(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a) const
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct Saver::Impl
|
||||||
SaveModule* saveModule = nullptr;
|
SaveModule* saveModule = nullptr;
|
||||||
~Impl()
|
~Impl()
|
||||||
{
|
{
|
||||||
if (saveModule) delete(saveModule);
|
delete(saveModule);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue