mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
[muparser] Remove unused fields from SToken
This commit is contained in:
parent
732b32c8b4
commit
fd60a7cff7
3 changed files with 4 additions and 9 deletions
|
@ -40,14 +40,12 @@
|
|||
namespace mu {
|
||||
struct SToken {
|
||||
ECmdCode Cmd;
|
||||
int StackPos;
|
||||
|
||||
union {
|
||||
struct // SValData
|
||||
{
|
||||
value_type *ptr;
|
||||
value_type data;
|
||||
value_type data2;
|
||||
} Val;
|
||||
|
||||
struct // SFunData
|
||||
|
|
|
@ -835,7 +835,7 @@ ValueOrError ParserBase::ExecuteRPN() const {
|
|||
Stack[++sidx] = *(pTok->Val.ptr);
|
||||
continue;
|
||||
case cmVAL:
|
||||
Stack[++sidx] = pTok->Val.data2;
|
||||
Stack[++sidx] = pTok->Val.data;
|
||||
continue;
|
||||
|
||||
// Next is treatment of numeric functions
|
||||
|
|
|
@ -51,12 +51,10 @@ void ParserByteCode::AddVar(value_type *a_pVar) {
|
|||
++m_iStackPos;
|
||||
m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
|
||||
|
||||
// optimization does not apply
|
||||
SToken tok;
|
||||
tok.Cmd = cmVAR;
|
||||
tok.Val.ptr = a_pVar;
|
||||
tok.Val.data = 1;
|
||||
tok.Val.data2 = 0;
|
||||
tok.Val.data = 0;
|
||||
m_vRPN.push_back(tok);
|
||||
}
|
||||
|
||||
|
@ -80,8 +78,7 @@ void ParserByteCode::AddVal(value_type a_fVal) {
|
|||
SToken tok;
|
||||
tok.Cmd = cmVAL;
|
||||
tok.Val.ptr = NULL;
|
||||
tok.Val.data = 0;
|
||||
tok.Val.data2 = a_fVal;
|
||||
tok.Val.data = a_fVal;
|
||||
m_vRPN.push_back(tok);
|
||||
}
|
||||
|
||||
|
@ -250,7 +247,7 @@ void ParserByteCode::AsciiDump() {
|
|||
switch (m_vRPN[i].Cmd) {
|
||||
case cmVAL:
|
||||
mu::console() << _T("VAL \t");
|
||||
mu::console() << _T("[") << m_vRPN[i].Val.data2 << _T("]\n");
|
||||
mu::console() << _T("[") << m_vRPN[i].Val.data << _T("]\n");
|
||||
break;
|
||||
|
||||
case cmVAR:
|
||||
|
|
Loading…
Reference in a new issue