author | wimpie <wimpie> | 2004-04-09 18:04:30 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-09 18:04:30 (UTC) |
commit | 028717962deec0c2ff0e382221cbc2242393b79e (patch) (side-by-side diff) | |
tree | a5f00a3b3d229f838b6e40e34ca12f248b317813 /inputmethods/dasher/DasherInterface.cpp | |
parent | d17b9f7b64e004dcc301866f8122171218553b42 (diff) | |
download | opie-028717962deec0c2ff0e382221cbc2242393b79e.zip opie-028717962deec0c2ff0e382221cbc2242393b79e.tar.gz opie-028717962deec0c2ff0e382221cbc2242393b79e.tar.bz2 |
Removed warnings about initialization sequence in constructores
and unused variables and arguments
Diffstat (limited to 'inputmethods/dasher/DasherInterface.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/dasher/DasherInterface.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/inputmethods/dasher/DasherInterface.cpp b/inputmethods/dasher/DasherInterface.cpp index bb5b85e..4699687 100644 --- a/inputmethods/dasher/DasherInterface.cpp +++ b/inputmethods/dasher/DasherInterface.cpp @@ -1,80 +1,97 @@ // DasherInterface.cpp // ///////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2002 Iain Murray // ///////////////////////////////////////////////////////////////////////////// #include "DasherInterface.h" //#include "EnglishAlphabet.h" #include "CustomAlphabet.h" #include "DasherViewSquare.h" #include "PPMLanguageModel.h" #include <iostream> namespace { #include "stdio.h" } using namespace Dasher; using namespace std; const string CDasherInterface::EmptyString = ""; CDasherInterface::CDasherInterface() - : m_DashEditbox(0), m_DasherScreen(0), m_LanguageModel(0), TrainContext(0), m_Alphabet(0), - m_DasherModel(0), m_DasherView(0), AlphabetID(""), LanguageModelID(-1), ViewID(-1), - m_MaxBitRate(-1), m_Orientation(Opts::LeftToRight), m_SettingsStore(0), m_SettingsUI(0), - m_UserLocation("usr_"), m_SystemLocation("sys_"), m_AlphIO(0), m_TrainFile(""), - m_DasherFont(""), m_EditFont(""), m_EditFontSize(0), m_DrawKeyboard(false) + : m_Alphabet(0), + m_LanguageModel(0), + m_DasherModel(0), + m_DashEditbox(0), + m_DasherScreen(0), + m_DasherView(0), + m_SettingsStore(0), + m_SettingsUI(0), + m_AlphIO(0), + TrainContext(0), + AlphabetID(""), + LanguageModelID(-1), + ViewID(-1), + m_MaxBitRate(-1), + m_DrawKeyboard(false), + m_Orientation(Opts::LeftToRight), + m_UserLocation("usr_"), + m_SystemLocation("sys_"), + m_TrainFile(""), + m_DasherFont(""), + m_EditFont(""), + m_EditFontSize(0) { } CDasherInterface::~CDasherInterface() { if (m_LanguageModel) m_LanguageModel->ReleaseNodeContext(TrainContext); delete m_DasherModel; // The order of some of these deletions matters delete m_LanguageModel; // eg DasherModel has a pointer to LanguageModel. delete m_Alphabet; // DM baulks if LM is deleted before it is. delete m_DasherView; // Do NOT delete Edit box or Screen. This class did not create them. } void CDasherInterface::SetSettingsStore(CSettingsStore* SettingsStore) { delete m_SettingsStore; m_SettingsStore = SettingsStore; this->SettingsDefaults(m_SettingsStore); } void CDasherInterface::SetSettingsUI(CDasherSettingsInterface* SettingsUI) { delete m_SettingsUI; m_SettingsUI = SettingsUI; //this->SettingsDefaults(m_SettingsStore); m_SettingsUI->SettingsDefaults(m_SettingsStore); } void CDasherInterface::SetUserLocation(std::string UserLocation) { // Nothing clever updates. (At the moment) it is assumed that // this is set before anything much happens and that it does // not require changing. m_UserLocation = UserLocation; if (m_Alphabet!=0) m_TrainFile = m_UserLocation + m_Alphabet->GetTrainingFile(); } void CDasherInterface::SetSystemLocation(std::string SystemLocation) { // Nothing clever updates. (At the moment) it is assumed that // this is set before anything much happens and that it does |