diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-06 01:13:29 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2016-12-06 01:13:29 +0000 |
commit | e17a155c618765c423cbb66ab010ee616aeb72b3 (patch) | |
tree | 0a8675cbd4409a4a85d71e1fb4007a31f5be0194 /libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp | |
parent | 68a694b800a9bb5f5cbbc5d8c956a87273356d20 (diff) | |
download | bcm5719-llvm-e17a155c618765c423cbb66ab010ee616aeb72b3.tar.gz bcm5719-llvm-e17a155c618765c423cbb66ab010ee616aeb72b3.zip |
[libcxx] [test] D27023: Fix MSVC warning C4389 "signed/unsigned mismatch", part 10/12.
Add static_cast<int>. In these cases, the values are guaranteed to be small-ish,
and they're being compared to int elements.
test/std/containers/sequences/deque/deque.capacity/access.pass.cpp
Use int instead of unsigned to iterate from 0 to 10.
llvm-svn: 288747
Diffstat (limited to 'libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp')
-rw-r--r-- | libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp index bf80c2c6edd..d6fdd18968d 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp @@ -35,5 +35,5 @@ int main() for_each_test(0)); assert(f.count == s); for (unsigned i = 0; i < s; ++i) - assert(ia[i] == i+1); + assert(ia[i] == static_cast<int>(i+1)); } |