Rename 'Pick' to 'RandomPick'

... because 'pick' is way too generic a name to spend a keyword on.
This commit is contained in:
Randy Heit 2014-12-23 21:46:27 -06:00
parent bfb94f13d2
commit 3fb9e754f1
5 changed files with 11 additions and 11 deletions

View file

@ -158,7 +158,7 @@ std2:
'random' { RET(TK_Random); }
'random2' { RET(TK_Random2); }
'frandom' { RET(TK_FRandom); }
'pick' { RET(TK_Pick); }
'randompick' { RET(TK_RandomPick); }
L (L|D)* { RET(TK_Identifier); }

View file

@ -122,5 +122,5 @@ xx(TK_Array, "'array'")
xx(TK_In, "'in'")
xx(TK_SizeOf, "'sizeof'")
xx(TK_AlignOf, "'alignof'")
xx(TK_Pick, "'pick'")
xx(TK_RandomPick, "'randompick'")
#undef xx

View file

@ -371,7 +371,7 @@ static FxExpression *ParseExpression0 (FScanner &sc, const PClass *cls)
return new FxRandom(rng, min, max, sc);
}
else if (sc.CheckToken(TK_Pick))
else if (sc.CheckToken(TK_RandomPick))
{
FRandom *rng;
TArray<FxExpression*> list;
@ -398,7 +398,7 @@ static FxExpression *ParseExpression0 (FScanner &sc, const PClass *cls)
break;
sc.MustGetToken(',');
}
return new FxPick(rng, list, sc);
return new FxRandomPick(rng, list, sc);
}
else if (sc.CheckToken(TK_FRandom))
{

View file

@ -559,7 +559,7 @@ public:
//
//==========================================================================
class FxPick : public FxExpression
class FxRandomPick : public FxExpression
{
protected:
FRandom * rng;
@ -567,8 +567,8 @@ protected:
public:
FxPick(FRandom *, TArray<FxExpression*> mi, const FScriptPosition &pos);
~FxPick();
FxRandomPick(FRandom *, TArray<FxExpression*> mi, const FScriptPosition &pos);
~FxRandomPick();
FxExpression *Resolve(FCompileContext&);
ExpVal EvalExpression(AActor *self);

View file

@ -1696,7 +1696,7 @@ ExpVal FxRandom::EvalExpression (AActor *self)
//
//
//==========================================================================
FxPick::FxPick(FRandom * r, TArray<FxExpression*> mi, const FScriptPosition &pos)
FxRandomPick::FxRandomPick(FRandom * r, TArray<FxExpression*> mi, const FScriptPosition &pos)
: FxExpression(pos)
{
for (unsigned int index = 0; index < mi.Size(); index++)
@ -1713,7 +1713,7 @@ FxPick::FxPick(FRandom * r, TArray<FxExpression*> mi, const FScriptPosition &pos
//
//==========================================================================
FxPick::~FxPick()
FxRandomPick::~FxRandomPick()
{
}
@ -1723,7 +1723,7 @@ FxPick::~FxPick()
//
//==========================================================================
FxExpression *FxPick::Resolve(FCompileContext &ctx)
FxExpression *FxRandomPick::Resolve(FCompileContext &ctx)
{
CHECKRESOLVED();
for (unsigned int index = 0; index < min.Size(); index++)
@ -1741,7 +1741,7 @@ FxExpression *FxPick::Resolve(FCompileContext &ctx)
//
//==========================================================================
ExpVal FxPick::EvalExpression(AActor *self)
ExpVal FxRandomPick::EvalExpression(AActor *self)
{
ExpVal val;
val.Type = VAL_Int;