aboutsummaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-05-24 18:47:38 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-05-24 18:47:38 -0500
commitf023be5dbef15c87fbb10a0b891ee19c73595791 (patch)
tree3c3dca3a026a1dff3e0720eb76616d8806c5f3a8 /src/device.c
parent4c95f0b14ad44f39b8e8e0b01a959e2a82e297a9 (diff)
downloadayatana-indicator-power-f023be5dbef15c87fbb10a0b891ee19c73595791.tar.gz
ayatana-indicator-power-f023be5dbef15c87fbb10a0b891ee19c73595791.tar.bz2
ayatana-indicator-power-f023be5dbef15c87fbb10a0b891ee19c73595791.zip
remove some unnecessary type compatibilty tests... g_object_set_property() does these tests for us
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/device.c b/src/device.c
index 219e738..d1b1a84 100644
--- a/src/device.c
+++ b/src/device.c
@@ -195,34 +195,28 @@ set_property (GObject * o, guint prop_id, const GValue * value, GParamSpec * psp
switch (prop_id)
{
case PROP_KIND:
- g_return_if_fail (G_VALUE_HOLDS_INT(value));
priv->kind = g_value_get_int (value);
break;
case PROP_STATE:
- g_return_if_fail (G_VALUE_HOLDS_INT(value));
priv->state = g_value_get_int (value);
break;
case PROP_OBJECT_PATH:
- g_return_if_fail (G_VALUE_HOLDS_STRING(value));
g_free (priv->object_path);
priv->object_path = g_value_dup_string (value);
break;
case PROP_ICON:
- g_return_if_fail (G_VALUE_HOLDS_STRING(value));
g_free (priv->icon);
priv->icon = g_value_dup_string (value);
break;
case PROP_PERCENTAGE:
- g_return_if_fail (G_VALUE_HOLDS_DOUBLE(value));
priv->percentage = g_value_get_double (value);
break;
case PROP_TIME:
- g_return_if_fail (G_VALUE_HOLDS_UINT64(value));
priv->time = g_value_get_uint64(value);
break;