fix: the size of intrusive list is not stable
fixes commet mistakes
This commit is contained in:
parent
340793f9cf
commit
f70de4e220
|
|
@ -321,9 +321,6 @@ namespace easy2d
|
|||
// 获取全部子节点
|
||||
Children const& GetChildren() const;
|
||||
|
||||
// 获取子节点数量
|
||||
int GetChildrenCount() const;
|
||||
|
||||
// 移除子节点
|
||||
bool RemoveChild(
|
||||
spNode const& child
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ namespace easy2d
|
|||
std::sort(temp_vec.begin(), temp_vec.end(), if_lt);
|
||||
|
||||
size_t size = temp_vec.size();
|
||||
for (size_t i = 0; i < size_; ++i)
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
{
|
||||
if (i == 0)
|
||||
temp_vec[i]->prev_ = ItemType();
|
||||
|
|
@ -224,7 +224,7 @@ namespace easy2d
|
|||
temp_vec[i]->prev_ = temp_vec[i - 1];
|
||||
temp_vec[i - 1]->next_ = temp_vec[i];
|
||||
}
|
||||
if (i == size_ - 1)
|
||||
if (i == size - 1)
|
||||
temp_vec[i]->next_ = ItemType();
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace easy2d
|
|||
//
|
||||
// Usage:
|
||||
// 获取指定范围内的一个随机数, 如:
|
||||
// int n = math::Rand(1, 5); // 获取 1~6 内的随机整数, 包含 1 和 6
|
||||
// int n = math::Rand(1, 5); // 获取 1~5 内的随机整数, 包含 1 和 5
|
||||
// 方法同样适用于浮点数的生成, 如:
|
||||
// double d = math::Rand(1.2, 1.5);
|
||||
// 注意, 获得的随机数类型取决于参数的类型。
|
||||
|
|
|
|||
Loading…
Reference in New Issue