Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ffes committed Mar 7, 2019
1 parent ea4c0ed commit d0a9652
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
21 changes: 0 additions & 21 deletions NppPlugin.cpp
Expand Up @@ -4,8 +4,6 @@
CNppPlugin::CNppPlugin()
{
m_hDllModule = NULL;
m_szDllFileName[0] = 0;
m_szIniFileName[0] = 0;
}

CNppPlugin::~CNppPlugin()
Expand All @@ -14,26 +12,7 @@ CNppPlugin::~CNppPlugin()

void CNppPlugin::OnDllProcessAttach( HINSTANCE hDLLInstance )
{
int nLen;
TCHAR szPath[2*MAX_PATH + 1];

m_hDllModule = ( HMODULE ) hDLLInstance;
nLen = ( int ) ::GetModuleFileName( m_hDllModule, szPath, 2*MAX_PATH );
while ( nLen-- > 0 ) {
if ( ( szPath[nLen] == _T( '\\' ) ) || ( szPath[nLen] == _T( '/' ) ) ) {
lstrcpy( m_szDllFileName, szPath + nLen + 1 );
lstrcpy( m_szIniFileName, m_szDllFileName );
break;
}
}

nLen = lstrlen( m_szIniFileName );
while ( nLen-- > 0 ) {
if ( m_szIniFileName[nLen] == _T( '.' ) ) {
lstrcpy( m_szIniFileName + nLen + 1, L"ini" );
break;
}
}
}

void CNppPlugin::OnDllProcessDetach() const
Expand Down
10 changes: 1 addition & 9 deletions NppPlugin.h
Expand Up @@ -7,8 +7,6 @@ class CNppPlugin
protected:
CNppMessager m_nppMsgr;
HMODULE m_hDllModule;
TCHAR m_szDllFileName[100];
TCHAR m_szIniFileName[100];

public:
CNppPlugin();
Expand All @@ -30,17 +28,11 @@ class CNppPlugin
// common n++ notification
virtual void OnNppSetInfo( const NppData& /*nppd*/ ) { }

const TCHAR* getDllFileName() const {
return m_szDllFileName;
}
HMODULE getDllModule() const {
return m_hDllModule;
}
const TCHAR* getIniFileName() const {
return m_szIniFileName;
}

HWND getNppWnd() const {
return m_nppMsgr.getNppWnd();
}

};

0 comments on commit d0a9652

Please sign in to comment.