fix: ensureVarCache 移到 expression_engine.h 内联,解决构造函数中未声明错误
This commit is contained in:
parent
b53c061f95
commit
f3b1543b73
@ -35,12 +35,6 @@ ExpressionEngine::ExpressionEngine(std::map<std::string, double>& mm_vars,
|
||||
}
|
||||
}
|
||||
|
||||
// 惰性初始化 VarsCache(首次变量刷新时调用)
|
||||
static void ensureVarCache(VarsCache& vc, size_t tag_count) {
|
||||
if (vc.tag_num == 0 && tag_count > 0) {
|
||||
vc.init(tag_count, 6);
|
||||
}
|
||||
}
|
||||
|
||||
int ExpressionEngine::registerExpression(const std::string& name,
|
||||
const std::string& raw_exp_str) {
|
||||
|
||||
@ -118,6 +118,12 @@ private:
|
||||
VarsCache var_cache_;
|
||||
static constexpr size_t PV_NUM = 6;
|
||||
|
||||
static void ensureVarCache(VarsCache& vc, size_t tag_count) {
|
||||
if (vc.tag_num == 0 && tag_count > 0) {
|
||||
vc.init(tag_count, 6);
|
||||
}
|
||||
}
|
||||
|
||||
// 内部辅助
|
||||
int initHoldExpStr(const std::string& exp_str);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user