From b88995b0bda9605a95b370f1822fe0151b73fb5a Mon Sep 17 00:00:00 2001 From: jf-home Date: Sun, 1 Sep 2024 18:48:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=84=9F=E8=A7=89=E5=BE=97=E5=AD=A6=E4=B9=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E4=BC=98=E7=A7=80=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A1=86=E6=9E=B6=E4=BA=86=E3=80=82=E6=88=91=E5=B0=9D=E8=AF=95?= =?UTF-8?q?=E4=BA=86=E5=BE=88=E5=A4=9A=EF=BC=8C=E4=BD=86=E7=8E=B0=E5=9C=A8?= =?UTF-8?q?=E6=83=B3=E4=B8=8D=E5=88=B0=E5=A5=BD=E7=9A=84=E5=8A=9E=E6=B3=95?= =?UTF-8?q?=E4=BA=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/rect.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/library/rect.c b/library/rect.c index f2c6a76..6769c59 100644 --- a/library/rect.c +++ b/library/rect.c @@ -11,11 +11,8 @@ double rect_area(void *self, void *parent) void rect_draw(void *self, void *parent) { - // struct _rect *pthis = (struct _rect *)parent; - // pthis->shape->vtb.draw(self, NULL); - - struct _rect *pthis = container_of(parent, struct _rect, self); - pthis->shape->vtb.draw(pthis, NULL); + struct _rect *pthis = (struct _rect *)parent; + pthis->shape->vtb.draw(self, NULL); } double _rect_area(void *self, void *parent)