2023-06-19 15:06:04 +02:00
|
|
|
#include "Utils.h"
|
|
|
|
|
|
|
|
Utils::Utils(QObject *parent) : QObject(parent)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int Utils::compare(const void* a, const void* b)
|
|
|
|
{
|
2023-07-19 15:30:30 +02:00
|
|
|
uint16_t int_a = * ( (uint16_t*) a );
|
|
|
|
uint16_t int_b = * ( (uint16_t*) b );
|
2023-06-19 15:06:04 +02:00
|
|
|
|
|
|
|
if ( int_a == int_b ) return 0;
|
|
|
|
else if ( int_a < int_b ) return -1;
|
|
|
|
else return 1;
|
|
|
|
}
|