[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:
Stephan T. Lavavej
2016-11-23 22:01:19 +00:00
parent 634ff013be
commit a9bcd3dae8
139 changed files with 349 additions and 210 deletions

View File

@@ -18,6 +18,7 @@
#include <algorithm>
#include <vector>
#include <cassert>
#include <cstddef>
#include "test_iterators.h"
@@ -36,7 +37,7 @@ test()
const unsigned M = 10;
std::vector<int> v(N);
int x = 0;
for (int i = 0; i < v.size(); ++i)
for (std::size_t i = 0; i < v.size(); ++i)
{
v[i] = x;
if (++x == M)

View File

@@ -19,6 +19,7 @@
#include <vector>
#include <functional>
#include <cassert>
#include <cstddef>
#include "test_iterators.h"
@@ -37,7 +38,7 @@ test()
const unsigned M = 10;
std::vector<int> v(N);
int x = 0;
for (int i = 0; i < v.size(); ++i)
for (std::size_t i = 0; i < v.size(); ++i)
{
v[i] = x;
if (++x == M)

View File

@@ -18,6 +18,7 @@
#include <algorithm>
#include <vector>
#include <cassert>
#include <cstddef>
#include "test_iterators.h"
@@ -44,7 +45,7 @@ test()
const unsigned M = 10;
std::vector<int> v(N);
int x = 0;
for (int i = 0; i < v.size(); ++i)
for (std::size_t i = 0; i < v.size(); ++i)
{
v[i] = x;
if (++x == M)

View File

@@ -19,6 +19,7 @@
#include <functional>
#include <vector>
#include <cassert>
#include <cstddef>
#include "test_iterators.h"
@@ -45,7 +46,7 @@ test()
const unsigned M = 10;
std::vector<int> v(N);
int x = 0;
for (int i = 0; i < v.size(); ++i)
for (std::size_t i = 0; i < v.size(); ++i)
{
v[i] = x;
if (++x == M)

View File

@@ -17,6 +17,7 @@
#include <algorithm>
#include <vector>
#include <cassert>
#include <cstddef>
#include "test_iterators.h"
@@ -39,7 +40,7 @@ test()
const unsigned M = 10;
std::vector<int> v(N);
int x = 0;
for (int i = 0; i < v.size(); ++i)
for (std::size_t i = 0; i < v.size(); ++i)
{
v[i] = x;
if (++x == M)

View File

@@ -18,6 +18,7 @@
#include <functional>
#include <vector>
#include <cassert>
#include <cstddef>
#include "test_iterators.h"
@@ -40,7 +41,7 @@ test()
const unsigned M = 10;
std::vector<int> v(N);
int x = 0;
for (int i = 0; i < v.size(); ++i)
for (std::size_t i = 0; i < v.size(); ++i)
{
v[i] = x;
if (++x == M)

View File

@@ -17,6 +17,7 @@
#include <algorithm>
#include <vector>
#include <cassert>
#include <cstddef>
#include "test_iterators.h"
@@ -39,7 +40,7 @@ test()
const unsigned M = 10;
std::vector<int> v(N);
int x = 0;
for (int i = 0; i < v.size(); ++i)
for (std::size_t i = 0; i < v.size(); ++i)
{
v[i] = x;
if (++x == M)

View File

@@ -18,6 +18,7 @@
#include <functional>
#include <vector>
#include <cassert>
#include <cstddef>
#include "test_iterators.h"
@@ -40,7 +41,7 @@ test()
const unsigned M = 10;
std::vector<int> v(N);
int x = 0;
for (int i = 0; i < v.size(); ++i)
for (std::size_t i = 0; i < v.size(); ++i)
{
v[i] = x;
if (++x == M)