Spacing / minor fixes
This commit is contained in:
parent
ab9464006b
commit
711060db8f
|
@ -159,7 +159,7 @@ showExcMessageBox(mrb_state *mrb, mrb_value exc)
|
|||
const char *excClass = mrb_class_name(mrb, mrb_class(mrb, exc));
|
||||
|
||||
char msgBoxText[512];
|
||||
snprintf(msgBoxText, 512, "Script '%s' line %d: %s occured.\n\n%s",
|
||||
snprintf(msgBoxText, sizeof(msgBoxText), "Script '%s' line %d: %s occured.\n\n%s",
|
||||
mrbValueString(file), mrb_fixnum(line), excClass, mrbValueString(mesg));
|
||||
|
||||
shState->eThread().showMessageBox(msgBoxText, SDL_MESSAGEBOX_ERROR);
|
||||
|
|
|
@ -235,10 +235,10 @@ getMrbData(mrb_state *mrb)
|
|||
static inline mrb_value
|
||||
mrb__float_value(mrb_float f)
|
||||
{
|
||||
mrb_value v;
|
||||
mrb_value v;
|
||||
|
||||
MRB_SET_VALUE(v, MRB_TT_FLOAT, value.f, f);
|
||||
return v;
|
||||
MRB_SET_VALUE(v, MRB_TT_FLOAT, value.f, f);
|
||||
return v;
|
||||
}
|
||||
|
||||
inline mrb_sym
|
||||
|
@ -252,7 +252,7 @@ inline T *
|
|||
getPrivateData(mrb_state *mrb, mrb_value self)
|
||||
{
|
||||
mrb_value priv = mrb_obj_iv_get(mrb,
|
||||
mrb_obj_ptr(self),
|
||||
mrb_obj_ptr(self),
|
||||
getSym(mrb, CSpriv_iv));
|
||||
|
||||
return static_cast<T*>(DATA_PTR(priv));
|
||||
|
@ -287,15 +287,15 @@ inline void
|
|||
setPrivateData(mrb_state *mrb, mrb_value self, void *p, const mrb_data_type &type)
|
||||
{
|
||||
RData *data =
|
||||
mrb_data_object_alloc(mrb,
|
||||
mrb_obj_class(mrb, self),
|
||||
p,
|
||||
&type);
|
||||
mrb_data_object_alloc(mrb,
|
||||
mrb_obj_class(mrb, self),
|
||||
p,
|
||||
&type);
|
||||
|
||||
mrb_obj_iv_set(mrb,
|
||||
mrb_obj_ptr(self),
|
||||
mrb_obj_ptr(self),
|
||||
getSym(mrb, CSpriv_iv),
|
||||
mrb_obj_value(data));
|
||||
mrb_obj_value(data));
|
||||
}
|
||||
|
||||
|
||||
|
@ -320,7 +320,7 @@ wrapProperty(mrb_state *mrb, mrb_value self,
|
|||
mrb_obj_iv_set(mrb,
|
||||
mrb_obj_ptr(self),
|
||||
getSym(mrb, iv),
|
||||
propObj);
|
||||
propObj);
|
||||
}
|
||||
|
||||
inline void
|
||||
|
|
Loading…
Reference in New Issue