- replaced more copystrings with FString.

This commit is contained in:
Christoph Oelckers 2016-07-28 09:06:49 +02:00
commit 759753eadc
4 changed files with 12 additions and 16 deletions

View file

@ -64,7 +64,7 @@ EXTERN_CVAR (Bool, cl_run)
FPlayerNameBox::FPlayerNameBox(int x, int y, int height, int frameofs, const char *text, FFont *font, EColorRange color, FName action)
: FListMenuItemSelectable(x, y, height, action)
{
mText = copystring(text);
mText = text;
mFont = font;
mFontColor = color;
mFrameSize = frameofs;
@ -74,7 +74,6 @@ FPlayerNameBox::FPlayerNameBox(int x, int y, int height, int frameofs, const cha
FPlayerNameBox::~FPlayerNameBox()
{
if (mText != NULL) delete [] mText;
}
//=============================================================================
@ -220,7 +219,7 @@ bool FPlayerNameBox::MenuEvent(int mkey, bool fromcontroller)
FValueTextItem::FValueTextItem(int x, int y, int height, const char *text, FFont *font, EColorRange color, EColorRange valuecolor, FName action, FName values)
: FListMenuItemSelectable(x, y, height, action)
{
mText = copystring(text);
mText = text;
mFont = font;
mFontColor = color;
mFontColor2 = valuecolor;
@ -240,7 +239,6 @@ FValueTextItem::FValueTextItem(int x, int y, int height, const char *text, FFont
FValueTextItem::~FValueTextItem()
{
if (mText != NULL) delete [] mText;
}
//=============================================================================
@ -341,7 +339,7 @@ void FValueTextItem::Drawer(bool selected)
FSliderItem::FSliderItem(int x, int y, int height, const char *text, FFont *font, EColorRange color, FName action, int min, int max, int step)
: FListMenuItemSelectable(x, y, height, action)
{
mText = copystring(text);
mText = text;
mFont = font;
mFontColor = color;
mSelection = 0;
@ -352,7 +350,6 @@ FSliderItem::FSliderItem(int x, int y, int height, const char *text, FFont *font
FSliderItem::~FSliderItem()
{
if (mText != NULL) delete [] mText;
}
//=============================================================================