diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-08 14:11:35 +0100 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-03-08 13:16:49 +0000 |
commit | 4bf95c4c31dd871065d4042028a4b3ae476dab70 (patch) | |
tree | 2935dfd660fc2ee2b914ca27a72077e51e5862f3 /vcl/headless | |
parent | 596334776ad45f7ab87937615fa1d4e7d2d0fd42 (diff) |
make use of startsWith()
Change-Id: Ie70097de550ddd1cddc6714f8f86f9723cb36679
Reviewed-on: https://gerrit.libreoffice.org/2599
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'vcl/headless')
-rw-r--r-- | vcl/headless/svpelement.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/headless/svpelement.cxx b/vcl/headless/svpelement.cxx index ee5fb00ce126..5458fe8a7539 100644 --- a/vcl/headless/svpelement.cxx +++ b/vcl/headless/svpelement.cxx @@ -163,7 +163,7 @@ IMPL_LINK( SvpElementContainer, processRequest, void*, pSocket ) while( read( nFile, &c, 1 ) && c != '\n' ) aBuf.append( sal_Char(c) ); rtl::OString aCommand( aBuf.makeStringAndClear() ); - if( aCommand.compareTo( "list", 4 ) == 0 ) + if( aCommand.startsWith( "list" ) ) { boost::unordered_map< rtl::OString, std::list<SvpElement*>, rtl::OStringHash > aMap; for( std::list< SvpElement* >::const_iterator it = m_aElements.begin(); @@ -186,7 +186,7 @@ IMPL_LINK( SvpElementContainer, processRequest, void*, pSocket ) } } } - else if( aCommand.compareTo( "get", 3 ) == 0 ) + else if( aCommand.startsWith( "get" ) ) { sal_IntPtr aId = aCommand.copy( 3 ).toInt64( 16 ); SvpElement* pElement = reinterpret_cast<SvpElement*>(aId); @@ -212,7 +212,7 @@ IMPL_LINK( SvpElementContainer, processRequest, void*, pSocket ) } } } - else if( aCommand.compareTo( "quit", 4 ) == 0 ) + else if( aCommand.startsWith( "quit" ) ) { Application::Quit(); close( m_nSocket ); |