summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/DasherNode.cpp
authorwimpie <wimpie>2004-04-09 18:04:30 (UTC)
committer wimpie <wimpie>2004-04-09 18:04:30 (UTC)
commit028717962deec0c2ff0e382221cbc2242393b79e (patch) (side-by-side diff)
treea5f00a3b3d229f838b6e40e34ca12f248b317813 /inputmethods/dasher/DasherNode.cpp
parentd17b9f7b64e004dcc301866f8122171218553b42 (diff)
downloadopie-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/DasherNode.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/DasherNode.cpp2
1 files changed, 1 insertions, 1 deletions
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
@@ -1,83 +1,83 @@
// DasherNode.cpp
//
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2001-2002 David Ward
//
/////////////////////////////////////////////////////////////////////////////
#include "DasherNode.h"
using namespace Dasher;
using namespace Opts;
using namespace std;
/////////////////////////////////////////////////////////////////////////////
void CDasherNode::Dump_node () const
{
/* TODO sort out
dchar out[256];
if (m_Symbol)
wsprintf(out,TEXT("%7x %3c %7x %5d %7x %5d %8x %8x \n"),this,m_Symbol,m_iGroup,m_context,m_Children,m_Cscheme,m_iLbnd,m_iHbnd);
else
wsprintf(out,TEXT("%7x %7x %5d %7x %5d %8x %8x \n"),this,m_iGroup,m_context,m_Children,m_Cscheme,m_iLbnd,m_iHbnd);
OutputDebugString(out);
if (m_Children) {
unsigned int i;
for (i=1;i<m_iChars;i++)
m_Children[i]->Dump_node();
}
*/
}
-void CDasherNode::Generic_Push_Node(CLanguageModel::CNodeContext *context) {
+void CDasherNode::Generic_Push_Node(CLanguageModel::CNodeContext *) {
m_iAge=0;
m_bAlive=true;
if (m_Symbol && !m_iChars) // make sure it's a valid symbol and don't enter if already done
m_languagemodel->EnterNodeSymbol(m_context,m_Symbol);
vector<symbol> newchars; // place to put this list of characters
vector<unsigned int> cum,groups; // for the probability list
m_languagemodel->GetNodeProbs(m_context,newchars,groups,cum,0.003);
m_iChars=newchars.size();
// work out cumulative probs
unsigned int i;
for (i=1;i<m_iChars;i++)
cum[i]+=cum[i-1];
m_Children =new CDasherNode *[m_iChars];
// create the children
ColorSchemes NormalScheme, SpecialScheme;
if ((m_ColorScheme==Nodes1) || (m_ColorScheme==Special1)) {
NormalScheme = Nodes2;
SpecialScheme = Special2;
} else {
NormalScheme = Nodes1;
SpecialScheme = Special1;
}
ColorSchemes ChildScheme;
for (i=1;i<m_iChars;i++) {
if (newchars[i]==this->m_languagemodel->GetSpaceSymbol())
ChildScheme = SpecialScheme;
else
ChildScheme = NormalScheme;
m_Children[i]=new CDasherNode(this,newchars[i],groups[i],i,ChildScheme,cum[i-1],cum[i],m_languagemodel,m_languagemodel->GetColour(i));
}
}
/////////////////////////////////////////////////////////////////////////////
void CDasherNode::Push_Node(CLanguageModel::CNodeContext *context)
// push a node copying the specified context
{
if (m_Children) {
// if there are children just give them a poke
unsigned int i;
for (i=1;i<m_iChars;i++) {