Skip to content

Commit

Permalink
Drop some more unused pal code
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 10, 2019
1 parent d15c9e7 commit f7d937d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 95 deletions.
40 changes: 0 additions & 40 deletions src/core/pal/palgeometry.h

This file was deleted.

47 changes: 0 additions & 47 deletions src/core/pal/util.cpp
Expand Up @@ -37,53 +37,6 @@
#include "qgslogger.h"
#include <cfloat>

void pal::Util::sort( void **items, int N, bool ( *greater )( void *l, void *r ) )
{

if ( N <= 0 )
return;

unsigned int n = static_cast< unsigned int >( N ), i = n / 2, parent, child;

void *t = nullptr;

for ( ;; )
{
if ( i > 0 )
{
i--;
t = items[i];
}
else
{
n--;
if ( n == 0 ) return;
t = items[n];
items[n] = items[0];
}
parent = i;
child = i * 2 + 1;
while ( child < n )
{
if ( child + 1 < n && greater( items[child + 1], items[child] ) )
{
child++;
}
if ( greater( items[child], t ) )
{
items[parent] = items[child];
parent = child;
child = parent * 2 + 1;
}
else
{
break;
}
}
items[parent] = t;
}
}

QLinkedList<const GEOSGeometry *> *pal::Util::unmulti( const GEOSGeometry *the_geom )
{
QLinkedList<const GEOSGeometry *> *queue = new QLinkedList<const GEOSGeometry *>;
Expand Down
8 changes: 0 additions & 8 deletions src/core/pal/util.h
Expand Up @@ -86,14 +86,6 @@ namespace pal
{
public:

/**
* \brief Sort an array of pointers
* \param items arays of pointers to sort
* \param N number of items
* \param greater function to compare two items
**/
static void sort( void **items, int N, bool ( *greater )( void *l, void *r ) );

static QLinkedList<const GEOSGeometry *> *unmulti( const GEOSGeometry *the_geom );
};

Expand Down

0 comments on commit f7d937d

Please sign in to comment.