Types - T_Optional access
Changed so it's relatively similar to the interface of pointers.
This commit is contained in:
parent
82fc8406b3
commit
46fa84d967
5 changed files with 48 additions and 21 deletions
src
|
@ -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 );
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue