@@ -540,11 +540,11 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
540
540
bool isMaterializedView = relkind == QLatin1String ( " m" );
541
541
QString comment = result.PQgetvalue ( idx, 7 );
542
542
543
- int srid = ssrid.isEmpty () ? INT_MIN : ssrid.toInt ();
543
+ int srid = ssrid.isEmpty () ? std::numeric_limits< int >:: min () : ssrid.toInt ();
544
544
if ( majorVersion () >= 2 && srid == 0 )
545
545
{
546
546
// 0 doesn't constraint => detect
547
- srid = INT_MIN ;
547
+ srid = std::numeric_limits< int >:: min () ;
548
548
}
549
549
550
550
#if 0
@@ -665,7 +665,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
665
665
// QgsDebugMsg( QString( "%1.%2.%3: %4" ).arg( schemaName ).arg( tableName ).arg( column ).arg( relkind ) );
666
666
667
667
layerProperty.types = QList<QgsWkbTypes::Type>() << QgsWkbTypes::Unknown;
668
- layerProperty.srids = QList<int >() << INT_MIN ;
668
+ layerProperty.srids = QList<int >() << std::numeric_limits< int >:: min () ;
669
669
layerProperty.schemaName = schemaName;
670
670
layerProperty.tableName = tableName;
671
671
layerProperty.geometryColName = column;
@@ -754,7 +754,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
754
754
// QgsDebugMsg( QString( "%1.%2: %3" ).arg( schema ).arg( table ).arg( relkind ) );
755
755
756
756
layerProperty.types = QList<QgsWkbTypes::Type>() << QgsWkbTypes::NoGeometry;
757
- layerProperty.srids = QList<int >() << INT_MIN ;
757
+ layerProperty.srids = QList<int >() << std::numeric_limits< int >:: min () ;
758
758
layerProperty.schemaName = schema;
759
759
layerProperty.tableName = table;
760
760
layerProperty.geometryColName = QString ();
@@ -1486,8 +1486,8 @@ void QgsPostgresConn::retrieveLayerTypes( QgsPostgresLayerProperty &layerPropert
1486
1486
1487
1487
query += ' ,' ;
1488
1488
1489
- int srid = layerProperty.srids .value ( 0 , INT_MIN );
1490
- if ( srid == INT_MIN )
1489
+ int srid = layerProperty.srids .value ( 0 , std::numeric_limits< int >:: min () );
1490
+ if ( srid == std::numeric_limits< int >:: min () )
1491
1491
{
1492
1492
query += QStringLiteral ( " %1(%2%3)" )
1493
1493
.arg ( majorVersion () < 2 ? " srid" : " st_srid" ,
0 commit comments