Skip to content
Permalink
Browse files

Merge pull request #4163 from nyalldawson/clang_tidyu

Fix a bunch of suggestions from clang-tidy
  • Loading branch information
nyalldawson committed Feb 21, 2017
2 parents 4c92689 + db5dd85 commit 4ad077e391ea7734febd7f7359f3aeb1dbe03c7e
Showing with 442 additions and 612 deletions.
  1. +14 −0 CMakeLists.txt
  2. +16 −0 python/core/symbology-ng/qgsfillsymbollayer.sip
  3. +4 −0 python/core/symbology-ng/qgslinesymbollayer.sip
  4. +4 −0 python/core/symbology-ng/qgsvectorfieldsymbollayer.sip
  5. +7 −0 src/analysis/CMakeLists.txt
  6. +0 −8 src/analysis/interpolation/Point3D.cc
  7. +0 −1 src/analysis/interpolation/Point3D.h
  8. +0 −15 src/analysis/interpolation/Vector3D.cc
  9. +0 −3 src/analysis/interpolation/Vector3D.h
  10. +0 −5 src/analysis/interpolation/qgsinterpolator.cpp
  11. +1 −1 src/analysis/interpolation/qgsinterpolator.h
  12. +0 −5 src/analysis/network/qgsvectorlayerdirector.cpp
  13. +1 −1 src/analysis/network/qgsvectorlayerdirector.h
  14. +0 −5 src/analysis/raster/qgsderivativefilter.cpp
  15. +1 −1 src/analysis/raster/qgsderivativefilter.h
  16. +0 −5 src/analysis/raster/qgsninecellfilter.cpp
  17. +1 −1 src/analysis/raster/qgsninecellfilter.h
  18. +1 −1 src/analysis/raster/qgsrastermatrix.cpp
  19. +0 −6 src/analysis/raster/qgsruggednessfilter.cpp
  20. +1 −1 src/analysis/raster/qgsruggednessfilter.h
  21. +0 −5 src/analysis/raster/qgsslopefilter.cpp
  22. +1 −1 src/analysis/raster/qgsslopefilter.h
  23. +0 −5 src/analysis/raster/qgstotalcurvaturefilter.cpp
  24. +1 −1 src/analysis/raster/qgstotalcurvaturefilter.h
  25. +4 −4 src/analysis/vector/mersenne-twister.cpp
  26. +1 −1 src/analysis/vector/qgstransectsample.cpp
  27. +8 −0 src/core/CMakeLists.txt
  28. +0 −3 src/core/annotations/qgshtmlannotation.cpp
  29. +1 −1 src/core/annotations/qgshtmlannotation.h
  30. +1 −1 src/core/auth/qgsauthmethodregistry.cpp
  31. +6 −6 src/core/composer/qgsatlascomposition.cpp
  32. +0 −2 src/core/composer/qgscomposerarrow.cpp
  33. +1 −1 src/core/composer/qgscomposerattributetablev2.cpp
  34. +3 −3 src/core/composer/qgscomposerhtml.cpp
  35. +1 −3 src/core/composer/qgscomposeritem.cpp
  36. +1 −1 src/core/composer/qgscomposerlabel.cpp
  37. +1 −1 src/core/composer/qgscomposermap.cpp
  38. +1 −1 src/core/composer/qgscomposermap.h
  39. +1 −1 src/core/composer/qgscomposernodesitem.cpp
  40. +1 −8 src/core/composer/qgscomposerpicture.cpp
  41. +1 −8 src/core/composer/qgscomposertablev2.cpp
  42. +3 −3 src/core/composer/qgscomposition.cpp
  43. +0 −8 src/core/diagram/qgsdiagram.cpp
  44. +1 −1 src/core/geometry/qgsabstractgeometry.h
  45. +20 −20 src/core/geometry/qgsgeometrymakevalid.cpp
  46. +2 −16 src/core/geometry/qgsgeometryutils.cpp
  47. +1 −1 src/core/geometry/qgsgeos.cpp
  48. +3 −3 src/core/geometry/qgsinternalgeometryengine.cpp
  49. +1 −1 src/core/gps/qextserialport/posix_qextserialport.cpp
  50. +1 −1 src/core/gps/qextserialport/qextserialport.cpp
  51. +1 −1 src/core/layertree/qgslayertreemodel.cpp
  52. +2 −2 src/core/pal/feature.cpp
  53. +2 −9 src/core/pal/problem.cpp
  54. +1 −1 src/core/qgsattributetableconfig.cpp
  55. +0 −4 src/core/qgscacheindex.cpp
  56. +5 −1 src/core/qgscacheindex.h
  57. +0 −1 src/core/qgscolorramp.cpp
  58. +0 −5 src/core/qgscolorscheme.cpp
  59. +4 −1 src/core/qgscolorscheme.h
  60. +9 −9 src/core/qgscoordinatereferencesystem.cpp
  61. +4 −7 src/core/qgscoordinatetransform.cpp
  62. +2 −6 src/core/qgsdataitem.cpp
  63. +3 −3 src/core/qgsdataitemproviderregistry.cpp
  64. +1 −1 src/core/qgsdatetimestatisticalsummary.cpp
  65. +3 −3 src/core/qgseditformconfig.cpp
  66. +14 −19 src/core/qgsexpression.cpp
  67. +5 −5 src/core/qgsexpressioncontext.cpp
  68. +1 −1 src/core/qgsexpressioncontext.h
  69. +3 −3 src/core/qgsfeature.cpp
  70. +4 −16 src/core/qgsfeaturerequest.cpp
  71. +2 −2 src/core/qgsfield.cpp
  72. +1 −1 src/core/qgsfieldformatter.cpp
  73. +3 −3 src/core/qgsfields.cpp
  74. +0 −1 src/core/qgsfontutils.cpp
  75. +1 −1 src/core/qgslabelingengine.cpp
  76. +1 −1 src/core/qgslocalec.cpp
  77. +1 −1 src/core/qgsmapsettings.cpp
  78. +2 −2 src/core/qgsnetworkaccessmanager.cpp
  79. +1 −2 src/core/qgsnetworkcontentfetcher.cpp
  80. +6 −6 src/core/qgsogcutils.cpp
  81. +1 −1 src/core/qgspallabeling.cpp
  82. +2 −8 src/core/qgspoint.cpp
  83. +4 −4 src/core/qgspointlocator.cpp
  84. +2 −2 src/core/qgsproject.cpp
  85. +1 −1 src/core/qgsproject.h
  86. +0 −4 src/core/qgsprojectfiletransform.cpp
  87. +1 −1 src/core/qgsprojectproperty.cpp
  88. +2 −2 src/core/qgsproperty.cpp
  89. +1 −1 src/core/qgsproviderregistry.cpp
  90. +0 −7 src/core/qgspythonrunner.cpp
  91. +1 −1 src/core/qgspythonrunner.h
  92. +6 −6 src/core/qgsspatialindex.cpp
  93. +3 −3 src/core/qgssqlstatement.cpp
  94. +1 −1 src/core/qgsstringstatisticalsummary.cpp
  95. +2 −2 src/core/qgsstringutils.cpp
  96. +1 −1 src/core/qgstaskmanager.cpp
  97. +1 −1 src/core/qgstextlabelfeature.cpp
  98. +14 −14 src/core/qgstextrenderer.cpp
  99. +5 −7 src/core/qgstracer.cpp
  100. +2 −1 src/core/qgstracer.h
  101. +4 −5 src/core/qgsvectorfilewriter.cpp
  102. +21 −24 src/core/qgsvectorlayer.cpp
  103. +1 −1 src/core/raster/qgscolorrampshader.cpp
  104. +10 −20 src/core/raster/qgspalettedrasterrenderer.cpp
  105. +6 −7 src/core/raster/qgsrasterblock.cpp
  106. +1 −1 src/core/raster/qgsrasterfilewriter.cpp
  107. +1 −2 src/core/raster/qgsrasterpipe.cpp
  108. +10 −20 src/core/raster/qgssinglebandgrayrenderer.cpp
  109. +1 −4 src/core/symbology-ng/qgscategorizedsymbolrenderer.cpp
  110. +2 −6 src/core/symbology-ng/qgscptcityarchive.cpp
  111. +6 −15 src/core/symbology-ng/qgsfillsymbollayer.cpp
  112. +3 −4 src/core/symbology-ng/qgsfillsymbollayer.h
  113. +1 −3 src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp
  114. +0 −1 src/core/symbology-ng/qgsheatmaprenderer.cpp
  115. +1 −3 src/core/symbology-ng/qgsinvertedpolygonrenderer.cpp
  116. +5 −12 src/core/symbology-ng/qgslinesymbollayer.cpp
  117. +1 −3 src/core/symbology-ng/qgslinesymbollayer.h
  118. +5 −12 src/core/symbology-ng/qgsstyle.cpp
  119. +1 −1 src/core/symbology-ng/qgssvgcache.cpp
  120. +1 −1 src/core/symbology-ng/qgssymbol.cpp
  121. +1 −2 src/core/symbology-ng/qgssymbollayer.cpp
  122. +1 −2 src/core/symbology-ng/qgssymbollayerutils.cpp
  123. +1 −7 src/core/symbology-ng/qgsvectorfieldsymbollayer.cpp
  124. +2 −3 src/core/symbology-ng/qgsvectorfieldsymbollayer.h
  125. +8 −0 src/gui/CMakeLists.txt
  126. +2 −2 src/gui/editorwidgets/core/qgseditorwidgetautoconf.cpp
  127. +1 −1 src/gui/qgisgui.cpp
  128. +1 −1 src/gui/qgsadvanceddigitizingdockwidget.cpp
  129. +3 −3 src/gui/qgsfiledownloader.cpp
  130. +3 −3 src/gui/qgsfiledownloader.h
  131. +0 −1 src/gui/qgsgradientstopeditor.cpp
  132. +1 −1 src/gui/qgsmapcanvas.cpp
  133. +1 −1 src/gui/qgsmapoverviewcanvas.cpp
  134. +2 −6 src/gui/qgsoptionsdialogbase.cpp
  135. +2 −3 src/gui/qgsoptionsdialogbase.h
  136. +1 −1 src/gui/qgsshortcutsmanager.cpp
  137. +1 −1 src/gui/qgsshortcutsmanager.h
  138. +6 −6 src/gui/symbology-ng/qgsstylemanagerdialog.cpp
  139. +0 −3 src/gui/symbology-ng/qgssymbollayerwidget.cpp
  140. +0 −1 src/gui/symbology-ng/qgssymbollayerwidget.h
  141. +1 −1 src/gui/symbology-ng/qgssymbolslistwidget.cpp
  142. +8 −0 src/providers/delimitedtext/CMakeLists.txt
  143. +8 −0 src/providers/gdal/CMakeLists.txt
  144. +3 −4 src/providers/gdal/qgsgdalprovider.cpp
  145. +1 −1 src/providers/gdal/qgsgdalproviderbase.cpp
  146. +8 −0 src/providers/memory/CMakeLists.txt
  147. +8 −0 src/providers/ogr/CMakeLists.txt
  148. +0 −9 src/providers/ogr/qgsogrdataitems.cpp
  149. +0 −2 src/providers/ogr/qgsogrdataitems.h
  150. +1 −1 src/providers/ogr/qgsogrprovider.cpp
  151. +7 −0 src/providers/postgres/CMakeLists.txt
  152. +1 −1 src/providers/postgres/qgscolumntypethread.cpp
  153. +1 −1 src/providers/postgres/qgscolumntypethread.h
  154. +0 −4 src/providers/postgres/qgspgnewconnection.cpp
  155. +0 −1 src/providers/postgres/qgspgnewconnection.h
  156. +0 −4 src/providers/postgres/qgspgtablemodel.cpp
  157. +0 −1 src/providers/postgres/qgspgtablemodel.h
  158. +3 −19 src/providers/postgres/qgspostgresdataitems.cpp
  159. +3 −7 src/providers/postgres/qgspostgresdataitems.h
  160. +2 −2 src/providers/postgres/qgspostgresprovider.cpp
  161. +2 −2 src/providers/postgres/qgspostgresprovider.h
  162. +8 −0 src/providers/spatialite/CMakeLists.txt
  163. +1 −1 src/providers/spatialite/qgsspatialiteconnection.cpp
  164. +1 −1 src/providers/spatialite/qgsspatialitedataitems.cpp
  165. +7 −0 src/server/CMakeLists.txt
  166. +1 −1 src/server/qgis_map_serv.cpp
@@ -671,6 +671,20 @@ INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
# that may be in the same install prefix
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/src/core ${CMAKE_BINARY_DIR}/src/gui)

####################################################
# clang-tidy
FIND_PROGRAM(
CLANG_TIDY_EXE
NAMES "clang-tidy"
DOC "Path to clang-tidy executable"
)
IF(NOT CLANG_TIDY_EXE)
MESSAGE(STATUS "clang-tidy not found.")
ELSE(NOT CLANG_TIDY_EXE)
MESSAGE(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
SET(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-checks=*,-clang-analyzer-alpha.*,-cppcoreguidelines*,-readability-implicit-bool-cast,-llvm-include-order,-cert-err58-cpp,-modernize-pass-by-value,-google-readability-braces-around-statements,-modernize-use-auto,-modernize-loop-convert,-readability-else-after-return,-readability-braces-around-statements,-google-runtime-references,-readability-named-parameter,-google-default-arguments,-google-readability-todo,-readability-inconsistent-declaration-parameter-name,-cert-flp30-c,-google-readability-casting,-clang-analyzer-security.FloatLoopCounter,-google-runtime-int,-modernize-use-using,-google-explicit-constructor,-google-build-using-namespace,-cert-err34-c,-clang-analyzer-core.CallAndMessage,-google-readability-function-size,-modernize-make-shared,-modernize-use-nullptr,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.NonNullParamChecker,performance-unnecessary-copy-initialization,-readability-simplify-boolean-expr,-modernize-raw-string-literal,-performance-unnecessary-copy-initialization")
ENDIF(NOT CLANG_TIDY_EXE)

#############################################################
# create qgsversion.h
IF (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
@@ -487,6 +487,10 @@ class QgsImageFillSymbolLayer: QgsFillSymbolLayer
protected:

virtual void applyDataDefinedSettings( QgsSymbolRenderContext& context );

private:

QgsImageFillSymbolLayer( const QgsImageFillSymbolLayer& other );
};

/** \ingroup core
@@ -844,6 +848,10 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer

QSet<QString> usedAttributes( const QgsRenderContext& context ) const;

private:

QgsLinePatternFillSymbolLayer( const QgsLinePatternFillSymbolLayer& other );

};

class QgsPointPatternFillSymbolLayer : QgsImageFillSymbolLayer
@@ -945,6 +953,10 @@ class QgsPointPatternFillSymbolLayer : QgsImageFillSymbolLayer

protected:
void applyDataDefinedSettings( QgsSymbolRenderContext& context );

private:

QgsPointPatternFillSymbolLayer( const QgsPointPatternFillSymbolLayer& other );
};

class QgsCentroidFillSymbolLayer : QgsFillSymbolLayer
@@ -1001,4 +1013,8 @@ class QgsCentroidFillSymbolLayer : QgsFillSymbolLayer
/** Returns whether a point is drawn for all parts or only on the biggest part of multi-part features.
* @note added in 2.16 */
bool pointOnAllParts() const;

private:

QgsCentroidFillSymbolLayer( const QgsCentroidFillSymbolLayer& other );
};
@@ -283,4 +283,8 @@ class QgsMarkerLineSymbolLayer : QgsLineSymbolLayer
void renderPolylineVertex( const QPolygonF& points, QgsSymbolRenderContext& context, Placement placement = Vertex );
void renderPolylineCentral( const QPolygonF& points, QgsSymbolRenderContext& context );
double markerAngle( const QPolygonF& points, bool isRing, int vertex );

private:

QgsMarkerLineSymbolLayer( const QgsMarkerLineSymbolLayer& other );
};
@@ -85,4 +85,8 @@ class QgsVectorFieldSymbolLayer : QgsMarkerSymbolLayer
const QgsMapUnitScale& distanceMapUnitScale() const;

QRectF bounds( QPointF point, QgsSymbolRenderContext& context );

private:

QgsVectorFieldSymbolLayer( const QgsVectorFieldSymbolLayer& other );
};
@@ -217,6 +217,13 @@ ENDIF (NOT ANDROID)

TARGET_LINK_LIBRARIES(qgis_analysis qgis_core)

# clang-tidy
IF(CLANG_TIDY_EXE)
SET_TARGET_PROPERTIES(
qgis_analysis PROPERTIES
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
)
ENDIF(CLANG_TIDY_EXE)

# install

@@ -17,14 +17,6 @@
#include "Point3D.h"
#include "qgslogger.h"

Point3D& Point3D::operator=( const Point3D & p )
{
mX = p.mX;
mY = p.mY;
mZ = p.mZ;
return ( *this );
}

bool Point3D::operator==( const Point3D& p ) const
{
return ( mX == p.getX() && mY == p.getY() && mZ == p.getZ() );
@@ -36,7 +36,6 @@ class ANALYSIS_EXPORT Point3D
//! Constructor with the x-, y- and z-coordinate as arguments
Point3D( double x, double y, double z );
Point3D( const Point3D& p );
Point3D& operator=( const Point3D& p );
bool operator==( const Point3D& p ) const;
bool operator!=( const Point3D& p ) const;
//! Calculates the three-dimensional distance to another point
@@ -29,21 +29,6 @@ void Vector3D::standardise()
setZ( getZ() / length );
}

Vector3D::Vector3D( const Vector3D& v )
: mX( v.mX )
, mY( v.mY )
, mZ( v.mZ )
{
}

Vector3D& Vector3D::operator=( const Vector3D & v )
{
mX = v.mX;
mY = v.mY;
mZ = v.mZ;
return ( *this );
}

bool Vector3D::operator==( const Vector3D& v ) const
{
return ( mX == v.getX() && mY == v.getY() && mZ == v.getZ() );
@@ -41,10 +41,7 @@ class ANALYSIS_EXPORT Vector3D
Vector3D( double x, double y, double z );
//! Default constructor
Vector3D();
//! Copy constructor
Vector3D( const Vector3D& v );

Vector3D& operator=( const Vector3D& v );
bool operator==( const Vector3D& v ) const;
bool operator!=( const Vector3D& v ) const;
//! Returns the x-component of the vector
@@ -35,11 +35,6 @@ QgsInterpolator::QgsInterpolator()

}

QgsInterpolator::~QgsInterpolator()
{

}

int QgsInterpolator::cacheBaseData()
{
if ( mLayerData.size() < 1 )
@@ -57,7 +57,7 @@ class ANALYSIS_EXPORT QgsInterpolator

QgsInterpolator( const QList<LayerData>& layerData );

virtual ~QgsInterpolator();
virtual ~QgsInterpolator() = default;

/** Calculates interpolation value for map coordinates x, y
@param x x-coordinate (in map units)
@@ -118,11 +118,6 @@ QgsVectorLayerDirector::QgsVectorLayerDirector( QgsVectorLayer *myLayer,
mBothDirectionValue = bothDirectionValue;
}

QgsVectorLayerDirector::~QgsVectorLayerDirector()
{

}

QString QgsVectorLayerDirector::name() const
{
return QStringLiteral( "Vector line" );
@@ -65,7 +65,7 @@ class ANALYSIS_EXPORT QgsVectorLayerDirector : public QgsGraphDirector
const Direction defaultDirection
);

virtual ~QgsVectorLayerDirector();
virtual ~QgsVectorLayerDirector() = default;

/*
* MANDATORY DIRECTOR PROPERTY DECLARATION
@@ -23,11 +23,6 @@ QgsDerivativeFilter::QgsDerivativeFilter( const QString& inputFile, const QStrin

}

QgsDerivativeFilter::~QgsDerivativeFilter()
{

}

float QgsDerivativeFilter::calcFirstDerX( float* x11, float* x21, float* x31, float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
{
//the basic formula would be simple, but we need to test for nodata values...
@@ -27,7 +27,7 @@ class ANALYSIS_EXPORT QgsDerivativeFilter : public QgsNineCellFilter
{
public:
QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat );
virtual ~QgsDerivativeFilter();
virtual ~QgsDerivativeFilter() = default;
//to be implemented by subclasses
virtual float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
@@ -43,11 +43,6 @@ QgsNineCellFilter::QgsNineCellFilter()
{
}

QgsNineCellFilter::~QgsNineCellFilter()
{

}

int QgsNineCellFilter::processRaster( QProgressDialog* p )
{
GDALAllRegister();
@@ -34,7 +34,7 @@ class ANALYSIS_EXPORT QgsNineCellFilter
public:
//! Constructor that takes input file, output file and output format (GDAL string)
QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat );
virtual ~QgsNineCellFilter();
virtual ~QgsNineCellFilter() = default;

/** Starts the calculation, reads from mInputFile and stores the result in mOutputFile
@param p progress dialog that receives update and that is checked for abort. 0 if no progress bar is needed.
@@ -16,7 +16,7 @@
***************************************************************************/

#include "qgsrastermatrix.h"
#include <string.h>
#include <cstring>
#include <qmath.h>

QgsRasterMatrix::QgsRasterMatrix()
@@ -27,12 +27,6 @@ QgsRuggednessFilter::QgsRuggednessFilter(): QgsNineCellFilter( QLatin1String( ""

}


QgsRuggednessFilter::~QgsRuggednessFilter()
{

}

float QgsRuggednessFilter::processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
{
@@ -28,7 +28,7 @@ class ANALYSIS_EXPORT QgsRuggednessFilter: public QgsNineCellFilter
{
public:
QgsRuggednessFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat );
~QgsRuggednessFilter();
~QgsRuggednessFilter() = default;

protected:

@@ -23,11 +23,6 @@ QgsSlopeFilter::QgsSlopeFilter( const QString& inputFile, const QString& outputF

}

QgsSlopeFilter::~QgsSlopeFilter()
{

}

float QgsSlopeFilter::processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
{
@@ -27,7 +27,7 @@ class ANALYSIS_EXPORT QgsSlopeFilter: public QgsDerivativeFilter
{
public:
QgsSlopeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat );
~QgsSlopeFilter();
~QgsSlopeFilter() = default;

/** Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
@@ -23,11 +23,6 @@ QgsTotalCurvatureFilter::QgsTotalCurvatureFilter( const QString& inputFile, cons

}

QgsTotalCurvatureFilter::~QgsTotalCurvatureFilter()
{

}

float QgsTotalCurvatureFilter::processNineCellWindow( float* x11, float* x21, float* x31, float* x12,
float* x22, float* x32, float* x13, float* x23, float* x33 )
{
@@ -27,7 +27,7 @@ class ANALYSIS_EXPORT QgsTotalCurvatureFilter: public QgsNineCellFilter
{
public:
QgsTotalCurvatureFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat );
~QgsTotalCurvatureFilter();
~QgsTotalCurvatureFilter() = default;

protected:

@@ -20,7 +20,7 @@
* 2015-02-17
*/

#include <stdio.h>
#include <cstdio>
#include "mersenne-twister.h"

/*
@@ -35,9 +35,9 @@ static const unsigned DIFF = SIZE - PERIOD;
static uint32_t MT[SIZE];
static unsigned index = 0;

#define M32(x) (0x80000000 & x) // 32nd Most Significant Bit
#define L31(x) (0x7FFFFFFF & x) // 31 Least Significant Bits
#define ODD(x) (x & 1) // Check if number is odd
#define M32(x) (0x80000000 & (x)) // 32nd Most Significant Bit
#define L31(x) (0x7FFFFFFF & (x)) // 31 Least Significant Bits
#define ODD(x) ((x) & 1) // Check if number is odd

#define UNROLL(expr) \
y = M32(MT[i]) | L31(MT[i+1]); \
@@ -22,7 +22,7 @@
#include <QProgressDialog>
#include <QFileInfo>
#ifndef _MSC_VER
#include <stdint.h>
#include <cstdint>
#endif
#include "mersenne-twister.h"
#include <limits>
@@ -1060,6 +1060,14 @@ IF (Qt5Positioning_FOUND)
)
ENDIF (Qt5Positioning_FOUND)

# clang-tidy
IF(CLANG_TIDY_EXE)
SET_TARGET_PROPERTIES(
qgis_core PROPERTIES
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
)
ENDIF(CLANG_TIDY_EXE)

# install

INSTALL(TARGETS qgis_core
@@ -47,9 +47,6 @@ QgsHtmlAnnotation::QgsHtmlAnnotation( QObject* parent )
connect( mWebPage->mainFrame(), &QWebFrame::javaScriptWindowObjectCleared, this, &QgsHtmlAnnotation::javascript );
}

QgsHtmlAnnotation::~QgsHtmlAnnotation()
{}

void QgsHtmlAnnotation::setSourceFile( const QString& htmlFile )
{
QFile file( htmlFile );
@@ -42,7 +42,7 @@ class CORE_EXPORT QgsHtmlAnnotation: public QgsAnnotation
*/
QgsHtmlAnnotation( QObject* parent = nullptr );

~QgsHtmlAnnotation();
~QgsHtmlAnnotation() = default;

QSizeF minimumFrameSize() const override;

@@ -338,7 +338,7 @@ QFunctionPointer QgsAuthMethodRegistry::function( QString const & authMethodKey,
else
{
QgsDebugMsg( "Cannot load library: " + myLib.errorString() );
return 0;
return nullptr;
}
}

0 comments on commit 4ad077e

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