[Bf-blender-cvs] [70992ae2702] master: Fix: Fix build error with MSVC in BLI_span_test
Ray Molenkamp
noreply at git.blender.org
Mon Jul 13 20:29:58 CEST 2020
Commit: 70992ae270279438aea6118a9a6e56a92d736564
Author: Ray Molenkamp
Date: Mon Jul 13 12:29:53 2020 -0600
Branches: master
https://developer.blender.org/rB70992ae270279438aea6118a9a6e56a92d736564
Fix: Fix build error with MSVC in BLI_span_test
span.size() returns an uint, causing a signed/unsigned comparison
using 3u sidesteps the issue
===================================================================
M tests/gtests/blenlib/BLI_span_test.cc
===================================================================
diff --git a/tests/gtests/blenlib/BLI_span_test.cc b/tests/gtests/blenlib/BLI_span_test.cc
index cb1a8b9b6f9..ccc63fd80eb 100644
--- a/tests/gtests/blenlib/BLI_span_test.cc
+++ b/tests/gtests/blenlib/BLI_span_test.cc
@@ -291,7 +291,7 @@ TEST(span, VoidPointerSpan)
float b;
double c;
- auto func1 = [](Span<void *> span) { EXPECT_EQ(span.size(), 3); };
+ auto func1 = [](Span<void *> span) { EXPECT_EQ(span.size(), 3u); };
func1({&a, &b, &c});
}
More information about the Bf-blender-cvs
mailing list