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 7e9428f
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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.