Skip to content

Commit

Permalink
more lints
Browse files Browse the repository at this point in the history
  • Loading branch information
gaaclarke committed Dec 12, 2024
1 parent d5cad30 commit dc27455
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
12 changes: 6 additions & 6 deletions impeller/toolkit/glvk/trampoline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@ bool Trampoline::BlitTextureOpenGLToVulkan(
gl.BufferData(GL_ARRAY_BUFFER, sizeof(kVertData), kVertData, GL_STATIC_DRAW);
gl.EnableVertexAttribArray(kAttributeIndexPosition);
gl.EnableVertexAttribArray(kAttributeIndexTexCoord);
gl.VertexAttribPointer(kAttributeIndexPosition, 2, GL_FLOAT, GL_FALSE,
sizeof(VertexData),
(void*)offsetof(VertexData, position));
gl.VertexAttribPointer(kAttributeIndexTexCoord, 2, GL_FLOAT, GL_FALSE,
sizeof(VertexData),
(void*)offsetof(VertexData, tex_coord));
gl.VertexAttribPointer(
kAttributeIndexPosition, 2, GL_FLOAT, GL_FALSE, sizeof(VertexData),
reinterpret_cast<void*>(offsetof(VertexData, position)));
gl.VertexAttribPointer(
kAttributeIndexTexCoord, 2, GL_FLOAT, GL_FALSE, sizeof(VertexData),
reinterpret_cast<void*>(offsetof(VertexData, tex_coord)));

gl.ActiveTexture(GL_TEXTURE0);
gl.BindTexture(src_texture.target, src_texture.texture);
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/android/image_external_texture_gl_skia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void ImageExternalTextureGLSkia::BindImageToTexture(
}
glBindTexture(GL_TEXTURE_EXTERNAL_OES, tex);
glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES,
(GLeglImageOES)image.get().image);
static_cast<GLeglImageOES>(image.get().image));
}

sk_sp<flutter::DlImage> ImageExternalTextureGLSkia::CreateDlImage(
Expand Down
8 changes: 4 additions & 4 deletions shell/platform/android/platform_view_android_jni_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1358,11 +1358,11 @@ double PlatformViewAndroidJNIImpl::FlutterViewGetScaledFontSize(
return -3;
}

const jfloat scaledSize =
env->CallFloatMethod(java_object.obj(), g_get_scaled_font_size_method,
(jfloat)font_size, (jint)configuration_id);
const jfloat scaledSize = env->CallFloatMethod(
java_object.obj(), g_get_scaled_font_size_method,
static_cast<jfloat>(font_size), static_cast<jint>(configuration_id));
FML_CHECK(fml::jni::CheckException(env));
return (double)scaledSize;
return static_cast<double>(scaledSize);
}

void PlatformViewAndroidJNIImpl::FlutterViewUpdateSemantics(
Expand Down
6 changes: 3 additions & 3 deletions shell/platform/linux/fl_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ static void fl_renderer_init(FlRenderer* self) {
fl_renderer_get_instance_private(self));
priv->views = g_hash_table_new_full(g_direct_hash, g_direct_equal, nullptr,
free_weak_ref);
priv->framebuffers_by_view_id =
g_hash_table_new_full(g_direct_hash, g_direct_equal, nullptr,
(GDestroyNotify)g_ptr_array_unref);
priv->framebuffers_by_view_id = g_hash_table_new_full(
g_direct_hash, g_direct_equal, nullptr,
reinterpret_cast<GDestroyNotify>(g_ptr_array_unref));
}

void fl_renderer_set_engine(FlRenderer* self, FlEngine* engine) {
Expand Down
23 changes: 13 additions & 10 deletions shell/platform/linux/testing/fl_mock_binary_messenger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -320,19 +320,22 @@ static void fl_mock_binary_messenger_iface_init(
}

static void fl_mock_binary_messenger_init(FlMockBinaryMessenger* self) {
self->handlers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
(GDestroyNotify)handler_free);
self->handlers =
g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
reinterpret_cast<GDestroyNotify>(handler_free));

self->mock_channels = g_hash_table_new_full(
g_str_hash, g_str_equal, g_free, (GDestroyNotify)mock_channel_free);
self->mock_message_channels =
g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
(GDestroyNotify)mock_message_channel_free);
self->mock_method_channels =
g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
(GDestroyNotify)mock_method_channel_free);
g_str_hash, g_str_equal, g_free,
reinterpret_cast<GDestroyNotify>(mock_channel_free));
self->mock_message_channels = g_hash_table_new_full(
g_str_hash, g_str_equal, g_free,
reinterpret_cast<GDestroyNotify>(mock_message_channel_free));
self->mock_method_channels = g_hash_table_new_full(
g_str_hash, g_str_equal, g_free,
reinterpret_cast<GDestroyNotify>(mock_method_channel_free));
self->mock_error_channels = g_hash_table_new_full(
g_str_hash, g_str_equal, g_free, (GDestroyNotify)mock_error_channel_free);
g_str_hash, g_str_equal, g_free,
reinterpret_cast<GDestroyNotify>(mock_error_channel_free));
}

FlMockBinaryMessenger* fl_mock_binary_messenger_new() {
Expand Down

0 comments on commit dc27455

Please sign in to comment.