mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-gtk: use 0 instead of -inf/inf
This commit is contained in:
@ -208,8 +208,8 @@ _sysprof_document_counter_new (guint id,
|
|||||||
|
|
||||||
if (type == SYSPROF_CAPTURE_COUNTER_DOUBLE)
|
if (type == SYSPROF_CAPTURE_COUNTER_DOUBLE)
|
||||||
{
|
{
|
||||||
double min_value = INFINITY;
|
double min_value = 0;
|
||||||
double max_value = -INFINITY;
|
double max_value = 0;
|
||||||
|
|
||||||
for (guint i = 0; i < values->len; i++)
|
for (guint i = 0; i < values->len; i++)
|
||||||
{
|
{
|
||||||
@ -228,8 +228,8 @@ _sysprof_document_counter_new (guint id,
|
|||||||
}
|
}
|
||||||
else if (type == SYSPROF_CAPTURE_COUNTER_INT64)
|
else if (type == SYSPROF_CAPTURE_COUNTER_INT64)
|
||||||
{
|
{
|
||||||
gint64 min_value = G_MAXINT64;
|
gint64 min_value = 0;
|
||||||
gint64 max_value = G_MININT64;
|
gint64 max_value = 0;
|
||||||
|
|
||||||
for (guint i = 0; i < values->len; i++)
|
for (guint i = 0; i < values->len; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -44,7 +44,7 @@ static double
|
|||||||
sysprof_axis_real_normalize (SysprofAxis *axis,
|
sysprof_axis_real_normalize (SysprofAxis *axis,
|
||||||
const GValue *value)
|
const GValue *value)
|
||||||
{
|
{
|
||||||
return -INFINITY;
|
return .0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@ -398,10 +398,10 @@ sysprof_normalized_series_get_value_at (SysprofNormalizedSeries *self,
|
|||||||
g_return_val_if_fail (SYSPROF_IS_NORMALIZED_SERIES (self), .0f);
|
g_return_val_if_fail (SYSPROF_IS_NORMALIZED_SERIES (self), .0f);
|
||||||
|
|
||||||
if (egg_bitset_contains (self->missing, position))
|
if (egg_bitset_contains (self->missing, position))
|
||||||
return -INFINITY;
|
return .0;
|
||||||
|
|
||||||
if (position >= self->values->len)
|
if (position >= self->values->len)
|
||||||
return -INFINITY;
|
return .0;
|
||||||
|
|
||||||
return g_array_index (self->values, float, position);
|
return g_array_index (self->values, float, position);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,7 @@ get_as_double (const GValue *value)
|
|||||||
return g_value_get_double (&dst);
|
return g_value_get_double (&dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
return -INFINITY;
|
return .0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user