diff options
author | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-27 19:01:39 +0000 |
---|---|---|
committer | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-27 19:01:39 +0000 |
commit | 2c1862f941068335333de05dfd0d6914cb98bd28 (patch) | |
tree | 8d811c5d704bca9a50db8eac205abdabfd21d8c4 /o3d | |
parent | e1c9e10a46516c9b49289560f98d1ceaf728df0b (diff) | |
download | chromium_src-2c1862f941068335333de05dfd0d6914cb98bd28.zip chromium_src-2c1862f941068335333de05dfd0d6914cb98bd28.tar.gz chromium_src-2c1862f941068335333de05dfd0d6914cb98bd28.tar.bz2 |
Fix code in effect_helper.cc that does not compile in GCC.
Review URL: http://codereview.chromium.org/174597
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/command_buffer/client/cross/effect_helper.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/o3d/command_buffer/client/cross/effect_helper.cc b/o3d/command_buffer/client/cross/effect_helper.cc index 8302c14..1f05dd8 100644 --- a/o3d/command_buffer/client/cross/effect_helper.cc +++ b/o3d/command_buffer/client/cross/effect_helper.cc @@ -88,7 +88,8 @@ bool EffectHelper::CreateEffectParameters(ResourceID effect_id, // Read param descriptions in batches. We use as much shared memory as // possible so that we only call Finish as little as possible. unsigned int max_param_per_batch = - std::min(param_count, max_buffer_size / sizeof(Desc)); // NOLINT + std::min(static_cast<unsigned>(param_count), + static_cast<unsigned>(max_buffer_size / sizeof(Desc))); // NOLINT Desc *raw_descs = shm_allocator_->AllocTyped<Desc>(max_param_per_batch); DCHECK(raw_descs); for (unsigned int i = 0; i < param_count; i += max_param_per_batch) { @@ -125,7 +126,8 @@ bool EffectHelper::GetParamStrings(EffectParamDesc *desc) { DCHECK_NE(desc->id, kInvalidResource); // desc may not have come directly from CreateEffectParameters, so it may be // less than the minimum required size. - unsigned int size = std::max(desc->cmd_desc_size, sizeof(Desc)); // NOLINT + unsigned int size = std::max(static_cast<unsigned>(desc->cmd_desc_size), + static_cast<unsigned>(sizeof(Desc))); // NOLINT Desc *raw_desc = static_cast<Desc *>(shm_allocator_->Alloc(size)); if (!raw_desc) { // Not enough memory to get the param desc. @@ -242,7 +244,8 @@ bool EffectHelper::GetEffectStreams(ResourceID effect_id, // Read stream descriptions in batches. We use as much shared memory as // possible so that we only call Finish as little as possible. unsigned int max_stream_per_batch = - std::min(stream_count, max_buffer_size / sizeof(Desc)); // NOLINT + std::min(static_cast<unsigned>(stream_count), + static_cast<unsigned>(max_buffer_size / sizeof(Desc))); // NOLINT Desc *raw_descs = shm_allocator_->AllocTyped<Desc>(max_stream_per_batch); DCHECK(raw_descs); for (unsigned int i = 0; i < stream_count; i += max_stream_per_batch) { |