mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Add OpenBSD compile support
Thanks to Claus Assmann for the fixups; - RideNavigator double foreach loops used same name for iterator - N_TTY line discipline is not defined on OpenBSD (possibly) Would be nice to have a better fix for the line discipline stuff, but 0 is usually the TTY line discipline. Bit of a hack, but ok for now.
This commit is contained in:
@@ -63,6 +63,9 @@
|
||||
#include <termios.h> // unix!!
|
||||
#include <unistd.h> // unix!!
|
||||
#include <sys/ioctl.h>
|
||||
#ifndef N_TTY // for OpenBSD, this is a hack XXX
|
||||
#define N_TTY 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined GC_HAVE_LIBUSB
|
||||
|
||||
@@ -47,6 +47,9 @@
|
||||
#include <termios.h> // unix!!
|
||||
#include <unistd.h> // unix!!
|
||||
#include <sys/ioctl.h>
|
||||
#ifndef N_TTY // for OpenBSD, this is a hack XXX
|
||||
#define N_TTY 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -685,12 +685,12 @@ QString
|
||||
GroupByModel::groupFromValue(QString headingName, QString value, double rank, double count) const
|
||||
{
|
||||
// Check for predefined thresholds / zones / bands for this metric/column
|
||||
foreach (groupRange range, groupRanges) {
|
||||
if (range.column == headingName) {
|
||||
foreach (groupRange orange, groupRanges) {
|
||||
if (orange.column == headingName) {
|
||||
|
||||
double number = value.toDouble();
|
||||
// use thresholds defined for this column/metric
|
||||
foreach(groupRange::range range, range.ranges) {
|
||||
foreach(groupRange::range range, orange.ranges) {
|
||||
|
||||
// 0-x is lower, x-0 is upper, 0-0 is no data and x-x is a range
|
||||
if (range.low == 0.0 && range.high == 0.0 && number == 0.0) return range.name;
|
||||
|
||||
Reference in New Issue
Block a user