Types - T_Optional access

Changed so it's relatively similar to the interface of pointers.
This commit is contained in:
Emmanuel BENOîT 2017-11-07 17:40:02 +01:00
parent 82fc8406b3
commit 46fa84d967
5 changed files with 48 additions and 21 deletions

View file

@ -1430,7 +1430,7 @@ T_String T_String::trim( ) const noexcept
while ( !it.atEnd( ) ) {
T_Character c( it );
if ( !c.isWhitespace( ) ) {
if ( !firstNws.present( ) ) {
if ( !firstNws ) {
firstNws = it.index( );
}
lastNws = it.index( );
@ -1438,10 +1438,10 @@ T_String T_String::trim( ) const noexcept
it.next( );
}
if ( !firstNws.present( ) ) {
if ( !firstNws ) {
return T_String( );
}
return range( firstNws , lastNws );
return range( *firstNws , lastNws );
}
/*----------------------------------------------------------------------------*/