Skip to content

Commit

Permalink
Update sorted_vector_with_large_capacity.h
Browse files Browse the repository at this point in the history
  • Loading branch information
xiexiexx committed May 3, 2022
1 parent f5e0987 commit 5c462d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion second-edition/src/sorted_vector_with_large_capacity.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ template <typename T>
void sorted_vector_with_large_capacity<T>::
erase(size_t pos)
{
// 注意执行erase的前提是size() > 0. 另外, 也可使用向量的erase操作.
// 执行erase的前提是pos位置有元素可删. 另外, 也可使用向量的erase操作.
for (size_t i = pos + 1; i < data.size(); ++i)
data[i - 1] = data[i]; // 也可使用移动语义.
data.pop_back();
Expand Down

0 comments on commit 5c462d1

Please sign in to comment.