Skip to content
Snippets Groups Projects
Commit eb6d7019 authored by apatrick@google.com's avatar apatrick@google.com
Browse files

Fixed some warnings.

Review URL: http://codereview.chromium.org/231027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27159 0039d316-1c4b-4281-b951-d872f2087c98
parent a76aeeaf
No related merge requests found
......@@ -218,7 +218,7 @@ bool EffectParamGL::SetData(GAPIGL *gapi,
break;
}
case effect_param::SAMPLER: {
DCHECK_GE(low_level_param.sampler_ids.size(), 1);
DCHECK_GE(low_level_param.sampler_ids.size(), 1U);
low_level_param.sampler_ids[0] = *static_cast<const ResourceID *>(data);
if (effect_ == gapi->current_effect()) {
gapi->DirtyEffect();
......@@ -445,7 +445,7 @@ void EffectGL::AddLowLevelParams(CGprogram prog, CGenum name_space, bool vp) {
int num_elements;
if (cg_type == CG_ARRAY) {
num_elements = cgGetArraySize(cg_param, 0);
// Substitute the first element's type for our type.
// Substitute the first element's type for our type.
cg_type = cgGetParameterType(cgGetArrayParameter(cg_param, 0));
} else {
num_elements = 0;
......
......@@ -242,10 +242,10 @@ inline unsigned int GetAttribIndex(vertex_struct::Semantic semantic,
DCHECK_EQ(semantic_index, 0);
return 2;
case vertex_struct::COLOR:
DCHECK_LT(semantic_index, 2);
DCHECK_LT(semantic_index, 2U);
return 3 + semantic_index;
case vertex_struct::TEX_COORD:
DCHECK_LT(semantic_index, 8);
DCHECK_LT(semantic_index, 8U);
return 8 + semantic_index;
default:
DLOG(FATAL) << "Not reached.";
......
......@@ -157,7 +157,7 @@ void SamplerGL::SetStates(sampler::AddressingMode addressing_u,
// These are validated in GAPIDecoder.cc
DCHECK_NE(mag_filter, sampler::NONE);
DCHECK_NE(min_filter, sampler::NONE);
DCHECK_GT(max_anisotropy, 0);
DCHECK_GT(max_anisotropy, 0U);
gl_wrap_s_ = GLAddressMode(addressing_u);
gl_wrap_t_ = GLAddressMode(addressing_v);
gl_wrap_r_ = GLAddressMode(addressing_w);
......
......@@ -209,9 +209,9 @@ Texture2DGL *Texture2DGL::Create(unsigned int width,
texture::Format format,
unsigned int flags,
bool enable_render_surfaces) {
DCHECK_GT(width, 0);
DCHECK_GT(height, 0);
DCHECK_GT(levels, 0);
DCHECK_GT(width, 0U);
DCHECK_GT(height, 0U);
DCHECK_GT(levels, 0U);
GLenum gl_internal_format = 0;
GLenum gl_format = 0;
GLenum gl_type = 0;
......@@ -347,10 +347,10 @@ Texture3DGL *Texture3DGL::Create(unsigned int width,
texture::Format format,
unsigned int flags,
bool enable_render_surfaces) {
DCHECK_GT(width, 0);
DCHECK_GT(height, 0);
DCHECK_GT(depth, 0);
DCHECK_GT(levels, 0);
DCHECK_GT(width, 0U);
DCHECK_GT(height, 0U);
DCHECK_GT(depth, 0U);
DCHECK_GT(levels, 0U);
GLenum gl_internal_format = 0;
GLenum gl_format = 0;
GLenum gl_type = 0;
......@@ -474,8 +474,8 @@ TextureCubeGL *TextureCubeGL::Create(unsigned int side,
texture::Format format,
unsigned int flags,
bool enable_render_surfaces) {
DCHECK_GT(side, 0);
DCHECK_GT(levels, 0);
DCHECK_GT(side, 0U);
DCHECK_GT(levels, 0U);
GLenum gl_internal_format = 0;
GLenum gl_format = 0;
GLenum gl_type = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment