mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
bindings/capi: fix c compatibility warnings.
warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat]
This commit is contained in:
parent
eef7620bc8
commit
3e18b85f99
1 changed files with 2 additions and 17 deletions
|
@ -32,21 +32,6 @@ using namespace tvg;
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct _Tvg_Canvas
|
|
||||||
{
|
|
||||||
//Dummy for Direct Casting
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _Tvg_Paint
|
|
||||||
{
|
|
||||||
//Dummy for Direct Casting
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _Tvg_Gradient
|
|
||||||
{
|
|
||||||
//Dummy for Direct Casting
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/* Engine API */
|
/* Engine API */
|
||||||
|
@ -144,7 +129,7 @@ TVG_EXPORT Tvg_Result tvg_canvas_sync(Tvg_Canvas* canvas)
|
||||||
TVG_EXPORT Tvg_Result tvg_paint_del(Tvg_Paint* paint)
|
TVG_EXPORT Tvg_Result tvg_paint_del(Tvg_Paint* paint)
|
||||||
{
|
{
|
||||||
if (!paint) return TVG_RESULT_INVALID_ARGUMENT;
|
if (!paint) return TVG_RESULT_INVALID_ARGUMENT;
|
||||||
delete(paint);
|
delete(reinterpret_cast<Paint*>(paint));
|
||||||
return TVG_RESULT_SUCCESS;
|
return TVG_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,7 +407,7 @@ TVG_EXPORT Tvg_Gradient* tvg_radial_gradient_new()
|
||||||
TVG_EXPORT Tvg_Result tvg_gradient_del(Tvg_Gradient* grad)
|
TVG_EXPORT Tvg_Result tvg_gradient_del(Tvg_Gradient* grad)
|
||||||
{
|
{
|
||||||
if (!grad) return TVG_RESULT_INVALID_ARGUMENT;
|
if (!grad) return TVG_RESULT_INVALID_ARGUMENT;
|
||||||
delete(grad);
|
delete(reinterpret_cast<Fill*>(grad));
|
||||||
return TVG_RESULT_SUCCESS;
|
return TVG_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue