11/*
2- NppFTP: FTP/SFTP functionality for Notepad++
3- Copyright (C) 2010 Harry (harrybharry@users.sourceforge.net)
2+ NppFTP: FTP/SFTP functionality for Notepad++
3+ Copyright (C) 2010 Harry (harrybharry@users.sourceforge.net)
44
5- This program is free software: you can redistribute it and/or modify
6- it under the terms of the GNU General Public License as published by
7- the Free Software Foundation, either version 3 of the License, or
8- (at your option) any later version.
5+ This program is free software: you can redistribute it and/or modify
6+ it under the terms of the GNU General Public License as published by
7+ the Free Software Foundation, either version 3 of the License, or
8+ (at your option) any later version.
99
10- This program is distributed in the hope that it will be useful,
11- but WITHOUT ANY WARRANTY; without even the implied warranty of
12- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13- GNU General Public License for more details.
10+ This program is distributed in the hope that it will be useful,
11+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+ GNU General Public License for more details.
1414
15- You should have received a copy of the GNU General Public License
16- along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ You should have received a copy of the GNU General Public License
16+ along with this program. If not, see <http://www.gnu.org/licenses/>.
1717*/
1818
1919#include " StdInc.h"
2222#include " Encryption.h"
2323#include " InputDialog.h"
2424
25- bool _DebugMode = false ;
25+ bool FTPSettings::m_debugMode = false ;
2626
2727FTPSettings::FTPSettings () :
2828 m_clearCache(false ),
@@ -32,7 +32,7 @@ FTPSettings::FTPSettings() :
3232{
3333 m_globalCachePath = SU::DupString (TEXT (" %CONFIGDIR%\\ Cache\\ %USERNAME%@%HOSTNAME%" ));
3434
35- PathMap globalPathmap;
35+ PathMap globalPathmap{} ;
3636 globalPathmap.localpath = SU::DupString (m_globalCachePath);
3737 globalPathmap.externalpath = SU::strdup (" /" );
3838 m_globalCache.Clear ();
@@ -53,7 +53,7 @@ int FTPSettings::SetGlobalCachePath(const TCHAR * path) {
5353 path = TEXT (" %CONFIGDIR%\\ Cache\\ %USERNAME%@%HOSTNAME%\\ %PORT%" );
5454 }
5555
56- PathMap globalPathmap;
56+ PathMap globalPathmap{} ;
5757 globalPathmap.localpath = SU::DupString (path);
5858 globalPathmap.externalpath = SU::strdup (" /" );
5959 m_globalCache.Clear ();
@@ -78,13 +78,12 @@ int FTPSettings::SetEncryptionKey(const char * key) {
7878 return 0 ;
7979}
8080
81- bool FTPSettings::GetDebugMode () const {
81+ bool FTPSettings::GetDebugMode () {
8282 return m_debugMode;
8383}
8484
8585int FTPSettings::SetDebugMode (bool debugMode) {
8686 m_debugMode = debugMode;
87- _DebugMode = m_debugMode;
8887 return 0 ;
8988}
9089
@@ -187,14 +186,13 @@ int FTPSettings::LoadSettings(const TiXmlElement * settingsElem) {
187186 clearState = 0 ;
188187 }
189188 m_clearCache = (clearState != 0 );
190-
189+
191190 int debugModeState = 0 ;
192191 const char * debugModeStr = settingsElem->Attribute (" debugMode" , &debugModeState);
193192 if (!debugModeStr) {
194193 debugModeState = 0 ;
195194 }
196195 m_debugMode = (debugModeState != 0 );
197- _DebugMode = m_debugMode;
198196
199197
200198 clearState = 0 ;
@@ -207,7 +205,7 @@ int FTPSettings::LoadSettings(const TiXmlElement * settingsElem) {
207205 return 0 ;
208206}
209207
210- int FTPSettings::SaveSettings (TiXmlElement * settingsElem) {
208+ int FTPSettings::SaveSettings (TiXmlElement * settingsElem) const {
211209 char * defaultCacheutf8 = SU::TCharToUtf8 (m_globalCachePath);
212210 settingsElem->SetAttribute (" defaultCache" , defaultCacheutf8);
213211 SU::FreeChar (defaultCacheutf8);
0 commit comments