Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix style
  • Loading branch information
peppsac committed Jan 23, 2019
1 parent 39f7d9a commit 08634c4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/geometry/qgswkbptr.sip.in
Expand Up @@ -38,14 +38,14 @@ class QgsConstWkbPtr




public:
QgsConstWkbPtr( const unsigned char *p /Array/, int size /ArraySize/ );






};

/************************************************************************
Expand Down
3 changes: 3 additions & 0 deletions python/gui/auto_generated/qgsnewmemorylayerdialog.sip.in
Expand Up @@ -28,6 +28,9 @@ Runs the dialog and creates a new memory layer
%End

QgsNewMemoryLayerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
New dialog constructor.
%End
~QgsNewMemoryLayerDialog();

QgsWkbTypes::Type selectedType() const;
Expand Down
3 changes: 3 additions & 0 deletions python/gui/auto_generated/qgsnewvectorlayerdialog.sip.in
Expand Up @@ -28,6 +28,9 @@ If the ``initialPath`` argument is specified, then the dialog will default to th
%End

QgsNewVectorLayerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
New dialog constructor.
%End
~QgsNewVectorLayerDialog();
QgsWkbTypes::Type selectedType() const;
%Docstring
Expand Down
24 changes: 11 additions & 13 deletions src/core/geometry/qgswkbptr.h
Expand Up @@ -132,19 +132,6 @@ class CORE_EXPORT QgsConstWkbPtr
mutable bool mEndianSwap;
mutable QgsWkbTypes::Type mWkbType;

#ifndef SIP_RUN
template<typename T>
void endian_swap( T &value ) const
{
char *data = reinterpret_cast<char *>( &value );
std::size_t n = sizeof( value );
for ( std::size_t i = 0, m = n / 2; i < m; ++i )
{
std::swap( data[i], data[n - 1 - i] );
}
}
#endif

/**
* \brief Verify bounds
* \note note available in Python bindings
Expand Down Expand Up @@ -196,6 +183,17 @@ class CORE_EXPORT QgsConstWkbPtr
* \note note available in Python bindings
*/
inline int remaining() const { return mEnd - mP; } SIP_SKIP

private:
template<typename T> void endian_swap( T &value ) const SIP_SKIP
{
char *data = reinterpret_cast<char *>( &value );
std::size_t n = sizeof( value );
for ( std::size_t i = 0, m = n / 2; i < m; ++i )
{
std::swap( data[i], data[n - 1 - i] );
}
}
};

#endif // QGSWKBPTR_H
3 changes: 3 additions & 0 deletions src/gui/qgsnewmemorylayerdialog.h
Expand Up @@ -43,6 +43,9 @@ class GUI_EXPORT QgsNewMemoryLayerDialog: public QDialog, private Ui::QgsNewMemo
*/
static QgsVectorLayer *runAndCreateLayer( QWidget *parent = nullptr, const QgsCoordinateReferenceSystem &defaultCrs = QgsCoordinateReferenceSystem() );

/**
* New dialog constructor.
*/
QgsNewMemoryLayerDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
~QgsNewMemoryLayerDialog() override;

Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsnewvectorlayerdialog.h
Expand Up @@ -44,6 +44,9 @@ class GUI_EXPORT QgsNewVectorLayerDialog: public QDialog, private Ui::QgsNewVect
static QString runAndCreateLayer( QWidget *parent = nullptr, QString *enc = nullptr, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem(),
const QString &initialPath = QString() );

/**
* New dialog constructor.
*/
QgsNewVectorLayerDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
~QgsNewVectorLayerDialog() override;
//! Returns the selected geometry type
Expand Down

0 comments on commit 08634c4

Please sign in to comment.