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));
|
const char *excClass = mrb_class_name(mrb, mrb_class(mrb, exc));
|
||||||
|
|
||||||
char msgBoxText[512];
|
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));
|
mrbValueString(file), mrb_fixnum(line), excClass, mrbValueString(mesg));
|
||||||
|
|
||||||
shState->eThread().showMessageBox(msgBoxText, SDL_MESSAGEBOX_ERROR);
|
shState->eThread().showMessageBox(msgBoxText, SDL_MESSAGEBOX_ERROR);
|
||||||
|
|
|
@ -235,10 +235,10 @@ getMrbData(mrb_state *mrb)
|
||||||
static inline mrb_value
|
static inline mrb_value
|
||||||
mrb__float_value(mrb_float f)
|
mrb__float_value(mrb_float f)
|
||||||
{
|
{
|
||||||
mrb_value v;
|
mrb_value v;
|
||||||
|
|
||||||
MRB_SET_VALUE(v, MRB_TT_FLOAT, value.f, f);
|
MRB_SET_VALUE(v, MRB_TT_FLOAT, value.f, f);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline mrb_sym
|
inline mrb_sym
|
||||||
|
@ -252,7 +252,7 @@ inline T *
|
||||||
getPrivateData(mrb_state *mrb, mrb_value self)
|
getPrivateData(mrb_state *mrb, mrb_value self)
|
||||||
{
|
{
|
||||||
mrb_value priv = mrb_obj_iv_get(mrb,
|
mrb_value priv = mrb_obj_iv_get(mrb,
|
||||||
mrb_obj_ptr(self),
|
mrb_obj_ptr(self),
|
||||||
getSym(mrb, CSpriv_iv));
|
getSym(mrb, CSpriv_iv));
|
||||||
|
|
||||||
return static_cast<T*>(DATA_PTR(priv));
|
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)
|
setPrivateData(mrb_state *mrb, mrb_value self, void *p, const mrb_data_type &type)
|
||||||
{
|
{
|
||||||
RData *data =
|
RData *data =
|
||||||
mrb_data_object_alloc(mrb,
|
mrb_data_object_alloc(mrb,
|
||||||
mrb_obj_class(mrb, self),
|
mrb_obj_class(mrb, self),
|
||||||
p,
|
p,
|
||||||
&type);
|
&type);
|
||||||
|
|
||||||
mrb_obj_iv_set(mrb,
|
mrb_obj_iv_set(mrb,
|
||||||
mrb_obj_ptr(self),
|
mrb_obj_ptr(self),
|
||||||
getSym(mrb, CSpriv_iv),
|
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_iv_set(mrb,
|
||||||
mrb_obj_ptr(self),
|
mrb_obj_ptr(self),
|
||||||
getSym(mrb, iv),
|
getSym(mrb, iv),
|
||||||
propObj);
|
propObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
|
Loading…
Reference in New Issue