Skip to content

Commit 6a66837

Browse files
committed
Remove unnecessary if condition and comment
1 parent 4cb7d3b commit 6a66837

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libcxx/include/__vector/vector_bool.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,9 +845,7 @@ _LIBCPP_CONSTEXPR_SINCE_CXX20 void vector<bool, _Allocator>::reserve(size_type _
845845
this->__throw_length_error();
846846
vector __v(this->get_allocator());
847847
__v.__vallocate(__n);
848-
// Ensure that the call to __construct_at_end(first, last, n) meets the precondition of n > 0
849-
if (this->size() > 0)
850-
__v.__construct_at_end(this->begin(), this->end(), this->size());
848+
__v.__construct_at_end(this->begin(), this->end(), this->size());
851849
swap(__v);
852850
}
853851
}

0 commit comments

Comments
 (0)