Skip to content

Commit d7def05

Browse files
author
Roberto De Ioris
committed
added support for work-by-ref structs
1 parent c9fe50e commit d7def05

File tree

6 files changed

+181
-122
lines changed

6 files changed

+181
-122
lines changed

Source/UnrealEnginePython/Private/Slate/UEPyFSlateIcon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
static PyObject *py_ue_fslate_icon_get_icon(ue_PyFSlateIcon *self, PyObject * args)
66
{
7-
PyObject *ret = py_ue_new_uscriptstruct(FSlateBrush::StaticStruct(), (const uint8*)self->icon.GetIcon());
7+
PyObject *ret = py_ue_new_uscriptstruct(FSlateBrush::StaticStruct(), (uint8*)self->icon.GetIcon());
88
return ret;
99
}
1010

Source/UnrealEnginePython/Private/Slate/UEPyFSlateStyleSet.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ namespace {
9494
PyObject* pyGetWidgetStyle(FSlateStyleSet& InStyle, FName PropertyName)
9595
{
9696
const WidgetStyleType styleWidgetStyle = InStyle.GetWidgetStyle<WidgetStyleType>(PropertyName);
97-
return py_ue_new_uscriptstruct(WidgetStyleType::StaticStruct(), (const uint8*)&styleWidgetStyle);
97+
return py_ue_new_uscriptstruct(WidgetStyleType::StaticStruct(), (uint8*)&styleWidgetStyle);
9898
}
9999
}
100100

@@ -114,24 +114,24 @@ static PyObject *py_ue_fslate_style_set_get(ue_PyFSlateStyleSet *self, PyObject
114114
if (ue_py_check_struct<FSlateSound>(py_type))
115115
{
116116
const FSlateSound& styleSound = self->style_set->GetSound(FName(name));
117-
ret = py_ue_new_uscriptstruct(FSlateSound::StaticStruct(), (const uint8*)&styleSound);
117+
ret = py_ue_new_uscriptstruct(FSlateSound::StaticStruct(), (uint8*)&styleSound);
118118
}
119119
else if (ue_py_check_struct<FSlateBrush>(py_type))
120120
{
121121
if (const FSlateBrush* styleBrush = self->style_set->GetBrush(FName(name)))
122122
{
123-
ret = py_ue_new_uscriptstruct(FSlateBrush::StaticStruct(), (const uint8*)styleBrush);
123+
ret = py_ue_new_uscriptstruct(FSlateBrush::StaticStruct(), (uint8*)styleBrush);
124124
}
125125
}
126126
else if (ue_py_check_struct<FSlateColor>(py_type))
127127
{
128128
const FSlateColor styleSlateColor = self->style_set->GetSlateColor(FName(name));
129-
ret = py_ue_new_uscriptstruct(FSlateColor::StaticStruct(), (const uint8*)&styleSlateColor);
129+
ret = py_ue_new_uscriptstruct(FSlateColor::StaticStruct(), (uint8*)&styleSlateColor);
130130
}
131131
else if (ue_py_check_struct<FSlateFontInfo>(py_type))
132132
{
133133
const FSlateFontInfo styleFontInfo = self->style_set->GetFontStyle(FName(name));
134-
ret = py_ue_new_uscriptstruct(FSlateFontInfo::StaticStruct(), (const uint8*)&styleFontInfo);
134+
ret = py_ue_new_uscriptstruct(FSlateFontInfo::StaticStruct(), (uint8*)&styleFontInfo);
135135
}
136136
else if (ue_py_check_childstruct<FSlateWidgetStyle>(py_type))
137137
{

0 commit comments

Comments
 (0)