[libcxx] [test] D27013: Fix MSVC warning C4018 "signed/unsigned mismatch", part 1/12.
Change loop indices from int to std::size_t. Also, include <cstddef> when it wasn't already being included. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287820 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <stack>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
|
||||
#include "test_allocator.h"
|
||||
|
||||
@@ -49,7 +50,7 @@ int main()
|
||||
test q(d, test_allocator<int>(4));
|
||||
assert(q.get_allocator() == test_allocator<int>(4));
|
||||
assert(q.size() == 5);
|
||||
for (int i = 0; i < d.size(); ++i)
|
||||
for (std::size_t i = 0; i < d.size(); ++i)
|
||||
{
|
||||
assert(q.top() == d[d.size() - i - 1]);
|
||||
q.pop();
|
||||
|
||||
Reference in New Issue
Block a user