libsysprof-gtk: use 0 instead of -inf/inf

This commit is contained in:
Christian Hergert
2023-06-27 10:59:00 -07:00
parent 33b5c53a98
commit 514f913f40
4 changed files with 8 additions and 8 deletions

View File

@ -208,8 +208,8 @@ _sysprof_document_counter_new (guint id,
if (type == SYSPROF_CAPTURE_COUNTER_DOUBLE)
{
double min_value = INFINITY;
double max_value = -INFINITY;
double min_value = 0;
double max_value = 0;
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)
{
gint64 min_value = G_MAXINT64;
gint64 max_value = G_MININT64;
gint64 min_value = 0;
gint64 max_value = 0;
for (guint i = 0; i < values->len; i++)
{

View File

@ -44,7 +44,7 @@ static double
sysprof_axis_real_normalize (SysprofAxis *axis,
const GValue *value)
{
return -INFINITY;
return .0;
}
static void

View File

@ -398,10 +398,10 @@ sysprof_normalized_series_get_value_at (SysprofNormalizedSeries *self,
g_return_val_if_fail (SYSPROF_IS_NORMALIZED_SERIES (self), .0f);
if (egg_bitset_contains (self->missing, position))
return -INFINITY;
return .0;
if (position >= self->values->len)
return -INFINITY;
return .0;
return g_array_index (self->values, float, position);
}

View File

@ -81,7 +81,7 @@ get_as_double (const GValue *value)
return g_value_get_double (&dst);
}
return -INFINITY;
return .0;
}
static void