diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-05-04 22:33:44 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-05-04 22:33:44 +0300 |
commit | ee6f0d5fca54ea975f857d6ddaabcd4472ac523d (patch) | |
tree | 3b136ad04443c6f67c310cdcee6ee7856d177337 /src/ObjectModel | |
parent | 621f92cb7f072997366bb385f4f25059c012b6f3 (diff) |
Further reduced stack usage of ExpressionParser
Diffstat (limited to 'src/ObjectModel')
-rw-r--r-- | src/ObjectModel/ObjectModel.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ObjectModel/ObjectModel.h b/src/ObjectModel/ObjectModel.h index 24f810d3..b979a9b6 100644 --- a/src/ObjectModel/ObjectModel.h +++ b/src/ObjectModel/ObjectModel.h @@ -147,9 +147,11 @@ struct ExpressionValue void Set(bool b) noexcept { Release(); type = (uint32_t)TypeCode::Bool; bVal = b; } void Set(char c) noexcept { Release(); type = (uint32_t)TypeCode::Char; cVal = c; } void Set(int32_t i) noexcept { Release(); type = (uint32_t)TypeCode::Int32; iVal = i; } - void Set(float f) noexcept { Release(); type = (uint32_t)TypeCode::Float; fVal = f; param = 1; } + void Set(float f) noexcept { Release(); type = (uint32_t)TypeCode::Float; fVal = f; param = MaxFloatDigitsDisplayedAfterPoint; } + void Set(float f, uint32_t digits) noexcept { Release(); type = (uint32_t)TypeCode::Float; fVal = f; param = digits; } void Set(const char *s) noexcept { Release(); type = (uint32_t)TypeCode::CString; sVal = s; } void Set(StringHandle sh) noexcept { Release(); type = (uint32_t)TypeCode::HeapString; shVal = sh; } + void Set(nullptr_t dummy) noexcept { Release(); type = (uint32_t)TypeCode::None; } // Store a 56-bit value void Set56BitValue(uint64_t v) { Release(); param = (uint32_t)(v >> 32) & 0x00FFFFFF; uVal = (uint32_t)v; } |