Permalink
Browse files

clang-tidy: google-readability-redundant-smartptr-get

  • Loading branch information...
jhasse committed Sep 10, 2018
1 parent a4ec7c3 commit f7349f33b0e24ff9650e25881d773f56300ab428
Showing with 5 additions and 8 deletions.
  1. +2 −2 .clang-tidy
  2. +3 −6 src/utils/wxfbipc.cpp
View
@@ -1,6 +1,6 @@
---
Checks: 'modernize-use-override,readability-implicit-bool-conversion,modernize-deprecated-headers,readability-delete-null-pointer,readability-redundant-member-init'
WarningsAsErrors: 'modernize-use-override,readability-implicit-bool-conversion,modernize-deprecated-headers,readability-delete-null-pointer,clang-analyzer-core.CallAndMessage'
Checks: 'modernize-use-override,readability-implicit-bool-conversion,modernize-deprecated-headers,readability-delete-null-pointer,readability-redundant-member-init,google-readability-redundant-smartptr-get'
WarningsAsErrors: 'modernize-use-override,readability-implicit-bool-conversion,modernize-deprecated-headers,readability-delete-null-pointer,clang-analyzer-core.CallAndMessage,google-readability-redundant-smartptr-get'
CheckOptions:
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: '1'
View
@@ -82,8 +82,7 @@ bool wxFBIPC::VerifySingleInstance( const wxString& file, bool switchTo )
#endif
// Check to see if I already have a server with this name - if so, no need to make another!
if ( m_server.get() )
{
if (m_server) {
if ( m_server->m_name == name )
{
return true;
@@ -125,8 +124,7 @@ bool wxFBIPC::VerifySingleInstance( const wxString& file, bool switchTo )
// so temporarily drop the server if there is one
bool hadServer = false;
wxString oldName;
if ( m_server.get() != NULL )
{
if (m_server) {
oldName = m_server->m_name;
m_server.reset();
hadServer = true;
@@ -145,8 +143,7 @@ bool wxFBIPC::VerifySingleInstance( const wxString& file, bool switchTo )
{
wxString sPort = wxString::Format( "%i", i );
connection.reset( client->MakeConnection( "localhost", sPort, name ) );
if ( NULL != connection.get() )
{
if (connection) {
connected = true;
wxChar* pid = (wxChar*)connection->Request( wxT("PID"), NULL );
if ( NULL != pid )

0 comments on commit f7349f3

Please sign in to comment.