- removed the string constructors from FSoundID.
Due to C++ conversion rules this was a bit too volatile. There's really not enough places where being able to pass a string directly into the sound API was beneficial - the two most frequent functions now got overloaded variants.
This commit is contained in:
parent
b89c4affae
commit
65a26d6779
26 changed files with 66 additions and 70 deletions
|
|
@ -1475,7 +1475,7 @@ FxExpression *FxSoundCast::Resolve(FCompileContext &ctx)
|
|||
if (basex->isConstant())
|
||||
{
|
||||
ExpVal constval = static_cast<FxConstant *>(basex)->GetValue();
|
||||
FxExpression *x = new FxConstant(FSoundID(constval.GetString()), ScriptPosition);
|
||||
FxExpression *x = new FxConstant(S_FindSound(constval.GetString()), ScriptPosition);
|
||||
delete this;
|
||||
return x;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1351,7 +1351,7 @@ bool PSound::ReadValue(FSerializer &ar, const char *key, void *addr) const
|
|||
}
|
||||
else
|
||||
{
|
||||
*(FSoundID *)addr = FSoundID(cptr);
|
||||
*(FSoundID *)addr = S_FindSound(cptr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue