Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit dc27455

Browse files
committed
more lints
1 parent d5cad30 commit dc27455

File tree

5 files changed

+27
-24
lines changed

5 files changed

+27
-24
lines changed

impeller/toolkit/glvk/trampoline.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,12 @@ bool Trampoline::BlitTextureOpenGLToVulkan(
272272
gl.BufferData(GL_ARRAY_BUFFER, sizeof(kVertData), kVertData, GL_STATIC_DRAW);
273273
gl.EnableVertexAttribArray(kAttributeIndexPosition);
274274
gl.EnableVertexAttribArray(kAttributeIndexTexCoord);
275-
gl.VertexAttribPointer(kAttributeIndexPosition, 2, GL_FLOAT, GL_FALSE,
276-
sizeof(VertexData),
277-
(void*)offsetof(VertexData, position));
278-
gl.VertexAttribPointer(kAttributeIndexTexCoord, 2, GL_FLOAT, GL_FALSE,
279-
sizeof(VertexData),
280-
(void*)offsetof(VertexData, tex_coord));
275+
gl.VertexAttribPointer(
276+
kAttributeIndexPosition, 2, GL_FLOAT, GL_FALSE, sizeof(VertexData),
277+
reinterpret_cast<void*>(offsetof(VertexData, position)));
278+
gl.VertexAttribPointer(
279+
kAttributeIndexTexCoord, 2, GL_FLOAT, GL_FALSE, sizeof(VertexData),
280+
reinterpret_cast<void*>(offsetof(VertexData, tex_coord)));
281281

282282
gl.ActiveTexture(GL_TEXTURE0);
283283
gl.BindTexture(src_texture.target, src_texture.texture);

shell/platform/android/image_external_texture_gl_skia.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void ImageExternalTextureGLSkia::BindImageToTexture(
3636
}
3737
glBindTexture(GL_TEXTURE_EXTERNAL_OES, tex);
3838
glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES,
39-
(GLeglImageOES)image.get().image);
39+
static_cast<GLeglImageOES>(image.get().image));
4040
}
4141

4242
sk_sp<flutter::DlImage> ImageExternalTextureGLSkia::CreateDlImage(

shell/platform/android/platform_view_android_jni_impl.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,11 +1358,11 @@ double PlatformViewAndroidJNIImpl::FlutterViewGetScaledFontSize(
13581358
return -3;
13591359
}
13601360

1361-
const jfloat scaledSize =
1362-
env->CallFloatMethod(java_object.obj(), g_get_scaled_font_size_method,
1363-
(jfloat)font_size, (jint)configuration_id);
1361+
const jfloat scaledSize = env->CallFloatMethod(
1362+
java_object.obj(), g_get_scaled_font_size_method,
1363+
static_cast<jfloat>(font_size), static_cast<jint>(configuration_id));
13641364
FML_CHECK(fml::jni::CheckException(env));
1365-
return (double)scaledSize;
1365+
return static_cast<double>(scaledSize);
13661366
}
13671367

13681368
void PlatformViewAndroidJNIImpl::FlutterViewUpdateSemantics(

shell/platform/linux/fl_renderer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ static void fl_renderer_init(FlRenderer* self) {
324324
fl_renderer_get_instance_private(self));
325325
priv->views = g_hash_table_new_full(g_direct_hash, g_direct_equal, nullptr,
326326
free_weak_ref);
327-
priv->framebuffers_by_view_id =
328-
g_hash_table_new_full(g_direct_hash, g_direct_equal, nullptr,
329-
(GDestroyNotify)g_ptr_array_unref);
327+
priv->framebuffers_by_view_id = g_hash_table_new_full(
328+
g_direct_hash, g_direct_equal, nullptr,
329+
reinterpret_cast<GDestroyNotify>(g_ptr_array_unref));
330330
}
331331

332332
void fl_renderer_set_engine(FlRenderer* self, FlEngine* engine) {

shell/platform/linux/testing/fl_mock_binary_messenger.cc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,19 +320,22 @@ static void fl_mock_binary_messenger_iface_init(
320320
}
321321

322322
static void fl_mock_binary_messenger_init(FlMockBinaryMessenger* self) {
323-
self->handlers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
324-
(GDestroyNotify)handler_free);
323+
self->handlers =
324+
g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
325+
reinterpret_cast<GDestroyNotify>(handler_free));
325326

326327
self->mock_channels = g_hash_table_new_full(
327-
g_str_hash, g_str_equal, g_free, (GDestroyNotify)mock_channel_free);
328-
self->mock_message_channels =
329-
g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
330-
(GDestroyNotify)mock_message_channel_free);
331-
self->mock_method_channels =
332-
g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
333-
(GDestroyNotify)mock_method_channel_free);
328+
g_str_hash, g_str_equal, g_free,
329+
reinterpret_cast<GDestroyNotify>(mock_channel_free));
330+
self->mock_message_channels = g_hash_table_new_full(
331+
g_str_hash, g_str_equal, g_free,
332+
reinterpret_cast<GDestroyNotify>(mock_message_channel_free));
333+
self->mock_method_channels = g_hash_table_new_full(
334+
g_str_hash, g_str_equal, g_free,
335+
reinterpret_cast<GDestroyNotify>(mock_method_channel_free));
334336
self->mock_error_channels = g_hash_table_new_full(
335-
g_str_hash, g_str_equal, g_free, (GDestroyNotify)mock_error_channel_free);
337+
g_str_hash, g_str_equal, g_free,
338+
reinterpret_cast<GDestroyNotify>(mock_error_channel_free));
336339
}
337340

338341
FlMockBinaryMessenger* fl_mock_binary_messenger_new() {

0 commit comments

Comments
 (0)