- 论坛徽章:
- 0
|
本帖最后由 lishizelibin 于 2010-07-17 14:54 编辑
- void CAsDisplayObject::up(int entity)
- {
- if (!entity)
- return;
- std::stack<dob_iterator> nodes;
- nodes.push(0);
- dob_iterator inode = m_nodes.begin();
- dob_iterator isuper = 0;
- dob_iterator istart = 0;
- dob_iterator iend = 0;
- for (; inode != m_nodes.end(); inode++)
- {
- int ent = (*inode)->m_entity;
- if (!ent)
- continue;
- // store possible super node
- if ((nodes.top() == 0) ||
- (*nodes.top())->m_entity != ent)
- {
- // new entity node started
- if (nodes.top() != 0 &&
- ent == entity)
- {
- isuper = nodes.top();
- istart = inode;
- }
- nodes.push(inode);
- }
- else
- {
- // entity node finished
- if (ent == entity)
- {
- iend = ++inode;
- inode--;
- }
- if (isuper != 0 &&
- (*isuper)->m_entity == ent)
- {
- if (istart != 0 && iend != 0)
- {
- if (iend != inode)
- m_nodes.splice(inode, m_nodes, istart, iend);
- }
- isuper = 0;
- istart = 0;
- iend = 0;
- }
- nodes.pop();
- }
- }
- }
复制代码 问题:
error C2664: “std::stack<_Ty>::push”: 不能将参数 1 从“int”转换为“const std::list<_Ty>::_Iterator<_Secure_validation> &”
error C2440: “初始化”: 无法从“int”转换为“std::list<_Ty>::_Iterator<_Secure_validation>”
error C2678: 二进制“==”: 没有找到接受“std::list<_Ty>::_Iterator<_Secure_validation>”类型的左操作数的运算符(或没有可接受的转换)
。。。
运行环境:VS2005 |
|