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 | |
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
21 files changed, 118 insertions, 79 deletions
diff --git a/inputmethods/dasher/AlphIO.cpp b/inputmethods/dasher/AlphIO.cpp index 41b1b23..96ca14a 100644 --- a/inputmethods/dasher/AlphIO.cpp +++ b/inputmethods/dasher/AlphIO.cpp @@ -16,4 +16,6 @@ using namespace std; CAlphIO::CAlphIO(string SystemLocation, string UserLocation) - : SystemLocation(SystemLocation), UserLocation(UserLocation), - BlankInfo(), CData("") + : BlankInfo(), + SystemLocation(SystemLocation), + UserLocation(UserLocation), + CData("") { @@ -40,3 +42,3 @@ const CAlphIO::AlphInfo& CAlphIO::GetInfo(const std::string& AlphID) else { - AlphInfo& CurInfo = Alphabets[AlphID]; + // AlphInfo& CurInfo = Alphabets[AlphID]; Alphabets[AlphID].AlphID = AlphID; // Ensure consistency diff --git a/inputmethods/dasher/Alphabet.cpp b/inputmethods/dasher/Alphabet.cpp index dc58b35..6327d8a 100644 --- a/inputmethods/dasher/Alphabet.cpp +++ b/inputmethods/dasher/Alphabet.cpp @@ -18,3 +18,3 @@ using namespace std; -CAlphabet::CAlphabet() : m_Groups(0), m_DefaultEncoding(Opts::Western), m_Orientation(Opts::LeftToRight) +CAlphabet::CAlphabet() : m_DefaultEncoding(Opts::Western), m_Orientation(Opts::LeftToRight), m_Groups(0) { @@ -33,3 +33,3 @@ void CAlphabet::GetSymbols(vector<symbol>* Symbols, string* Input, bool IsMore) bool KeyIsPrefix; - int z= Input->size(); + // int z= Input->size(); int extras; diff --git a/inputmethods/dasher/AlphabetMap.cpp b/inputmethods/dasher/AlphabetMap.cpp index 09e2c72..c687e45 100644 --- a/inputmethods/dasher/AlphabetMap.cpp +++ b/inputmethods/dasher/AlphabetMap.cpp @@ -14,3 +14,3 @@ using namespace std; alphabet_map::alphabet_map(unsigned int InitialTableSize) - : Undefined(0), HashTable(InitialTableSize<<1) + : HashTable(InitialTableSize<<1), Undefined(0) { diff --git a/inputmethods/dasher/AlphabetMap.h b/inputmethods/dasher/AlphabetMap.h index 3aac1f5..62f20d9 100644 --- a/inputmethods/dasher/AlphabetMap.h +++ b/inputmethods/dasher/AlphabetMap.h @@ -70,3 +70,3 @@ private: Entry(std::string Key, symbol Symbol, Entry* Next) - : Key(Key), Symbol(Symbol), Next(Next), KeyIsPrefix(false) {} + : Key(Key), KeyIsPrefix(false), Symbol(Symbol), Next(Next) {} diff --git a/inputmethods/dasher/DashEdit.h b/inputmethods/dasher/DashEdit.h index dc14d15..0baeec9 100644 --- a/inputmethods/dasher/DashEdit.h +++ b/inputmethods/dasher/DashEdit.h @@ -25,3 +25,3 @@ class Dasher::CDashEditbox public: - CDashEditbox() : m_iFlushed(0), m_DasherInterface(0), m_dirty(false) {} + CDashEditbox() : m_dirty(false),m_iFlushed(0), m_DasherInterface(0) {} @@ -47,3 +47,3 @@ public: //! Delete flushed text from the editbox - virtual inline void unflush()=0; + virtual void unflush()=0; @@ -67,3 +67,3 @@ public: //! filename or in file metadata - virtual void TimeStampNewFiles(bool Value) {} + virtual void TimeStampNewFiles(bool ) {} @@ -77,3 +77,3 @@ public: //! save dialogue when Save() is called - virtual void New(const std::string& filename) {}; // filename can be "", but you cannot call Save() without having set a filename. + virtual void New(const std::string& ) {}; // filename can be "", but you cannot call Save() without having set a filename. @@ -84,3 +84,3 @@ public: //! false otherwise - virtual bool Open(const std::string& filename) {return false;}; + virtual bool Open(const std::string& ) {return false;}; @@ -92,3 +92,3 @@ public: //! otherwise - virtual bool OpenAppendMode(const std::string& filename) {return false;}; + virtual bool OpenAppendMode(const std::string& ) {return false;}; //! Save a file as a provided filename (optional) @@ -98,3 +98,3 @@ public: //! false otherwise - virtual bool SaveAs(const std::string& filename) {return false;}; + virtual bool SaveAs(const std::string& ) {return false;}; 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 @@ -27,7 +27,24 @@ 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) { diff --git a/inputmethods/dasher/DasherInterface.h b/inputmethods/dasher/DasherInterface.h index 6338801..7c4496f 100644 --- a/inputmethods/dasher/DasherInterface.h +++ b/inputmethods/dasher/DasherInterface.h @@ -40,3 +40,3 @@ public: CDasherInterface(); - ~CDasherInterface(); + virtual ~CDasherInterface(); diff --git a/inputmethods/dasher/DasherModel.cpp b/inputmethods/dasher/DasherModel.cpp index 0450d66..f15fa49 100644 --- a/inputmethods/dasher/DasherModel.cpp +++ b/inputmethods/dasher/DasherModel.cpp @@ -19,3 +19,3 @@ using namespace std; CDasherModel::CDasherModel(CDashEditbox* Editbox, CLanguageModel* LanguageModel, bool Dimensions) - : m_editbox(Editbox), m_languagemodel(LanguageModel), m_Root(0), m_Dimensions(Dimensions) + : m_Dimensions(Dimensions), m_editbox(Editbox), m_languagemodel(LanguageModel), m_Root(0) { @@ -107,3 +107,3 @@ void CDasherModel::Get_string_under_mouse(const myint Mousex,const myint Mousey, -void CDasherModel::Flush(const myint Mousex,const myint Mousey) +void CDasherModel::Flush(const myint ,const myint ) { @@ -186,3 +186,3 @@ void CDasherModel::Get_new_root_coords(myint Mousex,myint Mousey) { - int cappedrate=0; + // int cappedrate=0; double dRx=1.0,dRxnew=1.0; @@ -245,3 +245,3 @@ void CDasherModel::Get_new_root_coords(myint Mousex,myint Mousey) -void CDasherModel::Tap_on_display(myint miMousex,myint miMousey, unsigned long Time) +void CDasherModel::Tap_on_display(myint miMousex,myint miMousey, unsigned long ) // work out the next viewpoint, opens some new nodes diff --git a/inputmethods/dasher/DasherNode.cpp b/inputmethods/dasher/DasherNode.cpp index 26af10f..3a984ef 100644 --- a/inputmethods/dasher/DasherNode.cpp +++ b/inputmethods/dasher/DasherNode.cpp @@ -34,3 +34,3 @@ void CDasherNode::Dump_node () const -void CDasherNode::Generic_Push_Node(CLanguageModel::CNodeContext *context) { +void CDasherNode::Generic_Push_Node(CLanguageModel::CNodeContext *) { diff --git a/inputmethods/dasher/DasherNode.h b/inputmethods/dasher/DasherNode.h index 705a9d4..fb00d47 100644 --- a/inputmethods/dasher/DasherNode.h +++ b/inputmethods/dasher/DasherNode.h @@ -76,5 +76,19 @@ using namespace Opts; -inline CDasherNode::CDasherNode(CDasherNode *parent,symbol Symbol, unsigned int igroup, int iphase, ColorSchemes ColorScheme,int ilbnd,int ihbnd,CLanguageModel *lm, int Colour=0) - : m_parent(parent),m_Symbol(Symbol),m_iGroup(igroup),m_iLbnd(ilbnd),m_iHbnd(ihbnd),m_languagemodel(lm),m_iPhase(iphase), - m_context(0), m_iAge(0), m_bAlive(1), m_Children(0), m_bForce(false), m_iChars(0), m_ColorScheme(ColorScheme), m_bControlChild(false), m_iColour(Colour) +inline CDasherNode::CDasherNode(CDasherNode *parent,symbol Symbol, unsigned int igroup, int iphase, ColorSchemes ColorScheme,int ilbnd,int ihbnd,CLanguageModel *lm, int Colour=0) : + m_iLbnd(ilbnd), + m_iHbnd(ihbnd), + m_iGroup(igroup), + m_iChars(0), + m_iAge(0), + m_bAlive(1), + m_bControlChild(false), + m_ColorScheme(ColorScheme), + m_iPhase(iphase), + m_iColour(Colour), + m_Symbol(Symbol), + m_languagemodel(lm), + m_Children(0), + m_parent(parent), + m_context(0), + m_bForce(false) { diff --git a/inputmethods/dasher/DasherSettingsInterface.h b/inputmethods/dasher/DasherSettingsInterface.h index 9d03eba..34b55d4 100644 --- a/inputmethods/dasher/DasherSettingsInterface.h +++ b/inputmethods/dasher/DasherSettingsInterface.h @@ -23,27 +23,27 @@ public: //! Change the alphabet in use to NewAlphabetID - virtual void ChangeAlphabet(const std::string& NewAlphabetID) {}; + virtual void ChangeAlphabet(const std::string& ) {}; //! Change the maximum bitrate (effectively the speed) of Dasher - virtual void ChangeMaxBitRate(double NewMaxBitRate) {}; + virtual void ChangeMaxBitRate(double ) {}; //! Generate a new langage model. Not usually needed - virtual void ChangeLanguageModel(unsigned int NewLanguageModelID) {}; + virtual void ChangeLanguageModel(unsigned int ) {}; //! Generate a new view of the model. Call it with 0 when starting up - virtual void ChangeView(unsigned int NewViewID) {}; + virtual void ChangeView(unsigned int ) {}; //! Change the orientation (l->r, r->l, so on) of the model - virtual void ChangeOrientation(Opts::ScreenOrientations Orientation) {}; + virtual void ChangeOrientation(Opts::ScreenOrientations ) {}; //! Set the file encoding of output files to Encoding - virtual void SetFileEncoding(Opts::FileEncodingFormats Encoding) {}; + virtual void SetFileEncoding(Opts::FileEncodingFormats ) {}; //! Inform the core that the screen has this size - virtual void SetScreenSize(long Width, long Height) {}; + virtual void SetScreenSize(long , long ) {}; //! Set the size of the font used in the Dasher canvas - virtual void SetDasherFontSize(Dasher::Opts::FontSize fontsize) {}; + virtual void SetDasherFontSize(Dasher::Opts::FontSize ) {}; //! Set the number of dimensions of input (either 1 or 2) - virtual void SetDasherDimensions(bool Value) {}; + virtual void SetDasherDimensions(bool ) {}; @@ -55,45 +55,45 @@ public: //! True if toolbar should be shown, false otherwise - virtual void ShowToolbar(bool Value) {}; + virtual void ShowToolbar(bool ) {}; //! True if toolbar should show text, false otherwse - virtual void ShowToolbarText(bool Value) {}; + virtual void ShowToolbarText(bool ) {}; //! True if toolbar should have large icons, false otherwise - virtual void ShowToolbarLargeIcons(bool Value) {}; + virtual void ShowToolbarLargeIcons(bool ) {}; //! True if the speed slider should be shown, false otherwise - virtual void ShowSpeedSlider(bool Value) {}; + virtual void ShowSpeedSlider(bool ) {}; //! True if the window layout should be fixed, false otherwise - virtual void FixLayout(bool Value) {}; + virtual void FixLayout(bool ) {}; //! True if new files should be timestamped, false otherwise - virtual void TimeStampNewFiles(bool Value) {}; + virtual void TimeStampNewFiles(bool ) {}; //! True if all text should be copied to clipboard when Dasher is stopped, false otherwise - virtual void CopyAllOnStop(bool Value) {}; + virtual void CopyAllOnStop(bool ) {}; //! True if a box should be drawn to represent the logical position of the mouse - virtual void DrawMouse(bool Value) {}; + virtual void DrawMouse(bool ) {}; //! Set the editbox font - virtual void SetEditFont(std::string Name, long Size) {}; + virtual void SetEditFont(std::string , long ) {}; //! Set the canvas font - virtual void SetDasherFont(std::string Name) {}; + virtual void SetDasherFont(std::string ) {}; //! Set the height of the edit box - virtual void SetEditHeight(long Value) {}; + virtual void SetEditHeight(long ) {}; //! Should Dasher start and stop on space bar? - virtual void StartOnSpace(bool Value) {}; + virtual void StartOnSpace(bool ) {}; //! Should Dasher start and stop on left mouse button? - virtual void StartOnLeft(bool Value) {}; + virtual void StartOnLeft(bool ) {}; //! Should Dasher be keyboard controlled? - virtual void KeyControl(bool Value) {}; + virtual void KeyControl(bool ) {}; //! Should Dasher pause when the pointer leaves the window? - virtual void WindowPause(bool Value) {}; + virtual void WindowPause(bool ) {}; }; diff --git a/inputmethods/dasher/DasherView.cpp b/inputmethods/dasher/DasherView.cpp index 3b8cb64..8e32cf1 100644 --- a/inputmethods/dasher/DasherView.cpp +++ b/inputmethods/dasher/DasherView.cpp @@ -26,3 +26,3 @@ void CDasherView::ChangeOrientation(Dasher::Opts::ScreenOrientations Orientation -void CDasherView::FlushAt(int mousex,int mousey) +void CDasherView::FlushAt(int ,int ) { @@ -33,3 +33,3 @@ int CDasherView::RecursiveRender(CDasherNode* Render, myint y1,myint y2,int most { - symbol CurChar = Render->Symbol(); + // symbol CurChar = Render->Symbol(); int Color; diff --git a/inputmethods/dasher/DasherView.h b/inputmethods/dasher/DasherView.h index 81cc24e..6257c03 100644 --- a/inputmethods/dasher/DasherView.h +++ b/inputmethods/dasher/DasherView.h @@ -30,3 +30,3 @@ public: CDasherView(CDasherScreen* DasherScreen, CDasherModel& DasherModel, Dasher::Opts::ScreenOrientations Orientation=Dasher::Opts::LeftToRight); - ~CDasherView() {} + virtual ~CDasherView() {} diff --git a/inputmethods/dasher/PPMLanguageModel.cpp b/inputmethods/dasher/PPMLanguageModel.cpp index b725a2b..137b07f 100644 --- a/inputmethods/dasher/PPMLanguageModel.cpp +++ b/inputmethods/dasher/PPMLanguageModel.cpp @@ -74,3 +74,3 @@ CPPMLanguageModel::~CPPMLanguageModel() -bool CPPMLanguageModel::GetProbs(CContext *context,vector<unsigned int> &probs,double addprob) +bool CPPMLanguageModel::GetProbs(CContext *context,vector<unsigned int> &probs,double ) // get the probability distribution at the context @@ -87,3 +87,3 @@ bool CPPMLanguageModel::GetProbs(CContext *context,vector<unsigned int> &probs,d int sym; - ulong spent=0; + // ulong spent=0; ulong size_of_slice; @@ -194,3 +194,3 @@ void CPPMLanguageModel::EnterSymbol(CContext* Context, modelchar Symbol) CPPMnode *find; - CPPMnode *temp=context.head; + // CPPMnode *temp=context.head; @@ -248,3 +248,3 @@ void CPPMLanguageModel::dumpString( char *str, int pos, int len ) -void CPPMLanguageModel::dumpTrie( CPPMLanguageModel::CPPMnode *t, int d ) +void CPPMLanguageModel::dumpTrie( CPPMLanguageModel::CPPMnode *, int ) // diagnostic display of the PPM trie from node t and deeper diff --git a/inputmethods/dasher/PPMLanguageModel.h b/inputmethods/dasher/PPMLanguageModel.h index bd860b8..7025a0a 100644 --- a/inputmethods/dasher/PPMLanguageModel.h +++ b/inputmethods/dasher/PPMLanguageModel.h @@ -18,3 +18,3 @@ -static char dumpTrieStr[40000]; +// static char dumpTrieStr[40000]; const int MAX_ORDER = 5; @@ -27,3 +27,3 @@ public: CPPMLanguageModel(CAlphabet *_alphabet, int _normalization); - ~CPPMLanguageModel(); + virtual ~CPPMLanguageModel(); @@ -43,3 +43,4 @@ public: public: - CPPMContext(CPPMContext const &input) {head = input.head; order= input.order;} + CPPMContext(CPPMContext const &input) : CContext(input) + { head = input.head;order= input.order;} CPPMContext(CPPMnode* _head=0, int _order=0) : head(_head),order(_order) {}; diff --git a/inputmethods/dasher/QtDasherImpl.cc b/inputmethods/dasher/QtDasherImpl.cc index d72f6d9..f4a70dd 100644 --- a/inputmethods/dasher/QtDasherImpl.cc +++ b/inputmethods/dasher/QtDasherImpl.cc @@ -23,3 +23,3 @@ static const char * qtdasher_xpm[]={ QtDasherImpl::QtDasherImpl() - : qtdasherwidget(0), icn(0), qtdasherinterface(0) + : qtdasherinterface(0), qtdasherwidget(0), icn(0) { diff --git a/inputmethods/dasher/QtDasherPlugin.cc b/inputmethods/dasher/QtDasherPlugin.cc index cf4fc2c..f491769 100644 --- a/inputmethods/dasher/QtDasherPlugin.cc +++ b/inputmethods/dasher/QtDasherPlugin.cc @@ -51,3 +51,3 @@ void QtDasherPlugin::unflush() return; - for (flushcount; flushcount>0; flushcount--) { + for (; flushcount>0; flushcount--) { deletetext(); diff --git a/inputmethods/dasher/QtDasherPlugin.h b/inputmethods/dasher/QtDasherPlugin.h index 5f70acf..c979a2f 100644 --- a/inputmethods/dasher/QtDasherPlugin.h +++ b/inputmethods/dasher/QtDasherPlugin.h @@ -24,3 +24,3 @@ public: void SetEncoding(Dasher::Opts::FileEncodingFormats) {}; - void SetFont(std::string Name, long Size) {}; + void SetFont(std::string , long ) {}; diff --git a/inputmethods/dasher/QtDasherScreen.cc b/inputmethods/dasher/QtDasherScreen.cc index 747b705..2179cfb 100644 --- a/inputmethods/dasher/QtDasherScreen.cc +++ b/inputmethods/dasher/QtDasherScreen.cc @@ -20,6 +20,9 @@ QtDasherScreen::QtDasherScreen (int _width, int _height, CDasherInterface *_interface, - QWidget * _parent, Dasher::CDashEditbox *edit): - QWidget(_parent), interface( _interface ), - fontname( "fixed" ), fontsize(12), - Dasher::CDasherScreen(_width, _height) + QWidget * _parent, + Dasher::CDashEditbox *_edit): + QWidget(_parent), + Dasher::CDasherScreen(_width, _height), + fontsize(12), + interface( _interface ), + fontname( "fixed" ) { @@ -34,3 +37,5 @@ QtDasherScreen::QtDasherScreen (int _width, int _height, interface->ChangeView(0); - interface->ChangeEdit(edit); + interface->ChangeEdit(_edit); + edit = _edit; + @@ -145,3 +150,3 @@ void QtDasherScreen::DrawPolygon(point* Points, int Number, int Color, -void QtDasherScreen::mousePressEvent (QMouseEvent *e) +void QtDasherScreen::mousePressEvent (QMouseEvent *) { diff --git a/inputmethods/dasher/QtDasherScreen.h b/inputmethods/dasher/QtDasherScreen.h index 06689d6..d3d67cb 100644 --- a/inputmethods/dasher/QtDasherScreen.h +++ b/inputmethods/dasher/QtDasherScreen.h @@ -38,3 +38,3 @@ class QtDasherScreen : public QWidget, public Dasher::CDasherScreen - void SetFontSize(Dasher::Opts::FontSize fontsize) + void SetFontSize(Dasher::Opts::FontSize ) { @@ -48,3 +48,3 @@ class QtDasherScreen : public QWidget, public Dasher::CDasherScreen - void TextSize(symbol Character, int* Width, int* Height, int Size) const + void TextSize(symbol , int* Width, int* Height, int ) const { diff --git a/inputmethods/dasher/SettingsStore.cpp b/inputmethods/dasher/SettingsStore.cpp index c5bbfea..f7661bd 100644 --- a/inputmethods/dasher/SettingsStore.cpp +++ b/inputmethods/dasher/SettingsStore.cpp @@ -104,3 +104,3 @@ functions are over-ridden. -bool CSettingsStore::LoadSetting(const string& Key, bool* Value) +bool CSettingsStore::LoadSetting(const string& , bool* ) { @@ -110,3 +110,3 @@ bool CSettingsStore::LoadSetting(const string& Key, bool* Value) -bool CSettingsStore::LoadSetting(const string& Key, long* Value) +bool CSettingsStore::LoadSetting(const string& , long* ) { @@ -116,3 +116,3 @@ bool CSettingsStore::LoadSetting(const string& Key, long* Value) -bool CSettingsStore::LoadSetting(const string& Key, string* Value) +bool CSettingsStore::LoadSetting(const string& , string* ) { @@ -122,3 +122,3 @@ bool CSettingsStore::LoadSetting(const string& Key, string* Value) -void CSettingsStore::SaveSetting(const string& Key, bool Value) +void CSettingsStore::SaveSetting(const string& , bool ) { @@ -127,3 +127,3 @@ void CSettingsStore::SaveSetting(const string& Key, bool Value) -void CSettingsStore::SaveSetting(const string& Key, long Value) +void CSettingsStore::SaveSetting(const string& , long ) { @@ -132,3 +132,3 @@ void CSettingsStore::SaveSetting(const string& Key, long Value) -void CSettingsStore::SaveSetting(const string& Key, const string& Value) +void CSettingsStore::SaveSetting(const string& , const string& ) { |