mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
Use an explicit constructor for TreeNode
List initialization ended using movable constructors which surprisingly caused data troubles in release mode, at least in VC2019 compiler. The tree being messed up caused crashes while SQL was generated. I have no explanation for it.
This commit is contained in:
@ -45,6 +45,11 @@ public:
|
||||
std::string t;
|
||||
std::vector<TreeNode> children;
|
||||
|
||||
explicit TreeNode(std::string t, std::vector<TreeNode> children)
|
||||
: t(t), children(children)
|
||||
{
|
||||
}
|
||||
|
||||
int buildSqlString(std::string &sqlString, int bindPosition = 0) const;
|
||||
int bindValues(QSqlQuery &selectQuery, int bindPosition = 0) const;
|
||||
};
|
||||
|
Reference in New Issue
Block a user