[nautilus] canvas-container: Remove unnecessary g_asserts
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] canvas-container: Remove unnecessary g_asserts
- Date: Mon, 26 Mar 2018 17:46:50 +0000 (UTC)
commit 8985b2261f66e32b40b1dd74203690474f933338
Author: Alexandru Fazakas <alex fazakas97 gmail com>
Date: Sun Mar 25 16:58:24 2018 +0300
canvas-container: Remove unnecessary g_asserts
is_selected is a binary filed of NautilusCanvasIcon (thus its value is
modulo 2), while select is a gboolean, which is a typedef for gint.
We never pass integers to the icon_set_selected call as arguments, so
it's safe to remove these two g_asserts.
src/nautilus-canvas-container.c | 3 ---
1 file changed, 3 deletions(-)
---
diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c
index 09c570118..85d769d62 100644
--- a/src/nautilus-canvas-container.c
+++ b/src/nautilus-canvas-container.c
@@ -401,9 +401,6 @@ icon_set_selected (NautilusCanvasContainer *container,
NautilusCanvasIcon *icon,
gboolean select)
{
- g_assert (select == FALSE || select == TRUE);
- g_assert (icon->is_selected == FALSE || icon->is_selected == TRUE);
-
if (select == icon->is_selected)
{
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]