Skip to content
Permalink
Browse files

Use .at(0) instead of .left(1), as it avoids string allocation

Thanks to Clazy
  • Loading branch information
nyalldawson committed Aug 29, 2017
1 parent cca964a commit 7e9428f6ac1d4f257b2bc22882f03b9400015dd8
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/wfs/qgswfsprovider.cpp
@@ -1363,7 +1363,7 @@ bool QgsWFSProvider::readAttributesFromSchema( QDomDocument &schemaDoc,
geometryAttribute = ref.mid( 4 ); // Strip gml: prefix
QString propertyType( gmlRefProperty.cap( 1 ) );
// Set the first character in upper case
propertyType = propertyType.left( 1 ).toUpper() + propertyType.mid( 1 );
propertyType = propertyType.at( 0 ).toUpper() + propertyType.mid( 1 );
geomType = geomTypeFromPropertyType( geometryAttribute, propertyType );
}
else if ( !name.isEmpty() ) //todo: distinguish between numerical and non-numerical types

0 comments on commit 7e9428f

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