Pass value object attributes by reference (instead of pointer)

This underlines that no reference inside the setter is taken,
and that these attributes are non-nullable.

Also removes a couple of superfluous attribute macros.
This commit is contained in:
Jonas Kulla 2014-10-25 23:33:41 +02:00
parent 5549ff78f0
commit c9d5059238
29 changed files with 92 additions and 110 deletions

View file

@ -57,10 +57,10 @@ MRB_METHOD(bitmapInitialize)
mrb_value fontProp = wrapProperty(mrb, self, font, CSfont, FontType);
wrapProperty(mrb, fontProp, font->getColor(), CScolor, ColorType);
wrapProperty(mrb, fontProp, &font->getColor(), CScolor, ColorType);
if (rgssVer >= 3)
wrapProperty(mrb, fontProp, font->getOutColor(), CSout_color, ColorType);
wrapProperty(mrb, fontProp, &font->getOutColor(), CSout_color, ColorType);
return self;
}
@ -296,7 +296,7 @@ MRB_METHOD(bitmapSetFont)
font = getPrivateDataCheck<Font>(mrb, fontObj, FontType);
GUARD_EXC( b->setFont(font); )
GUARD_EXC( b->setFont(*font); )
return mrb_nil_value();
}