Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: gpu/command_buffer/common/id_allocator_test.cc

Issue 375733004: Fixes for re-enabling more MSVC level 4 warnings: gpu/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/common/id_allocator_test.cc
diff --git a/gpu/command_buffer/common/id_allocator_test.cc b/gpu/command_buffer/common/id_allocator_test.cc
index 624f959b28725cd0866ffc953f7c4ff6d55cfb85..5d32e40b1bdd6a01ac48884c62eaf45afc1a36cd 100644
--- a/gpu/command_buffer/common/id_allocator_test.cc
+++ b/gpu/command_buffer/common/id_allocator_test.cc
@@ -50,7 +50,7 @@ TEST_F(IdAllocatorTest, TestAdvanced) {
IdAllocator *allocator = id_allocator();
// Allocate the highest possible ID, to make life awkward.
- allocator->AllocateIDAtOrAbove(-1);
+ allocator->AllocateIDAtOrAbove(~static_cast<ResourceId>(0));
// Allocate a significant number of resources.
const unsigned int kNumResources = 100;
@@ -98,9 +98,9 @@ TEST_F(IdAllocatorTest, AllocateIdAtOrAbove) {
EXPECT_GT(id3, kOffset);
}
-// Checks that AllocateIdAtOrAbove wraps around at the maximum 32-bit value.
+// Checks that AllocateIdAtOrAbove wraps around at the maximum value.
TEST_F(IdAllocatorTest, AllocateIdAtOrAboveWrapsAround) {
- const ResourceId kMaxPossibleOffset = -1;
+ const ResourceId kMaxPossibleOffset = ~static_cast<ResourceId>(0);
IdAllocator* allocator = id_allocator();
ResourceId id1 = allocator->AllocateIDAtOrAbove(kMaxPossibleOffset);
EXPECT_EQ(kMaxPossibleOffset, id1);
« no previous file with comments | « gpu/command_buffer/client/transfer_buffer_unittest.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698