Skip to content

Commit 7e9428f

Browse files
committed
Use .at(0) instead of .left(1), as it avoids string allocation
Thanks to Clazy
1 parent cca964a commit 7e9428f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/wfs/qgswfsprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ bool QgsWFSProvider::readAttributesFromSchema( QDomDocument &schemaDoc,
13631363
geometryAttribute = ref.mid( 4 ); // Strip gml: prefix
13641364
QString propertyType( gmlRefProperty.cap( 1 ) );
13651365
// Set the first character in upper case
1366-
propertyType = propertyType.left( 1 ).toUpper() + propertyType.mid( 1 );
1366+
propertyType = propertyType.at( 0 ).toUpper() + propertyType.mid( 1 );
13671367
geomType = geomTypeFromPropertyType( geometryAttribute, propertyType );
13681368
}
13691369
else if ( !name.isEmpty() ) //todo: distinguish between numerical and non-numerical types

0 commit comments

Comments
 (0)