Skip to content
Permalink
Browse files

fix windows build

  • Loading branch information
jef-n committed Mar 19, 2019
1 parent 8cff941 commit ab340f2de429a166bbdc3604fb76255212391f42
@@ -297,11 +297,12 @@ static bool intersectionDemTriangles( const QByteArray &vertexBuf, const QByteAr

const float *vertices = reinterpret_cast<const float *>( vertexBuf.constData() );
const uint *indices = reinterpret_cast<const uint *>( indexBuf.constData() );
#ifdef QGISDEBUG
int vertexCnt = vertexBuf.count() / sizeof( float );
int indexCnt = indexBuf.count() / sizeof( uint );
Q_ASSERT( vertexCnt % 8 == 0 );
#endif
int indexCnt = indexBuf.count() / sizeof( uint );
Q_ASSERT( indexCnt % 3 == 0 );
//int vertexCount = vertexCnt/8;
int triangleCount = indexCnt / 3;

QVector3D intersectionPt, minIntersectionPt;
@@ -23,7 +23,7 @@
#endif


#ifdef USE_THREAD_LOCAL
#if defined(USE_THREAD_LOCAL) && !defined(Q_OS_WIN)
thread_local QgsProjContext QgsProjContext::sProjContext;
#else
QThreadStorage< QgsProjContext * > QgsProjContext::sProjContext;
@@ -49,7 +49,7 @@ QgsProjContext::~QgsProjContext()

PJ_CONTEXT *QgsProjContext::get()
{
#ifdef USE_THREAD_LOCAL
#if defined(USE_THREAD_LOCAL) && !defined(Q_OS_WIN)
return sProjContext.mContext;
#else
PJ_CONTEXT *pContext = nullptr;
@@ -17,10 +17,12 @@
#ifndef QGSPROJUTILS_H
#define QGSPROJUTILS_H

#include <QtGlobal>

#include "qgis_core.h"
#include "qgsconfig.h"

#ifndef USE_THREAD_LOCAL
#if !defined(USE_THREAD_LOCAL) || defined(Q_OS_WIN)
#include <QThreadStorage>
#endif

@@ -59,7 +61,7 @@ class CORE_EXPORT QgsProjContext
* Thread local proj context storage. A new proj context will be created
* for every thread.
*/
#ifdef USE_THREAD_LOCAL
#if defined(USE_THREAD_LOCAL) && !defined(Q_OS_WIN)
static thread_local QgsProjContext sProjContext;
#else
static QThreadStorage< QgsProjContext * > sProjContext;
@@ -123,7 +123,8 @@ void TestQgsCoordinateReferenceSystem::initTestCase()
qDebug() << "GDAL version (build): " << GDAL_RELEASE_NAME;
qDebug() << "GDAL version (runtime): " << GDALVersionInfo( "RELEASE_NAME" );
#if PROJ_VERSION_MAJOR > 4
qDebug() << "PROJ version: " << pj_release;
PJ_INFO info = proj_info();
qDebug() << "PROJ version: " << info.release;
#else
qDebug() << "PROJ version: " << PJ_VERSION;
#endif

0 comments on commit ab340f2

Please sign in to comment.
You can’t perform that action at this time.